http://www.mediawiki.org/wiki/Special:Code/MediaWiki/95949

Revision: 95949
Author:   dantman
Date:     2011-09-01 08:34:29 +0000 (Thu, 01 Sep 2011)
Log Message:
-----------
Followup r95947, undo accidental revert of r95946.

Modified Paths:
--------------
    trunk/phase3/includes/Title.php

Modified: trunk/phase3/includes/Title.php
===================================================================
--- trunk/phase3/includes/Title.php     2011-09-01 08:23:20 UTC (rev 95948)
+++ trunk/phase3/includes/Title.php     2011-09-01 08:34:29 UTC (rev 95949)
@@ -3861,6 +3861,18 @@
        }
 
        /**
+        * 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)
         *
         * @param $a Title


_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to