From: Brion Vibber Date: Tue, 20 Jun 2006 18:20:58 +0000 (+0000) Subject: Temporarily revert 14847; makes incompatible changes to message strings. X-Git-Tag: 1.31.0-rc.0~56719 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/password.php?a=commitdiff_plain;h=6c6b3b8083ceb11c2fe4c3ea35b76620ef90f476;p=lhc%2Fweb%2Fwiklou.git Temporarily revert 14847; makes incompatible changes to message strings. --- diff --git a/includes/EditPage.php b/includes/EditPage.php index be999a9c9c..a3c98d676f 100644 --- a/includes/EditPage.php +++ b/includes/EditPage.php @@ -1353,12 +1353,15 @@ END global $wgUser, $wgOut; $skin = $wgUser->getSkin(); + $loginTitle = Title::makeTitle( NS_SPECIAL, 'Userlogin' ); + $loginLink = $skin->makeKnownLinkObj( $loginTitle, wfMsgHtml( 'loginreqlink' ), 'returnto=' . $this->mTitle->getPrefixedUrl() ); + $wgOut->setPageTitle( wfMsg( 'whitelistedittitle' ) ); $wgOut->setRobotPolicy( 'noindex,nofollow' ); $wgOut->setArticleRelated( false ); - $wgOut->addHtml( wfMsgWikiHtml( 'whitelistedittext', $skin->loginLink( $this->mTitle ) ) ); - $wgOut->returnToMain( false, $this->mTitle->getPrefixedText() ); + $wgOut->addHtml( wfMsgWikiHtml( 'whitelistedittext', $loginLink ) ); + $wgOut->returnToMain( false, $this->mTitle->getPrefixedUrl() ); } /** @@ -1770,15 +1773,9 @@ END } function noCreatePermission() { - global $wgUser, $wgOut; - $skin = $wgUser->getSkin(); - + global $wgOut; $wgOut->setPageTitle( wfMsg( 'nocreatetitle' ) ); - $wgOut->setRobotPolicy( 'noindex,nofollow' ); - $wgOut->setArticleRelated( false ); - - $wgOut->addHtml( wfMsgWikiHtml( 'nocreatetext', $skin->loginLink( $this->mTitle ) ) ); - $wgOut->returnToMain( false, $this->mTitle->getPrefixedText() ); + $wgOut->addWikiText( wfMsg( 'nocreatetext' ) ); } } diff --git a/includes/Linker.php b/includes/Linker.php index 142bda6ea0..416a940d73 100644 --- a/includes/Linker.php +++ b/includes/Linker.php @@ -826,21 +826,7 @@ class Linker { wfMsgHtml( 'blocklink' ), 'ip=' . urlencode( $userText ) ); return $blockLink; } - - /** - * @param string the title to return to - * - * @return string of the link to the login page, returning to the specified title. - */ - function loginLink( $returnto = null ) { - if( !isset( $returnto ) ) { - global $wgTitle; - $returnto = &$wgTitle; - } - $loginTitle = Title::makeTitle( NS_SPECIAL, 'Userlogin' ); - return $this->makeKnownLinkObj( $loginTitle, wfMsgHtml( 'loginreqlink' ), 'returnto=' . $returnto->getPrefixedUrl() ); - } - + /** * Generate a user link if the current user is allowed to view it * @param $rev Revision object. diff --git a/includes/OutputPage.php b/includes/OutputPage.php index 4336d94c03..69e8521292 100644 --- a/includes/OutputPage.php +++ b/includes/OutputPage.php @@ -776,10 +776,12 @@ class OutputPage { $this->setRobotPolicy( 'noindex,nofollow' ); $this->setArticleFlag( false ); - $this->addHtml( wfMsgWikiHtml( 'loginreqpagetext', $skin->loginLink() ) ); + $loginTitle = Title::makeTitle( NS_SPECIAL, 'Userlogin' ); + $loginLink = $skin->makeKnownLinkObj( $loginTitle, wfMsgHtml( 'loginreqlink' ), 'returnto=' . $wgTitle->getPrefixedUrl() ); + $this->addHtml( wfMsgWikiHtml( 'loginreqpagetext', $loginLink ) ); $this->addHtml( "\n" ); - $this->returnToMain( false ); + $this->returnToMain(); } /** @obsolete */ diff --git a/languages/Messages.php b/languages/Messages.php index 25036a2d1a..789945732a 100644 --- a/languages/Messages.php +++ b/languages/Messages.php @@ -477,13 +477,15 @@ Note that you may not use the "e-mail this user" feature unless you have a valid Your IP address is $3. Please include this address in any queries you make.', 'whitelistedittitle' => 'Login required to edit', 'whitelistedittext' => 'You have to $1 to edit pages.', +'whitelistreadtitle' => 'Login required to read', +'whitelistreadtext' => 'You have to [[Special:Userlogin|login]] to read pages.', 'whitelistacctitle' => 'You are not allowed to create an account', -'whitelistacctext' => 'To be allowed to create accounts in this Wiki you have to log in and have the appropriate permissions.', +'whitelistacctext' => 'To be allowed to create accounts in this Wiki you have to [[Special:Userlogin|log]] in and have the appropriate permissions.', 'confirmedittitle' => 'E-mail confirmation required to edit', 'confirmedittext' => 'You must confirm your e-mail address before editing pages. Please set and validate your e-mail address through your [[Special:Preferences|user preferences]].', -'loginreqtitle' => 'Login required to view', +'loginreqtitle' => 'Login Required', 'loginreqlink' => 'log in', -'loginreqpagetext' => 'You must $1 to view pages.', +'loginreqpagetext' => 'You must $1 to view other pages.', 'accmailtitle' => 'Password sent.', 'accmailtext' => 'The password for "$1" has been sent to $2.', 'newarticle' => '(New)', @@ -552,7 +554,7 @@ the text into a text file and save it for later.', 'edittools' => '', 'nocreatetitle' => 'Page creation limited', 'nocreatetext' => 'This site has restricted the ability to create new pages. -You can go back and edit an existing page, or $1.', +You can go back and edit an existing page, or [[Special:Userlogin|log in or create an account]].', # History pages # diff --git a/languages/MessagesHe.php b/languages/MessagesHe.php index 2d36cf6fd8..6f89bf63ff 100644 --- a/languages/MessagesHe.php +++ b/languages/MessagesHe.php @@ -442,14 +442,16 @@ $wgAllMessagesHe = array( כתובת ה-IP שלך כרגע היא \'\'\'$3\'\'\', ויש לציין עובדה זו בכל פנייה למפעילי המערכת.', "whitelistedittitle" => "כניסה לחשבון נדרשת לעריכה", -"whitelistedittext" => "עליכם $1 כדי לערוך דפים.", +"whitelistedittext" => "עליכם לבצע $1 כדי לערוך דפים.", +"whitelistreadtitle" => "כניסה לחשבון נדרשת לקריאה", +"whitelistreadtext" => "עליכם [[{{ns:special}}:Userlogin|להיכנס לחשבון]] כדי לקרוא דפים.", "whitelistacctitle" => "אינכם מורשים ליצור חשבון", -"whitelistacctext" => "עליכם להיכנס לחשבון שיש לו את ההרשאה ליצור חשבונות כדי ליצור חשבון.", +"whitelistacctext" => "עליכם [[{{ns:special}}:Userlogin|להיכנס לחשבון]] שיש לו את ההרשאה ליצור חשבונות כדי ליצור חשבון.", "confirmedittitle" => 'הנכם חייבים לאמת את כתובת הדוא"ל שלכם כדי לערוך', "confirmedittext" => 'עליכם לאמת את כתובת הדוא"ל שלכם לפני שתוכלו לערוך דפים. אנא הגדירו ואמתו את כתובת הדוא"ל שלכם באמצעות [[{{ns:special}}:Preferences|העדפות המשתמש]] לשכם.', -"loginreqtitle" => "כניסה לחשבון נדרשת לצפייה", -"loginreqlink" => "להיכנס לחשבון", -"loginreqpagetext" => "עליכם $1 כדי לצפות בדפים.", +"loginreqtitle" => "כניסה לחשבון נדרשת", +"loginreqlink" => "כניסה לחשבון", +"loginreqpagetext" => "עליכם לבצע $1 כדי לצפות בדפים אחרים.", "accmailtitle" => "הסיסמה נשלחה", "accmailtext" => 'הסיסמה עבור "$1" נשלחה אל $2.', "newarticle" => "(חדש)", @@ -510,7 +512,7 @@ $wgAllMessagesHe = array( "templatesused" => "תבניות המופיעות בדף זה:", "edittools" => "", "nocreatetitle" => "יצירת הדפים הוגבלה", -"nocreatetext" => "אתר זה מגביל את האפשרות ליצור דפים חדשים. באפשרותכם לחזור אחורה ולערוך דף קיים, או $1.", +"nocreatetext" => "אתר זה מגביל את האפשרות ליצור דפים חדשים. באפשרותכם לחזור אחורה ולערוך דף קיים, או [[{{ns:special}}:Userlogin|להיכנס לחשבון]].", # History pages "revhistory" => "היסטוריית שינויים",