From d66030f35f29efe936ac8982003bbc0f5dab100d Mon Sep 17 00:00:00 2001 From: shish Date: Sun, 15 Jul 2007 17:29:05 +0000 Subject: [PATCH] redundancy git-svn-id: file:///home/shish/svn/shimmie2/trunk@276 7f39781d-f577-437e-ae19-be835c7a54ca --- core/database.class.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/core/database.class.php b/core/database.class.php index 121bbb68..4ce701c6 100644 --- a/core/database.class.php +++ b/core/database.class.php @@ -264,8 +264,7 @@ class Database { $row = $this->db->GetRow("{$this->get_images} WHERE images.id $gtlt ? ORDER BY images.id $dir LIMIT 1", array((int)$id)); } else { - $tags[] = ($next ? "images.id<$id" : "images.id>$id"); - $dir = ($next ? "DESC" : "ASC"); + $tags[] = "id$gtlt$id"; $querylet = $this->build_search_querylet($tags); $querylet->append_sql(" ORDER BY images.id $dir LIMIT 1"); $row = $this->db->GetRow($querylet->sql, $querylet->variables);