Pārlūkot izejas kodu

Improve image sorting

k4be 1 gadu atpakaļ
vecāks
revīzija
3e546b61e9
1 mainītis faili ar 1 papildinājumiem un 1 dzēšanām
  1. 1 1
      include/db.php

+ 1 - 1
include/db.php

@@ -116,7 +116,7 @@ function get_dir_images($dir) {
 	global $pdo;
 	$images = [];
 
-	$sql = 'SELECT images.id, images.name, images.comment, images.views, images.likes, images.tags, images.path, dirs.name AS dir_name, dirs.comment AS dir_comment, dirs.views AS dir_views, dirs.likes AS dir_likes, dirs.tags AS dir_tags, dirs.path AS dir_path FROM images INNER JOIN dirs ON dirs.id=images.dir WHERE dirs.path = :path ORDER BY images.date ASC';
+	$sql = 'SELECT images.id, images.name, images.comment, images.views, images.likes, images.tags, images.path, dirs.name AS dir_name, dirs.comment AS dir_comment, dirs.views AS dir_views, dirs.likes AS dir_likes, dirs.tags AS dir_tags, dirs.path AS dir_path FROM images INNER JOIN dirs ON dirs.id=images.dir WHERE dirs.path = :path ORDER BY images.date ASC, images.path ASC';
 	$values = array(
 		':path' => $dir
 	);