Temporarily revert 14847; makes incompatible changes to message strings.
authorBrion Vibber <brion@users.mediawiki.org>
Tue, 20 Jun 2006 18:20:58 +0000 (18:20 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Tue, 20 Jun 2006 18:20:58 +0000 (18:20 +0000)
includes/EditPage.php
includes/Linker.php
includes/OutputPage.php
languages/Messages.php
languages/MessagesHe.php

index be999a9..a3c98d6 100644 (file)
@@ -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' ) );
        }
 
 }
index 142bda6..416a940 100644 (file)
@@ -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.
index 4336d94..69e8521 100644 (file)
@@ -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<!--" . $wgTitle->getPrefixedUrl() . "-->" );
                
-               $this->returnToMain( false );
+               $this->returnToMain();
        }
 
        /** @obsolete */
index 25036a2..7899457 100644 (file)
@@ -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.</strong>',
 'edittools' => '<!-- Text here will be shown below edit and upload forms. -->',
 '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
 #
index 2d36cf6..6f89bf6 100644 (file)
@@ -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"              => "×\9c×\94×\99×\9bנס לחשבון",
-"loginreqpagetext"          => "עליכם $1 כדי לצפות בדפים.",
+"loginreqtitle"             => "כניסה לחשבון נדרשת",
+"loginreqlink"              => "×\9b× ×\99ס×\94 לחשבון",
+"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"                  => "היסטוריית שינויים",