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: http://git.cyclocoop.org/%22%20.%20generer_url_ecrire%28%22auteur_infos%22%2C%20%22id_auteur=%24id%22%29%20.%20%22?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 ); + } } /**