Index: branches/phase3_rev_deleted/includes/SpecialUserrights.php |
— | — | @@ -74,7 +74,7 @@ |
75 | 75 | * @param string $reason Reason for group change |
76 | 76 | * |
77 | 77 | */ |
78 | | - function saveUserGroups( $username, $removegroup, $addgroup, $reason ) { |
| 78 | + function saveUserGroups( $username, $removegroup, $addgroup, $reason = '' ) { |
79 | 79 | global $wgOut; |
80 | 80 | $u = User::newFromName($username); |
81 | 81 | |
— | — | @@ -108,7 +108,7 @@ |
109 | 109 | wfDebug( 'oldGroups: ' . print_r( $oldGroups, true ) ); |
110 | 110 | wfDebug( 'newGroups: ' . print_r( $newGroups, true ) ); |
111 | 111 | |
112 | | - wfRunHooks( 'UserRights', array( &$u, $addgroup, $removegroup ) ); |
| 112 | + wfRunHooks( 'UserRights', array( &$u, $addgroup, $removegroup ) ); |
113 | 113 | $log = new LogPage( 'rights' ); |
114 | 114 | $log->addEntry( 'rights', Title::makeTitle( NS_USER, $u->getName() ), $reason, array( $this->makeGroupNameList( $oldGroups ), |
115 | 115 | $this->makeGroupNameList( $newGroups ) ) ); |
Index: branches/phase3_rev_deleted/includes/Xml.php |
— | — | @@ -19,9 +19,7 @@ |
20 | 20 | public static function element( $element, $attribs = null, $contents = '') {
|
21 | 21 | $out = '<' . $element;
|
22 | 22 | if( !is_null( $attribs ) ) {
|
23 | | - foreach( $attribs as $name => $val ) {
|
24 | | - $out .= ' ' . $name . '="' . Sanitizer::encodeAttribute( $val ) . '"';
|
25 | | - }
|
| 23 | + $out .= self::expandAttributes( $attribs );
|
26 | 24 | }
|
27 | 25 | if( is_null( $contents ) ) {
|
28 | 26 | $out .= '>';
|
— | — | @@ -36,6 +34,25 @@ |
37 | 35 | }
|
38 | 36 |
|
39 | 37 | /**
|
| 38 | + * Given an array of ('attributename' => 'value'), it generates the code
|
| 39 | + * to set the XML attributes : attributename="value".
|
| 40 | + * The values are passed to Sanitizer::encodeAttribute.
|
| 41 | + * Return null if no attributes given.
|
| 42 | + * @param $attribs Array of attributes for an XML element
|
| 43 | + */
|
| 44 | + private static function expandAttributes( $attribs ) {
|
| 45 | + if( is_null( $attribs ) ) {
|
| 46 | + return null;
|
| 47 | + } else {
|
| 48 | + $out = '';
|
| 49 | + foreach( $attribs as $name => $val ) {
|
| 50 | + $out .= ' ' . $name . '="' . Sanitizer::encodeAttribute( $val ) . '"';
|
| 51 | + }
|
| 52 | + return $out;
|
| 53 | + }
|
| 54 | + }
|
| 55 | +
|
| 56 | + /**
|
40 | 57 | * Format an XML element as with self::element(), but run text through the
|
41 | 58 | * UtfNormal::cleanUp() validator first to ensure that no invalid UTF-8
|
42 | 59 | * is passed.
|
— | — | @@ -57,8 +74,12 @@ |
58 | 75 | return self::element( $element, $attribs, $contents );
|
59 | 76 | }
|
60 | 77 |
|
61 | | - // Shortcuts
|
62 | | - public static function openElement( $element, $attribs = null ) { return self::element( $element, $attribs, null ); }
|
| 78 | + /** This open an XML element */
|
| 79 | + public static function openElement( $element, $attribs = null ) {
|
| 80 | + return '<' . $element . self::expandAttributes( $attribs ) . '>';
|
| 81 | + }
|
| 82 | +
|
| 83 | + // Shortcut
|
63 | 84 | public static function closeElement( $element ) { return "</$element>"; }
|
64 | 85 |
|
65 | 86 | /**
|
— | — | @@ -66,7 +87,7 @@ |
67 | 88 | * content you have is already valid xml.
|
68 | 89 | */
|
69 | 90 | public static function tags( $element, $attribs = null, $contents ) {
|
70 | | - return self::element( $element, $attribs, null ) . $contents . "</$element>";
|
| 91 | + return self::openElement( $element, $attribs ) . $contents . "</$element>";
|
71 | 92 | }
|
72 | 93 |
|
73 | 94 | /**
|
— | — | @@ -165,6 +186,14 @@ |
166 | 187 | }
|
167 | 188 |
|
168 | 189 | /**
|
| 190 | + * Convenience function to build an HTML password input field
|
| 191 | + * @return string HTML
|
| 192 | + */
|
| 193 | + public static function password( $name, $size=false, $value=false, $attribs=array() ) {
|
| 194 | + return self::input( $name, $size, $value, array_merge($attribs, array('type' => 'password')));
|
| 195 | + }
|
| 196 | +
|
| 197 | + /**
|
169 | 198 | * Internal function for use in checkboxes and radio buttons and such.
|
170 | 199 | * @return array
|
171 | 200 | */
|
Index: branches/phase3_rev_deleted/includes/ProtectionForm.php |
— | — | @@ -99,7 +99,7 @@ |
100 | 100 | return; |
101 | 101 | } |
102 | 102 | |
103 | | - list( $cascadeSources, $restrictions ) = $this->mTitle->getCascadeProtectionSources(); |
| 103 | + list( $cascadeSources, /* $restrictions */ ) = $this->mTitle->getCascadeProtectionSources(); |
104 | 104 | |
105 | 105 | if ( "" != $err ) { |
106 | 106 | $wgOut->setSubtitle( wfMsgHtml( 'formerror' ) ); |
Index: branches/phase3_rev_deleted/includes/SpecialImport.php |
— | — | @@ -328,12 +328,10 @@ |
329 | 329 | } else { |
330 | 330 | $created = false; |
331 | 331 | |
332 | | - $result = $dbw->select( 'revision', |
333 | | - array('MIN(rev_timestamp) as created', 'MAX(rev_timestamp) as latest'), |
| 332 | + $latest = $dbw->selectField( 'revision', 'MAX(rev_timestamp)', |
334 | 333 | array( 'rev_page' => $pageId ), __METHOD__ ); |
335 | | - $row = $dbw->fetchObject($result); |
336 | 334 | // Don't make fucked up alternating page histories |
337 | | - if( $row && $row->latest > $this->timestamp && $row->created < $this->timestamp ) { |
| 335 | + if( $latest && $latest > $this->timestamp ) { |
338 | 336 | wfDebug( __METHOD__ . ": skipping existing revision for [[" . |
339 | 337 | $this->title->getPrefixedText() . "]], timestamp " . |
340 | 338 | $this->timestamp . "\n" ); |
— | — | @@ -860,13 +858,13 @@ |
861 | 859 | } |
862 | 860 | } |
863 | 861 | |
864 | | - function newFromURL( $url ) { |
| 862 | + function newFromURL( $url, $method = 'GET' ) { |
865 | 863 | wfDebug( __METHOD__ . ": opening $url\n" ); |
866 | 864 | # Use the standard HTTP fetch function; it times out |
867 | 865 | # quicker and sorts out user-agent problems which might |
868 | 866 | # otherwise prevent importing from large sites, such |
869 | 867 | # as the Wikimedia cluster, etc. |
870 | | - $data = Http::get( $url ); |
| 868 | + $data = Http::request( $method, $url ); |
871 | 869 | if( $data !== false ) { |
872 | 870 | $file = tmpfile(); |
873 | 871 | fwrite( $file, $data ); |
— | — | @@ -885,7 +883,8 @@ |
886 | 884 | } else { |
887 | 885 | $params = $history ? 'history=1' : ''; |
888 | 886 | $url = $link->getFullUrl( $params ); |
889 | | - return ImportStreamSource::newFromURL( $url ); |
| 887 | + # For interwikis, use POST to avoid redirects. |
| 888 | + return ImportStreamSource::newFromURL( $url, "POST" ); |
890 | 889 | } |
891 | 890 | } |
892 | 891 | } |
Index: branches/phase3_rev_deleted/includes/Article.php |
— | — | @@ -371,10 +371,7 @@ |
372 | 372 | } |
373 | 373 | } |
374 | 374 | |
375 | | - // FIXME: Horrible, horrible! This content-loading interface just plain sucks. |
376 | | - // We should instead work with the Revision object when we need it... |
377 | | - $this->mContent = $revision->userCan( Revision::DELETED_TEXT ) ? $revision->getRawText() : ""; |
378 | | - //$this->mContent = $revision->getText(); |
| 375 | + $this->mContent = $revision->revText(); // Loads if user is allowed |
379 | 376 | |
380 | 377 | $this->mUser = $revision->getUser(); |
381 | 378 | $this->mUserText = $revision->getUserText(); |
Index: branches/phase3_rev_deleted/includes/RecentChange.php |
— | — | @@ -290,10 +290,8 @@ |
291 | 291 | * Makes an entry in the database corresponding to page creation |
292 | 292 | * Note: the title object must be loaded with the new id using resetArticleID() |
293 | 293 | * @todo Document parameters and return |
294 | | - * @public |
295 | | - * @static |
296 | 294 | */ |
297 | | - public static function notifyNew( $timestamp, &$title, $minor, &$user, $comment, $bot = "default", |
| 295 | + public static function notifyNew( $timestamp, &$title, $minor, &$user, $comment, $bot = 'default', |
298 | 296 | $ip='', $size = 0, $newId = 0 ) |
299 | 297 | { |
300 | 298 | if ( !$ip ) { |
— | — | @@ -302,7 +300,7 @@ |
303 | 301 | $ip = ''; |
304 | 302 | } |
305 | 303 | } |
306 | | - if ( $bot == 'default' ) { |
| 304 | + if ( $bot === 'default' ) { |
307 | 305 | $bot = $user->isAllowed( 'bot' ); |
308 | 306 | } |
309 | 307 | |
Index: branches/phase3_rev_deleted/includes/GlobalFunctions.php |
— | — | @@ -429,18 +429,11 @@ |
430 | 430 | * @param $key String: |
431 | 431 | */ |
432 | 432 | function wfMsgWeirdKey ( $key ) { |
433 | | - $subsource = str_replace ( ' ' , '_' , $key ) ; |
434 | | - $source = wfMsgForContentNoTrans( $subsource ) ; |
435 | | - if ( wfEmptyMsg( $subsource, $source) ) { |
436 | | - # Try again with first char lower case |
437 | | - $subsource = strtolower ( substr ( $subsource , 0 , 1 ) ) . substr ( $subsource , 1 ) ; |
438 | | - $source = wfMsgForContentNoTrans( $subsource ) ; |
439 | | - } |
440 | | - if ( wfEmptyMsg( $subsource, $source ) ) { |
441 | | - # Didn't work either, return blank text |
442 | | - $source = "" ; |
443 | | - } |
444 | | - return $source ; |
| 433 | + $source = wfMsgGetKey( $key, false, true, false ); |
| 434 | + if ( wfEmptyMsg( $key, $source ) ) |
| 435 | + return ""; |
| 436 | + else |
| 437 | + return $source; |
445 | 438 | } |
446 | 439 | |
447 | 440 | /** |
— | — | @@ -454,6 +447,17 @@ |
455 | 448 | function wfMsgGetKey( $key, $useDB, $forContent = false, $transform = true ) { |
456 | 449 | global $wgParser, $wgContLang, $wgMessageCache, $wgLang; |
457 | 450 | |
| 451 | + /* <Vyznev> btw, is all that code in wfMsgGetKey() that check |
| 452 | + * if the message cache exists of not really necessary, or is |
| 453 | + * it just paranoia? |
| 454 | + * <TimStarling> Vyznev: it's probably not necessary |
| 455 | + * <TimStarling> I think I wrote it in an attempt to report DB |
| 456 | + * connection errors properly |
| 457 | + * <TimStarling> but eventually we gave up on using the |
| 458 | + * message cache for that and just hard-coded the strings |
| 459 | + * <TimStarling> it may have other uses, it's not mere paranoia |
| 460 | + */ |
| 461 | + |
458 | 462 | if ( is_object( $wgMessageCache ) ) |
459 | 463 | $transstat = $wgMessageCache->getTransform(); |
460 | 464 | |
— | — | @@ -468,16 +472,18 @@ |
469 | 473 | $lang = &$wgLang; |
470 | 474 | } |
471 | 475 | |
| 476 | + # MessageCache::get() does this already, Language::getMessage() doesn't |
| 477 | + # ISSUE: Should we try to handle "message/lang" here too? |
| 478 | + $key = str_replace( ' ' , '_' , $wgContLang->lcfirst( $key ) ); |
| 479 | + |
472 | 480 | wfSuppressWarnings(); |
473 | | - |
474 | 481 | if( is_object( $lang ) ) { |
475 | 482 | $message = $lang->getMessage( $key ); |
476 | 483 | } else { |
477 | 484 | $message = false; |
478 | 485 | } |
479 | 486 | wfRestoreWarnings(); |
480 | | - if($message === false) |
481 | | - $message = Language::getMessage($key); |
| 487 | + |
482 | 488 | if ( $transform && strstr( $message, '{{' ) !== false ) { |
483 | 489 | $message = $wgParser->transformMsg($message, $wgMessageCache->getParserOptions() ); |
484 | 490 | } |
Index: branches/phase3_rev_deleted/includes/SpecialUserlogin.php |
— | — | @@ -32,6 +32,7 @@ |
33 | 33 | const WRONG_PASS = 5; |
34 | 34 | const EMPTY_PASS = 6; |
35 | 35 | const RESET_PASS = 7; |
| 36 | + const ABORTED = 8; |
36 | 37 | |
37 | 38 | var $mName, $mPassword, $mRetype, $mReturnTo, $mCookieCheck, $mPosted; |
38 | 39 | var $mAction, $mCreateaccount, $mCreateaccountMail, $mMailmypassword; |
— | — | @@ -364,6 +365,12 @@ |
365 | 366 | $u->load(); |
366 | 367 | } |
367 | 368 | |
| 369 | + // Give general extensions, such as a captcha, a chance to abort logins |
| 370 | + $abort = self::ABORTED; |
| 371 | + if( !wfRunHooks( 'AbortLogin', array( $u, $this->mPassword, &$abort ) ) ) { |
| 372 | + return $abort; |
| 373 | + } |
| 374 | + |
368 | 375 | if (!$u->checkPassword( $this->mPassword )) { |
369 | 376 | if( $u->checkTemporaryPassword( $this->mPassword ) ) { |
370 | 377 | // The e-mailed temporary password should not be used |
— | — | @@ -393,16 +400,18 @@ |
394 | 401 | // reset form; bot interfaces etc will probably just |
395 | 402 | // fail cleanly here. |
396 | 403 | // |
397 | | - return self::RESET_PASS; |
| 404 | + $retval = self::RESET_PASS; |
398 | 405 | } else { |
399 | | - return '' == $this->mPassword ? self::EMPTY_PASS : self::WRONG_PASS; |
| 406 | + $retval = '' == $this->mPassword ? self::EMPTY_PASS : self::WRONG_PASS; |
400 | 407 | } |
401 | 408 | } else { |
402 | 409 | $wgAuth->updateUser( $u ); |
403 | 410 | $wgUser = $u; |
404 | 411 | |
405 | | - return self::SUCCESS; |
| 412 | + $retval = self::SUCCESS; |
406 | 413 | } |
| 414 | + wfRunHooks( 'LoginAuthenticateAudit', array( $u, $this->mPassword, $retval ) ); |
| 415 | + return $retval; |
407 | 416 | } |
408 | 417 | |
409 | 418 | function processLogin() { |
— | — | @@ -696,6 +705,7 @@ |
697 | 706 | $wgOut->setPageTitle( wfMsg( 'userlogin' ) ); |
698 | 707 | $wgOut->setRobotpolicy( 'noindex,nofollow' ); |
699 | 708 | $wgOut->setArticleRelated( false ); |
| 709 | + $wgOut->disallowUserJs(); // just in case... |
700 | 710 | $wgOut->addTemplate( $template ); |
701 | 711 | } |
702 | 712 | |
Index: branches/phase3_rev_deleted/includes/SpecialWhatlinkshere.php |
— | — | @@ -112,6 +112,11 @@ |
113 | 113 | |
114 | 114 | // Read an extra row as an at-end check |
115 | 115 | $queryLimit = $limit + 1; |
| 116 | + |
| 117 | + // enforce join order, sometimes namespace selector may |
| 118 | + // trigger filesorts which are far less efficient than scanning many entries |
| 119 | + $options[] = 'STRAIGHT_JOIN'; |
| 120 | + |
116 | 121 | $options['LIMIT'] = $queryLimit; |
117 | 122 | $fields = array( 'page_id', 'page_namespace', 'page_title', 'page_is_redirect' ); |
118 | 123 | |
Index: branches/phase3_rev_deleted/includes/SpecialRevisiondelete.php |
— | — | @@ -21,7 +21,7 @@ |
22 | 22 | // We need a target page (possible a dummy like User:#1) |
23 | 23 | $page = Title::newFromUrl( $target, false ); |
24 | 24 | if( is_null( $page ) ) { |
25 | | - $wgOut->showErrorPage( 'notargettitle', 'notargettext' ); |
| 25 | + $wgOut->addWikiText( wfMsgHtml( 'undelete-header' ) ); |
26 | 26 | return; |
27 | 27 | } |
28 | 28 | |
— | — | @@ -886,8 +886,7 @@ |
887 | 887 | return false; |
888 | 888 | } |
889 | 889 | |
890 | | - $m = explode('!',$oimage->mArchiveName); |
891 | | - $timestamp = $m[0]; |
| 890 | + list($timestamp,$img) = explode('!',$oimage->mArchiveName,2); |
892 | 891 | |
893 | 892 | $oldpath = wfImageArchiveDir( $oimage->mName ) . DIRECTORY_SEPARATOR . $oimage->mArchiveName; |
894 | 893 | // Dupe the file into the file store |
— | — | @@ -1096,6 +1095,10 @@ |
1097 | 1096 | function updatePage( $title ) { |
1098 | 1097 | $title->invalidateCache(); |
1099 | 1098 | $title->purgeSquid(); |
| 1099 | + |
| 1100 | + // Extensions that require referencing previous revisions may need this |
| 1101 | + $article = new Article( $title ); |
| 1102 | + wfRunHooks( 'ArticleRevisionVisiblityUpdates', array( &$article ) ); |
1100 | 1103 | } |
1101 | 1104 | |
1102 | 1105 | /** |
Index: branches/phase3_rev_deleted/includes/Linker.php |
— | — | @@ -223,27 +223,21 @@ |
224 | 224 | if ( 0 == $aid ) { |
225 | 225 | $retVal = $this->makeBrokenLinkObj( $nt, $text, $query, $trail, $prefix ); |
226 | 226 | } else { |
227 | | - $threshold = $wgUser->getOption('stubthreshold') ; |
228 | | - if ( $threshold > 0 ) { |
229 | | - $dbr = wfGetDB( DB_SLAVE ); |
230 | | - $s = $dbr->selectRow( |
231 | | - array( 'page' ), |
232 | | - array( 'page_len', |
233 | | - 'page_namespace', |
234 | | - 'page_is_redirect' ), |
235 | | - array( 'page_id' => $aid ), $fname ) ; |
236 | | - if ( $s !== false ) { |
237 | | - $size = $s->page_len; |
238 | | - if ( $s->page_is_redirect OR $s->page_namespace != NS_MAIN ) { |
239 | | - $size = $threshold*2 ; # Really big |
240 | | - } |
241 | | - } else { |
242 | | - $size = $threshold*2 ; # Really big |
| 227 | + $stub = false; |
| 228 | + if ( $nt->isContentPage() ) { |
| 229 | + $threshold = $wgUser->getOption('stubthreshold'); |
| 230 | + if ( $threshold > 0 ) { |
| 231 | + $dbr = wfGetDB( DB_SLAVE ); |
| 232 | + $s = $dbr->selectRow( |
| 233 | + array( 'page' ), |
| 234 | + array( 'page_len', |
| 235 | + 'page_is_redirect' ), |
| 236 | + array( 'page_id' => $aid ), $fname ) ; |
| 237 | + $stub = ( $s !== false && !$s->page_is_redirect && |
| 238 | + $s->page_len < $threshold ); |
243 | 239 | } |
244 | | - } else { |
245 | | - $size = 1 ; |
246 | 240 | } |
247 | | - if ( $size < $threshold ) { |
| 241 | + if ( $stub ) { |
248 | 242 | $retVal = $this->makeStubLinkObj( $nt, $text, $query, $trail, $prefix ); |
249 | 243 | } else { |
250 | 244 | $retVal = $this->makeKnownLinkObj( $nt, $text, $query, $trail, $prefix ); |
— | — | @@ -511,8 +505,6 @@ |
512 | 506 | */ |
513 | 507 | function makeThumbLinkObj( $img, $label = '', $alt, $align = 'right', $params = array(), $framed=false , $manual_thumb = "" ) { |
514 | 508 | global $wgStylePath, $wgContLang; |
515 | | - $thumbUrl = ''; |
516 | | - $error = ''; |
517 | 509 | |
518 | 510 | $page = isset( $params['page'] ) ? $params['page'] : false; |
519 | 511 | |
— | — | @@ -922,16 +914,33 @@ |
923 | 915 | function formatComment($comment, $title = NULL, $local = false) { |
924 | 916 | wfProfileIn( __METHOD__ ); |
925 | 917 | |
926 | | - global $wgContLang; |
| 918 | + # Sanitize text a bit: |
927 | 919 | $comment = str_replace( "\n", " ", $comment ); |
928 | 920 | $comment = htmlspecialchars( $comment ); |
929 | 921 | |
930 | | - # The pattern for autogen comments is / * foo * /, which makes for |
931 | | - # some nasty regex. |
932 | | - # We look for all comments, match any text before and after the comment, |
933 | | - # add a separator where needed and format the comment itself with CSS |
| 922 | + # Render autocomments and make links: |
| 923 | + $comment = $this->formatAutoComments( $comment, $title, $local ); |
| 924 | + $comment = $this->formatLinksInComment( $comment ); |
| 925 | + |
| 926 | + wfProfileOut( __METHOD__ ); |
| 927 | + return $comment; |
| 928 | + } |
| 929 | + |
| 930 | + /** |
| 931 | + * The pattern for autogen comments is / * foo * /, which makes for |
| 932 | + * some nasty regex. |
| 933 | + * We look for all comments, match any text before and after the comment, |
| 934 | + * add a separator where needed and format the comment itself with CSS |
| 935 | + * Called by Linker::formatComment. |
| 936 | + * |
| 937 | + * @param $comment Comment text |
| 938 | + * @param $title An optional title object used to links to sections |
| 939 | + * |
| 940 | + * @todo Document the $local parameter. |
| 941 | + */ |
| 942 | + private function formatAutocomments( $comment, $title = NULL, $local = false ) { |
934 | 943 | $match = array(); |
935 | | - while (preg_match('/(.*)\/\*\s*(.*?)\s*\*\/(.*)/', $comment,$match)) { |
| 944 | + while (preg_match('!(.*)/\*\s*(.*?)\s*\*/(.*)!', $comment,$match)) { |
936 | 945 | $pre=$match[1]; |
937 | 946 | $auto=$match[2]; |
938 | 947 | $post=$match[3]; |
— | — | @@ -963,10 +972,21 @@ |
964 | 973 | $comment=$pre.$auto.$post; |
965 | 974 | } |
966 | 975 | |
967 | | - # format regular and media links - all other wiki formatting |
968 | | - # is ignored |
| 976 | + return $comment; |
| 977 | + } |
| 978 | + |
| 979 | + /** |
| 980 | + * Format regular and media links - all other wiki formatting is ignored |
| 981 | + * Called by Linker::formatComment. |
| 982 | + * @param $comment The comment text. |
| 983 | + * @return Comment text with links using HTML. |
| 984 | + */ |
| 985 | + private function formatLinksInComment( $comment ) { |
| 986 | + global $wgContLang; |
| 987 | + |
969 | 988 | $medians = '(?:' . preg_quote( Namespace::getCanonicalName( NS_MEDIA ), '/' ) . '|'; |
970 | 989 | $medians .= preg_quote( $wgContLang->getNsText( NS_MEDIA ), '/' ) . '):'; |
| 990 | + |
971 | 991 | while(preg_match('/\[\[:?(.*?)(\|(.*?))*\]\](.*)$/',$comment,$match)) { |
972 | 992 | # Handle link renaming [[foo|text]] will show link as "text" |
973 | 993 | if( "" != $match[3] ) { |
— | — | @@ -993,7 +1013,7 @@ |
994 | 1014 | } |
995 | 1015 | $comment = preg_replace( $linkRegexp, StringUtils::escapeRegexReplacement( $thelink ), $comment, 1 ); |
996 | 1016 | } |
997 | | - wfProfileOut( __METHOD__ ); |
| 1017 | + |
998 | 1018 | return $comment; |
999 | 1019 | } |
1000 | 1020 | |
— | — | @@ -1018,7 +1038,7 @@ |
1019 | 1039 | return " <span class=\"comment\">($formatted)</span>"; |
1020 | 1040 | } |
1021 | 1041 | } |
1022 | | - |
| 1042 | + |
1023 | 1043 | /** |
1024 | 1044 | * Wrap and format the given revision's comment block, if the current |
1025 | 1045 | * user is allowed to view it. |
Index: branches/phase3_rev_deleted/includes/Parser.php |
— | — | @@ -1937,6 +1937,7 @@ |
1938 | 1938 | # Look at the first character |
1939 | 1939 | if( $target != '' && $target{0} == '/' ) { |
1940 | 1940 | # / at end means we don't want the slash to be shown |
| 1941 | + $m = array(); |
1941 | 1942 | $trailingSlashes = preg_match_all( '%(/+)$%', $target, $m ); |
1942 | 1943 | if( $trailingSlashes ) { |
1943 | 1944 | $noslash = $target = substr( $target, 1, -strlen($m[0][0]) ); |
— | — | @@ -4086,16 +4087,11 @@ |
4087 | 4088 | $linkCache->addGoodLinkObj( $s->page_id, $title ); |
4088 | 4089 | $this->mOutput->addLink( $title, $s->page_id ); |
4089 | 4090 | |
4090 | | - if ( $threshold > 0 ) { |
4091 | | - $size = $s->page_len; |
4092 | | - if ( $s->page_is_redirect || $s->page_namespace != 0 || $size >= $threshold ) { |
4093 | | - $colours[$pdbk] = 1; |
4094 | | - } else { |
4095 | | - $colours[$pdbk] = 2; |
4096 | | - } |
4097 | | - } else { |
4098 | | - $colours[$pdbk] = 1; |
4099 | | - } |
| 4091 | + $colours[$pdbk] = ( $threshold == 0 || ( |
| 4092 | + $s->page_len >= $threshold || # always true if $threshold <= 0 |
| 4093 | + $s->page_is_redirect || |
| 4094 | + !Namespace::isContent( $s->page_namespace ) ) |
| 4095 | + ? 1 : 2 ); |
4100 | 4096 | } |
4101 | 4097 | } |
4102 | 4098 | wfProfileOut( $fname.'-check' ); |
— | — | @@ -4595,7 +4591,7 @@ |
4596 | 4592 | .+? # Section title... |
4597 | 4593 | \\2 # Ending = count must match start |
4598 | 4594 | (?:$comment|<\/?noinclude>|[ \\t]+)* # Trailing whitespace ok |
4599 | | - # Bug 9156: don't require EOL here |
| 4595 | + $ |
4600 | 4596 | | |
4601 | 4597 | <h([1-6])\b.*?> |
4602 | 4598 | .*? |
Index: branches/phase3_rev_deleted/includes/SpecialContributions.php |
— | — | @@ -10,8 +10,6 @@ |
11 | 11 | var $namespace = '', $mDb; |
12 | 12 | |
13 | 13 | function __construct( $target, $namespace = false ) { |
14 | | - global $wgUser; |
15 | | - |
16 | 14 | parent::__construct(); |
17 | 15 | foreach( explode( ' ', 'uctop diff newarticle rollbacklink diff hist minoreditletter' ) as $msg ) { |
18 | 16 | $this->messages[$msg] = wfMsgExt( $msg, array( 'escape') ); |
Index: branches/phase3_rev_deleted/includes/PatrolLog.php |
— | — | @@ -46,7 +46,7 @@ |
47 | 47 | # these conditions would have gone into recentchanges, which we aren't
|
48 | 48 | # supposed to be updating
|
49 | 49 | if( is_object( $skin ) ) {
|
50 | | - list( $cur, $prev, $auto ) = $params;
|
| 50 | + list( $cur, /* $prev */, $auto ) = $params;
|
51 | 51 | # Standard link to the page in question
|
52 | 52 | $link = $skin->makeLinkObj( $title );
|
53 | 53 | # Generate a diff link
|
Index: branches/phase3_rev_deleted/includes/UserMailer.php |
— | — | @@ -145,7 +145,7 @@ |
146 | 146 | if (is_array($dest)) { |
147 | 147 | $chunks = array_chunk($dest, $wgEnotifMaxRecips); |
148 | 148 | foreach ($chunks as $chunk) { |
149 | | - $e = send_mail($mail_object, $dest, $headers, $body); |
| 149 | + $e = send_mail($mail_object, $chunk, $headers, $body); |
150 | 150 | if ($e != '') |
151 | 151 | return $e; |
152 | 152 | } |
Index: branches/phase3_rev_deleted/includes/Profiler.php |
— | — | @@ -301,6 +301,9 @@ |
302 | 302 | * @static |
303 | 303 | */ |
304 | 304 | function logToDB($name, $timeSum, $eventCount) { |
| 305 | + # Do not log anything if database is readonly (bug 5375) |
| 306 | + if( wfReadOnly() ) { return; } |
| 307 | + |
305 | 308 | # Warning: $wguname is a live patch, it should be moved to Setup.php |
306 | 309 | global $wguname, $wgProfilePerHost; |
307 | 310 | |
Index: branches/phase3_rev_deleted/includes/EditPage.php |
— | — | @@ -1002,7 +1002,7 @@ |
1003 | 1003 | } |
1004 | 1004 | if ( $this->mTitle->isCascadeProtected() ) { |
1005 | 1005 | # Is this page under cascading protection from some source pages? |
1006 | | - list($cascadeSources, $restrictions) = $this->mTitle->getCascadeProtectionSources(); |
| 1006 | + list($cascadeSources, /* $restrictions */) = $this->mTitle->getCascadeProtectionSources(); |
1007 | 1007 | if ( count($cascadeSources) > 0 ) { |
1008 | 1008 | # Explain, and list the titles responsible |
1009 | 1009 | $notice = wfMsgExt( 'cascadeprotectedwarning', array('parsemag'), count($cascadeSources) ) . "\n"; |
Index: branches/phase3_rev_deleted/includes/SpecialBlockip.php |
— | — | @@ -65,7 +65,7 @@ |
66 | 66 | } |
67 | 67 | |
68 | 68 | function showForm( $err ) { |
69 | | - global $wgOut, $wgUser, $wgSysopUserBans; |
| 69 | + global $wgOut, $wgUser, $wgSysopUserBans, $wgContLang; |
70 | 70 | |
71 | 71 | $wgOut->setPagetitle( wfMsg( 'blockip' ) ); |
72 | 72 | $wgOut->addWikiText( wfMsg( 'blockiptext' ) ); |
— | — | @@ -84,6 +84,7 @@ |
85 | 85 | |
86 | 86 | $titleObj = SpecialPage::getTitleFor( 'Blockip' ); |
87 | 87 | $action = $titleObj->escapeLocalURL( "action=submit" ); |
| 88 | + $alignRight = $wgContLang->isRtl() ? 'left' : 'right'; |
88 | 89 | |
89 | 90 | if ( "" != $err ) { |
90 | 91 | $wgOut->setSubtitle( wfMsgHtml( 'formerror' ) ); |
— | — | @@ -150,8 +151,8 @@ |
151 | 152 | <form id=\"blockip\" method=\"post\" action=\"{$action}\"> |
152 | 153 | <table border='0'> |
153 | 154 | <tr> |
154 | | - <td align=\"right\">{$mIpaddress}:</td> |
155 | | - <td align=\"left\"> |
| 155 | + <td align=\"$alignRight\">{$mIpaddress}</td> |
| 156 | + <td> |
156 | 157 | " . Xml::input( 'wpBlockAddress', 45, $this->BlockAddress, |
157 | 158 | array( |
158 | 159 | 'tabindex' => '1', |
— | — | @@ -162,8 +163,8 @@ |
163 | 164 | <tr>"); |
164 | 165 | if ($showblockoptions) { |
165 | 166 | $wgOut->addHTML(" |
166 | | - <td align=\"right\">{$mIpbexpiry}:</td> |
167 | | - <td align=\"left\"> |
| 167 | + <td align=\"$alignRight\">{$mIpbexpiry}</td> |
| 168 | + <td> |
168 | 169 | <select tabindex='2' id='wpBlockExpiry' name=\"wpBlockExpiry\" onchange=\"considerChangingExpiryFocus()\"> |
169 | 170 | $blockExpiryFormOptions |
170 | 171 | </select> |
— | — | @@ -173,8 +174,8 @@ |
174 | 175 | $wgOut->addHTML(" |
175 | 176 | </tr> |
176 | 177 | <tr id='wpBlockOther'> |
177 | | - <td align=\"right\">{$mIpbother}:</td> |
178 | | - <td align=\"left\"> |
| 178 | + <td align=\"$alignRight\">{$mIpbother}</td> |
| 179 | + <td> |
179 | 180 | " . Xml::input( 'wpBlockOther', 45, $this->BlockOther, |
180 | 181 | array( 'tabindex' => '3', 'id' => 'mw-bi-other' ) ) . " |
181 | 182 | </td> |
— | — | @@ -182,8 +183,8 @@ |
183 | 184 | if ( $blockReasonList != '' ) { |
184 | 185 | $wgOut->addHTML(" |
185 | 186 | <tr> |
186 | | - <td align=\"right\">{$mIpbreasonother}:</td> |
187 | | - <td align=\"left\"> |
| 187 | + <td align=\"$alignRight\">{$mIpbreasonother}</td> |
| 188 | + <td> |
188 | 189 | <select tabindex='4' id=\"wpBlockReasonList\" name=\"wpBlockReasonList\"> |
189 | 190 | $blockReasonList |
190 | 191 | </select> |
— | — | @@ -192,15 +193,15 @@ |
193 | 194 | } |
194 | 195 | $wgOut->addHTML(" |
195 | 196 | <tr id=\"wpBlockReason\"> |
196 | | - <td align=\"right\">{$mIpbreason}:</td> |
197 | | - <td align=\"left\"> |
| 197 | + <td align=\"$alignRight\">{$mIpbreason}</td> |
| 198 | + <td> |
198 | 199 | " . Xml::input( 'wpBlockReason', 45, $this->BlockReason, |
199 | 200 | array( 'tabindex' => '5', 'id' => 'mw-bi-reason' ) ) . " |
200 | 201 | </td> |
201 | 202 | </tr> |
202 | 203 | <tr id='wpAnonOnlyRow'> |
203 | 204 | <td> </td> |
204 | | - <td align=\"left\"> |
| 205 | + <td> |
205 | 206 | " . wfCheckLabel( wfMsgHtml( 'ipbanononly' ), |
206 | 207 | 'wpAnonOnly', 'wpAnonOnly', $this->BlockAnonOnly, |
207 | 208 | array( 'tabindex' => '6' ) ) . " |
— | — | @@ -208,7 +209,7 @@ |
209 | 210 | </tr> |
210 | 211 | <tr id='wpCreateAccountRow'> |
211 | 212 | <td> </td> |
212 | | - <td align=\"left\"> |
| 213 | + <td> |
213 | 214 | " . wfCheckLabel( wfMsgHtml( 'ipbcreateaccount' ), |
214 | 215 | 'wpCreateAccount', 'wpCreateAccount', $this->BlockCreateAccount, |
215 | 216 | array( 'tabindex' => '7' ) ) . " |
— | — | @@ -216,7 +217,7 @@ |
217 | 218 | </tr> |
218 | 219 | <tr id='wpEnableAutoblockRow'> |
219 | 220 | <td> </td> |
220 | | - <td align=\"left\"> |
| 221 | + <td> |
221 | 222 | " . wfCheckLabel( wfMsgHtml( 'ipbenableautoblock' ), |
222 | 223 | 'wpEnableAutoblock', 'wpEnableAutoblock', $this->BlockEnableAutoblock, |
223 | 224 | array( 'tabindex' => '8' ) ) . " |
— | — | @@ -228,7 +229,7 @@ |
229 | 230 | $wgOut->addHTML(" |
230 | 231 | <tr> |
231 | 232 | <td> </td> |
232 | | - <td align=\"left\"> |
| 233 | + <td> |
233 | 234 | " . wfCheckLabel( wfMsgHtml( 'ipbhidename' ), |
234 | 235 | 'wpHideName', 'wpHideName', $this->BlockHideName, |
235 | 236 | array( 'tabindex' => '9' ) ) . " |
— | — | @@ -239,7 +240,7 @@ |
240 | 241 | $wgOut->addHTML(" |
241 | 242 | <tr> |
242 | 243 | <td style='padding-top: 1em'> </td> |
243 | | - <td style='padding-top: 1em' align=\"left\"> |
| 244 | + <td style='padding-top: 1em'> |
244 | 245 | " . Xml::submitButton( wfMsg( 'ipbsubmit' ), |
245 | 246 | array( 'name' => 'wpBlock', 'tabindex' => '10' ) ) . " |
246 | 247 | </td> |
— | — | @@ -377,7 +378,7 @@ |
378 | 379 | # Make log entry, if the name is hidden, put it in the oversight log |
379 | 380 | $log_type = ($this->BlockHideName) ? 'oversight' : 'block'; |
380 | 381 | $log = new LogPage( $log_type ); |
381 | | - $log->addEntry( 'block', Title::makeTitle( NS_USER, $this->BlockAddress ), |
| 382 | + $log->addEntry( $log_type, Title::makeTitle( NS_USER, $this->BlockAddress ), |
382 | 383 | $reasonstr, $logParams ); |
383 | 384 | |
384 | 385 | # Report to the user |
Index: branches/phase3_rev_deleted/includes/HTMLForm.php |
— | — | @@ -134,7 +134,7 @@ |
135 | 135 | $attribs = array( 'name' => $selectname ); |
136 | 136 | } |
137 | 137 | $attribs['style'] = 'width: 100%'; |
138 | | - $out .= wfElement( 'select', $attribs, null ); |
| 138 | + $out .= wfOpenElement( 'select', $attribs ); |
139 | 139 | |
140 | 140 | foreach( $groups as $group ) { |
141 | 141 | $attribs = array( 'value' => $group ); |
Index: branches/phase3_rev_deleted/includes/SearchPostgres.php |
— | — | @@ -64,6 +64,7 @@ |
65 | 65 | $term = preg_replace('/:/', ' ', $term);
|
66 | 66 |
|
67 | 67 | $searchstring = '';
|
| 68 | + $m = array();
|
68 | 69 | if( preg_match_all('/([-!]?)(\S+)\s*/', $term, $m, PREG_SET_ORDER ) ) {
|
69 | 70 | foreach( $m as $terms ) {
|
70 | 71 | if (strlen($terms[1])) {
|
Index: branches/phase3_rev_deleted/includes/OutputPage.php |
— | — | @@ -15,6 +15,7 @@ |
16 | 16 | var $mLastModified, $mETag, $mCategoryLinks; |
17 | 17 | var $mScripts, $mLinkColours, $mPageLinkTitle; |
18 | 18 | |
| 19 | + var $mAllowUserJs; |
19 | 20 | var $mSuppressQuickbar; |
20 | 21 | var $mOnloadHandler; |
21 | 22 | var $mDoNothing; |
— | — | @@ -33,6 +34,8 @@ |
34 | 35 | * Initialise private variables |
35 | 36 | */ |
36 | 37 | function __construct() { |
| 38 | + global $wgAllowUserJs; |
| 39 | + $this->mAllowUserJs = $wgAllowUserJs; |
37 | 40 | $this->mMetatags = $this->mKeywords = $this->mLinktags = array(); |
38 | 41 | $this->mHTMLtitle = $this->mPagetitle = $this->mBodytext = |
39 | 42 | $this->mRedirect = $this->mLastModified = |
— | — | @@ -283,6 +286,9 @@ |
284 | 287 | public function suppressQuickbar() { $this->mSuppressQuickbar = true; } |
285 | 288 | public function isQuickbarSuppressed() { return $this->mSuppressQuickbar; } |
286 | 289 | |
| 290 | + public function disallowUserJs() { $this->mAllowUserJs = false; } |
| 291 | + public function isUserJsAllowed() { return $this->mAllowUserJs; } |
| 292 | + |
287 | 293 | public function addHTML( $text ) { $this->mBodytext .= $text; } |
288 | 294 | public function clearHTML() { $this->mBodytext = ''; } |
289 | 295 | public function getHTML() { return $this->mBodytext; } |
— | — | @@ -937,7 +943,7 @@ |
938 | 944 | $this->setPageTitle( wfMsg( 'viewsource' ) ); |
939 | 945 | $this->setSubtitle( wfMsg( 'viewsourcefor', $skin->makeKnownLinkObj( $wgTitle ) ) ); |
940 | 946 | |
941 | | - list( $cascadeSources, $restrictions ) = $wgTitle->getCascadeProtectionSources(); |
| 947 | + list( $cascadeSources, /* $restrictions */ ) = $wgTitle->getCascadeProtectionSources(); |
942 | 948 | |
943 | 949 | # Determine if protection is due to the page being a system message |
944 | 950 | # and show an appropriate explanation |
— | — | @@ -1138,7 +1144,7 @@ |
1139 | 1145 | $ret .= "<link rel='stylesheet' type='text/css' $media href='$printsheet' />\n"; |
1140 | 1146 | |
1141 | 1147 | $sk = $wgUser->getSkin(); |
1142 | | - $ret .= $sk->getHeadScripts(); |
| 1148 | + $ret .= $sk->getHeadScripts( $this->mAllowUserJs ); |
1143 | 1149 | $ret .= $this->mScripts; |
1144 | 1150 | $ret .= $sk->getUserStyles(); |
1145 | 1151 | $ret .= $this->getHeadItems(); |
Index: branches/phase3_rev_deleted/includes/SpecialResetpass.php |
— | — | @@ -74,6 +74,8 @@ |
75 | 75 |
|
76 | 76 | function showForm() {
|
77 | 77 | global $wgOut, $wgUser, $wgRequest;
|
| 78 | +
|
| 79 | + $wgOut->disallowUserJs();
|
78 | 80 |
|
79 | 81 | $self = SpecialPage::getTitleFor( 'Resetpass' );
|
80 | 82 | $form =
|
Index: branches/phase3_rev_deleted/includes/SpecialProtectedpages.php |
— | — | @@ -219,8 +219,7 @@ |
220 | 220 | $lb = new LinkBatch;
|
221 | 221 |
|
222 | 222 | while ( $row = $this->mResult->fetchObject() ) {
|
223 | | - $name = str_replace( ' ', '_', $row->page_title );
|
224 | | - $lb->add( $row->page_namespace, $name );
|
| 223 | + $lb->add( $row->page_namespace, $row->page_title );
|
225 | 224 | }
|
226 | 225 |
|
227 | 226 | $lb->execute();
|
— | — | @@ -239,10 +238,11 @@ |
240 | 239 | $conds[] = 'page_id=pr_page';
|
241 | 240 | $conds[] = 'pr_type=' . $this->mDb->addQuotes( $this->type );
|
242 | 241 |
|
243 | | - if( $this->sizetype=='min' )
|
| 242 | + if( $this->sizetype=='min' ) {
|
244 | 243 | $conds[] = 'page_len>=' . $this->size;
|
245 | | - else if( $this->sizetype=='max' )
|
| 244 | + } else if( $this->sizetype=='max' ) {
|
246 | 245 | $conds[] = 'page_len<=' . $this->size;
|
| 246 | + }
|
247 | 247 |
|
248 | 248 | if( $this->level )
|
249 | 249 | $conds[] = 'pr_level=' . $this->mDb->addQuotes( $this->level );
|
Index: branches/phase3_rev_deleted/includes/Revision.php |
— | — | @@ -96,7 +96,7 @@ |
97 | 97 | } else if ( $row->log_action=='restore' ) { |
98 | 98 | // Check the restore point (format is <page time><\n><image time>) |
99 | 99 | $restpoints = explode('\n',$row->log_params); |
100 | | - if ( $restpoints[0] >= $timeframe ) { |
| 100 | + if ( $restpoints[0] >= 0 && $restpoints[0] <= $timeframe ) { |
101 | 101 | $isdeleted = false; // our desired revision was restored |
102 | 102 | $d = "log_action='delete'"; |
103 | 103 | $r = '1 = 0'; |
Index: branches/phase3_rev_deleted/includes/Wiki.php |
— | — | @@ -158,7 +158,7 @@ |
159 | 159 | $title = SpecialPage::getTitleFor( 'Badtitle' ); |
160 | 160 | throw new ErrorPageError( 'badtitle', 'badtitletext' ); |
161 | 161 | } |
162 | | - } else if ( ( $action == 'view' ) && |
| 162 | + } else if ( ( $action == 'view' ) && !$wgRequest->wasPosted() && |
163 | 163 | (!isset( $this->GET['title'] ) || $title->getPrefixedDBKey() != $this->GET['title'] ) && |
164 | 164 | !count( array_diff( array_keys( $this->GET ), array( 'action', 'title' ) ) ) ) |
165 | 165 | { |
Index: branches/phase3_rev_deleted/includes/SpecialUndelete.php |
— | — | @@ -461,12 +461,10 @@ |
462 | 462 | } |
463 | 463 | // If there were any revisions restored |
464 | 464 | if( $revision ) { |
465 | | - // If we have to create a new page entry |
466 | | - // or this is now the newest live revision, |
467 | | - // then set the page entry to point to it |
468 | | - if( $newid || $revision->getTimestamp() > $previousTimestamp ) { |
469 | | - // Attach the latest revision to the page... |
470 | | - $article->updateRevisionOn( $dbw, $revision, $previousRevId ); |
| 465 | + // Attach the latest revision to the page... |
| 466 | + $wasnew = $article->updateIfNewerOn( $dbw, $revision, $previousRevId ); |
| 467 | + |
| 468 | + if( $newid || $wasnew ) { |
471 | 469 | // Update site stats, link tables, etc |
472 | 470 | $article->createUpdates( $revision ); |
473 | 471 | } |
— | — | @@ -892,7 +890,7 @@ |
893 | 891 | $wgOut->addHtml( "<h2 id=\"filehistory\">" . wfMsgHtml( 'imghistory' ) . "</h2>\n" ); |
894 | 892 | $wgOut->addHTML( wfMsgHtml( "restorepoint" ) ); |
895 | 893 | $wgOut->addHtml( "<ul>" ); |
896 | | - $wgOut->addHTML( "<li>" . wfRadio( "imgrestorepoint", -1, false ) . wfMsgHtml('restorenone') . "</li>" ); |
| 894 | + $wgOut->addHTML( "<li>" . wfRadio( "imgrestorepoint", -1, false ) . " " . wfMsgHtml('restorenone') . "</li>" ); |
897 | 895 | while( $row = $files->fetchObject() ) { |
898 | 896 | $ts = wfTimestamp( TS_MW, $row->fa_timestamp ); |
899 | 897 | if ( $this->mAllowed && $row->fa_storage_key ) { |
— | — | @@ -958,7 +956,9 @@ |
959 | 957 | $titleObj = SpecialPage::getTitleFor( "Undelete" ); |
960 | 958 | $pageLink = $this->getPageLink( $row, $titleObj, $ts, $this->mTarget ); |
961 | 959 | # Last link |
962 | | - if ( isset($this->prevId[$row->ar_rev_id]) ) |
| 960 | + if ( !$this->userCan( $row, Revision::DELETED_TEXT ) ) |
| 961 | + $last = $this->message['last']; |
| 962 | + else if ( isset($this->prevId[$row->ar_rev_id]) ) |
963 | 963 | $last = $this->sk->makeKnownLinkObj( $titleObj, $this->message['last'], "target=" . $this->mTarget . |
964 | 964 | "&diff=" . $row->ar_rev_id . "&oldid=" . $this->prevId[$row->ar_rev_id] ); |
965 | 965 | } else { |
Index: branches/phase3_rev_deleted/includes/SpecialIpblocklist.php |
— | — | @@ -77,7 +77,7 @@ |
78 | 78 | } |
79 | 79 | |
80 | 80 | function showForm( $err ) { |
81 | | - global $wgOut, $wgUser, $wgSysopUserBans; |
| 81 | + global $wgOut, $wgUser, $wgSysopUserBans, $wgContLang; |
82 | 82 | |
83 | 83 | $wgOut->setPagetitle( wfMsg( 'unblockip' ) ); |
84 | 84 | $wgOut->addWikiText( wfMsg( 'unblockiptext' ) ); |
— | — | @@ -87,6 +87,7 @@ |
88 | 88 | $ipus = wfMsgHtml( 'ipusubmit' ); |
89 | 89 | $titleObj = SpecialPage::getTitleFor( "Ipblocklist" ); |
90 | 90 | $action = $titleObj->getLocalURL( "action=submit" ); |
| 91 | + $alignRight = $wgContLang->isRtl() ? 'left' : 'right'; |
91 | 92 | |
92 | 93 | if ( "" != $err ) { |
93 | 94 | $wgOut->setSubtitle( wfMsg( "formerror" ) ); |
— | — | @@ -111,24 +112,24 @@ |
112 | 113 | Xml::openElement( 'form', array( 'method' => 'post', 'action' => $action, 'id' => 'unblockip' ) ) . |
113 | 114 | Xml::openElement( 'table', array( 'border' => '0' ) ). |
114 | 115 | "<tr> |
115 | | - <td align='right'> |
116 | | - {$ipa}: |
| 116 | + <td align='$alignRight'> |
| 117 | + {$ipa} |
117 | 118 | </td> |
118 | | - <td align='left'> |
| 119 | + <td> |
119 | 120 | {$addressPart} |
120 | 121 | </td> |
121 | 122 | </tr> |
122 | 123 | <tr> |
123 | | - <td align='right'> |
124 | | - {$ipr}: |
| 124 | + <td align='$alignRight'> |
| 125 | + {$ipr} |
125 | 126 | </td> |
126 | | - <td align='left'>" . |
| 127 | + <td>" . |
127 | 128 | Xml::input( 'wpUnblockReason', 40, $this->reason, array( 'type' => 'text', 'tabindex' => '2' ) ) . |
128 | 129 | "</td> |
129 | 130 | </tr> |
130 | 131 | <tr> |
131 | 132 | <td> </td> |
132 | | - <td align='left'>" . |
| 133 | + <td>" . |
133 | 134 | Xml::submitButton( $ipus, array( 'name' => 'wpBlock', 'tabindex' => '3' ) ) . |
134 | 135 | "</td> |
135 | 136 | </tr>" . |
— | — | @@ -223,46 +224,30 @@ |
224 | 225 | } |
225 | 226 | } |
226 | 227 | |
227 | | - # TODO: difference message between |
228 | | - # a) an real empty list and |
229 | | - # b) requested ip/username not on list |
230 | 228 | $pager = new IPBlocklistPager( $this, $conds ); |
231 | 229 | if ( $pager->getNumRows() ) { |
232 | | - $s = $this->searchForm() . |
233 | | - $pager->getNavigationBar(); |
234 | | - $s .= "<ul>" . |
235 | | - $pager->getBody() . |
236 | | - "</ul>"; |
237 | | - $s .= $pager->getNavigationBar(); |
| 230 | + $wgOut->addHTML( |
| 231 | + $this->searchForm() . |
| 232 | + $pager->getNavigationBar() . |
| 233 | + Xml::tags( 'ul', null, $pager->getBody() ) . |
| 234 | + $pager->getNavigationBar() |
| 235 | + ); |
| 236 | + } elseif ( $this->ip != '') { |
| 237 | + $wgOut->addHTML( $this->searchForm() ); |
| 238 | + $wgOut->addWikiText( wfMsg( 'ipblocklist-no-results' ) ); |
238 | 239 | } else { |
239 | | - $s = $this->searchForm() . |
240 | | - '<p>' . wfMsgHTML( 'ipblocklistempty' ) . '</p>'; |
| 240 | + $wgOut->addWikiText( wfMsg( 'ipblocklist-empty' ) ); |
241 | 241 | } |
242 | | - $wgOut->addHTML( $s ); |
243 | 242 | } |
244 | 243 | |
245 | 244 | function searchForm() { |
246 | 245 | global $wgTitle, $wgScript, $wgRequest; |
247 | 246 | return |
248 | | - wfElement( 'form', array( |
249 | | - 'action' => $wgScript ), |
250 | | - null ) . |
251 | | - wfHidden( 'title', $wgTitle->getPrefixedDbKey() ) . |
252 | | - wfElement( 'input', array( |
253 | | - 'type' => 'hidden', |
254 | | - 'name' => 'action', |
255 | | - 'value' => 'search' ) ). |
256 | | - wfElement( 'input', array( |
257 | | - 'type' => 'hidden', |
258 | | - 'name' => 'limit', |
259 | | - 'value' => $wgRequest->getText( 'limit' ) ) ) . |
260 | | - wfElement( 'input', array( |
261 | | - 'name' => 'ip', |
262 | | - 'value' => $this->ip ) ) . |
263 | | - wfElement( 'input', array( |
264 | | - 'type' => 'submit', |
265 | | - 'value' => wfMsg( 'ipblocklist-submit' ) ) ) . |
266 | | - '</form>'; |
| 247 | + Xml::tags( 'form', array( 'action' => $wgScript ), |
| 248 | + Xml::hidden( 'title', $wgTitle->getPrefixedDbKey() ) . |
| 249 | + Xml::input( 'ip', /*size*/ false, $this->ip ) . |
| 250 | + Xml::submitButton( wfMsg( 'ipblocklist-submit' ) ) |
| 251 | + ); |
267 | 252 | } |
268 | 253 | |
269 | 254 | /** |
Index: branches/phase3_rev_deleted/includes/Title.php |
— | — | @@ -40,7 +40,7 @@ |
41 | 41 | * Please use the accessor functions |
42 | 42 | */ |
43 | 43 | |
44 | | - /**#@+ |
| 44 | + /**#@+ |
45 | 45 | * @private |
46 | 46 | */ |
47 | 47 | |
— | — | @@ -2407,11 +2407,14 @@ |
2408 | 2408 | * Should a link should be displayed as a known link, just based on its title? |
2409 | 2409 | * |
2410 | 2410 | * Currently, a self-link with a fragment and special pages are in |
2411 | | - * this category. Special pages never exist in the database. |
| 2411 | + * this category. Special pages never exist in the database. System |
| 2412 | + * messages that have defined default values are also always known. |
2412 | 2413 | */ |
2413 | 2414 | public function isAlwaysKnown() { |
2414 | | - return $this->isExternal() || ( 0 == $this->mNamespace && "" == $this->mDbkeyform ) |
2415 | | - || NS_SPECIAL == $this->mNamespace; |
| 2415 | + return ( $this->isExternal() || |
| 2416 | + ( 0 == $this->mNamespace && "" == $this->mDbkeyform ) || |
| 2417 | + ( NS_SPECIAL == $this->mNamespace ) || |
| 2418 | + ( NS_MEDIAWIKI == $this->mNamespace && wfMsgWeirdKey( $this->mDbkeyform ) ) ); |
2416 | 2419 | } |
2417 | 2420 | |
2418 | 2421 | /** |
Index: branches/phase3_rev_deleted/includes/Image.php |
— | — | @@ -898,7 +898,7 @@ |
899 | 899 | if ( !$handler ) { |
900 | 900 | return null; |
901 | 901 | } |
902 | | - list( $thumbExt, $thumbMime ) = self::getThumbType( $this->extension, $this->mime ); |
| 902 | + list( $thumbExt, /* $thumbMime */ ) = self::getThumbType( $this->extension, $this->mime ); |
903 | 903 | $thumbName = $handler->makeParamString( $params ) . '-' . $this->fileName; |
904 | 904 | if ( $thumbExt != $this->extension ) { |
905 | 905 | $thumbName .= ".$thumbExt"; |
— | — | @@ -992,17 +992,19 @@ |
993 | 993 | $thumbPath = wfImageThumbDir( $this->name, $this->fromSharedDirectory ) . "/$thumbName"; |
994 | 994 | $thumbUrl = $this->thumbUrlFromName( $thumbName ); |
995 | 995 | |
996 | | - $this->migrateThumbFile( $thumbName ); |
997 | 996 | |
998 | | - if ( file_exists( $thumbPath ) ) { |
| 997 | + if ( !$wgGenerateThumbnailOnParse && !($flags & self::RENDER_NOW ) ) { |
999 | 998 | $thumb = $handler->getTransform( $this, $thumbPath, $thumbUrl, $params ); |
1000 | 999 | break; |
1001 | 1000 | } |
1002 | | - |
1003 | | - if ( !$wgGenerateThumbnailOnParse && !($flags & self::RENDER_NOW ) ) { |
| 1001 | + |
| 1002 | + wfDebug( "Doing stat for $thumbPath\n" ); |
| 1003 | + $this->migrateThumbFile( $thumbName ); |
| 1004 | + if ( file_exists( $thumbPath ) ) { |
1004 | 1005 | $thumb = $handler->getTransform( $this, $thumbPath, $thumbUrl, $params ); |
1005 | 1006 | break; |
1006 | 1007 | } |
| 1008 | + |
1007 | 1009 | $thumb = $handler->doTransform( $this, $thumbPath, $thumbUrl, $params ); |
1008 | 1010 | |
1009 | 1011 | // Ignore errors if requested |
— | — | @@ -1137,7 +1139,6 @@ |
1138 | 1140 | $dir = wfImageThumbDir( $this->name, $shared ); |
1139 | 1141 | $urls = array(); |
1140 | 1142 | foreach ( $files as $file ) { |
1141 | | - $m = array(); |
1142 | 1143 | # Check that the base image name is part of the thumb name |
1143 | 1144 | # This is a basic sanity check to avoid erasing unrelated directories |
1144 | 1145 | if ( strpos( $file, $this->name ) !== false ) { |
— | — | @@ -1477,7 +1478,6 @@ |
1478 | 1479 | } |
1479 | 1480 | |
1480 | 1481 | function getExifData() { |
1481 | | - global $wgRequest; |
1482 | 1482 | $handler = $this->getHandler(); |
1483 | 1483 | if ( !$handler || $handler->getMetadataType( $this ) != 'exif' ) { |
1484 | 1484 | return array(); |
— | — | @@ -1667,7 +1667,8 @@ |
1668 | 1668 | * @return FStransaction on success, false on failure |
1669 | 1669 | */ |
1670 | 1670 | private function prepareDeleteOld( $archiveName, $reason, $suppress=false ) { |
1671 | | - list($timestamp,$img) = explode('!',$archiveName); |
| 1671 | + // Stored as either <time>!<name> or <time>!<key> |
| 1672 | + list($timestamp,$img) = explode('!',$archiveName,2); |
1672 | 1673 | // Is this image using a filestore key (hidden)? |
1673 | 1674 | if( $img != $this->name && FileStore::validKey($img) ) { |
1674 | 1675 | $group = 'hidden'; |
— | — | @@ -1804,6 +1805,15 @@ |
1805 | 1806 | try { |
1806 | 1807 | $dbw = wfGetDB( DB_MASTER ); |
1807 | 1808 | $dbw->begin(); |
| 1809 | + |
| 1810 | + // Make sure there is a page for this image |
| 1811 | + $page = $dbw->selectRow( 'page', |
| 1812 | + array( 'page_id', 'page_latest' ), |
| 1813 | + array( 'page_namespace' => $this->title->getNamespace(), |
| 1814 | + 'page_title' => $this->title->getDBkey() ), |
| 1815 | + __METHOD__ ); |
| 1816 | + if( !$page ) |
| 1817 | + return false; |
1808 | 1818 | |
1809 | 1819 | // Re-confirm whether this image presently exists; |
1810 | 1820 | // if no we'll need to create an image record for the |
— | — | @@ -1834,11 +1844,7 @@ |
1835 | 1845 | } |
1836 | 1846 | |
1837 | 1847 | $revisions = 0; |
1838 | | - while( $row = $dbw->fetchObject( $result ) ) { |
1839 | | - if( ($row->fa_deleted & Revision::DELETED_RESTRICTED) && !$wgUser->isAllowed('hiderevision') ) { |
1840 | | - // Skip restoring file revisions that the user cannot restore |
1841 | | - continue; |
1842 | | - } |
| 1848 | + while( $row = $dbw->fetchObject( $result ) ) { |
1843 | 1849 | $revisions++; |
1844 | 1850 | $store = FileStore::get( $row->fa_storage_group ); |
1845 | 1851 | if( !$store ) { |
— | — | @@ -1908,7 +1914,7 @@ |
1909 | 1915 | $archiveName = wfTimestamp( TS_MW, $row->fa_deleted_timestamp ) . '!' . $row->fa_name; |
1910 | 1916 | } |
1911 | 1917 | |
1912 | | - list($timestamp,$img) = explode('!',$archiveName); |
| 1918 | + list($timestamp,$img) = explode('!',$archiveName,2); |
1913 | 1919 | // Is this image hidden? |
1914 | 1920 | if( !$Unsuppress && $row->fa_deleted & Image::DELETED_FILE ) { |
1915 | 1921 | $group = 'hidden'; |
Index: branches/phase3_rev_deleted/includes/SpecialExport.php |
— | — | @@ -71,7 +71,7 @@ |
72 | 72 | } |
73 | 73 | } |
74 | 74 | } |
75 | | - else if( $wgRequest->wasPosted() ) { |
| 75 | + else if( $wgRequest->wasPosted() && $page == '' ) { |
76 | 76 | $page = $wgRequest->getText( 'pages' ); |
77 | 77 | $curonly = $wgRequest->getCheck( 'curonly' ); |
78 | 78 | $rawOffset = $wgRequest->getVal( 'offset' ); |
Index: branches/phase3_rev_deleted/includes/SkinTemplate.php |
— | — | @@ -179,7 +179,7 @@ |
180 | 180 | |
181 | 181 | $this->usercss = $this->userjs = $this->userjsprev = false; |
182 | 182 | $this->setupUserCss(); |
183 | | - $this->setupUserJs(); |
| 183 | + $this->setupUserJs( $out->isUserJsAllowed() ); |
184 | 184 | $this->titletxt = $this->mTitle->getPrefixedText(); |
185 | 185 | wfProfileOut( "$fname-stuff" ); |
186 | 186 | |
— | — | @@ -591,7 +591,7 @@ |
592 | 592 | if( $selected ) { |
593 | 593 | $classes[] = 'selected'; |
594 | 594 | } |
595 | | - if( $checkEdit && $title->getArticleId() == 0 ) { |
| 595 | + if( $checkEdit && !$title->isAlwaysKnown() && $title->getArticleId() == 0 ) { |
596 | 596 | $classes[] = 'new'; |
597 | 597 | $query = 'action=edit'; |
598 | 598 | } |
— | — | @@ -968,9 +968,12 @@ |
969 | 969 | # If we use the site's dynamic CSS, throw that in, too |
970 | 970 | if ( $wgUseSiteCss ) { |
971 | 971 | $query = "usemsgcache=yes&action=raw&ctype=text/css&smaxage=$wgSquidMaxage"; |
| 972 | + $skinquery = ''; |
| 973 | + if (($us = $wgRequest->getVal('useskin', '')) !== '') |
| 974 | + $skinquery = "&useskin=$us"; |
972 | 975 | $sitecss .= '@import "' . self::makeNSUrl( 'Common.css', $query, NS_MEDIAWIKI) . '";' . "\n"; |
973 | 976 | $sitecss .= '@import "' . self::makeNSUrl( ucfirst( $this->skinname ) . '.css', $query, NS_MEDIAWIKI ) . '";' . "\n"; |
974 | | - $sitecss .= '@import "' . self::makeUrl( '-', 'action=raw&gen=css' . $siteargs ) . '";' . "\n"; |
| 977 | + $sitecss .= '@import "' . self::makeUrl( '-', "action=raw&gen=css$siteargs$skinquery" ) . '";' . "\n"; |
975 | 978 | } |
976 | 979 | |
977 | 980 | # If we use any dynamic CSS, make a little CDATA block out of it. |
— | — | @@ -984,14 +987,14 @@ |
985 | 988 | /** |
986 | 989 | * @private |
987 | 990 | */ |
988 | | - function setupUserJs() { |
| 991 | + function setupUserJs( $allowUserJs ) { |
989 | 992 | $fname = 'SkinTemplate::setupUserJs'; |
990 | 993 | wfProfileIn( $fname ); |
991 | 994 | |
992 | | - global $wgRequest, $wgAllowUserJs, $wgJsMimeType; |
| 995 | + global $wgRequest, $wgJsMimeType; |
993 | 996 | $action = $wgRequest->getText('action'); |
994 | 997 | |
995 | | - if( $wgAllowUserJs && $this->loggedin ) { |
| 998 | + if( $allowUserJs && $this->loggedin ) { |
996 | 999 | if( $this->mTitle->isJsSubpage() and $this->userCanPreview( $action ) ) { |
997 | 1000 | # XXX: additional security check/prompt? |
998 | 1001 | $this->userjsprev = '/*<![CDATA[*/ ' . $wgRequest->getText('wpTextbox1') . ' /*]]>*/'; |
Index: branches/phase3_rev_deleted/includes/SpecialPreferences.php |
— | — | @@ -211,19 +211,23 @@ |
212 | 212 | |
213 | 213 | if ( '' != $this->mNewpass && $wgAuth->allowPasswordChange() ) { |
214 | 214 | if ( $this->mNewpass != $this->mRetypePass ) { |
| 215 | + wfRunHooks( "PrefsPasswordAudit", array( $wgUser, $this->mNewpass, 'badretype' ) ); |
215 | 216 | $this->mainPrefsForm( 'error', wfMsg( 'badretype' ) ); |
216 | 217 | return; |
217 | 218 | } |
218 | 219 | |
219 | 220 | if (!$wgUser->checkPassword( $this->mOldpass )) { |
| 221 | + wfRunHooks( "PrefsPasswordAudit", array( $wgUser, $this->mNewpass, 'wrongpassword' ) ); |
220 | 222 | $this->mainPrefsForm( 'error', wfMsg( 'wrongpassword' ) ); |
221 | 223 | return; |
222 | 224 | } |
223 | 225 | |
224 | 226 | try { |
225 | 227 | $wgUser->setPassword( $this->mNewpass ); |
| 228 | + wfRunHooks( "PrefsPasswordAudit", array( $wgUser, $this->mNewpass, 'success' ) ); |
226 | 229 | $this->mNewpass = $this->mOldpass = $this->mRetypePass = ''; |
227 | 230 | } catch( PasswordError $e ) { |
| 231 | + wfRunHooks( "PrefsPasswordAudit", array( $wgUser, $this->mNewpass, 'error' ) ); |
228 | 232 | $this->mainPrefsForm( 'error', $e->getMessage() ); |
229 | 233 | return; |
230 | 234 | } |
— | — | @@ -321,6 +325,9 @@ |
322 | 326 | $wgUser->setCookies(); |
323 | 327 | $wgUser->saveSettings(); |
324 | 328 | } |
| 329 | + if( $oldadr != $newadr ) { |
| 330 | + wfRunHooks( "PrefsEmailAudit", array( $wgUser, $oldadr, $newadr ) ); |
| 331 | + } |
325 | 332 | } |
326 | 333 | |
327 | 334 | if( $needRedirect && $error === false ) { |
— | — | @@ -489,6 +496,8 @@ |
490 | 497 | $wgOut->setArticleRelated( false ); |
491 | 498 | $wgOut->setRobotpolicy( 'noindex,nofollow' ); |
492 | 499 | |
| 500 | + $wgOut->disallowUserJs(); # Prevent hijacked user scripts from sniffing passwords etc. |
| 501 | + |
493 | 502 | if ( $this->mSuccess || 'success' == $status ) { |
494 | 503 | $wgOut->addWikitext( '<div class="successbox"><strong>'. wfMsg( 'savedprefs' ) . '</strong></div>' ); |
495 | 504 | } else if ( 'error' == $status ) { |
— | — | @@ -657,15 +666,15 @@ |
658 | 667 | $this->tableRow( Xml::element( 'h2', null, wfMsg( 'changepassword' ) ) ) . |
659 | 668 | $this->tableRow( |
660 | 669 | Xml::label( wfMsg( 'oldpassword' ), 'wpOldpass' ), |
661 | | - Xml::input( 'wpOldpass', 25, $this->mOldpass, array( 'id' => 'wpOldpass' ) ) |
| 670 | + Xml::password( 'wpOldpass', 25, $this->mOldpass, array( 'id' => 'wpOldpass' ) ) |
662 | 671 | ) . |
663 | 672 | $this->tableRow( |
664 | 673 | Xml::label( wfMsg( 'newpassword' ), 'wpNewpass' ), |
665 | | - Xml::input( 'wpNewpass', 25, $this->mNewpass, array( 'id' => 'wpNewpass' ) ) |
| 674 | + Xml::password( 'wpNewpass', 25, $this->mNewpass, array( 'id' => 'wpNewpass' ) ) |
666 | 675 | ) . |
667 | 676 | $this->tableRow( |
668 | 677 | Xml::label( wfMsg( 'retypenew' ), 'wpRetypePass' ), |
669 | | - Xml::input( 'wpRetypePass', 25, $this->mRetypePass, array( 'id' => 'wpRetypePass' ) ) |
| 678 | + Xml::password( 'wpRetypePass', 25, $this->mRetypePass, array( 'id' => 'wpRetypePass' ) ) |
670 | 679 | ) . |
671 | 680 | Xml::tags( 'tr', null, |
672 | 681 | Xml::tags( 'td', array( 'colspan' => '2' ), |
Index: branches/phase3_rev_deleted/includes/DefaultSettings.php |
— | — | @@ -1136,7 +1136,7 @@ |
1137 | 1137 | * to ensure that client-side caches don't keep obsolete copies of global |
1138 | 1138 | * styles. |
1139 | 1139 | */ |
1140 | | -$wgStyleVersion = '64'; |
| 1140 | +$wgStyleVersion = '67'; |
1141 | 1141 | |
1142 | 1142 | |
1143 | 1143 | # Server-side caching: |
— | — | @@ -1348,7 +1348,11 @@ |
1349 | 1349 | /** Lots of debugging output from SquidUpdate.php */ |
1350 | 1350 | $wgDebugSquid = false; |
1351 | 1351 | |
| 1352 | +/** Whereas to count the number of time an article is viewed. |
| 1353 | + * Does not work if pages are cached (for example with squid). |
| 1354 | + */ |
1352 | 1355 | $wgDisableCounters = false; |
| 1356 | + |
1353 | 1357 | $wgDisableTextSearch = false; |
1354 | 1358 | $wgDisableSearchContext = false; |
1355 | 1359 | /** |
Index: branches/phase3_rev_deleted/includes/HttpFunctions.php |
— | — | @@ -4,12 +4,20 @@ |
5 | 5 | * Various HTTP related functions |
6 | 6 | */ |
7 | 7 | class Http { |
| 8 | + static function get( $url, $timeout = 'default' ) { |
| 9 | + return Http::request( "GET", $url, $timeout ); |
| 10 | + } |
| 11 | + |
| 12 | + static function post( $url, $timeout = 'default' ) { |
| 13 | + return Http::request( "POST", $url, $timeout ); |
| 14 | + } |
| 15 | + |
8 | 16 | /** |
9 | 17 | * Get the contents of a file by HTTP |
10 | 18 | * |
11 | 19 | * if $timeout is 'default', $wgHTTPTimeout is used |
12 | 20 | */ |
13 | | - static function get( $url, $timeout = 'default' ) { |
| 21 | + static function request( $method, $url, $timeout = 'default' ) { |
14 | 22 | global $wgHTTPTimeout, $wgHTTPProxy, $wgVersion, $wgTitle; |
15 | 23 | |
16 | 24 | # Use curl if available |
— | — | @@ -26,6 +34,10 @@ |
27 | 35 | } |
28 | 36 | curl_setopt( $c, CURLOPT_TIMEOUT, $timeout ); |
29 | 37 | curl_setopt( $c, CURLOPT_USERAGENT, "MediaWiki/$wgVersion" ); |
| 38 | + if ( $method == 'POST' ) |
| 39 | + curl_setopt( $c, CURLOPT_POST, true ); |
| 40 | + else |
| 41 | + curl_setopt( $c, CURLOPT_CUSTOMREQUEST, $method ); |
30 | 42 | |
31 | 43 | # Set the referer to $wgTitle, even in command-line mode |
32 | 44 | # This is useful for interwiki transclusion, where the foreign |
— | — | @@ -49,8 +61,12 @@ |
50 | 62 | } else { |
51 | 63 | # Otherwise use file_get_contents, or its compatibility function from GlobalFunctions.php |
52 | 64 | # This may take 3 minutes to time out, and doesn't have local fetch capabilities |
| 65 | + |
| 66 | + $opts = array('http' => array( 'method' => $method ) ); |
| 67 | + $ctx = stream_context_create($opts); |
| 68 | + |
53 | 69 | $url_fopen = ini_set( 'allow_url_fopen', 1 ); |
54 | | - $text = file_get_contents( $url ); |
| 70 | + $text = file_get_contents( $url, false, $ctx ); |
55 | 71 | ini_set( 'allow_url_fopen', $url_fopen ); |
56 | 72 | } |
57 | 73 | return $text; |
Index: branches/phase3_rev_deleted/includes/Block.php |
— | — | @@ -438,9 +438,6 @@ |
439 | 439 | * @return bool Whether or not an autoblock was inserted. |
440 | 440 | */ |
441 | 441 | function doAutoblock( $autoblockip, $justInserted = false ) { |
442 | | - # Check if this IP address is already blocked |
443 | | - $dbw = wfGetDB( DB_MASTER ); |
444 | | - |
445 | 442 | # If autoblocks are disabled, go away. |
446 | 443 | if ( !$this->mEnableAutoblock ) { |
447 | 444 | return; |
Index: branches/phase3_rev_deleted/includes/QueryPage.php |
— | — | @@ -332,7 +332,6 @@ |
333 | 333 | $num = $dbr->numRows($res); |
334 | 334 | |
335 | 335 | $this->preprocessResults( $dbr, $res ); |
336 | | - $sk = $wgUser->getSkin(); |
337 | 336 | |
338 | 337 | # Top header and navigation |
339 | 338 | if( $shownavigation ) { |
Index: branches/phase3_rev_deleted/includes/Skin.php |
— | — | @@ -334,8 +334,8 @@ |
335 | 335 | return self::makeVariablesScript( $vars ); |
336 | 336 | } |
337 | 337 | |
338 | | - function getHeadScripts() { |
339 | | - global $wgStylePath, $wgUser, $wgAllowUserJs, $wgJsMimeType, $wgStyleVersion; |
| 338 | + function getHeadScripts( $allowUserJs ) { |
| 339 | + global $wgStylePath, $wgUser, $wgJsMimeType, $wgStyleVersion; |
340 | 340 | |
341 | 341 | $r = self::makeGlobalVariablesScript( array( 'skinname' => $this->getSkinName() ) ); |
342 | 342 | |
— | — | @@ -348,7 +348,7 @@ |
349 | 349 | $r .= "<script type=\"$wgJsMimeType\" src=\"".htmlspecialchars(self::makeUrl('-','action=raw&gen=js'))."\"><!-- site js --></script>\n"; |
350 | 350 | } |
351 | 351 | } |
352 | | - if( $wgAllowUserJs && $wgUser->isLoggedIn() ) { |
| 352 | + if( $allowUserJs && $wgUser->isLoggedIn() ) { |
353 | 353 | $userpage = $wgUser->getUserPage(); |
354 | 354 | $userjs = htmlspecialchars( self::makeUrl( |
355 | 355 | $userpage->getPrefixedText().'/'.$this->getSkinName().'.js', |
Index: branches/phase3_rev_deleted/includes/SpecialListusers.php |
— | — | @@ -103,7 +103,6 @@ |
104 | 104 | $this->doQuery(); |
105 | 105 | } |
106 | 106 | $batch = new LinkBatch; |
107 | | - $db = $this->mDb; |
108 | 107 | |
109 | 108 | $this->mResult->rewind(); |
110 | 109 | |
Index: branches/phase3_rev_deleted/includes/Pager.php |
— | — | @@ -72,17 +72,18 @@ |
73 | 73 | public $mResult; |
74 | 74 | |
75 | 75 | function __construct() { |
76 | | - global $wgRequest; |
| 76 | + global $wgRequest, $wgUser; |
77 | 77 | $this->mRequest = $wgRequest; |
78 | | - |
| 78 | + |
79 | 79 | # NB: the offset is quoted, not validated. It is treated as an arbitrary string |
80 | 80 | # to support the widest variety of index types. Be careful outputting it into |
81 | 81 | # HTML! |
82 | 82 | $this->mOffset = $this->mRequest->getText( 'offset' ); |
83 | | - $this->mLimit = $this->mRequest->getInt( 'limit', $this->mDefaultLimit ); |
84 | | - if ( $this->mLimit <= 0 || $this->mLimit > 50000 ) { |
85 | | - $this->mLimit = $this->mDefaultLimit; |
86 | | - } |
| 83 | + |
| 84 | + # Use consistent behavior for the limit options |
| 85 | + $this->mDefaultLimit = intval( $wgUser->getOption( 'rclimit' ) ); |
| 86 | + list( $this->mLimit, /* $offset */ ) = $this->mRequest->getLimitOffset(); |
| 87 | + |
87 | 88 | $this->mIsBackwards = ( $this->mRequest->getVal( 'dir' ) == 'prev' ); |
88 | 89 | $this->mIndexField = $this->getIndexField(); |
89 | 90 | $this->mDb = wfGetDB( DB_SLAVE ); |
Index: branches/phase3_rev_deleted/includes/Database.php |
— | — | @@ -582,7 +582,7 @@ |
583 | 583 | @/**/$this->mConn = mysql_connect( $server, $user, $password, true ); |
584 | 584 | } |
585 | 585 | if ($this->mConn === false) { |
586 | | - $iplus = $i + 1; |
| 586 | + #$iplus = $i + 1; |
587 | 587 | #wfLogDBError("Connect loop error $iplus of $max ($server): " . mysql_errno() . " - " . mysql_error()."\n"); |
588 | 588 | } |
589 | 589 | } |
Index: branches/phase3_rev_deleted/languages/messages/MessagesEn.php |
— | — | @@ -22,13 +22,13 @@ |
23 | 23 | * is English by default, for all files other than this one. |
24 | 24 | * |
25 | 25 | * Do NOT set this to false in any other message file! Leave the line out to |
26 | | - * accept the default fallback to "en". |
| 26 | + * accept the default fallback to "en". |
27 | 27 | */ |
28 | 28 | $fallback = false; |
29 | 29 | |
30 | 30 | /** |
31 | 31 | * Is the language written right-to-left? |
32 | | - * Note that right-to-left languages generally also specify |
| 32 | + * Note that right-to-left languages generally also specify |
33 | 33 | * $defaultUserOptionOverrides = array( 'quickbar' => 2 ); |
34 | 34 | */ |
35 | 35 | $rtl = false; |
— | — | @@ -49,17 +49,17 @@ |
50 | 50 | $defaultUserOptionOverrides = array(); |
51 | 51 | |
52 | 52 | /** |
53 | | - * Extra user preferences which will be shown in Special:Preferences as |
54 | | - * checkboxes. Extra settings in derived languages will automatically be |
| 53 | + * Extra user preferences which will be shown in Special:Preferences as |
| 54 | + * checkboxes. Extra settings in derived languages will automatically be |
55 | 55 | * appended to the array of the fallback languages. |
56 | 56 | */ |
57 | 57 | $extraUserToggles = array(); |
58 | 58 | |
59 | 59 | /** |
60 | | - * URLs do not specify their encoding. UTF-8 is used by default, but if the |
| 60 | + * URLs do not specify their encoding. UTF-8 is used by default, but if the |
61 | 61 | * URL is not a valid UTF-8 sequence, we have to try to guess what the real |
62 | 62 | * encoding is. The encoding used in this case is defined below, and must be |
63 | | - * supported by iconv(). |
| 63 | + * supported by iconv(). |
64 | 64 | */ |
65 | 65 | $fallback8bitEncoding = 'windows-1252'; |
66 | 66 | |
— | — | @@ -69,20 +69,20 @@ |
70 | 70 | $linkPrefixExtension = false; |
71 | 71 | |
72 | 72 | /** |
73 | | - * Namespace names. NS_PROJECT is always set to $wgMetaNamespace after the |
74 | | - * settings are loaded, it will be ignored even if you specify it here. |
| 73 | + * Namespace names. NS_PROJECT is always set to $wgMetaNamespace after the |
| 74 | + * settings are loaded, it will be ignored even if you specify it here. |
75 | 75 | * |
76 | 76 | * NS_PROJECT_TALK will be set to $wgMetaNamespaceTalk if that variable is |
77 | | - * set, otherwise the string specified here will be used. The string may |
78 | | - * contain "$1", which will be replaced by the name of NS_PROJECT. It may |
79 | | - * also contain a grammatical transformation, e.g. |
| 77 | + * set, otherwise the string specified here will be used. The string may |
| 78 | + * contain "$1", which will be replaced by the name of NS_PROJECT. It may |
| 79 | + * also contain a grammatical transformation, e.g. |
80 | 80 | * |
81 | 81 | * NS_PROJECT_TALK => 'Keskustelu_{{grammar:elative|$1}}' |
82 | 82 | * |
83 | | - * Only one grammatical transform may be specified in the string. For |
84 | | - * performance reasons, this transformation is done locally by the language |
85 | | - * module rather than by the full wikitext parser. As a result, no other |
86 | | - * parser features are available. |
| 83 | + * Only one grammatical transform may be specified in the string. For |
| 84 | + * performance reasons, this transformation is done locally by the language |
| 85 | + * module rather than by the full wikitext parser. As a result, no other |
| 86 | + * parser features are available. |
87 | 87 | */ |
88 | 88 | $namespaceNames = array( |
89 | 89 | NS_MEDIA => 'Media', |
— | — | @@ -137,12 +137,12 @@ |
138 | 138 | ); |
139 | 139 | |
140 | 140 | /** |
141 | | - * A list of date format preference keys which can be selected in user |
| 141 | + * A list of date format preference keys which can be selected in user |
142 | 142 | * preferences. New preference keys can be added, provided they are supported |
143 | | - * by the language class's timeanddate(). Only the 5 keys listed below are |
| 143 | + * by the language class's timeanddate(). Only the 5 keys listed below are |
144 | 144 | * supported by the wikitext converter (DateFormatter.php). |
145 | 145 | * |
146 | | - * The special key "default" is an alias for either dmy or mdy depending on |
| 146 | + * The special key "default" is an alias for either dmy or mdy depending on |
147 | 147 | * $wgAmericanDates |
148 | 148 | */ |
149 | 149 | $datePreferences = array( |
— | — | @@ -155,14 +155,14 @@ |
156 | 156 | |
157 | 157 | /** |
158 | 158 | * The date format to use for generated dates in the user interface. |
159 | | - * This may be one of the above date preferences, or the special value |
160 | | - * "dmy or mdy", which uses mdy if $wgAmericanDates is true, and dmy |
| 159 | + * This may be one of the above date preferences, or the special value |
| 160 | + * "dmy or mdy", which uses mdy if $wgAmericanDates is true, and dmy |
161 | 161 | * if $wgAmericanDates is false. |
162 | 162 | */ |
163 | 163 | $defaultDateFormat = 'dmy or mdy'; |
164 | 164 | |
165 | 165 | /** |
166 | | - * Associative array mapping old numeric date formats, which may still be |
| 166 | + * Associative array mapping old numeric date formats, which may still be |
167 | 167 | * stored in user preferences, to the new string formats. |
168 | 168 | */ |
169 | 169 | $datePreferenceMigrationMap = array( |
— | — | @@ -174,8 +174,8 @@ |
175 | 175 | |
176 | 176 | /** |
177 | 177 | * These are formats for dates generated by MediaWiki (as opposed to the wikitext |
178 | | - * DateFormatter). Documentation for the format string can be found in |
179 | | - * Language.php, search for sprintfDate. |
| 178 | + * DateFormatter). Documentation for the format string can be found in |
| 179 | + * Language.php, search for sprintfDate. |
180 | 180 | * |
181 | 181 | * This array is automatically inherited by all subclasses. Individual keys can be |
182 | 182 | * overridden. |
— | — | @@ -341,11 +341,11 @@ |
342 | 342 | |
343 | 343 | /** |
344 | 344 | * Alternate names of special pages. All names are case-insensitive. The first |
345 | | - * listed alias will be used as the default. Aliases from the fallback |
346 | | - * localisation (usually English) will be included by default. |
347 | | - * |
348 | | - * This array may be altered at runtime using the LangugeGetSpecialPageAliases |
349 | | - * hook. |
| 345 | + * listed alias will be used as the default. Aliases from the fallback |
| 346 | + * localisation (usually English) will be included by default. |
| 347 | + * |
| 348 | + * This array may be altered at runtime using the LangugeGetSpecialPageAliases |
| 349 | + * hook. |
350 | 350 | */ |
351 | 351 | $specialPageAliases = array( |
352 | 352 | 'DoubleRedirects' => array( 'DoubleRedirects' ), |
— | — | @@ -421,7 +421,7 @@ |
422 | 422 | ); |
423 | 423 | |
424 | 424 | /** |
425 | | - * Regular expression matching the "link trail", e.g. "ed" in [[Toast]]ed, as |
| 425 | + * Regular expression matching the "link trail", e.g. "ed" in [[Toast]]ed, as |
426 | 426 | * the first group, and the remainder of the string as the second group. |
427 | 427 | */ |
428 | 428 | $linkTrail = '/^([a-z]+)(.*)$/sD'; |
— | — | @@ -663,7 +663,7 @@ |
664 | 664 | 'redirectedfrom' => '(Redirected from $1)', |
665 | 665 | 'redirectpagesub' => 'Redirect page', |
666 | 666 | 'lastmodifiedat' => 'This page was last modified $2, $1.', //$1 date, $2 time |
667 | | -'viewcount' => 'This page has been accessed {{plural:$1|one time|$1 times}}.', |
| 667 | +'viewcount' => 'This page has been accessed {{PLURAL:$1|one time|$1 times}}.', |
668 | 668 | 'copyright' => 'Content is available under $1.', |
669 | 669 | 'protectedpage' => 'Protected page', |
670 | 670 | 'jumpto' => 'Jump to:', |
— | — | @@ -799,11 +799,11 @@ |
800 | 800 | Your account has been created. Don't forget to change your {{SITENAME}} preferences.", |
801 | 801 | |
802 | 802 | 'loginpagetitle' => 'User login', |
803 | | -'yourname' => 'Username', |
804 | | -'yourpassword' => 'Password', |
805 | | -'yourpasswordagain' => 'Retype password', |
| 803 | +'yourname' => 'Username:', |
| 804 | +'yourpassword' => 'Password:', |
| 805 | +'yourpasswordagain' => 'Retype password:', |
806 | 806 | 'remembermypassword' => 'Remember my login on this computer', |
807 | | -'yourdomainname' => 'Your domain', |
| 807 | +'yourdomainname' => 'Your domain:', |
808 | 808 | 'externaldberror' => 'There was either an external authentication database error or you are not allowed to update your external account.', |
809 | 809 | 'loginproblem' => '<b>There has been a problem with your login.</b><br />Try again!', |
810 | 810 | 'alreadyloggedin' => "<strong>User $1, you are already logged in!</strong><br />", |
— | — | @@ -831,10 +831,9 @@ |
832 | 832 | 'yournick' => 'Nickname:', |
833 | 833 | 'badsig' => 'Invalid raw signature; check HTML tags.', |
834 | 834 | 'email' => 'E-mail', |
835 | | -'prefs-help-email-enotif' => 'This address is also used to send you e-mail notifications if you enabled the options.', |
836 | | -'prefs-help-realname' => 'Optional: if you choose to provide it this will be used for giving you attribution for your work.', |
| 835 | +'prefs-help-realname' => 'Real name is optional and if you choose to provide it this will be used for giving you attribution for your work.', |
837 | 836 | 'loginerror' => 'Login error', |
838 | | -'prefs-help-email' => 'Optional: Enables others to contact you through your user or user_talk page without needing to reveal your identity.', |
| 837 | +'prefs-help-email' => 'E-mail address is optional, but it enables others to contact you through your user or user_talk page without needing to reveal your identity.', |
839 | 838 | 'nocookiesnew' => 'The user account was created, but you are not logged in. {{SITENAME}} uses cookies to log in users. You have cookies disabled. Please enable them, then log in with your new username and password.', |
840 | 839 | 'nocookieslogin' => '{{SITENAME}} uses cookies to log in users. You have cookies disabled. Please enable them and try again.', |
841 | 840 | 'noname' => 'You have not specified a valid user name.', |
— | — | @@ -1028,7 +1027,7 @@ |
1029 | 1028 | 'longpagewarning' => "<strong>WARNING: This page is $1 kilobytes long; some |
1030 | 1029 | browsers may have problems editing pages approaching or longer than 32kb. |
1031 | 1030 | Please consider breaking the page into smaller sections.</strong>", |
1032 | | -'longpageerror' => "<strong>ERROR: The text you have submitted is $1 kilobytes |
| 1031 | +'longpageerror' => "<strong>ERROR: The text you have submitted is $1 kilobytes |
1033 | 1032 | long, which is longer than the maximum of $2 kilobytes. It cannot be saved.</strong>", |
1034 | 1033 | 'readonlywarning' => '<strong>WARNING: The database has been locked for maintenance, |
1035 | 1034 | so you will not be able to save your edits right now. You may wish to cut-n-paste |
— | — | @@ -1053,8 +1052,8 @@ |
1054 | 1053 | |
1055 | 1054 | # Account creation failure |
1056 | 1055 | 'cantcreateaccounttitle' => 'Can\'t create account', |
1057 | | -'cantcreateaccounttext' => 'Account creation from this IP address (<b>$1</b>) has been blocked. |
1058 | | -This is probably due to persistent vandalism from your school or Internet service |
| 1056 | +'cantcreateaccounttext' => 'Account creation from this IP address (<b>$1</b>) has been blocked. |
| 1057 | +This is probably due to persistent vandalism from your school or Internet service |
1059 | 1058 | provider.', |
1060 | 1059 | |
1061 | 1060 | # History pages |
— | — | @@ -1137,8 +1136,8 @@ |
1138 | 1137 | 'revdelete-submit' => 'Apply to selected revision', |
1139 | 1138 | 'revdelete-logentry' => 'changed revision visibility of [[$1]]', |
1140 | 1139 | 'logdelete-logentry' => 'changed event visibility of [[$1]]', |
1141 | | -'revdelete-logaction' => '$1 {{plural:$1|revision|revisions}} set to mode $2', |
1142 | | -'logdelete-logaction' => '$1 {{plural:$1|event|events}} to [[$3]] set to mode $2', |
| 1140 | +'revdelete-logaction' => '$1 {{PLURAL:$1|revision|revisions}} set to mode $2', |
| 1141 | +'logdelete-logaction' => '$1 {{PLURAL:$1|event|events}} to [[$3]] set to mode $2', |
1143 | 1142 | 'revdelete-success' => 'Revision visibility successfully set.', |
1144 | 1143 | 'logdelete-success' => 'Event visibility successfully set.', |
1145 | 1144 | |
— | — | @@ -1165,7 +1164,7 @@ |
1166 | 1165 | 'selectolderversionfordiff' => 'Select an older version for comparison', |
1167 | 1166 | 'compareselectedversions' => 'Compare selected versions', |
1168 | 1167 | 'editundo' => 'undo', |
1169 | | -'diff-multi' => "({{plural:$1|One intermediate revision|$1 intermediate revisions}} not shown.)", |
| 1168 | +'diff-multi' => "({{PLURAL:$1|One intermediate revision|$1 intermediate revisions}} not shown.)", |
1170 | 1169 | |
1171 | 1170 | # Search results |
1172 | 1171 | # |
— | — | @@ -1444,7 +1443,7 @@ |
1445 | 1444 | # |
1446 | 1445 | 'imagelist' => 'File list', |
1447 | 1446 | 'imagelist-summary' => '', |
1448 | | -'imagelisttext' => "Below is a list of '''$1''' {{plural:$1|file|files}} sorted $2.", |
| 1447 | +'imagelisttext' => "Below is a list of '''$1''' {{PLURAL:$1|file|files}} sorted $2.", |
1449 | 1448 | 'imagelistforuser' => "This shows only images uploaded by $1.", |
1450 | 1449 | 'getimagelist' => 'fetching file list', |
1451 | 1450 | 'ilsubmit' => 'Search', |
— | — | @@ -1514,7 +1513,7 @@ |
1515 | 1514 | This includes \"talk\" pages, pages about {{SITENAME}}, minimal \"stub\" |
1516 | 1515 | pages, redirects, and others that probably don't qualify as content pages. |
1517 | 1516 | Excluding those, there {{PLURAL:$2|is '''1''' page that is a|are '''$2''' pages that are}} probably legitimate |
1518 | | -content {{PLURAL:$2|page|pages}}. |
| 1517 | +content {{PLURAL:$2|page|pages}}. |
1519 | 1518 | |
1520 | 1519 | '''$8''' {{PLURAL:$8|file|files}} have been uploaded. |
1521 | 1520 | |
— | — | @@ -1893,8 +1892,8 @@ |
1894 | 1893 | use the navigation links.", |
1895 | 1894 | 'undeleterevisions' => "$1 {{PLURAL:$1|revision|revisions}} archived", |
1896 | 1895 | 'undeletehistory' => 'If you restore the page, these revisions will be restored to the page history. |
1897 | | -If a new page with the same name has been created since the deletion, the restored |
1898 | | -revisions will appear in the prior history.', |
| 1896 | +If a new page with the same name has been created since the deletion, the restored revisions will appear |
| 1897 | +in the prior history.', |
1899 | 1898 | 'undeleterevdel' => 'Undeletion will not be performed if either it would result in the top page or image revision |
1900 | 1899 | being restricted or it would result in an alternating page history between these and any live revisions for this page. ', |
1901 | 1900 | 'restorepoint' => 'Use the radio button column to restore only revisions from the specified time onwards.', |
— | — | @@ -1909,14 +1908,14 @@ |
1910 | 1909 | 'undeletereset' => 'Reset', |
1911 | 1910 | 'undeletecomment' => 'Comment:', |
1912 | 1911 | 'undeletedarticle' => "restored \"[[$1]]\"", |
1913 | | -'undeletedrevisions' => "$1 {{plural:$1|revision|revisions}} restored", |
1914 | | -'undeletedrevisions-files' => "$1 {{plural:$1|revision|revisions}} and $2 {{plural:$2|file|files}} restored", |
1915 | | -'undeletedfiles' => "$1 {{plural:$1|file|files}} restored", |
| 1912 | +'undeletedrevisions' => "$1 {{PLURAL:$1|revision|revisions}} restored", |
| 1913 | +'undeletedrevisions-files' => "$1 {{PLURAL:$1|revision|revisions}} and $2 {{PLURAL:$2|file|files}} restored", |
| 1914 | +'undeletedfiles' => "$1 {{PLURAL:$1|file|files}} restored", |
1916 | 1915 | 'cannotundelete' => 'Undelete failed; someone else may have undeleted the page first.', |
1917 | 1916 | 'undeletedpage' => "<big>'''$1 has been restored'''</big> |
1918 | 1917 | |
1919 | 1918 | Consult the [[Special:Log/delete|deletion log]] for a record of recent deletions and restorations.", |
1920 | | -'undelete-header' => 'See [[Special:Log/delete|the deletion log]] for recently deleted pages.', |
| 1919 | +'undelete-header' => 'See [[Special:Log/delete|the deletion log]] for recently deleted pages or revisions.', |
1921 | 1920 | 'undelete-search-box' => 'Search deleted pages', |
1922 | 1921 | 'undelete-search-prefix' => 'Show pages starting with:', |
1923 | 1922 | 'undelete-search-submit' => 'Search', |
— | — | @@ -1977,10 +1976,10 @@ |
1978 | 1977 | accordance with [[{{MediaWiki:policy-url}}|policy]]. |
1979 | 1978 | Fill in a specific reason below (for example, citing particular |
1980 | 1979 | pages that were vandalized).", |
1981 | | -'ipaddress' => 'IP Address', |
1982 | | -'ipadressorusername' => 'IP Address or username', |
1983 | | -'ipbexpiry' => 'Expiry', |
1984 | | -'ipbreason' => 'Reason', |
| 1980 | +'ipaddress' => 'IP Address:', |
| 1981 | +'ipadressorusername' => 'IP Address or username:', |
| 1982 | +'ipbexpiry' => 'Expiry:', |
| 1983 | +'ipbreason' => 'Reason:', |
1985 | 1984 | 'ipbreasonotherlist' => 'Other reason', |
1986 | 1985 | |
1987 | 1986 | // These are examples only. They can be translated but should be adjusted via |
— | — | @@ -2002,10 +2001,10 @@ |
2003 | 2002 | 'ipbcreateaccount' => 'Prevent account creation', |
2004 | 2003 | 'ipbenableautoblock' => 'Automatically block the last IP address used by this user, and any subsequent IPs they try to edit from', |
2005 | 2004 | 'ipbsubmit' => 'Block this user', |
2006 | | -'ipbother' => 'Other time', |
| 2005 | +'ipbother' => 'Other time:', |
2007 | 2006 | 'ipboptions' => '2 hours:2 hours,1 day:1 day,3 days:3 days,1 week:1 week,2 weeks:2 weeks,1 month:1 month,3 months:3 months,6 months:6 months,1 year:1 year,infinite:infinite', |
2008 | 2007 | 'ipbotheroption' => 'other', |
2009 | | -'ipbotherreason' => 'Other/additional reason', |
| 2008 | +'ipbotherreason' => 'Other/additional reason:', |
2010 | 2009 | 'ipbhidename' => 'Hide username/IP from the block log, active block list and user list', |
2011 | 2010 | 'badipaddress' => 'Invalid IP address', |
2012 | 2011 | 'blockipsuccesssub' => 'Block succeeded', |
— | — | @@ -2031,7 +2030,8 @@ |
2032 | 2031 | 'anononlyblock' => 'anon. only', |
2033 | 2032 | 'noautoblockblock' => 'autoblock disabled', |
2034 | 2033 | 'createaccountblock' => 'account creation blocked', |
2035 | | -'ipblocklistempty' => 'The blocklist is empty or the requested IP address/username is not blocked.', |
| 2034 | +'ipblocklist-empty' => 'The blocklist is empty.', |
| 2035 | +'ipblocklist-no-results' => 'The requested IP address or username is not blocked.', |
2036 | 2036 | 'blocklink' => 'block', |
2037 | 2037 | 'unblocklink' => 'unblock', |
2038 | 2038 | 'contribslink' => 'contribs', |
— | — | @@ -2258,6 +2258,8 @@ |
2259 | 2259 | 'accesskey-feed-atom' => '', |
2260 | 2260 | 'accesskey-t-contributions' => '', |
2261 | 2261 | 'accesskey-t-emailuser' => '', |
| 2262 | +'accesskey-t-permalink' => '', |
| 2263 | +'accesskey-t-print' => 'p', |
2262 | 2264 | 'accesskey-t-upload' => 'u', |
2263 | 2265 | 'accesskey-t-specialpages' => 'q', |
2264 | 2266 | 'accesskey-ca-nstab-main' => 'c', |
— | — | @@ -2316,6 +2318,8 @@ |
2317 | 2319 | 'tooltip-t-emailuser' => 'Send a mail to this user', |
2318 | 2320 | 'tooltip-t-upload' => 'Upload images or media files', |
2319 | 2321 | 'tooltip-t-specialpages' => 'List of all special pages', |
| 2322 | +'tooltip-t-print' => 'Printable version of this page', |
| 2323 | +'tooltip-t-permalink' => 'Permanent link to this version of the page', |
2320 | 2324 | 'tooltip-ca-nstab-main' => 'View the content page', |
2321 | 2325 | 'tooltip-ca-nstab-user' => 'View the user page', |
2322 | 2326 | 'tooltip-ca-nstab-media' => 'View the media page', |