r79719 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r79718‎ | r79719 | r79720 >
Date:14:15, 6 January 2011
Author:catrope
Status:ok
Tags:
Comment:
Modified paths:
  • /branches/REL1_17/extensions/ContributionReporting/ContributionReporting.php (modified) (history)
  • /branches/REL1_17/extensions/ContributionReporting/FundraiserStatistics_body.php (modified) (history)
  • /branches/REL1_17/extensions/ExtensionDistributor/ExtensionDistributor_body.php (modified) (history)
  • /branches/REL1_17/phase3/RELEASE-NOTES (modified) (history)
  • /branches/REL1_17/phase3/docs/hooks.txt (modified) (history)
  • /branches/REL1_17/phase3/includes/Setup.php (modified) (history)
  • /branches/REL1_17/phase3/includes/installer/CoreInstaller.php (modified) (history)
  • /branches/REL1_17/phase3/includes/installer/DatabaseInstaller.php (modified) (history)
  • /branches/REL1_17/phase3/includes/installer/MysqlUpdater.php (modified) (history)
  • /branches/REL1_17/phase3/includes/installer/WebInstallerPage.php (modified) (history)
  • /branches/REL1_17/phase3/includes/resourceloader/ResourceLoader.php (modified) (history)
  • /branches/REL1_17/phase3/includes/upload/UploadBase.php (modified) (history)
  • /branches/REL1_17/phase3/resources/mediawiki/mediawiki.js (modified) (history)
  • /branches/REL1_17/phase3/skins/Vector.php (modified) (history)

Diff [purge]

Index: branches/REL1_17/extensions/ExtensionDistributor/ExtensionDistributor_body.php
@@ -259,7 +259,7 @@
260260 htmlspecialchars( wfMsg( 'extdist-want-more' ) ) . '</a></big></p>' );
261261
262262 // Redirect to the file
263 - header( 'Refresh: 5;' . $url );
 263+ header( 'Refresh: 5;url=' . $url );
264264 }
265265
266266 protected function updateAndGetRevisionLocal( $extension, $version ) {
Index: branches/REL1_17/extensions/ContributionReporting/ContributionReporting.php
@@ -96,8 +96,11 @@
9797 $egFundraiserStatisticsMinimum = 1;
9898 $egFundraiserStatisticsMaximum = 10000;
9999
 100+// Cache timeout for fundraiser statistics, in seconds
 101+$egFundraiserStatisticsCacheTimeout = 300; // 5 minutes
100102
101103
 104+
102105 $wgContributionTrackingStatisticsViewWeeks = 3;
103106
104107 $wgHooks['ParserFirstCallInit'][] = 'efContributionReportingSetup';
Index: branches/REL1_17/extensions/ContributionReporting/FundraiserStatistics_body.php
@@ -217,7 +217,7 @@
218218 /* Private Functions */
219219
220220 private function query( $type, $start, $end ) {
221 - global $wgMemc, $egFundraiserStatisticsMinimum, $egFundraiserStatisticsMaximum;
 221+ global $wgMemc, $egFundraiserStatisticsMinimum, $egFundraiserStatisticsMaximum, $egFundraiserStatisticsCacheTimeout;
222222
223223 $key = wfMemcKey( 'fundraiserstatistics', $type, $start, $end );
224224 $cache = $wgMemc->get( $key );
@@ -309,8 +309,7 @@
310310 break;
311311 }
312312 if ( isset( $result ) ) {
313 - // Cache invalidates once per minute
314 - $wgMemc->set( $key, $result, 60 );
 313+ $wgMemc->set( $key, $result, $egFundraiserStatisticsCacheTimeout );
315314 return $result;
316315 }
317316 return null;
Index: branches/REL1_17/phase3/skins/Vector.php
@@ -305,6 +305,8 @@
306306 'text' => wfMsg( 'nstab-special' ),
307307 'href' => $wgRequest->getRequestURL()
308308 );
 309+ // Equiv to SkinTemplateBuildContentActionUrlsAfterSpecialPage
 310+ wfRunHooks( 'SkinTemplateNavigation::SpecialPage', array( &$this, &$links ) );
309311 }
310312
311313 // Gets list of language variants
@@ -331,6 +333,9 @@
332334 }
333335 }
334336
 337+ // Equiv to SkinTemplateContentActions
 338+ wfRunHooks( 'SkinTemplateNavigation::Universal', array( &$this, &$links ) );
 339+
335340 wfProfileOut( __METHOD__ );
336341
337342 return $links;
Property changes on: branches/REL1_17/phase3/skins/Vector.php
___________________________________________________________________
Modified: svn:mergeinfo
338343 Merged /trunk/phase3/skins/Vector.php:r78078,78285,79246,79358,79480
Index: branches/REL1_17/phase3/docs/hooks.txt
@@ -1489,7 +1489,10 @@
14901490 [See http://svn.wikimedia.org/viewvc/mediawiki/trunk/extensions/examples/Content_action.php
14911491 for an example]
14921492
1493 -'SkinTemplateNavigation': Alter the structured navigation links in SkinTemplates
 1493+Alter the structured navigation links in SkinTemplates, there are three of these hooks called in different spots.
 1494+'SkinTemplateNavigation': Called on content pages before variants have been added
 1495+'SkinTemplateNavigation::SpecialPage': Called on special pages before variands have been added
 1496+'SkinTemplateNavigation::Universal': Called on both content and special pages after variants have been added
14941497 &$sktemplate: SkinTemplate object
14951498 &$links: Structured navigation links
14961499 This is used to alter the navigation for skins which use buildNavigationUrls such as Vector.
Property changes on: branches/REL1_17/phase3/docs/hooks.txt
___________________________________________________________________
Modified: svn:mergeinfo
14971500 Merged /trunk/phase3/docs/hooks.txt:r78078,79246,79358,79480
Index: branches/REL1_17/phase3/includes/upload/UploadBase.php
@@ -568,10 +568,9 @@
569569 if ( $this->mFinalExtension == '' ) {
570570 $this->mTitleError = self::FILETYPE_MISSING;
571571 return $this->mTitle = null;
572 - } elseif ( ( $this->checkFileExtensionList( $ext, $wgFileBlacklist )
573 - && !$this->checkFileExtensionList( $ext, $wgFileExtensions ) ) ||
574 - ( $wgCheckFileExtensions && $wgStrictFileExtensions &&
575 - !$this->checkFileExtension( $this->mFinalExtension, $wgFileExtensions ) ) ) {
 572+ } elseif ( $this->checkFileExtensionList( $ext, $wgFileBlacklist ) ||
 573+ ( $wgCheckFileExtensions && $wgStrictFileExtensions &&
 574+ !$this->checkFileExtension( $this->mFinalExtension, $wgFileExtensions ) ) ) {
576575 $this->mTitleError = self::FILETYPE_BADTYPE;
577576 return $this->mTitle = null;
578577 }
Property changes on: branches/REL1_17/phase3/includes/upload/UploadBase.php
___________________________________________________________________
Modified: svn:mergeinfo
579578 Merged /trunk/phase3/includes/upload/UploadBase.php:r78078,78285,79246,79358,79480,79693
Index: branches/REL1_17/phase3/includes/Setup.php
@@ -293,6 +293,9 @@
294294 $wgCacheEpoch = max( $wgCacheEpoch, gmdate( 'YmdHis', @filemtime( "$IP/LocalSettings.php" ) ) );
295295 }
296296
 297+# Blacklisted file extensions shouldn't appear on the "allowed" list
 298+$wgFileExtensions = array_diff ( $wgFileExtensions, $wgFileBlacklist );
 299+
297300 wfProfileOut( $fname.'-misc1' );
298301 wfProfileIn( $fname.'-memcached' );
299302
Index: branches/REL1_17/phase3/includes/installer/MysqlUpdater.php
@@ -191,7 +191,7 @@
192192 $this->output( "...$table table has correct $field encoding.\n" );
193193 } else {
194194 $this->output( "Fixing $field encoding on $table table... " );
195 - $this->db->applyPatch( $patchFile );
 195+ $this->applyPatch( $patchFile );
196196 $this->output( "ok\n" );
197197 }
198198 }
@@ -311,6 +311,7 @@
312312 $this->output( wfTimestamp( TS_DB ) );
313313 $this->output( "......<b>Found duplicate entries</b>\n" );
314314 $this->output( sprintf( "<b> %-60s %3s %5s</b>\n", 'Title', 'NS', 'Count' ) );
 315+ $duplicate = array();
315316 foreach ( $rows as $row ) {
316317 if ( ! isset( $duplicate[$row->cur_namespace] ) ) {
317318 $duplicate[$row->cur_namespace] = array();
@@ -617,13 +618,17 @@
618619 * @see bug 3946
619620 */
620621 protected function doPageRandomUpdate() {
621 - $this->output( "Setting page_random to a random value on rows where it equals 0..." );
 622+
622623
623624 $page = $this->db->tableName( 'page' );
624625 $this->db->query( "UPDATE $page SET page_random = RAND() WHERE page_random = 0", __METHOD__ );
625626 $rows = $this->db->affectedRows();
626627
627 - $this->output( "changed $rows rows\n" );
 628+ if( $rows ) {
 629+ $this->output( "Set page_random to a random value on $rows rows where it was set to 0\n" );
 630+ } else {
 631+ $this->output( "...no page_random rows needed to be set\n" );
 632+ }
628633 }
629634
630635 protected function doTemplatelinksUpdate() {
Property changes on: branches/REL1_17/phase3/includes/installer/MysqlUpdater.php
___________________________________________________________________
Added: svn:mergeinfo
631636 Merged /branches/REL1_15/phase3/includes/installer/MysqlUpdater.php:r51646
632637 Merged /branches/sqlite/includes/installer/MysqlUpdater.php:r58211-58321
633638 Merged /trunk/phase3/includes/installer/MysqlUpdater.php:r78078,78285,79246,79358,79480-79481,79693
634639 Merged /branches/new-installer/phase3/includes/installer/MysqlUpdater.php:r43664-66004
635640 Merged /branches/wmf-deployment/includes/installer/MysqlUpdater.php:r53381
Index: branches/REL1_17/phase3/includes/installer/CoreInstaller.php
@@ -259,7 +259,7 @@
260260 * Overridden by WebInstaller to provide lastPage parameters.
261261 */
262262 protected function getDocUrl( $page ) {
263 - return "{$_SERVER['PHP_SELF']}?page=" . urlencode( $attribs['href'] );
 263+ return "{$_SERVER['PHP_SELF']}?page=" . urlencode( $page );
264264 }
265265
266266 /**
Property changes on: branches/REL1_17/phase3/includes/installer/CoreInstaller.php
___________________________________________________________________
Added: svn:mergeinfo
267267 Merged /branches/sqlite/includes/installer/CoreInstaller.php:r58211-58321
268268 Merged /trunk/phase3/includes/installer/CoreInstaller.php:r78078,78285,79246,79358,79480,79491,79693
269269 Merged /branches/new-installer/phase3/includes/installer/CoreInstaller.php:r43664-66004
270270 Merged /branches/wmf-deployment/includes/installer/CoreInstaller.php:r53381
271271 Merged /branches/REL1_15/phase3/includes/installer/CoreInstaller.php:r51646
Index: branches/REL1_17/phase3/includes/installer/DatabaseInstaller.php
@@ -131,7 +131,7 @@
132132
133133 $error = $this->db->sourceFile( $this->db->getSchema() );
134134 if( $error !== true ) {
135 - $this->db->reportQueryError( $error, 0, $sql, __METHOD__ );
 135+ $this->db->reportQueryError( $error, 0, '', __METHOD__ );
136136 $status->fatal( 'config-install-tables-failed', $error );
137137 }
138138 return $status;
Property changes on: branches/REL1_17/phase3/includes/installer/DatabaseInstaller.php
___________________________________________________________________
Modified: svn:mergeinfo
139139 Merged /trunk/phase3/includes/installer/DatabaseInstaller.php:r78078,78285,79246,79358,79480,79497,79693
Index: branches/REL1_17/phase3/includes/installer/WebInstallerPage.php
@@ -1042,7 +1042,7 @@
10431043 // Pop up a dialog box, to make it difficult for the user to forget
10441044 // to download the file
10451045 $lsUrl = $GLOBALS['wgServer'] . $this->parent->getURL( array( 'localsettings' => 1 ) );
1046 - $this->parent->request->response()->header( "Refresh: 0;$lsUrl" );
 1046+ $this->parent->request->response()->header( "Refresh: 0;url=$lsUrl" );
10471047
10481048 $this->startForm();
10491049 $this->parent->disableLinkPopups();
Property changes on: branches/REL1_17/phase3/includes/installer/WebInstallerPage.php
___________________________________________________________________
Modified: svn:mergeinfo
10501050 Merged /trunk/phase3/includes/installer/WebInstallerPage.php:r78078,78285,79246,79358,79480,79503,79693
Index: branches/REL1_17/phase3/includes/resourceloader/ResourceLoader.php
@@ -533,7 +533,7 @@
534534 'mediaWiki.loader.implement',
535535 array(
536536 $name,
537 - new XmlJsCode( "function() {{$scripts}}" ),
 537+ new XmlJsCode( "function( $, mw ) {{$scripts}}" ),
538538 (object)$styles,
539539 (object)$messages
540540 ) );
Property changes on: branches/REL1_17/phase3/includes/resourceloader/ResourceLoader.php
___________________________________________________________________
Modified: svn:mergeinfo
541541 Merged /trunk/phase3/includes/resourceloader/ResourceLoader.php:r78078,78285,79246,79358,79480,79693
Index: branches/REL1_17/phase3/RELEASE-NOTES
@@ -234,6 +234,8 @@
235235 other than LocalSettings.php. This is like MW_CONFIG_CALLBACK but works in
236236 some cases where MW_CONFIG_CALLBACK will not work.
237237 * (bug 16019) $wgArticlePath = "/$1" no longer breaks API edit/watch actions
 238+* (bug 18372) File types blacklisted by $wgFileBlacklist will no longer be shown as "Permitted file types" on the upload form
 239+* (bug 26540) Fixed wrong call to applyPatch in MysqlUpdater
238240
239241 === Bug fixes in 1.17 ===
240242 * (bug 17560) Half-broken deletion moved image files to deletion archive
@@ -477,6 +479,8 @@
478480 * (bug 14404) The articles are now always saved with the default options. Articles
479481 with {{int:X}} will have consistent table links no matter the preferences of the
480482 last saving user.
 483+* (bug 22753) Output from update.php is more clear when things changed, entries
 484+ indicating nothing changed are now all prefixed by "..."
481485
482486 === API changes in 1.17 ===
483487 * BREAKING CHANGE: action=patrol now requires POST
Index: branches/REL1_17/phase3/resources/mediawiki/mediawiki.js
@@ -502,7 +502,7 @@
503503 }
504504 // Execute script
505505 try {
506 - registry[module].script();
 506+ registry[module].script( jQuery, mediaWiki );
507507 registry[module].state = 'ready';
508508 // Run jobs who's dependencies have just been met
509509 for ( var j = 0; j < jobs.length; j++ ) {
Property changes on: branches/REL1_17/phase3/resources/mediawiki/mediawiki.js
___________________________________________________________________
Modified: svn:mergeinfo
510510 Merged /trunk/phase3/resources/mediawiki/mediawiki.js:r78078,78285,79246,79358,79480

Follow-up revisions

RevisionCommit summaryAuthorDate
r79879Follow-up to r79719: remove RELEASE-NOTES entry left over from r77956 (which ...emufarmers05:08, 9 January 2011

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r78078(bug 22753) update.php should make things it actually changed stand out bette...demon17:22, 8 December 2010
r78285Follow-up to r77956: instead of making $wgFileExtensions override $wgFileBlac...emufarmers23:19, 12 December 2010
r78787Make Special:FundraiserStatistics cache timeout configurable and set it to 5 ...catrope14:26, 22 December 2010
r79246(bug 26507) Wrap all ResourceLoader-served JS in (function($, mw) { code here...catrope12:22, 30 December 2010
r79358Add SkinTemplateNavigation::SpecialPage and SkinTemplateNavigation::Universal...dantman17:48, 31 December 2010
r79480* (bug 26540) Fixed wrong call to applyPatch in MysqlUpdaterreedy08:05, 2 January 2011
r79481Explicitally define $duplicates = array();...reedy08:25, 2 January 2011
r79491Fix for r45497: undefined variableialex14:35, 2 January 2011
r79497Fix for r64254: undefined variableialex19:04, 2 January 2011
r79498* (bug 26537) ExtensionDistributor download fix for Opera...brion19:45, 2 January 2011
r79503Refresh header fix for Opera, as in r79498tstarling02:05, 3 January 2011
r79693Follow-up to r78285: remove blacklisted file types from $wgFileExtensions in ...emufarmers00:12, 6 January 2011

Status & tagging log