From 2bd7e72d14aa35905a355119e41a97c70e788abc Mon Sep 17 00:00:00 2001 From: sakamocchi Date: Fri, 4 May 2012 21:33:15 +0900 Subject: [PATCH] =?utf8?q?FIX:=20=E3=82=A2=E3=82=A4=E3=83=86=E3=83=A0?= =?utf8?q?=E3=81=AE=E8=BF=BD=E5=8A=A0=E3=83=BB=E7=B7=A8=E9=9B=86=E3=83=BB?= =?utf8?q?=E7=A7=BB=E5=8B=95=E3=83=BB=E5=89=8A=E9=99=A4=E3=81=AE=E5=BE=8C?= =?utf8?q?=E3=81=AB=E3=83=AA=E3=82=B9=E3=83=88=E7=94=BB=E9=9D=A2=E3=81=AB?= =?utf8?q?=E3=83=95=E3=82=A9=E3=83=BC=E3=83=AB=E3=83=90=E3=83=83=E3=82=AF?= =?utf8?q?=E3=81=97=E3=81=AA=E3=81=84=E3=83=90=E3=82=B0=E3=81=AE=E4=BF=AE?= =?utf8?q?=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 移動時、移動先のウェブログのアイテムリストにフォールバックしない不具合がまだある。 --- nucleus/libs/AdminActions.php | 66 +++++++++++++++++++++++++------------------ 1 file changed, 38 insertions(+), 28 deletions(-) diff --git a/nucleus/libs/AdminActions.php b/nucleus/libs/AdminActions.php index ee4deda..15b0441 100644 --- a/nucleus/libs/AdminActions.php +++ b/nucleus/libs/AdminActions.php @@ -1980,7 +1980,6 @@ class AdminActions extends BaseActions { $blogid = $item['blogid']; } - $blog = &$manager->getBlog($blogid); if ( $item && $blog->convertBreaks() && requestVar('action') == 'itemedit' ) @@ -3818,33 +3817,7 @@ class AdminActions extends BaseActions public function parse_itemnavlist() { global $CONF, $manager, $member; - if ( $this->skintype == 'itemlist' ) - { - $blogid = intRequestVar('blogid'); - $blog =& $manager->getBlog($blogid); - } - if ( postVar('start') ) - { - $start = intPostVar('start'); - } - else - { - $start = 0; - } - // amount of items to show - if ( postVar('amount') ) - { - $amount = intPostVar('amount'); - } - else - { - $amount = intval($CONF['DefaultListSize']); - if ( $amount < 1 ) - { - $amount = 10; - } - } $query = "SELECT bshortname, cname, mname, ititle, ibody, inumber, idraft, itime" . " FROM %s, %s, %s, %s" . " WHERE iblog=bnumber AND iauthor=mnumber AND icat=catid"; @@ -3853,7 +3826,20 @@ class AdminActions extends BaseActions if ( $this->skintype == 'itemlist' ) { - $query .= ' AND iblog = ' . $blogid; + $blog = FALSE; + if ( array_key_exists('blogid', $_REQUEST) ) + { + $blogid = intRequestVar('blogid'); + } + else if ( array_key_exists('itemid', $_REQUEST) ) + { + $itemid = intRequestVar('itemid'); + $item = &$manager->getItem($itemid, 1, 1); + $blogid = (integer) $item['blogid']; + } + $blog =& $manager->getBlog($blogid); + + $query .= " AND iblog={$blogid}"; $template['now'] = $blog->getCorrectTime(time()); // non-blog-admins can only edit/delete their own items @@ -3878,6 +3864,30 @@ class AdminActions extends BaseActions . ' OR (ibody LIKE "%' . sql_real_escape_string($search) . '%") ' . ' OR (imore LIKE "%' . sql_real_escape_string($search) . '%"))'; } + + if ( postVar('start') ) + { + $start = intPostVar('start'); + } + else + { + $start = 0; + } + + // amount of items to show + if ( postVar('amount') ) + { + $amount = intPostVar('amount'); + } + else + { + $amount = (integer) $CONF['DefaultListSize']; + if ( $amount < 1 ) + { + $amount = 10; + } + } + $query .= ' ORDER BY itime DESC' . " LIMIT {$start},{$amount}"; -- 2.11.0