dépôts
/
lhc
/
web
/
wiklou.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b6f827b
)
Make pageCond() use PK is ID is already cached
author
Aaron Schulz
<aaron@users.mediawiki.org>
Mon, 8 Dec 2008 22:30:58 +0000
(22:30 +0000)
committer
Aaron Schulz
<aaron@users.mediawiki.org>
Mon, 8 Dec 2008 22:30:58 +0000
(22:30 +0000)
includes/Title.php
patch
|
blob
|
history
diff --git
a/includes/Title.php
b/includes/Title.php
index
da5ac50
..
792f475
100644
(file)
--- 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 );
+ }
}
/**