auth: create user object regardless of login
[minimedit.git] / foto / album.inc.php
index 6d706ca99769bd5c37a3dfc7c46d20c2f55f1cb4..92a7395f1df4c263f7cd40303013300b1cea7f0b 100644 (file)
@@ -24,7 +24,7 @@ function openphotoswipe(index) {
                closeElClasses: [], 
                shareButtons: [
 <?php
-if ($User and $User->admin) {
+if ($User->admin('foto')) {
        printf("\t\t\t{id:'%s', label:'%s', url:'%s'},\n",
                'cover', 'Cover instellen', "/edit/foto/cover$Args?img={{image_url}}"
        );
@@ -74,7 +74,6 @@ function imgjustify() {
                targetRowHeight: 200,
        };
        var layout = require('justified-layout')(ratios, config);
-       var thumbreplace = !/[?&]blur\b/.test(window.location.search);
 
        gallery.style.position = 'relative';
        gallery.style.height = layout.containerHeight + 'px';
@@ -86,20 +85,6 @@ function imgjustify() {
                        imgel.style.position = 'absolute';
                        imgel.style.top = layout.boxes[i].top + 'px';
                        imgel.style.left = layout.boxes[i].left + 'px';
-
-                       if (thumbreplace) {
-                               var thumbtarget = imgel.src.replace(/(\/thumb\/)\d+/, '$1'+layout.boxes[i].height)
-                               if (imgel.complete) {
-                                       imgel.src = thumbtarget;
-                               }
-                               else if (thumbtarget != imgel.src) {
-                                       var loadthumb = new Image();
-                                       loadthumb.src = thumbtarget;
-                                       loadthumb.onload = function() {
-                                               imgel.src = this.src;
-                                       };
-                               }
-                       }
                })();
        }
 };