Merge "Little change of readability in Title::secureAndSplit"
[lhc/web/wiklou.git] / includes / Title.php
index 6c091e1..bdba578 100644 (file)
@@ -706,6 +706,8 @@ class Title {
        /**
         * Get the interwiki prefix
         *
+        * Use Title::isExternal to check if a interwiki is set
+        *
         * @return String Interwiki prefix
         */
        public function getInterwiki() {
@@ -1194,6 +1196,8 @@ class Title {
        /**
         * Get the Title fragment (i.e.\ the bit after the #) in text form
         *
+        * Use Title::hasFragment to check for a fragment
+        *
         * @return String Title fragment
         */
        public function getFragment() {
@@ -1638,7 +1642,7 @@ class Title {
                wfProfileIn( __METHOD__ );
                if ( $this->isExternal() || $proto !== PROTO_RELATIVE ) {
                        $ret = $this->getFullURL( $query, $query2, $proto );
-               } elseif ( $this->getPrefixedText() === '' && $this->getFragment() !== '' ) {
+               } elseif ( $this->getPrefixedText() === '' && $this->hasFragment() ) {
                        $ret = $this->getFragmentForURL();
                } else {
                        $ret = $this->getLocalURL( $query, $query2 ) . $this->getFragmentForURL();