From: Aaron Schulz Date: Mon, 8 Dec 2008 22:30:58 +0000 (+0000) Subject: Make pageCond() use PK is ID is already cached X-Git-Tag: 1.31.0-rc.0~44097 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/banques/?a=commitdiff_plain;h=57073ee3b102a200ae015fa6e211c846f6014026;p=lhc%2Fweb%2Fwiklou.git Make pageCond() use PK is ID is already cached --- diff --git a/includes/Title.php b/includes/Title.php index da5ac50359..792f475901 100644 --- a/includes/Title.php +++ b/includes/Title.php @@ -2978,7 +2978,11 @@ class Title { * @return \type{\array} Selection array */ public function pageCond() { - return array( 'page_namespace' => $this->mNamespace, 'page_title' => $this->mDbkeyform ); + if( $this->mArticleID > 0 ) { + return array( 'page_id' => $this->mArticleID ); // PK avoids secondary lookups + } else { + return array( 'page_namespace' => $this->mNamespace, 'page_title' => $this->mDbkeyform ); + } } /**