From: Sam Reed Date: Wed, 26 Jan 2011 20:03:38 +0000 (+0000) Subject: Followup fixme on r80861, X-Git-Tag: 1.31.0-rc.0~32343 X-Git-Url: http://git.cyclocoop.org/data/%24oldEdit?a=commitdiff_plain;h=7d1e4bef1162a849aeb336558d527946186ef193;p=lhc%2Fweb%2Fwiklou.git Followup fixme on r80861, Do cl_from <> 0 check not in SQL, remove order by. Fixup casing error noticed also --- diff --git a/includes/Title.php b/includes/Title.php index 421be43fbf..e98ab59176 100644 --- a/includes/Title.php +++ b/includes/Title.php @@ -3516,18 +3516,23 @@ class Title { public function getParentCategories() { global $wgContLang; - $titlekey = $this->getArticleId(); + $data = array(); + + $titleKey = $this->getArticleId(); + + if ( $titleKey === 0 ) { + return $data; + } + $dbr = wfGetDB( DB_SLAVE ); $res = $dbr->select( 'categorylinks', '*', array( 'cl_from' => $titleKey, - "cl_from <> '0'", ), __METHOD__, - array( 'ORDER BY' => 'cl_sortkey' ) + array() ); - $data = array(); if ( $dbr->numRows( $res ) > 0 ) { foreach ( $res as $row ) {