Merge "Log when resyncFiles() fails in FileBackendMultiWrite"
[lhc/web/wiklou.git] / includes / parser / Parser.php
index d7ba266..a1d62e5 100644 (file)
@@ -739,8 +739,7 @@ class Parser {
 
                if ( $t->hasFragment() ) {
                        # Strip the fragment to avoid various odd effects
-                       $this->mTitle = clone $t;
-                       $this->mTitle->setFragment( '' );
+                       $this->mTitle = $t->createFragmentTarget( '' );
                } else {
                        $this->mTitle = $t;
                }
@@ -1115,7 +1114,7 @@ class Parser {
 
                                // Implies both are valid for table headings.
                                if ( $first_character === '!' ) {
-                                       $line = str_replace( '!!', '||', $line );
+                                       $line = StringUtils::replaceMarkup( '!!', '||', $line );
                                }
 
                                # Split up multiple cells on the same line.
@@ -1213,9 +1212,9 @@ class Parser {
         *
         * @private
         *
-        * @param string $text
-        * @param bool $isMain
-        * @param PPFrame|bool $frame
+        * @param string $text The text to parse
+        * @param bool $isMain Whether this is being called from the main parse() function
+        * @param PPFrame|bool $frame A pre-processor frame
         *
         * @return string
         */
@@ -3000,7 +2999,7 @@ class Parser {
                                $value = wfEscapeWikiText( $this->mTitle->getRootText() );
                                break;
                        case 'rootpagenamee':
-                               $value = wfEscapeWikiText( wfUrlEncode( str_replace(
+                               $value = wfEscapeWikiText( wfUrlencode( str_replace(
                                        ' ',
                                        '_',
                                        $this->mTitle->getRootText()
@@ -3010,7 +3009,7 @@ class Parser {
                                $value = wfEscapeWikiText( $this->mTitle->getBaseText() );
                                break;
                        case 'basepagenamee':
-                               $value = wfEscapeWikiText( wfUrlEncode( str_replace(
+                               $value = wfEscapeWikiText( wfUrlencode( str_replace(
                                        ' ',
                                        '_',
                                        $this->mTitle->getBaseText()