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:
2fb7f4f
)
(bug 6062) Logic error in {{BASEPAGENAME}}
author
Rob Church
<robchurch@users.mediawiki.org>
Thu, 25 May 2006 08:22:32 +0000
(08:22 +0000)
committer
Rob Church
<robchurch@users.mediawiki.org>
Thu, 25 May 2006 08:22:32 +0000
(08:22 +0000)
includes/Title.php
patch
|
blob
|
history
diff --git
a/includes/Title.php
b/includes/Title.php
index
b8769a2
..
1e87fd8
100644
(file)
--- a/
includes/Title.php
+++ b/
includes/Title.php
@@
-697,9
+697,11
@@
class Title {
*/
function getBaseText() {
global $wgNamespacesWithSubpages;
*/
function getBaseText() {
global $wgNamespacesWithSubpages;
- if( isset( $wgNamespacesWithSubpages[ $this->mNamespace] ) && $wgNamespacesWithSubpages[ $this->mNamespace ] ) {
+ if( isset( $wgNamespacesWithSubpages[ $this->mNamespace
] ) && $wgNamespacesWithSubpages[ $this->mNamespace ] ) {
$parts = explode( '/', $this->getText() );
$parts = explode( '/', $this->getText() );
- unset( $parts[ count( $parts ) - 1 ] );
+ # Don't discard the real title if there's no subpage involved
+ if( count( $parts ) > 1 )
+ unset( $parts[ count( $parts ) - 1 ] );
return implode( '/', $parts );
} else {
return $this->getText();
return implode( '/', $parts );
} else {
return $this->getText();