From: sakamocchi Date: Mon, 21 Mar 2011 03:01:59 +0000 (+0000) Subject: Remove unneccesary queries in BLOG.php, refering to http://lists.sourceforge.jp/mailm... X-Git-Tag: release-3-64~18 X-Git-Url: http://git.sourceforge.jp/view?p=nucleus-jp%2Fnucleus-jp-ancient.git;a=commitdiff_plain;h=34ee6ef3294853f7018662682c99d723d12116a7 Remove unneccesary queries in BLOG.php, refering to lists.sourceforge.jp/mailman/private/nucleus-jp-security/2011-March/000029.html. Thanks to NKJG. git-svn-id: https://svn.sourceforge.jp/svnroot/nucleus-jp/nucleus-jp/trunk@1177 1ca29b6e-896d-4ea0-84a5-967f57386b96 --- diff --git a/utf8/nucleus/libs/BLOG.php b/utf8/nucleus/libs/BLOG.php index db4e1f8..cbc086e 100755 --- a/utf8/nucleus/libs/BLOG.php +++ b/utf8/nucleus/libs/BLOG.php @@ -1302,13 +1302,11 @@ class BLOG { . ' WHERE' . ' i.iblog = ' . $this->blogid . ' and i.iauthor = m.mnumber' - . ' and i.icat = c.catid' - . ' and i.idraft = 0' // exclude drafts - // don't show future items - . ' and i.itime <= ' . mysqldate($this->getCorrectTime()); - if (!$showDrafts) $query .= ' and i.idraft=0'; // exclude drafts - if (!$showFuture) $query .= ' and i.itime<=' . mysqldate($this->getCorrectTime()); // don't show future items + . ' and i.icat = c.catid'; + if (!$showDrafts) $query .= ' and i.idraft=0'; // exclude drafts + if (!$showFuture) $query .= ' and i.itime<=' . mysqldate($this->getCorrectTime()); // don't show future items + //$query .= ' and i.inumber IN ('.$itemlist.')'; $query .= ' and i.inumber = '.intval($value); $query .= ')';