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:
927fb79
)
* No need to query database for special namespaces
author
Niklas Laxström
<nikerabbit@users.mediawiki.org>
Thu, 10 Jan 2008 22:15:33 +0000
(22:15 +0000)
committer
Niklas Laxström
<nikerabbit@users.mediawiki.org>
Thu, 10 Jan 2008 22:15:33 +0000
(22:15 +0000)
includes/Title.php
patch
|
blob
|
history
diff --git
a/includes/Title.php
b/includes/Title.php
index
4afa47f
..
2976078
100644
(file)
--- a/
includes/Title.php
+++ b/
includes/Title.php
@@
-1258,6
+1258,11
@@
class Title {
public function getTitleProtection() {
$dbr = wfGetDB( DB_SLAVE );
+ // Can't protect pages in special namespaces
+ if ( $this->getNamespace() < NS_MAIN ) {
+ return false;
+ }
+
$res = $dbr->select( 'protected_titles', '*',
array ('pt_namespace' => $this->getNamespace(), 'pt_title' => $this->getDBKey()) );