wiki.techinc.nl/maintenance
WMDE-Fisch 6df9ed1ad6 update mediawiki-codesniffer to 0.11.0 and fix issues
- mostly auto fixes
- some too long lines fixed
- ignore amp space in one case  passing by reference

Change-Id: I6472f83bc3cbf4bd629d83050cc3319b19ec465c
2017-08-11 22:27:51 +02:00
..
archives Create new table to be used for querying IP ranges. 2017-08-10 21:28:16 +00:00
benchmarks benchmarks: Add benchmarks for MapCacheLRU and HashBagOStuff 2017-07-27 21:40:42 +00:00
dev Update weblinks in comments from HTTP to HTTPS 2016-11-07 15:24:46 +01:00
dictionary phpunit: Avoid use of wmf-production host names 2017-04-12 02:53:33 +00:00
hhvm update mediawiki-codesniffer to 0.11.0 and fix issues 2017-08-11 22:27:51 +02:00
jsduck Enable jsduck for resources/src/mediawiki.rcfilters and make pass 2017-07-27 18:16:47 -07:00
language Remove auto-generated "Constructor" documentation on constructors 2017-07-21 12:19:30 +02:00
locking
mssql Follow-up to '3D' file type addition 2017-07-28 23:46:33 +00:00
oracle Remove empty lines at begin of function, if, foreach, switch 2017-07-01 11:34:16 +00:00
postgres Follow-up to '3D' file type addition 2017-07-28 23:46:33 +00:00
resources Update OOjs UI to v0.22.1 2017-05-31 12:27:05 -07:00
sqlite/archives Create new table to be used for querying IP ranges. 2017-08-10 21:28:16 +00:00
storage Move DB errors to Rdbms namespace 2017-04-15 10:47:41 -07:00
term
.htaccess
7zip.inc
addRFCandPMIDInterwiki.php addRFCandPMIDInterwiki.php: Add trailing . to skipped message 2017-07-25 23:26:14 +00:00
addSite.php Remove execute bits from non-executable files 2017-06-22 11:28:39 -04:00
attachLatest.php
backup.inc Move IDatabase/IMaintainableDatabase to Rdbms namespace 2017-03-28 15:32:38 -07:00
backupPrefetch.inc Fix TextPassDumperDatabaseTest::testPrefetchPlain postgres failures 2017-05-26 21:43:17 +00:00
cdb.php Remove empty lines from PHP and JavaScript comment blocks 2016-12-09 09:01:06 +00:00
changePassword.php Remove $wgDisableAuthManager 2016-08-09 23:00:27 +00:00
checkBadRedirects.php Rename DB_SLAVE constant to DB_REPLICA 2016-09-05 22:55:53 -07:00
checkComposerLockUpToDate.php Remove empty lines at end of functions 2016-11-05 11:55:10 +01:00
checkImages.php Rename DB_SLAVE constant to DB_REPLICA 2016-09-05 22:55:53 -07:00
checkLess.php Refactor parser tests 2016-09-12 16:11:42 +10:00
checkSyntax.php Remove empty lines at begin of function, if, foreach, switch 2017-07-01 11:34:16 +00:00
checkUsernames.php Rename DB_SLAVE constant to DB_REPLICA 2016-09-05 22:55:53 -07:00
cleanupAncientTables.php
cleanupBlocks.php
cleanupCaps.php Let cleanupCaps.php clean up when $wgCapitalLinks is set to true 2016-08-17 04:15:32 +00:00
cleanupEmptyCategories.php Remove a few unused variables 2016-09-26 17:03:32 -07:00
cleanupImages.php maintenance: Replace implicit Bugzilla bug numbers with Phab ones 2017-02-21 18:32:44 -08:00
cleanupInvalidDbKeys.php Fix a couple of issues with cleanupInvalidDbKeys.php maint script 2017-05-06 11:45:46 +00:00
cleanupPreferences.php
cleanupRemovedModules.php Move IDatabase/IMaintainableDatabase to Rdbms namespace 2017-03-28 15:32:38 -07:00
cleanupSpam.php Rename DB_SLAVE constant to DB_REPLICA 2016-09-05 22:55:53 -07:00
cleanupTable.inc Rename DB_SLAVE constant to DB_REPLICA 2016-09-05 22:55:53 -07:00
cleanupTitles.php Fix cleanupTitles.php 2017-07-10 15:07:07 -07:00
cleanupUploadStash.php Rename getSlaveDB() FileRepo method to getReplicaDB() 2016-11-18 07:42:39 -08:00
cleanupWatchlist.php
clearInterwikiCache.php Rename DB_SLAVE constant to DB_REPLICA 2016-09-05 22:55:53 -07:00
CodeCleanerGlobalsPass.inc build: Prepare for mediawiki/mediawiki-codesniffer to 0.9.0 2017-06-26 17:14:31 +00:00
commandLine.inc Register importImages options without arguments as actual maintenance script options so they are usable 2016-03-12 00:23:43 +00:00
compareParserCache.php Rename DB_SLAVE constant to DB_REPLICA 2016-09-05 22:55:53 -07:00
compareParsers.php
convertExtensionToRegistration.php registration: Fix adding $formerGlobals in conversion script 2016-08-08 02:56:39 -07:00
convertLinks.php
convertUserOptions.php Use IDatabase type hints in /maintenance 2017-04-07 23:37:41 +00:00
copyFileBackend.php Drop check for mbstring in copyFileBackend maintenance script 2016-06-30 11:58:20 -07:00
copyJobQueue.php
createAndPromote.php Remove $wgDisableAuthManager 2016-08-09 23:00:27 +00:00
createCommonPasswordCdb.php maintenance: Fix broken url in comment for createCommonPasswordCdb.php 2017-03-20 22:51:04 +00:00
deleteArchivedFiles.php Remove "@author Aaron Schulz" annotations 2017-06-27 15:24:14 -07:00
deleteArchivedRevisions.php Remove "@author Aaron Schulz" annotations 2017-06-27 15:24:14 -07:00
deleteBatch.php
deleteDefaultMessages.php maintenance: Add --dry-run option to deleteDefaultMessages.php 2017-07-18 21:18:28 +00:00
deleteEqualMessages.php
deleteOldRevisions.php Remove empty lines at begin of function, if, foreach, switch 2017-07-01 11:34:16 +00:00
deleteOrphanedRevisions.php Use IDatabase type hints in /maintenance 2017-04-07 23:37:41 +00:00
deleteRevision.php Use IDatabase type hints in /maintenance 2017-04-07 23:37:41 +00:00
deleteSelfExternals.php
doMaintenance.php Allow install.php to run env-checks with no db 2017-07-04 19:39:42 +01:00
Doxyfile Merge "Improve Doxygen template used by mwdocgen.php" 2016-10-12 14:57:10 +00:00
dumpBackup.php add option to XML dump stubs of page ranges with explicit rev_id ordering 2016-06-22 22:05:55 +03:00
dumpIterator.php Use IDatabase type hints in /maintenance 2017-04-07 23:37:41 +00:00
dumpLinks.php Rename DB_SLAVE constant to DB_REPLICA 2016-09-05 22:55:53 -07:00
dumpTextPass.php Remove empty lines at begin of function, if, foreach, switch 2017-07-01 11:34:16 +00:00
dumpUploads.php Rename DB_SLAVE constant to DB_REPLICA 2016-09-05 22:55:53 -07:00
edit.php Use english messages for background use of Status::getWikiText 2016-04-12 20:01:44 +02:00
eraseArchivedFile.php Remove "@author Aaron Schulz" annotations 2017-06-27 15:24:14 -07:00
eval.php Make "eval.php -d 2" work again 2017-05-03 09:49:44 -04:00
exportSites.php Introduce top level service locator. 2016-04-02 18:07:28 +03:00
fetchText.php Use IDatabase type hints in /maintenance 2017-04-07 23:37:41 +00:00
fileOpPerfTest.php Remove Profiler specific code from fileOpPerfTest 2016-07-01 01:36:33 +00:00
findDeprecated.php Upgrade PhpParser to 2.1 and update findDeprecated.php 2016-08-15 23:10:42 +00:00
findHooks.php Removed deprecated ContentHandler hooks. 2017-01-18 21:19:17 +00:00
findMissingFiles.php Remove "@author Aaron Schulz" annotations 2017-06-27 15:24:14 -07:00
findOrphanedFiles.php Remove "@author Aaron Schulz" annotations 2017-06-27 15:24:14 -07:00
fixDefaultJsonContentPages.php Rename DB_SLAVE constant to DB_REPLICA 2016-09-05 22:55:53 -07:00
fixDoubleRedirects.php maintenance: Consistently use hasOption() for boolean options 2017-07-19 14:52:21 -05:00
fixExtLinksProtocolRelative.php
fixTimestamps.php
fixUserRegistration.php Change "slave" => "replica DB" in /maintenance 2016-09-06 00:13:08 +00:00
formatInstallDoc.php
generateJsonI18n.php Un-blacklist PhanUndeclaredVariable 2017-01-18 13:07:39 -08:00
generateLocalAutoload.php Structure test: Add autoload.php order check 2016-08-03 09:50:27 +00:00
generateSitemap.php Merge "Remove auto-generated "Constructor" documentation on constructors" 2017-07-21 13:19:44 +00:00
getConfiguration.php
getLagTimes.php Send integer ms to DB lag time guage instead of seconds 2017-04-03 20:40:22 -07:00
getReplicaServer.php Rename DB_SLAVE constant to DB_REPLICA 2016-09-05 22:55:53 -07:00
getSlaveServer.php clone keyword must not be used as a function 2017-06-28 16:29:33 +02:00
getText.php
importDump.php Add skipping to nth page option/ability for dump importing process 2017-06-09 01:01:05 +03:00
importImages.php Remove empty lines at begin of function, if, foreach, switch 2017-07-01 11:34:16 +00:00
importSites.php Introduce top level service locator. 2016-04-02 18:07:28 +03:00
importSiteScripts.php
importTextFiles.php Get ConfigFactory & MainConfig from MediaWikiServices 2016-11-23 00:12:38 +00:00
initEditCount.php Remove a few unused variables 2016-09-26 17:03:32 -07:00
initSiteStats.php
initUserPreference.php Maintenance: init a user preference based on another preference 2017-03-03 11:02:58 -05:00
install.php Allow install.php to run env-checks with no db 2017-07-04 19:39:42 +01:00
interwiki.list Add 'pmid' to the default interwiki list, and update 'rfc' 2016-10-06 15:15:29 -07:00
interwiki.sql Add 'pmid' to the default interwiki list, and update 'rfc' 2016-10-06 15:15:29 -07:00
invalidateUserSessions.php Handle session reset errors in invalidateSessionsForUser.php 2016-06-18 11:01:20 +00:00
jsparse.php benchmarks: Add benchmark for JSMinPlus 2017-06-27 22:17:39 +00:00
lag.php Make LoadMonitor use $serverIndexes in the cache key 2016-10-05 20:07:03 +00:00
Maintenance.php build: Update mediawiki/mediawiki-codesniffer to 0.10.1 2017-07-22 18:24:09 -07:00
Makefile Renames preparatory to parser tests refactor 2016-09-12 15:46:15 +10:00
makeTestEdits.php
manageJobs.php Remove "@author Aaron Schulz" annotations 2017-06-27 15:24:14 -07:00
mcc.php Try to fix some other broken-looking legacy maintenance script options 2016-03-12 00:47:36 +00:00
mctest.php Remove used of deprecated MemCachedClientforWiki 2016-04-03 11:52:50 +03:00
mergeMessageFileList.php Don't hard fail when we couldn't find an entry point for an extension 2016-12-02 00:31:11 +00:00
migrateFileRepoLayout.php Make MigrateFileRepoLayout use getErrors() 2016-09-21 17:28:08 -07:00
migrateUserGroup.php maintenance: Replace implicit Bugzilla bug numbers with Phab ones 2017-02-21 18:32:44 -08:00
minify.php
moveBatch.php maintenance: Consistently use hasOption() for boolean options 2017-07-19 14:52:21 -05:00
mwdoc-filter.php Revert "Convert mwdoc-filter.php to Maintenance", rm wfShellWikiCmd 2017-05-04 00:15:22 +00:00
mwdocgen.php Use shell_exec instead of backtick 2017-07-06 19:14:38 -04:00
mwjsduck-gen
namespaceDupes.php Remove empty lines at begin of function, if, foreach, switch 2017-07-01 11:34:16 +00:00
nukeNS.php maintenance: Consistently use hasOption() for boolean options 2017-07-19 14:52:21 -05:00
nukePage.php maintenance: Consistently use hasOption() for boolean options 2017-07-19 14:52:21 -05:00
orphans.php Use IDatabase type hints in /maintenance 2017-04-07 23:37:41 +00:00
pageExists.php
parse.php Add --tidy option to maintenance/parse.php 2017-03-15 09:49:02 +11:00
patchSql.php Inject schema vars into DatabaseMysql 2016-09-22 21:07:27 +00:00
populateBacklinkNamespace.php
populateCategory.php maintenance: Consistently use hasOption() for boolean options 2017-07-19 14:52:21 -05:00
populateContentModel.php Use IDatabase type hints in /maintenance 2017-04-07 23:37:41 +00:00
populateFilearchiveSha1.php Change "slave" => "replica DB" in /maintenance 2016-09-06 00:13:08 +00:00
populateImageSha1.php
populateInterwiki.php maintenance: Consistently use hasOption() for boolean options 2017-07-19 14:52:21 -05:00
populateLogSearch.php
populateLogUsertext.php
populateParentId.php
populatePPSortKey.php Add some output messages to populatePPSortKey 2017-07-26 00:47:58 +01:00
populateRecentChangesSource.php Use IDatabase type hints in /maintenance 2017-04-07 23:37:41 +00:00
populateRevisionLength.php maintenance: Replace implicit Bugzilla bug numbers with Phab ones 2017-02-21 18:32:44 -08:00
populateRevisionSha1.php maintenance: Replace implicit Bugzilla bug numbers with Phab ones 2017-02-21 18:32:44 -08:00
preprocessDump.php
preprocessorFuzzTest.php Clean up array() syntax in docs, part VII 2016-09-27 06:53:25 +03:30
protect.php Make protect.php maintenance script not ignore --user and --reason parameters 2016-11-29 16:57:19 +01:00
pruneFileCache.php
purgeChangedFiles.php Rename getSlaveDB() FileRepo method to getReplicaDB() 2016-11-18 07:42:39 -08:00
purgeChangedPages.php Move ResultWrapper subclasses to Rdbms 2017-03-03 00:44:41 +00:00
purgeList.php Rename DB_SLAVE constant to DB_REPLICA 2016-09-05 22:55:53 -07:00
purgeModuleDeps.php Move IDatabase/IMaintainableDatabase to Rdbms namespace 2017-03-28 15:32:38 -07:00
purgeOldText.php
purgePage.php Maintenance script to purge specific page 2017-07-06 17:34:49 +02:00
purgeParserCache.php Turn ParserCache into a service, deprecate $parserMemc 2017-07-05 19:56:49 -07:00
README
reassignEdits.php
rebuildall.php Rename DB_SLAVE constant to DB_REPLICA 2016-09-05 22:55:53 -07:00
rebuildFileCache.php maintenance: Consistently use hasOption() for boolean options 2017-07-19 14:52:21 -05:00
rebuildImages.php A service for read-only mode 2017-04-19 12:27:06 -07:00
rebuildLocalisationCache.php Update weblinks in comments from HTTP to HTTPS 2016-11-07 15:24:46 +01:00
rebuildmessages.php
rebuildrecentchanges.php Fix overzealous addQuotes for rc_source field in rebuildrecentchanges.php 2017-08-03 09:09:36 +00:00
rebuildSitesCache.php Introduce top level service locator. 2016-04-02 18:07:28 +03:00
rebuildtextindex.php Move Database and subclasses to Rdbms namespace 2017-04-12 10:43:57 -07:00
recountCategories.php New maintenance script to recalculate category membership counts 2017-07-15 07:37:11 +00:00
refreshFileHeaders.php Remove "@author Aaron Schulz" annotations 2017-06-27 15:24:14 -07:00
refreshImageMetadata.php Improve output of refreshImageMetadata and refreshFileHeaders 2017-05-16 09:13:36 +02:00
refreshLinks.php update mediawiki-codesniffer to 0.11.0 and fix issues 2017-08-11 22:27:51 +02:00
removeInvalidEmails.php Rename DB_SLAVE constant to DB_REPLICA 2016-09-05 22:55:53 -07:00
removeUnusedAccounts.php Remove empty lines at begin of function, if, foreach, switch 2017-07-01 11:34:16 +00:00
renameDbPrefix.php
renderDump.php
resetUserEmail.php
resetUserTokens.php Rename DB_SLAVE constant to DB_REPLICA 2016-09-05 22:55:53 -07:00
rollbackEdits.php Rename DB_SLAVE constant to DB_REPLICA 2016-09-05 22:55:53 -07:00
runBatchedQuery.php Move IDatabase/IMaintainableDatabase to Rdbms namespace 2017-03-28 15:32:38 -07:00
runJobs.php Convert JobRunner to using beginMasterChanges() 2016-09-07 03:56:37 +00:00
runScript.php
shell.php Make "eval.php -d 2" work again 2017-05-03 09:49:44 -04:00
showJobs.php
showSiteStats.php Rename DB_SLAVE constant to DB_REPLICA 2016-09-05 22:55:53 -07:00
sql.php Move DB errors to Rdbms namespace 2017-04-15 10:47:41 -07:00
sqlite.inc build: Update mediawiki/mediawiki-codesniffer to 0.10.1 2017-07-22 18:24:09 -07:00
sqlite.php SQLite syntax checker: Fix support for multiple files 2016-08-25 21:28:45 -04:00
syncFileBackend.php syncFileBackend.php: ellapsed => elapsed 2016-07-25 10:43:24 -04:00
tables.sql Create new table to be used for querying IP ranges. 2017-08-10 21:28:16 +00:00
tidyUpBug37714.php Rename DB_SLAVE constant to DB_REPLICA 2016-09-05 22:55:53 -07:00
undelete.php
update-keys.sql
update.php Use IDatabase type hints in /maintenance 2017-04-07 23:37:41 +00:00
updateArticleCount.php Rename DB_SLAVE constant to DB_REPLICA 2016-09-05 22:55:53 -07:00
updateCollation.php Use IDatabase type hints in /maintenance 2017-04-07 23:37:41 +00:00
updateCredits.php updateCredits: Fix collation name 2017-07-28 17:24:03 +00:00
updateDoubleWidthSearch.php
updateExtensionJsonSchema.php registration: Convert "config" into an object with metadata 2016-07-13 14:58:00 -07:00
updateRestrictions.php Set batch size to 1000 in updateRestrictions 2017-07-19 18:35:02 +01:00
updateSearchIndex.php Fix numerous class/function casing 2016-03-18 23:14:49 +00:00
updateSpecialPages.php Change "slave" => "replica DB" in /maintenance 2016-09-06 00:13:08 +00:00
userDupes.inc Miscellaneous indentation tweaks 2017-02-27 19:23:54 +01:00
userOptions.inc build: Update mediawiki/mediawiki-codesniffer to 0.10.1 2017-07-22 18:24:09 -07:00
userOptions.php
validateRegistrationFile.php build: Prepare for mediawiki/mediawiki-codesniffer to 0.9.0 2017-06-26 17:14:31 +00:00
view.php Add maintenance/view.php for viewing page contents 2016-11-23 12:32:02 +00:00
wrapOldPasswords.php Move LBFactory to Rdbms namespace 2017-02-03 17:24:03 -08:00

== MediaWiki Maintenance ==

The .sql scripts in this directory are not intended to be run standalone,
although this is appropriate in some cases, e.g. manual creation of blank tables
prior to an import.

Most of the PHP scripts need to be run from the command line. Prior to doing so,
ensure that the LocalSettings.php file in the directory above points to the
proper installation.

Certain scripts will require elevated access to the database. In order to
provide this, first create a MySQL user with "all" permissions on the wiki
database, and then set $wgDBadminuser and $wgDBadminpassword in your
LocalSettings.php

=== Brief explanation of files ===

A lot of the files in this directory are PHP scripts used to perform various
maintenance tasks on the wiki database, e.g. rebuilding link tables, updating
the search indices, etc. The files in the "archives" directory are used to
upgrade the database schema when updating the software. Some schema definitions
for alternative (as yet unsupported) database management systems are stored
here too.

The "storage" directory contains scripts and resources useful for working with
external storage clusters, and are not likely to be particularly useful to the
vast majority of installations. This directory does contain the compressOld
scripts, however, which can be useful for compacting old data.

=== Maintenance scripts ===

As noted above, these should be run from the command line. Not all scripts are
listed, as some are Wikimedia-specific, and some are not applicable to most
installations.

	changePassword.php
	Reset the password of a specified user

	cleanupSpam.php
	Mass-revert insertion of linkspam

	createAndPromote.php
	Create a user with administrator (and optionally, bureaucrat) permissions

	deleteOldRevisions.php
	Erase old revisions of pages from the database

	dumpBackup.php
	Backup dump script

	edit.php
	Edit a page to change its content

	findHooks.php
	Find hooks that aren't documented in docs/hooks.txt

	importDump.php
	XML dump importer

	importImages.php
	Import images into the wiki

	moveBatch.php
	Move a batch of pages

	namespaceDupes.php
	Check articles name to see if they conflict with new/existing namespaces

	nukePage.php
	Wipe a page and all revisions from the database

	reassignEdits.php
	Reassign edits from one user to another

	rebuildImages.php
	Update image metadata records

	rebuildmessages.php
	Update the MediaWiki namespace after changing site language

	rebuildtextindex.php
	Rebuild the fulltext search indices

	refreshLinks.php
	Rebuild the link tables

	removeUnusedAccounts.php
	Remove user accounts which have made no edits

	runJobs.php
	Immediately complete all jobs in the job queue

	undelete.php
	Undelete all revisions of a page

	update.php
	Check and upgrade the database schema to the current version

	updateRestrictions.php
	Update pages restriction to the new schema

	userOptions.php
	Change user options