Revised design of Special:Userlogin
[lhc/web/wiklou.git] / includes / Article.php
index e5919cf..d2f52bc 100644 (file)
@@ -988,8 +988,9 @@ class Article implements Page {
 
                                // Set the fragment if one was specified in the redirect
                                if ( strval( $this->getTitle()->getFragment() ) != '' ) {
-                                       $fragment = Xml::escapeJsString( $this->getTitle()->getFragmentForURL() );
-                                       $outputPage->addInlineScript( "redirectToFragment(\"$fragment\");" );
+                                       $outputPage->addInlineScript( Xml::encodeJsCall(
+                                               'redirectToFragment', array( $this->getTitle()->getFragmentForURL() )
+                                       ) );
                                }
 
                                // Add a <link rel="canonical"> tag
@@ -1188,7 +1189,7 @@ class Article implements Page {
                } elseif ( $this->getContext()->getRequest()->getInt( 'unhide' ) != 1 ) {
                        # Give explanation and add a link to view the revision...
                        $oldid = intval( $this->getOldID() );
-                       $link = $this->getTitle()->getFullUrl( "oldid={$oldid}&unhide=1" );
+                       $link = $this->getTitle()->getFullURL( "oldid={$oldid}&unhide=1" );
                        $msg = $this->mRevision->isDeleted( Revision::DELETED_RESTRICTED ) ?
                                'rev-suppressed-text-unhide' : 'rev-deleted-text-unhide';
                        $outputPage->wrapWikiMsg( "<div class='mw-warning plainlinks'>\n$1\n</div>\n",
@@ -1727,7 +1728,7 @@ class Article implements Page {
         *
         * @param $oldid mixed integer Revision ID or null
         * @param $user User The relevant user
-        * @return ParserOutput or false if the given revsion ID is not found
+        * @return ParserOutput or false if the given revision ID is not found
         */
        public function getParserOutput( $oldid = null, User $user = null ) {
                //XXX: bypasses mParserOptions and thus setParserOptions()