r54225 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r54224‎ | r54225 | r54226 >
Date:19:35, 2 August 2009
Author:demon
Status:resolved (Comments)
Tags:
Comment:
Merge maintenance-work branch (now with less errors!):
* Docs have been updated to indicate the standard on how to write maintenance scripts (MW.org docs will follow) Have ported vast majority of maintenance scripts to new format. Remaining ones (mostly FiveUpgrade-related) are a bit more tricky. commandLine.inc is untouched for now. Many have gotten code-style updates as well. Deleted .inc files were only used by their .php counterparts, and have been merged into single files.
* (bug 11867) Lock error on redirect table when running orphans.php
* (bug 16322) Allow maintenance scripts to accept DB user/pass over input or params
* (bug 18566) Maintenance script to un/protect pages
* initStats overhaul, now uses class SiteStatsInit. Also fixes bug 18930
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/docs/maintenance.txt (added) (history)
  • /trunk/phase3/includes/AutoLoader.php (modified) (history)
  • /trunk/phase3/includes/DefaultSettings.php (modified) (history)
  • /trunk/phase3/includes/SiteStats.php (modified) (history)
  • /trunk/phase3/maintenance/Maintenance.php (added) (history)
  • /trunk/phase3/maintenance/addwiki.php (modified) (history)
  • /trunk/phase3/maintenance/archives/rebuildRecentchanges.inc (deleted) (history)
  • /trunk/phase3/maintenance/archives/upgradeWatchlist.php (deleted) (history)
  • /trunk/phase3/maintenance/attachLatest.php (modified) (history)
  • /trunk/phase3/maintenance/attribute.php (deleted) (history)
  • /trunk/phase3/maintenance/benchmarkPurge.php (modified) (history)
  • /trunk/phase3/maintenance/cdb-test.php (modified) (history)
  • /trunk/phase3/maintenance/changePassword.php (modified) (history)
  • /trunk/phase3/maintenance/checkAutoLoader.php (modified) (history)
  • /trunk/phase3/maintenance/checkBadRedirects.php (modified) (history)
  • /trunk/phase3/maintenance/checkImages.php (modified) (history)
  • /trunk/phase3/maintenance/checkUsernames.php (modified) (history)
  • /trunk/phase3/maintenance/cleanupSpam.php (modified) (history)
  • /trunk/phase3/maintenance/clear_interwiki_cache.php (modified) (history)
  • /trunk/phase3/maintenance/clear_stats.php (modified) (history)
  • /trunk/phase3/maintenance/convertLinks.inc (deleted) (history)
  • /trunk/phase3/maintenance/convertLinks.php (modified) (history)
  • /trunk/phase3/maintenance/convertUserOptions.php (modified) (history)
  • /trunk/phase3/maintenance/createAndPromote.php (modified) (history)
  • /trunk/phase3/maintenance/deleteArchivedFiles.inc (deleted) (history)
  • /trunk/phase3/maintenance/deleteArchivedFiles.php (modified) (history)
  • /trunk/phase3/maintenance/deleteArchivedRevisions.inc (deleted) (history)
  • /trunk/phase3/maintenance/deleteArchivedRevisions.php (modified) (history)
  • /trunk/phase3/maintenance/deleteBatch.php (modified) (history)
  • /trunk/phase3/maintenance/deleteDefaultMessages.php (modified) (history)
  • /trunk/phase3/maintenance/deleteImageMemcached.php (modified) (history)
  • /trunk/phase3/maintenance/deleteOldRevisions.inc (deleted) (history)
  • /trunk/phase3/maintenance/deleteOldRevisions.php (modified) (history)
  • /trunk/phase3/maintenance/deleteOrphanedRevisions.inc (deleted) (history)
  • /trunk/phase3/maintenance/deleteOrphanedRevisions.php (modified) (history)
  • /trunk/phase3/maintenance/deleteRevision.php (modified) (history)
  • /trunk/phase3/maintenance/doMaintenance.php (added) (history)
  • /trunk/phase3/maintenance/dumpLinks.php (modified) (history)
  • /trunk/phase3/maintenance/dumpSisterSites.php (modified) (history)
  • /trunk/phase3/maintenance/dumpUploads.php (modified) (history)
  • /trunk/phase3/maintenance/edit.php (modified) (history)
  • /trunk/phase3/maintenance/eval.php (modified) (history)
  • /trunk/phase3/maintenance/fetchText.php (modified) (history)
  • /trunk/phase3/maintenance/findhooks.php (modified) (history)
  • /trunk/phase3/maintenance/fixSlaveDesync.php (modified) (history)
  • /trunk/phase3/maintenance/fixTimestamps.php (modified) (history)
  • /trunk/phase3/maintenance/fixUserRegistration.php (modified) (history)
  • /trunk/phase3/maintenance/generateSitemap.php (modified) (history)
  • /trunk/phase3/maintenance/getLagTimes.php (modified) (history)
  • /trunk/phase3/maintenance/getSlaveServer.php (modified) (history)
  • /trunk/phase3/maintenance/initEditCount.php (modified) (history)
  • /trunk/phase3/maintenance/initStats.inc (deleted) (history)
  • /trunk/phase3/maintenance/initStats.php (modified) (history)
  • /trunk/phase3/maintenance/language/alltrans.php (modified) (history)
  • /trunk/phase3/maintenance/mctest.php (modified) (history)
  • /trunk/phase3/maintenance/moveBatch.php (modified) (history)
  • /trunk/phase3/maintenance/namespaceDupes.php (modified) (history)
  • /trunk/phase3/maintenance/nextJobDB.php (modified) (history)
  • /trunk/phase3/maintenance/nukeNS.php (modified) (history)
  • /trunk/phase3/maintenance/nukePage.inc (deleted) (history)
  • /trunk/phase3/maintenance/nukePage.php (modified) (history)
  • /trunk/phase3/maintenance/orphans.php (modified) (history)
  • /trunk/phase3/maintenance/patchSql.php (modified) (history)
  • /trunk/phase3/maintenance/populateCategory.php (modified) (history)
  • /trunk/phase3/maintenance/populateLogSearch.inc (deleted) (history)
  • /trunk/phase3/maintenance/populateLogSearch.php (modified) (history)
  • /trunk/phase3/maintenance/populateLogUsertext.inc (deleted) (history)
  • /trunk/phase3/maintenance/populateLogUsertext.php (modified) (history)
  • /trunk/phase3/maintenance/populateParentId.inc (deleted) (history)
  • /trunk/phase3/maintenance/populateParentId.php (modified) (history)
  • /trunk/phase3/maintenance/protect.php (added) (history)
  • /trunk/phase3/maintenance/purgeList.php (modified) (history)
  • /trunk/phase3/maintenance/purgeOldText.php (modified) (history)
  • /trunk/phase3/maintenance/reassignEdits.inc (deleted) (history)
  • /trunk/phase3/maintenance/reassignEdits.php (modified) (history)
  • /trunk/phase3/maintenance/rebuildFileCache.php (modified) (history)
  • /trunk/phase3/maintenance/rebuildLocalisationCache.php (modified) (history)
  • /trunk/phase3/maintenance/rebuildall.php (modified) (history)
  • /trunk/phase3/maintenance/rebuildmessages.php (modified) (history)
  • /trunk/phase3/maintenance/rebuildrecentchanges.inc (deleted) (history)
  • /trunk/phase3/maintenance/rebuildrecentchanges.php (modified) (history)
  • /trunk/phase3/maintenance/rebuildtextindex.inc (deleted) (history)
  • /trunk/phase3/maintenance/rebuildtextindex.php (modified) (history)
  • /trunk/phase3/maintenance/refreshImageCount.php (modified) (history)
  • /trunk/phase3/maintenance/refreshLinks.inc (deleted) (history)
  • /trunk/phase3/maintenance/refreshLinks.php (modified) (history)
  • /trunk/phase3/maintenance/removeUnusedAccounts.inc (deleted) (history)
  • /trunk/phase3/maintenance/removeUnusedAccounts.php (modified) (history)
  • /trunk/phase3/maintenance/renameDbPrefix.php (modified) (history)
  • /trunk/phase3/maintenance/renamewiki.php (modified) (history)
  • /trunk/phase3/maintenance/renderDump.php (modified) (history)
  • /trunk/phase3/maintenance/runJobs.php (modified) (history)
  • /trunk/phase3/maintenance/showJobs.php (modified) (history)
  • /trunk/phase3/maintenance/showStats.php (modified) (history)
  • /trunk/phase3/maintenance/sql.php (modified) (history)
  • /trunk/phase3/maintenance/stats.php (modified) (history)
  • /trunk/phase3/maintenance/undelete.php (modified) (history)
  • /trunk/phase3/maintenance/updateArticleCount.inc (deleted) (history)
  • /trunk/phase3/maintenance/updateArticleCount.php (modified) (history)
  • /trunk/phase3/maintenance/updateRestrictions.php (modified) (history)
  • /trunk/phase3/maintenance/updateSearchIndex.inc (deleted) (history)
  • /trunk/phase3/maintenance/updateSearchIndex.php (modified) (history)
  • /trunk/phase3/maintenance/updateSpecialPages.php (modified) (history)
  • /trunk/phase3/maintenance/updaters.inc (modified) (history)
  • /trunk/phase3/maintenance/waitForSlave.php (modified) (history)

Follow-up revisions

RevisionCommit summaryAuthorDate
r54583Fix apparent regression in r54225werdna14:44, 7 August 2009
r54839Revert eval.php changes from r54653, r54312, r54225 (maintenance-work branch ...tstarling03:44, 12 August 2009
r57807Readd line break which was lost in r54225ialex08:58, 16 October 2009
r58049fix regression introduced by r54225 - special page skipping was ignored by ma...midom09:37, 23 October 2009
r58050upwards merge from deployment-58049, fix regression introduced by r54225 - sp...midom09:40, 23 October 2009
r68513Follow up r54225. DumpRenderer::handleRevision needs to be public in order to...platonides12:44, 24 June 2010
r71288Followup r54225...reedy11:32, 19 August 2010
r76515Fix for r54225: parameter delimiter is ",", not "."ialex12:37, 11 November 2010

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r52336Merge maintenance-work branch:...demon02:02, 24 June 2009
r52513(bug 18930) initStats does not refresh active_users countdemon15:33, 28 June 2009
r52519* Port generateSitemap, rebuildLocalisationCache...demon16:43, 28 June 2009

Comments

#Comment by 😂 (talk | contribs)   21:31, 2 August 2009
#Comment by 😂 (talk | contribs)   21:56, 2 August 2009
#Comment by Brion VIBBER (talk | contribs)   02:33, 3 August 2009

There's some real nasty bugs here; updaters are totally broken, attempting to include files that don't exist.

require_once( 'populateCategory.inc' ); require_once( 'populateParentId.inc' ); require_once( 'populateLogSearch.inc' );

That's just on first look... :(

#Comment by 😂 (talk | contribs)   02:46, 3 August 2009

populateCategory.inc was still there, restored parentId and LogSearch in r54253

#Comment by Simetrical (talk | contribs)   17:03, 10 August 2009

When running generateSitemap.php on near-trunk:

Notice: Use of undefined constant NS_MAIN - assumed 'NS_MAIN' in /var/www/w/maintenance/doMaintenance.php on line 41

Notice: Use of undefined constant NS_TALK - assumed 'NS_TALK' in /var/www/w/maintenance/doMaintenance.php on line 41

Notice: Use of undefined constant NS_USER - assumed 'NS_USER' in /var/www/w/maintenance/doMaintenance.php on line 41

Notice: Use of undefined constant NS_USER_TALK - assumed 'NS_USER_TALK' in /var/www/w/maintenance/doMaintenance.php on line 41

Notice: Use of undefined constant NS_PROJECT - assumed 'NS_PROJECT' in /var/www/w/maintenance/doMaintenance.php on line 41

Notice: Use of undefined constant NS_PROJECT_TALK - assumed 'NS_PROJECT_TALK' in /var/www/w/maintenance/doMaintenance.php on line 41

Notice: Use of undefined constant NS_FILE - assumed 'NS_FILE' in /var/www/w/maintenance/doMaintenance.php on line 41

Notice: Use of undefined constant NS_FILE_TALK - assumed 'NS_FILE_TALK' in /var/www/w/maintenance/doMaintenance.php on line 41

Notice: Use of undefined constant NS_MEDIAWIKI - assumed 'NS_MEDIAWIKI' in /var/www/w/maintenance/doMaintenance.php on line 41

Notice: Use of undefined constant NS_MEDIAWIKI_TALK - assumed 'NS_MEDIAWIKI_TALK' in /var/www/w/maintenance/doMaintenance.php on line 41

Notice: Use of undefined constant NS_TEMPLATE - assumed 'NS_TEMPLATE' in /var/www/w/maintenance/doMaintenance.php on line 41

Notice: Use of undefined constant NS_TEMPLATE_TALK - assumed 'NS_TEMPLATE_TALK' in /var/www/w/maintenance/doMaintenance.php on line 41

Notice: Use of undefined constant NS_HELP - assumed 'NS_HELP' in /var/www/w/maintenance/doMaintenance.php on line 41

Notice: Use of undefined constant NS_HELP_TALK - assumed 'NS_HELP_TALK' in /var/www/w/maintenance/doMaintenance.php on line 41

Notice: Use of undefined constant NS_CATEGORY - assumed 'NS_CATEGORY' in /var/www/w/maintenance/doMaintenance.php on line 41

Notice: Use of undefined constant NS_CATEGORY_TALK - assumed 'NS_CATEGORY_TALK' in /var/www/w/maintenance/doMaintenance.php on line 41
#Comment by 😂 (talk | contribs)   17:11, 10 August 2009

Resolved in r54728.

#Comment by Brion VIBBER (talk | contribs)   23:17, 19 August 2009

We seem to have sorted out the bugs by now. :)

#Comment by Tim Starling (talk | contribs)   06:45, 4 September 2009

doMaintenance.php is a hair's breadth away from being an arbitrary script execution vulnerability. Does that not count as a bug?

#Comment by Tim Starling (talk | contribs)   22:58, 4 September 2009

Fixed in r55807.

#Comment by Midom (talk | contribs)   09:43, 23 October 2009

Skipping of disabled cached querypages wasn't functional, fixed in r58050

#Comment by Platonides (talk | contribs)   18:34, 25 July 2010

What's the point of that $DP used in loadWikimediaSettings() ?

I only see it assigned there, and another time $DP = $IP; in wikimedia CommonSettings.php No more usages.

#Comment by 😂 (talk | contribs)   18:07, 26 July 2010

It was in the old commandLine.inc. I only kept it for back-compat. Didn't think it was really used though. If a shell can confirm it isn't actually used anywhere, we can kill it.

Status & tagging log