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:
082a5fa
)
Followup r95947, undo accidental revert of r95946.
author
Daniel Friesen
<dantman@users.mediawiki.org>
Thu, 1 Sep 2011 08:34:29 +0000
(08:34 +0000)
committer
Daniel Friesen
<dantman@users.mediawiki.org>
Thu, 1 Sep 2011 08:34:29 +0000
(08:34 +0000)
includes/Title.php
patch
|
blob
|
history
diff --git
a/includes/Title.php
b/includes/Title.php
index
932e56c
..
56713cd
100644
(file)
--- a/
includes/Title.php
+++ b/
includes/Title.php
@@
-3860,6
+3860,18
@@
class Title {
&& $this->getDBkey() === $title->getDBkey();
}
+ /**
+ * Check if this title is a subpage of another title
+ *
+ * @param $title Title
+ * @return Bool
+ */
+ public function isSubpageOf( Title $title ) {
+ return $this->getInterwiki() === $title->getInterwiki()
+ && $this->getNamespace() == $title->getNamespace()
+ && strpos( $this->getDBkey(), $title->getDBkey() . '/' ) === 0;
+ }
+
/**
* Callback for usort() to do title sorts by (namespace, title)
*