if (!defined('LYCHEE')) exit('Error: Direct access is not allowed!');
@ -15,7 +13,7 @@ function search($database, $settings, $term) {
$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));
$result = $database->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));