Get sysdate from photo-id
This commit is contained in:
parent
a0787d7c11
commit
56eaac4a81
@ -59,22 +59,22 @@ class Album extends Module {
|
|||||||
switch($this->albumIDs) {
|
switch($this->albumIDs) {
|
||||||
|
|
||||||
case 'f': $return['public'] = false;
|
case 'f': $return['public'] = false;
|
||||||
$query = "SELECT id, title, tags, sysdate, public, star, album, thumbUrl FROM lychee_photos WHERE star = 1 " . $this->settings['sorting'];
|
$query = "SELECT id, title, tags, public, star, album, thumbUrl FROM lychee_photos WHERE star = 1 " . $this->settings['sorting'];
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 's': $return['public'] = false;
|
case 's': $return['public'] = false;
|
||||||
$query = "SELECT id, title, tags, sysdate, public, star, album, thumbUrl FROM lychee_photos WHERE public = 1 " . $this->settings['sorting'];
|
$query = "SELECT id, title, tags, public, star, album, thumbUrl FROM lychee_photos WHERE public = 1 " . $this->settings['sorting'];
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case '0': $return['public'] = false;
|
case '0': $return['public'] = false;
|
||||||
$query = "SELECT id, title, tags, sysdate, public, star, album, thumbUrl FROM lychee_photos WHERE album = 0 " . $this->settings['sorting'];
|
$query = "SELECT id, title, tags, public, star, album, thumbUrl FROM lychee_photos WHERE album = 0 " . $this->settings['sorting'];
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default: $albums = $this->database->query("SELECT * FROM lychee_albums WHERE id = '$this->albumIDs' LIMIT 1;");
|
default: $albums = $this->database->query("SELECT * FROM lychee_albums WHERE id = '$this->albumIDs' LIMIT 1;");
|
||||||
$return = $albums->fetch_assoc();
|
$return = $albums->fetch_assoc();
|
||||||
$return['sysdate'] = date('d M. Y', strtotime($return['sysdate']));
|
$return['sysdate'] = date('d M. Y', strtotime($return['sysdate']));
|
||||||
$return['password'] = ($return['password']=='' ? false : true);
|
$return['password'] = ($return['password']=='' ? false : true);
|
||||||
$query = "SELECT id, title, tags, sysdate, public, star, album, thumbUrl FROM lychee_photos WHERE album = '$this->albumIDs' " . $this->settings['sorting'];
|
$query = "SELECT id, title, tags, public, star, album, thumbUrl FROM lychee_photos WHERE album = '$this->albumIDs' " . $this->settings['sorting'];
|
||||||
break;
|
break;
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -85,7 +85,7 @@ class Album extends Module {
|
|||||||
while($photo = $photos->fetch_assoc()) {
|
while($photo = $photos->fetch_assoc()) {
|
||||||
|
|
||||||
# Parse
|
# Parse
|
||||||
$photo['sysdate'] = date('d F Y', strtotime($photo['sysdate']));
|
$photo['sysdate'] = date('d F Y', substr($photo['id'], 0, -4));
|
||||||
$photo['previousPhoto'] = $previousPhotoID;
|
$photo['previousPhoto'] = $previousPhotoID;
|
||||||
$photo['nextPhoto'] = '';
|
$photo['nextPhoto'] = '';
|
||||||
|
|
||||||
|
@ -33,7 +33,7 @@ class Photo extends Module {
|
|||||||
$photo = $photos->fetch_assoc();
|
$photo = $photos->fetch_assoc();
|
||||||
|
|
||||||
# Parse photo
|
# Parse photo
|
||||||
$photo['sysdate'] = date('d M. Y', strtotime($photo['sysdate']));
|
$photo['sysdate'] = date('d M. Y', substr($photo['id'], 0, -4));
|
||||||
if (strlen($photo['takedate'])>0) $photo['takedate'] = date('d M. Y', strtotime($photo['takedate']));
|
if (strlen($photo['takedate'])>0) $photo['takedate'] = date('d M. Y', strtotime($photo['takedate']));
|
||||||
|
|
||||||
if ($albumID!='false') {
|
if ($albumID!='false') {
|
||||||
|
Loading…
Reference in New Issue
Block a user