r22652 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r22651‎ | r22652 | r22653 >
Date:06:10, 2 June 2007
Author:david
Status:old
Tags:
Comment:
Merged revisions 22619-22651 via svnmerge from
svn+ssh://david@svn.wikimedia.org/svnroot/mediawiki/trunk/phase3

........
r22620 | aaron | 2007-05-31 23:18:40 -0700 (Thu, 31 May 2007) | 1 line

*Fix typo
........
r22623 | amidaniel | 2007-06-01 00:57:17 -0700 (Fri, 01 Jun 2007) | 1 line

(bug 10076) If a user is blocked as the result of a rangeblock, add the effective rangeblock to the output of MediaWiki:Blockedtext
........
r22624 | amidaniel | 2007-06-01 02:05:03 -0700 (Fri, 01 Jun 2007) | 3 lines

Fixes for previous commit:
* Forgot to commit RELEASE-NOTES and MessagesEn.php
* Teeny tiny bug -- defined variable $ipRange in an if-block
........
r22625 | amidaniel | 2007-06-01 02:11:52 -0700 (Fri, 01 Jun 2007) | 1 line

Aparently, it need not only be defined but *initialized* to make the warnings go away. Apologies -- I'll check for warnings before committing in the future.
........
r22628 | nikerabbit | 2007-06-01 06:06:02 -0700 (Fri, 01 Jun 2007) | 2 lines

* Some Shona (sn) translations
........
r22629 | aaron | 2007-06-01 06:17:24 -0700 (Fri, 01 Jun 2007) | 1 line

*Document some hooks
........
r22630 | brion | 2007-06-01 08:53:14 -0700 (Fri, 01 Jun 2007) | 3 lines

* (bug 10083) Fix for Special:Version breakage on PHP 5.2 with some hooks
........
r22638 | rotem | 2007-06-01 12:16:31 -0700 (Fri, 01 Jun 2007) | 1 line

Update.
........
r22639 | rotem | 2007-06-01 12:20:58 -0700 (Fri, 01 Jun 2007) | 1 line

Update.
........
r22641 | amidaniel | 2007-06-01 17:03:22 -0700 (Fri, 01 Jun 2007) | 1 line

(bug 10076) Modified so as to output whoever the original blockee is, regardless of whether it is an IP-range or not.
........
r22642 | amidaniel | 2007-06-01 17:41:16 -0700 (Fri, 01 Jun 2007) | 1 line

(bug 7691) Show deletion log following noarticletext and newarticletext when creating a new page.
........
r22643 | amidaniel | 2007-06-01 17:45:26 -0700 (Fri, 01 Jun 2007) | 1 line

Minor doc goof -- displays *after* not before.
........
r22644 | ivanlanin | 2007-06-01 17:48:54 -0700 (Fri, 01 Jun 2007) | 1 line

Indonesian (id) localisation updates.
........
r22648 | yurik | 2007-06-01 20:47:34 -0700 (Fri, 01 Jun 2007) | 1 line

API: Security update - deleted rev/rc/log entries are no longer shown.
........
Modified paths:
  • /branches/liquidthreads (modified) (history)
  • /branches/liquidthreads/RELEASE-NOTES (modified) (history)
  • /branches/liquidthreads/docs/hooks.txt (modified) (history)
  • /branches/liquidthreads/includes/Article.php (modified) (history)
  • /branches/liquidthreads/includes/EditPage.php (modified) (history)
  • /branches/liquidthreads/includes/OutputPage.php (modified) (history)
  • /branches/liquidthreads/includes/ProtectionForm.php (modified) (history)
  • /branches/liquidthreads/includes/SpecialVersion.php (modified) (history)
  • /branches/liquidthreads/includes/api/ApiQueryLogEvents.php (modified) (history)
  • /branches/liquidthreads/includes/api/ApiQueryRecentChanges.php (modified) (history)
  • /branches/liquidthreads/includes/api/ApiQueryUserContributions.php (modified) (history)
  • /branches/liquidthreads/includes/api/ApiQueryWatchlist.php (modified) (history)
  • /branches/liquidthreads/includes/filerepo/LocalFile.php (modified) (history)
  • /branches/liquidthreads/languages/messages/MessagesEn.php (modified) (history)
  • /branches/liquidthreads/languages/messages/MessagesHe.php (modified) (history)
  • /branches/liquidthreads/languages/messages/MessagesId.php (modified) (history)
  • /branches/liquidthreads/languages/messages/MessagesSn.php (added) (history)
  • /branches/liquidthreads/languages/messages/MessagesSn.php (added) (history)

Diff [purge]

Index: branches/liquidthreads/docs/hooks.txt
@@ -317,6 +317,27 @@
318318 Change $bad and return false to override. If an image is "bad", it is not
319319 rendered inline in wiki pages or galleries in category pages.
320320
 321+'BeforeGalleryFindFile': before an image is fetched for a gallery
 322+&$gallery,: the gallery object
 323+&$nt: the image title
 324+&$time: image timestamp
 325+
 326+'BeforeParserFetchTemplateAndtitle': before a template is fetched by Parser
 327+&$parser: Parser object
 328+&$title: title of the template
 329+&$skip: skip this template and link it?
 330+&$id: the id of the revision being parsed
 331+
 332+'BeforeParserMakeImageLinkObj': before an image is rendered by Parser
 333+&$parser: Parser object
 334+&$nt: the image title
 335+&$skip: skip this image and link it?
 336+&$time: the image timestamp
 337+
 338+'BeforeParserrenderImageGallery': before an image gallery is rendered by Parser
 339+&$parser: Parser object
 340+&$ig: ImageGallery object
 341+
321342 'BlockIp': before an IP address or user is blocked
322343 $block: the Block object about to be saved
323344 $user: the user _doing_ the block (not the one being blocked)
@@ -515,6 +536,9 @@
516537 &$sktemplate: SkinTemplate object
517538 &$tpl: Template engine object
518539
 540+'TitleLinkUpdatesAfterCompletion': after Linker->doUpdate() is called
 541+&$title: title of the updated page
 542+
519543 'TitleMoveComplete': after moving an article (title)
520544 $old: old title
521545 $nt: new title
Index: branches/liquidthreads/includes/ProtectionForm.php
@@ -360,7 +360,7 @@
361361 * @access private
362362 */
363363 function showLogExtract( &$out ) {
364 - # Show relevant lines from the deletion log:
 364+ # Show relevant lines from the protection log:
365365 $out->addHTML( "<h2>" . htmlspecialchars( LogPage::logName( 'protect' ) ) . "</h2>\n" );
366366 $logViewer = new LogViewer(
367367 new LogReader(
Index: branches/liquidthreads/includes/Article.php
@@ -852,6 +852,14 @@
853853 );
854854 }
855855
 856+ /**
 857+ * If it's a non-existant page, stick the deletion log after the "noarticle" message.
 858+ * This won't appear when editing a new page, but will when viewing a nonexistant one.
 859+ */
 860+ if ( 0 == $this->getID() ) {
 861+ $this->showLogExtract( $wgOut );
 862+ }
 863+
856864 # Trackbacks
857865 if ($wgUseTrackbacks)
858866 $this->addTrackbacks();
Index: branches/liquidthreads/includes/filerepo/LocalFile.php
@@ -1323,7 +1323,7 @@
13241324 */
13251325 class Image extends LocalFile {
13261326 function __construct( $title ) {
1327 - $repo = FileRepoGroup::singleton()->getLocalRepo();
 1327+ $repo = RepoGroup::singleton()->getLocalRepo();
13281328 parent::__construct( $title, $repo );
13291329 }
13301330
Index: branches/liquidthreads/includes/EditPage.php
@@ -611,6 +611,8 @@
612612 $wgOut->addWikiText( wfMsg( 'newarticletext' ) );
613613 else
614614 $wgOut->addWikiText( wfMsg( 'newarticletextanon' ) );
 615+ // Show deletion log when editing new article.
 616+ $this->mArticle->showLogExtract( $wgOut );
615617 }
616618 }
617619
Index: branches/liquidthreads/includes/OutputPage.php
@@ -795,7 +795,11 @@
796796 $msg = 'blockedtext';
797797 }
798798
799 - $this->addWikiText( wfMsg( $msg, $link, $reason, $ip, $name, $blockid, $blockExpiry ) );
 799+ /* $ip returns who *is* being blocked, $intended contains who was meant to be blocked.
 800+ * This could be a username, an ip range, or a single ip. */
 801+ $intended = $wgUser->mBlock->mAddress;
 802+
 803+ $this->addWikiText( wfMsg( $msg, $link, $reason, $ip, $name, $blockid, $blockExpiry, $intended ) );
800804
801805 # Don't auto-return to special pages
802806 if( $return ) {
Index: branches/liquidthreads/includes/api/ApiQueryRecentChanges.php
@@ -51,6 +51,7 @@
5252 $this->addTables('recentchanges');
5353 $this->addWhereRange('rc_timestamp', $dir, $start, $end);
5454 $this->addWhereFld('rc_namespace', $namespace);
 55+ $this->addWhereFld('rc_deleted', 0);
5556
5657 if (!is_null($show)) {
5758 $show = array_flip($show);
Index: branches/liquidthreads/includes/api/ApiQueryWatchlist.php
@@ -125,8 +125,10 @@
126126 'wl_namespace = rc_namespace',
127127 'wl_title = rc_title',
128128 'rc_cur_id = page_id',
129 - 'wl_user' => $userId
 129+ 'wl_user' => $userId,
 130+ 'rc_deleted' => 0,
130131 ));
 132+
131133 $this->addWhereRange('rc_timestamp', $dir, $start, $end);
132134 $this->addWhereFld('wl_namespace', $namespace);
133135 $this->addWhereIf('rc_this_oldid=page_latest', !$allrev);
Index: branches/liquidthreads/includes/api/ApiQueryUserContributions.php
@@ -129,6 +129,8 @@
130130 list ($tbl_page, $tbl_revision) = $this->getDB()->tableNamesN('page', 'revision');
131131 $this->addTables("$tbl_revision LEFT OUTER JOIN $tbl_page ON page_id=rev_page");
132132
 133+ $this->addWhereFld('rev_deleted', 0);
 134+
133135 // We only want pages by the specified user.
134136 $this->addWhereFld('rev_user_text', $this->userTitle->getText());
135137
Index: branches/liquidthreads/includes/api/ApiQueryLogEvents.php
@@ -65,6 +65,7 @@
6666 'log_params'
6767 ));
6868
 69+ $this->addWhereFld('log_deleted', 0);
6970 $this->addWhereFld('log_type', $type);
7071 $this->addWhereRange('log_timestamp', $dir, $start, $end);
7172 $this->addOption('LIMIT', $limit +1);
Index: branches/liquidthreads/includes/SpecialVersion.php
@@ -250,7 +250,10 @@
251251 * @return mixed
252252 */
253253 function arrayToString( $list ) {
254 - if ( ! is_array( $list ) ) {
 254+ if( is_object( $list ) ) {
 255+ $class = get_class( $list );
 256+ return "($class)";
 257+ } elseif ( ! is_array( $list ) ) {
255258 return $list;
256259 } else {
257260 $class = get_class( $list[0] );
Index: branches/liquidthreads/languages/messages/MessagesEn.php
@@ -939,7 +939,8 @@
940940
941941 The block was made by $1. The reason given is ''$2''.
942942
943 -Expiry of block: $6
 943+Expiry of block: $6
 944+Intended blockee: $7
944945
945946 You can contact $1 or another [[{{MediaWiki:grouppage-sysop}}|administrator]] to discuss the block.
946947 You cannot use the 'email this user' feature unless a valid email address is specified in your
Index: branches/liquidthreads/languages/messages/MessagesHe.php
@@ -117,6 +117,7 @@
118118 'img_center' => array( 1, 'מרכז', 'center', 'centre' ),
119119 'img_framed' => array( 1, 'ממוסגר', 'מסגרת', 'framed', 'enframed', 'frame' ),
120120 'img_page' => array( 1, 'דף=$1', 'דף $1', 'page=$1', 'page $1' ),
 121+ 'img_border' => array( 1, 'גבולות', 'גבול', 'border' ),
121122 'int' => array( 0, 'הודעה:', 'INT:' ),
122123 'sitename' => array( 1, 'שם האתר', 'SITENAME' ),
123124 'ns' => array( 0, 'מרחב שם:', 'NS:' ),
@@ -653,6 +654,8 @@
654655
655656 פקיעת החסימה: \$6
656657
 658+טווח החסימה: \$7
 659+
657660 באפשרותכם ליצור קשר עם \$1 או עם כל אחד מ[[{{ns:project}}:מפעיל מערכת|מפעילי המערכת]] האחרים כדי לדון על החסימה.
658661 אינכם יכולים להשתמש בתכונת \"שלחו דואר אלקטרוני למשתמש זה\" אם לא ציינתם כתובת דוא\"ל תקפה ב[[{{ns:special}}:Preferences|העדפות המשתמש שלכם]].
659662 כתובת ה־IP שלכם היא \$3, ומספר החסימה שלכם הוא #\$5. אנא ציינו אחת מעובדות אלה (או את שתיהן) בכל פנייה למפעילי המערכת.",
Index: branches/liquidthreads/languages/messages/MessagesId.php
@@ -707,6 +707,7 @@
708708 Blokir dilakukan oleh $1. Alasan yang diberikan adalah ''$2''.
709709
710710 Blokir kadaluwarsa pada: $6
 711+Sasaran pemblokiran: $7
711712
712713 Anda dapat menghubungi $1 atau [[{{MediaWiki:grouppage-sysop}}|pengurus lainnya]] untuk membicarakan hal ini.
713714
Index: branches/liquidthreads/languages/messages/MessagesSn.php
@@ -0,0 +1,181 @@
 2+<?php
 3+/** Shona (chiShona)
 4+ *
 5+ * @addtogroup Language
 6+ */
 7+
 8+$messages = array(
 9+# Dates
 10+'sunday' => 'Svondo',
 11+'monday' => 'Muvhuro',
 12+'tuesday' => 'Chipiri',
 13+'wednesday' => 'Chitatu',
 14+'thursday' => 'China',
 15+'friday' => 'Chishanu',
 16+'saturday' => 'Mugovera',
 17+'january' => 'Ndira',
 18+'february' => 'Kukadzi',
 19+'march' => 'Kurume',
 20+'april' => 'Kubvumbi',
 21+'may_long' => 'Chivabvu',
 22+'june' => 'Chikumi',
 23+'july' => 'Chikunguru',
 24+'august' => 'Nyamavhuvhu',
 25+'september' => 'Gunyana',
 26+'october' => 'Gumiguru',
 27+'november' => 'Mbudzi',
 28+'december' => 'Zvita',
 29+'january-gen' => 'Ndira',
 30+'february-gen' => 'Kukadzi',
 31+'march-gen' => 'Kurume',
 32+'april-gen' => 'Kubvumbi',
 33+'may-gen' => 'Chivabvu',
 34+'june-gen' => 'Chikumi',
 35+'july-gen' => 'Chikunguru',
 36+'august-gen' => 'Nyamavhuvhu',
 37+'september-gen' => 'Gunyana',
 38+'october-gen' => 'Gumiguru',
 39+'november-gen' => 'Mbudzi',
 40+'december-gen' => 'Zvita',
 41+
 42+'cancel' => 'Kanzura',
 43+'qbedit' => 'Chinja',
 44+'qbspecialpages' => 'Mapeji akakosha',
 45+'mytalk' => 'Hurukuro dzangu',
 46+'navigation' => 'Banguranyika',
 47+
 48+'help' => 'Rubatsiro',
 49+'search' => 'Tsvaga',
 50+'searchbutton' => 'Tsvaga',
 51+'go' => 'Enda',
 52+'searcharticle' => 'Enda',
 53+'history_short' => 'Zvemakare',
 54+'printableversion' => 'Rinoita kuprinta',
 55+'permalink' => 'Zvikochekero Zvisingachinje',
 56+'edit' => 'Chinja',
 57+'delete' => 'Bharanura',
 58+'protect' => 'Chengetedza',
 59+'talk' => 'Hurukuro',
 60+'toolbox' => 'Maturuzi',
 61+'otherlanguages' => 'Mimwe Mitauro',
 62+
 63+# All link text and link target definitions of links into project namespace that get used by other message strings, with the exception of user group pages (see grouppage) and the disambiguation template definition (see disambiguations).
 64+'currentevents' => 'Zvirikuitika',
 65+'currentevents-url' => 'Zvirikuitika',
 66+'disclaimers' => 'Matandanyadzi',
 67+'edithelp' => 'Mashandurirwo',
 68+'mainpage' => 'Peji Rekutanga',
 69+'portal' => 'Mukova wegutse',
 70+'sitesupport' => 'Zvipo',
 71+
 72+'newmessageslink' => 'mashoko matsva',
 73+'editsection' => 'chinja',
 74+'editold' => 'chinja',
 75+
 76+# Short words for each namespace, by default used in the 'article' tab in monobook
 77+'nstab-main' => 'Gani',
 78+
 79+# General errors
 80+'viewsource' => 'Wona mabviro',
 81+
 82+# Login and logout pages
 83+'welcomecreation' => '= Tigashire, $1! ==
 84+
 85+Akaunzi yako yagadzirwa. Usakanganwe kuchinga mapreferences ako eWikipedia.',
 86+'yourname' => 'Zita:',
 87+'yourpassword' => 'Password:',
 88+'yourpasswordagain' => 'Nyorazve password:',
 89+'remembermypassword' => 'Ndiyeuke',
 90+'login' => 'Gamuchirwa',
 91+'userlogin' => 'Gamuchirwa / Gadzira Akaunzi',
 92+'logout' => 'Chibuda',
 93+'userlogout' => 'Chibuda',
 94+'notloggedin' => 'Hauna kugamuchirwa',
 95+'createaccount' => 'Gadzira Akaunzi',
 96+'youremail' => 'E-mail:',
 97+'username' => 'Zita:',
 98+
 99+# Edit pages
 100+'summary' => 'Muchidimbu',
 101+'minoredit' => 'Uku kushandurwa kudiki',
 102+'watchthis' => 'Ringa peji rino',
 103+'savearticle' => 'Kotsa peji',
 104+'showpreview' => 'Ratidza chipandwa',
 105+'showdiff' => 'Ratidza zvasandurwa',
 106+
 107+# Search results
 108+'powersearch' => 'Tsvaga',
 109+
 110+# Preferences page
 111+'mypreferences' => 'Zvandinosarudza',
 112+'prefsnologin' => 'Hauna kugamuchirwa',
 113+'prefs-rc' => 'Zvaba Kuchinjwa',
 114+'searchresultshead' => 'Tsvaga',
 115+
 116+# Recent changes
 117+'recentchanges' => 'Zvaba Kuchinjwa',
 118+
 119+# Recent changes linked
 120+'recentchangeslinked' => 'Zvinoenderana nezvachinjwa',
 121+
 122+# Upload
 123+'upload' => 'Isa fayera',
 124+'uploadbtn' => 'Isa fayera',
 125+'uploadnologin' => 'Hauna kugamuchirwa',
 126+'watchthisupload' => 'Ringa peji rino',
 127+
 128+# Miscellaneous special pages
 129+'randompage' => 'Peji nhemwa',
 130+'specialpages' => 'Mapeji akakosha',
 131+'move' => 'Chichinura',
 132+'movethispage' => 'Chichinura kupeji iri',
 133+
 134+# Watchlist
 135+'watchlist' => 'Zvandakarinda',
 136+'mywatchlist' => 'Zvandakarinda',
 137+'watch' => 'Rinda',
 138+'watchthispage' => 'Ringa peji rino',
 139+
 140+# Restrictions (nouns)
 141+'restriction-edit' => 'Chinja',
 142+'restriction-move' => 'Chichinura',
 143+
 144+# Undelete
 145+'undelete-search-submit' => 'Tsvaga',
 146+
 147+# Contributions
 148+'contributions' => 'Mushandisi Kanzatu',
 149+'mycontris' => 'Kanzatu kangu',
 150+
 151+'sp-contributions-submit' => 'Tsvaga',
 152+
 153+# What links here
 154+'whatlinkshere' => 'Zvakakochekera pano',
 155+
 156+# Move page
 157+'movepage' => 'Chichinura peji',
 158+'movepagebtn' => 'Chichinura peji',
 159+'movedto' => 'rachichinurwa ku',
 160+'1movedto2' => '[[$1]] rachichinurwa ku [[$2]]',
 161+'movereason' => 'Chikonzero',
 162+
 163+# Namespace 8 related
 164+'allmessages' => 'Mashoko esystem',
 165+
 166+# Tooltip help for the actions
 167+'tooltip-pt-preferences' => 'Zvandinosarudza',
 168+'tooltip-pt-logout' => 'Chibuda',
 169+'tooltip-ca-move' => 'Chichinura kupeji iri',
 170+'tooltip-p-logo' => 'Peji Rekutanga',
 171+
 172+# Trackbacks
 173+'trackbackremove' => ' ([$1 Delete])',
 174+
 175+'youhavenewmessagesmulti' => 'Une mashoko matsva pa$1',
 176+
 177+# Table pager
 178+'table_pager_limit_submit' => 'Enda',
 179+
 180+);
 181+
 182+?>
Property changes on: branches/liquidthreads/languages/messages/MessagesSn.php
___________________________________________________________________
Added: svn:eol-style
1183 + native
Index: branches/liquidthreads/RELEASE-NOTES
@@ -49,8 +49,12 @@
5050 * Improved thumb.php error handling
5151 * Display file history on local image description pages of shared images
5252 * Added $wgArticleRobotPolicies
 53+* (bug 10076) Additional parameter $7 added to MediaWiki:Blockedtext
 54+ containing, the ip, ip range, or username whose block is affecting the
 55+* (bug 7691) Deletion log now shown when creating a new article, following
 56+ MediaWiki:Noarticletext(anon) or MediaWiki:Newarticletext(anon).
 57+ current user.
5358
54 -
5559 == Bugfixes since 1.10 ==
5660
5761 * (bug 9712) Use Arabic comma in date/time formats for Arabic and Farsi
@@ -101,6 +105,7 @@
102106 * (bug 7993) support mathematical symbol classes
103107 * (bug 10007) Allow Block IP to work with Postgrs again.
104108 * Add Google Wireless Transcoder to the Unicode editing blacklist
 109+* (bug 10083) Fix for Special:Version breakage on PHP 5.2 with some hooks
105110
106111
107112 == MediaWiki API changes since 1.10 ==
@@ -162,6 +167,7 @@
163168 * Polish (pl)
164169 * Russian (ru)
165170 * Slovak (sk)
 171+* Shona (sn)
166172 * Somali (so)
167173 * Sundanese (su)
168174 * Swedish (sv)
Property changes on: branches/liquidthreads
___________________________________________________________________
Modified: svnmerge-integrated
169175 - /trunk/phase3:1-22618
170176 + /trunk/phase3:1-22651

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r22620*Fix typoaaron06:18, 1 June 2007
r22623(bug 10076) If a user is blocked as the result of a rangeblock, add the effec...amidaniel07:57, 1 June 2007
r22624Fixes for previous commit:...amidaniel09:05, 1 June 2007
r22625Aparently, it need not only be defined but *initialized* to make the warnings...amidaniel09:11, 1 June 2007
r22628* Some Shona (sn) translationsnikerabbit13:06, 1 June 2007
r22629*Document some hooksaaron13:17, 1 June 2007
r22630* (bug 10083) Fix for Special:Version breakage on PHP 5.2 with some hooksbrion15:53, 1 June 2007
r22638Update.rotem19:16, 1 June 2007
r22639Update.rotem19:20, 1 June 2007
r22641(bug 10076) Modified so as to output whoever the original blockee is, regardl...amidaniel00:03, 2 June 2007
r22642(bug 7691) Show deletion log following noarticletext and newarticletext when ...amidaniel00:41, 2 June 2007
r22643Minor doc goof -- displays *after* not before.amidaniel00:45, 2 June 2007
r22644Indonesian (id) localisation updates.ivanlanin00:48, 2 June 2007
r22648API: Security update - deleted rev/rc/log entries are no longer shown.yurik03:47, 2 June 2007