diff --git a/php/modules/Album.php b/php/modules/Album.php index 54d92eb..3dbd6b7 100644 --- a/php/modules/Album.php +++ b/php/modules/Album.php @@ -2,7 +2,6 @@ ### # @name Album Module -# @author Tobias Reich # @copyright 2014 by Tobias Reich ### diff --git a/php/modules/Database.php b/php/modules/Database.php index cfaf2f4..653476b 100755 --- a/php/modules/Database.php +++ b/php/modules/Database.php @@ -1,8 +1,7 @@ query($query); while($row = $result->fetch_assoc()) { @@ -24,20 +22,20 @@ function search($database, $settings, $term) { $return['photos'][$row['id']]['sysdate'] = date('d M. Y', substr($row['id'], 0, -4)); } - // Albums + # Albums $query = Database::prepare($database, "SELECT id, title, public, sysstamp, password FROM ? WHERE title LIKE '%?%' OR description LIKE '%?%'", array(LYCHEE_TABLE_ALBUMS, $term, $term)); $result = $database->query($query); $i = 0; while($row = $result->fetch_object()) { - // Info + # Info $return['albums'][$row->id]['id'] = $row->id; $return['albums'][$row->id]['title'] = $row->title; $return['albums'][$row->id]['public'] = $row->public; $return['albums'][$row->id]['sysdate'] = date('F Y', $row->sysstamp); $return['albums'][$row->id]['password'] = ($row->password=='' ? false : true); - // Thumbs + # Thumbs $query = Database::prepare($database, "SELECT thumbUrl FROM ? WHERE album = '?' " . $settings['sorting'] . " LIMIT 0, 3", array(LYCHEE_TABLE_PHOTOS, $row->id)); $result2 = $database->query($query); $k = 0; @@ -125,7 +123,7 @@ function hasPermissions($path, $permissions = '0777') { /* assume that if running with the same uid as the owner of the directory it's ok */ $stat = @stat($path); - if ($stat && ($stat['uid'] == getmyuid())) return true; + //if ($stat && ($stat['uid'] == getmyuid())) return true; if (substr(sprintf('%o', @fileperms($path)), -4)!=$permissions) return false; else return true;