* Removing "whitelistreadtitle" and "whitelistreadtext", which seem to be unused.
* Removing the self login link in the create account not allowed screen, as it is not useful.
* Fixing "loginreqlink" in Hebrew.
* Fixing various small bugs about these error pages.
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', $loginLink ) );
- $wgOut->returnToMain( false, $this->mTitle->getPrefixedUrl() );
+ $wgOut->addHtml( wfMsgWikiHtml( 'whitelistedittext', $skin->loginLink( $this->mTitle ) ) );
+ $wgOut->returnToMain( false, $this->mTitle->getPrefixedText() );
}
/**
}
function noCreatePermission() {
- global $wgOut;
+ global $wgUser, $wgOut;
+ $skin = $wgUser->getSkin();
+
$wgOut->setPageTitle( wfMsg( 'nocreatetitle' ) );
- $wgOut->addWikiText( wfMsg( 'nocreatetext' ) );
+ $wgOut->setRobotPolicy( 'noindex,nofollow' );
+ $wgOut->setArticleRelated( false );
+
+ $wgOut->addHtml( wfMsgWikiHtml( 'nocreatetext', $skin->loginLink( $this->mTitle ) ) );
+ $wgOut->returnToMain( false, $this->mTitle->getPrefixedText() );
}
}
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.
$this->setRobotPolicy( 'noindex,nofollow' );
$this->setArticleFlag( false );
- $loginTitle = Title::makeTitle( NS_SPECIAL, 'Userlogin' );
- $loginLink = $skin->makeKnownLinkObj( $loginTitle, wfMsgHtml( 'loginreqlink' ), 'returnto=' . $wgTitle->getPrefixedUrl() );
- $this->addHtml( wfMsgWikiHtml( 'loginreqpagetext', $loginLink ) );
+ $this->addHtml( wfMsgWikiHtml( 'loginreqpagetext', $skin->loginLink() ) );
$this->addHtml( "\n<!--" . $wgTitle->getPrefixedUrl() . "-->" );
- $this->returnToMain();
+ $this->returnToMain( false );
}
/** @obsolete */
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 [[Special:Userlogin|log]] in and have the appropriate permissions.',
+'whitelistacctext' => 'To be allowed to create accounts in this Wiki you have to 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',
+'loginreqtitle' => 'Login required to view',
'loginreqlink' => 'log in',
-'loginreqpagetext' => 'You must $1 to view other pages.',
+'loginreqpagetext' => 'You must $1 to view pages.',
'accmailtitle' => 'Password sent.',
'accmailtext' => 'The password for "$1" has been sent to $2.',
'newarticle' => '(New)',
'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 [[Special:Userlogin|log in or create an account]].',
+You can go back and edit an existing page, or $1.',
# History pages
#
כתובת ה-IP שלך כרגע היא \'\'\'$3\'\'\', ויש לציין עובדה זו בכל פנייה למפעילי המערכת.',
"whitelistedittitle" => "כניסה לחשבון נדרשת לעריכה",
-"whitelistedittext" => "עליכם לבצע $1 כדי לערוך דפים.",
-"whitelistreadtitle" => "כניסה לחשבון נדרשת לקריאה",
-"whitelistreadtext" => "עליכם [[{{ns:special}}:Userlogin|להיכנס לחשבון]] כדי לקרוא דפים.",
+"whitelistedittext" => "עליכם $1 כדי לערוך דפים.",
"whitelistacctitle" => "אינכם מורשים ליצור חשבון",
-"whitelistacctext" => "עליכם [[{{ns:special}}:Userlogin|להיכנס לחשבון]] שיש לו את ההרשאה ליצור חשבונות כדי ליצור חשבון.",
+"whitelistacctext" => "עליכם להיכנס לחשבון שיש לו את ההרשאה ליצור חשבונות כדי ליצור חשבון.",
"confirmedittitle" => 'הנכם חייבים לאמת את כתובת הדוא"ל שלכם כדי לערוך',
"confirmedittext" => 'עליכם לאמת את כתובת הדוא"ל שלכם לפני שתוכלו לערוך דפים. אנא הגדירו ואמתו את כתובת הדוא"ל שלכם באמצעות [[{{ns:special}}:Preferences|העדפות המשתמש]] לשכם.',
-"loginreqtitle" => "כניסה לחשבון נדרשת",
-"loginreqlink" => "×\9b× ×\99ס×\94 לחשבון",
-"loginreqpagetext" => "עליכם לבצע $1 כדי לצפות בדפים אחרים.",
+"loginreqtitle" => "כניסה לחשבון נדרשת לצפייה",
+"loginreqlink" => "×\9c×\94×\99×\9b× ×¡ לחשבון",
+"loginreqpagetext" => "עליכם $1 כדי לצפות בדפים.",
"accmailtitle" => "הסיסמה נשלחה",
"accmailtext" => 'הסיסמה עבור "$1" נשלחה אל $2.',
"newarticle" => "(חדש)",
"templatesused" => "תבניות המופיעות בדף זה:",
"edittools" => "<!-- הטקסט הנכתב כאן יוצג מתחת לטפסי עריכת דפים והעלאת קבצים, ולפיכך ניתן לכתוב להציג בו תווים קשים לכתיבה, קטעים מוכנים של טקסט ועוד. -->",
"nocreatetitle" => "יצירת הדפים הוגבלה",
-"nocreatetext" => "אתר זה מגביל את האפשרות ליצור דפים חדשים. באפשרותכם לחזור אחורה ולערוך דף קיים, או [[{{ns:special}}:Userlogin|להיכנס לחשבון]].",
+"nocreatetext" => "אתר זה מגביל את האפשרות ליצור דפים חדשים. באפשרותכם לחזור אחורה ולערוך דף קיים, או $1.",
# History pages
"revhistory" => "היסטוריית שינויים",