From d29203e66b5fad6d611967d5396ec83c39413b80 Mon Sep 17 00:00:00 2001 From: kmorimatsu Date: Wed, 5 Dec 2007 01:28:41 +0000 Subject: [PATCH] Bug fix: archiveprevexists, archivenextexists git-svn-id: https://svn.sourceforge.jp/svnroot/nucleus-jp/nucleus-jp/branches/branch-3-3@358 1ca29b6e-896d-4ea0-84a5-967f57386b96 --- utf8/nucleus/libs/globalfunctions.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/utf8/nucleus/libs/globalfunctions.php b/utf8/nucleus/libs/globalfunctions.php index 39b679e..5dd2bb1 100755 --- a/utf8/nucleus/libs/globalfunctions.php +++ b/utf8/nucleus/libs/globalfunctions.php @@ -13,8 +13,8 @@ /** * @license http://nucleuscms.org/license.txt GNU General Public License * @copyright Copyright (C) 2002-2007 The Nucleus Group - * @version $Id: globalfunctions.php,v 1.23.2.4 2007-12-02 23:49:30 kmorimatsu Exp $ - * $NucleusJP: globalfunctions.php,v 1.23.2.3 2007/10/30 19:05:20 kmorimatsu Exp $ + * @version $Id: globalfunctions.php,v 1.23.2.5 2007-12-05 01:28:41 kmorimatsu Exp $ + * $NucleusJP: globalfunctions.php,v 1.23.2.4 2007/12/02 23:49:30 kmorimatsu Exp $ */ // needed if we include globalfunctions from install.php @@ -843,10 +843,10 @@ function selector() { global $archivenext, $archiveprev, $archivetype, $archivenextexists, $archiveprevexists; // sql queries for the timestamp of the first and the last published item - $query = "SELECT UNIX_TIMESTAMP(itime) as result FROM ".sql_table('item')." WHERE idraft=0 ORDER BY itime ASC"; - $first_timestamp=quickQuery ($query); - $query = "SELECT UNIX_TIMESTAMP(itime) as result FROM ".sql_table('item')." WHERE idraft=0 ORDER BY itime DESC"; - $last_timestamp=quickQuery ($query); + $query = "SELECT UNIX_TIMESTAMP(itime) as result FROM ".sql_table('item')." WHERE idraft=0 AND iblog=".(int)($blogid ? $blogid : $CONF['DefaultBlog'])." ORDER BY itime ASC"; + $first_timestamp=quickQuery ($query); + $query = "SELECT UNIX_TIMESTAMP(itime) as result FROM ".sql_table('item')." WHERE idraft=0 AND iblog=".(int)($blogid ? $blogid : $CONF['DefaultBlog'])." ORDER BY itime DESC"; + $last_timestamp=quickQuery ($query); sscanf($archive, '%d-%d-%d', $y, $m, $d); -- 2.11.0