Comment cleanup
This commit is contained in:
parent
09553f2262
commit
1acb3c2cc6
@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
###
|
###
|
||||||
# @name Album Module
|
# @name Album Module
|
||||||
# @author Tobias Reich
|
|
||||||
# @copyright 2014 by Tobias Reich
|
# @copyright 2014 by Tobias Reich
|
||||||
###
|
###
|
||||||
|
|
||||||
|
@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
###
|
###
|
||||||
# @name Database Module
|
# @name Database Module
|
||||||
# @author Tobias Reich
|
|
||||||
# @copyright 2014 by Tobias Reich
|
# @copyright 2014 by Tobias Reich
|
||||||
###
|
###
|
||||||
|
|
||||||
|
@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
###
|
###
|
||||||
# @name Upload Module
|
# @name Upload Module
|
||||||
# @author Tobias Reich
|
|
||||||
# @copyright 2014 by Tobias Reich
|
# @copyright 2014 by Tobias Reich
|
||||||
###
|
###
|
||||||
|
|
||||||
|
@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
###
|
###
|
||||||
# @name Log Module
|
# @name Log Module
|
||||||
# @author Tobias Reich
|
|
||||||
# @copyright 2014 by Tobias Reich
|
# @copyright 2014 by Tobias Reich
|
||||||
###
|
###
|
||||||
|
|
||||||
|
@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
###
|
###
|
||||||
# @name Module
|
# @name Module
|
||||||
# @author Tobias Reich
|
|
||||||
# @copyright 2014 by Tobias Reich
|
# @copyright 2014 by Tobias Reich
|
||||||
###
|
###
|
||||||
|
|
||||||
|
@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
###
|
###
|
||||||
# @name Photo Module
|
# @name Photo Module
|
||||||
# @author Tobias Reich
|
|
||||||
# @copyright 2014 by Tobias Reich
|
# @copyright 2014 by Tobias Reich
|
||||||
###
|
###
|
||||||
|
|
||||||
|
@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
###
|
###
|
||||||
# @name Plugins Module
|
# @name Plugins Module
|
||||||
# @author Tobias Reich
|
|
||||||
# @copyright 2014 by Tobias Reich
|
# @copyright 2014 by Tobias Reich
|
||||||
###
|
###
|
||||||
|
|
||||||
|
@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
###
|
###
|
||||||
# @name Session Module
|
# @name Session Module
|
||||||
# @author Tobias Reich
|
|
||||||
# @copyright 2014 by Tobias Reich
|
# @copyright 2014 by Tobias Reich
|
||||||
###
|
###
|
||||||
|
|
||||||
|
@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
###
|
###
|
||||||
# @name Settings Module
|
# @name Settings Module
|
||||||
# @author Tobias Reich
|
|
||||||
# @copyright 2014 by Tobias Reich
|
# @copyright 2014 by Tobias Reich
|
||||||
###
|
###
|
||||||
|
|
||||||
|
@ -1,11 +1,9 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
###
|
||||||
* @name Misc Module
|
# @name Misc Module
|
||||||
* @author Philipp Maurer
|
# @copyright 2014 by Tobias Reich
|
||||||
* @author Tobias Reich
|
###
|
||||||
* @copyright 2014 by Philipp Maurer, Tobias Reich
|
|
||||||
*/
|
|
||||||
|
|
||||||
if (!defined('LYCHEE')) exit('Error: Direct access is not allowed!');
|
if (!defined('LYCHEE')) exit('Error: Direct access is not allowed!');
|
||||||
|
|
||||||
@ -15,7 +13,7 @@ function search($database, $settings, $term) {
|
|||||||
|
|
||||||
$return['albums'] = '';
|
$return['albums'] = '';
|
||||||
|
|
||||||
// Photos
|
# Photos
|
||||||
$query = Database::prepare($database, "SELECT id, title, tags, public, star, album, thumbUrl FROM ? WHERE title LIKE '%?%' OR description LIKE '%?%' OR tags LIKE '%?%'", array(LYCHEE_TABLE_PHOTOS, $term, $term, $term));
|
$query = Database::prepare($database, "SELECT id, title, tags, public, star, album, thumbUrl FROM ? WHERE title LIKE '%?%' OR description LIKE '%?%' OR tags LIKE '%?%'", array(LYCHEE_TABLE_PHOTOS, $term, $term, $term));
|
||||||
$result = $database->query($query);
|
$result = $database->query($query);
|
||||||
while($row = $result->fetch_assoc()) {
|
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));
|
$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));
|
$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);
|
$result = $database->query($query);
|
||||||
$i = 0;
|
$i = 0;
|
||||||
while($row = $result->fetch_object()) {
|
while($row = $result->fetch_object()) {
|
||||||
|
|
||||||
// Info
|
# Info
|
||||||
$return['albums'][$row->id]['id'] = $row->id;
|
$return['albums'][$row->id]['id'] = $row->id;
|
||||||
$return['albums'][$row->id]['title'] = $row->title;
|
$return['albums'][$row->id]['title'] = $row->title;
|
||||||
$return['albums'][$row->id]['public'] = $row->public;
|
$return['albums'][$row->id]['public'] = $row->public;
|
||||||
$return['albums'][$row->id]['sysdate'] = date('F Y', $row->sysstamp);
|
$return['albums'][$row->id]['sysdate'] = date('F Y', $row->sysstamp);
|
||||||
$return['albums'][$row->id]['password'] = ($row->password=='' ? false : true);
|
$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));
|
$query = Database::prepare($database, "SELECT thumbUrl FROM ? WHERE album = '?' " . $settings['sorting'] . " LIMIT 0, 3", array(LYCHEE_TABLE_PHOTOS, $row->id));
|
||||||
$result2 = $database->query($query);
|
$result2 = $database->query($query);
|
||||||
$k = 0;
|
$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 */
|
/* assume that if running with the same uid as the owner of the directory it's ok */
|
||||||
$stat = @stat($path);
|
$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;
|
if (substr(sprintf('%o', @fileperms($path)), -4)!=$permissions) return false;
|
||||||
else return true;
|
else return true;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user