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:
095803a
)
Make getSubjectPage return $this if the title is the same. This avoids process cache...
author
Aaron Schulz
<aaron@users.mediawiki.org>
Thu, 30 Oct 2008 16:17:37 +0000
(16:17 +0000)
committer
Aaron Schulz
<aaron@users.mediawiki.org>
Thu, 30 Oct 2008 16:17:37 +0000
(16:17 +0000)
includes/Title.php
patch
|
blob
|
history
diff --git
a/includes/Title.php
b/includes/Title.php
index
53ba1d0
..
eb9e2b1
100644
(file)
--- a/
includes/Title.php
+++ b/
includes/Title.php
@@
-2258,7
+2258,12
@@
class Title {
* @return \type{Title} the object for the subject page
*/
public function getSubjectPage() {
- return Title::makeTitle( MWNamespace::getSubject( $this->getNamespace() ), $this->getDBkey() );
+ // Is this the same title?
+ $subjectNS = MWNamespace::getSubject( $this->getNamespace() );
+ if( $this->getNamespace() == $subjectNS ) {
+ return $this;
+ }
+ return Title::makeTitle( $subjectNS, $this->getDBkey() );
}
/**