aboutsummaryrefslogtreecommitdiffstats
path: root/maintenance/patchSql.php
Commit message (Collapse)AuthorAgeFilesLines
* Convert all array() syntax to []Kunal Mehta2016-02-171-2/+2
| | | | | | | | | | Per wikitech-l consensus: https://lists.wikimedia.org/pipermail/wikitech-l/2016-February/084821.html Notes: * Disabled CallTimePassByReference due to false positives (T127163) Change-Id: I2c8ce713ce6600a0bb7bf67537c87044c7a45c4b
* Use addDescription() instead of accessing mDescription directlyMax Semenik2016-01-301-1/+1
| | | | Change-Id: I0e2aa83024b8abf5298cfea4b21bf45722ad3103
* Update wfGetDB calls in Maintenance scripts to use getDB()Reedy2016-01-021-1/+1
| | | | Change-Id: I9ad6745d84506b736dae94747256caac89715899
* Pass phpcs-strict on maintenance/ (4/8)Siebrand Mazeland2014-04-231-1/+4
| | | | Change-Id: Ib9ee255740681f0d32d76b75ef33b369bc87bcc1
* phpcs: More require/include is not a functionTimo Tijhof2013-05-211-1/+1
| | | | | | | | | | | | | Follows-up I1343872de7, Ia533aedf63 and I2df2f80b81. Also updated usage in text in documentation and the installer LocalSettingsGenerator. Most of them were handled by this regex: - find: (require|include|require_once|include_once)\s*\(\s*(.+?)\s*\)\s*;$ - replace: $1 $2; Change-Id: I6b38aad9a5149c9c43ce18bd8edbab14b8ce43fa
* phpcs: Fix WhiteSpace.LanguageConstructSpacing warningsTimo Tijhof2013-05-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Squiz.WhiteSpace.LanguageConstructSpacing: Language constructs must be followed by a single space; expected "require_once expression" but found "require_once(expression)" It is a keyword (e.g. like `new`, `return` and `print`). As such the parentheses don't make sense. Per our code conventions, we use a space after keywords like these. We appeared to have an unwritten exception for `require` that doesn't make sense. About 60% of require/include usage was missing the space and/or had superfluous parentheses. It is as silly as print("foo") or return("foo"), it works because keywords have no significance for whitespace between it and the expression that follows, and since experessions can be wrapped in parentheses for clarity (e.g. when doing string concatenation or mathematical operations) the parenthesis before and after basiclaly just ignored. Change-Id: I2df2f80b8123714bea7e0771bf94b51ad5bb4b87
* Use __DIR__ instead of dirname( __FILE__ )jeroendedauw2012-08-271-1/+1
| | | | | | We can now do this since we finally switched to PHP 5.3 for MW 1.20 and get rid of the silly dirname(__FILE__) stuff :) Change-Id: Id9b2c9cd2e678197aa81c78adced5d1d31ff57b1
* Improve documentation of maintenance scripts.Alexandre Emsenhuber2012-08-021-0/+6
| | | | Change-Id: I52ebe4d741109aef19cd8fa252243e2b6440565f
* Fix concern raised by Brion in r74108 (but has really existed since the ↵Chad Horohoe2011-01-131-1/+1
| | | | | | | | | | | maintenance rewrite). Right now, including a maintenance script causes it to execute. This is bad when you want to reuse the particular class but not have it start executing all by itself. Until now, we relied on setting MW_NO_SETUP which was a) hacky, b) irreversable, and c) likely to be forgotten if you didn't use one of the wrappers like runChild(). Instead, move the freaky magic to doMaintenance and have *it* check if it's in a specific call stack that indicates this is being run from the file scope and should be executed. Rename DO_MAINTENANCE to RUN_MAINTENANCE_IF_MAIN so it's nice and clear what magic happens behind the require_once(). Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/80205
* Follow-up r74628: convert two remaining calls of patchPath()Max Semenik2010-10-121-2/+2
| | | | Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/74681
* Stylize maintenance folder..Sam Reed2010-05-221-4/+4
| | | | Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/66751
* Fixed some errors while running patchSql.php:Alexandre Emsenhuber2010-03-141-1/+1
| | | | | | | | * Notice: Undefined variable: name in includes/db/Database.php on lines 2209 and 2212 * Fatal error: Call to undefined method DatabaseMysql::fileSource() in maintenance/patchSql.php on line 48 Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/63742
* Fix child class visibilityChad Horohoe2010-03-101-1/+1
| | | | Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/63549
* Redo addArgs() as addArg() so we can actually do useful things with ↵Chad Horohoe2009-08-181-1/+1
| | | | | | | arguments like descriptions and proper requirement checks, similar to addOption() Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/55287
* patchPath not patchPatchChad Horohoe2009-08-091-2/+2
| | | | Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/54666
* * Use DB_ADMIN for fixSlaveDesync, rebuildtextindex, updateSearchIndex, patchSqlChad Horohoe2009-08-091-23/+46
| | | | | | | * Duplicate archive() as DatabaseBase::patchPath(), clean up patchSql to use this Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/54665
* Revert r54244 which was stupid and fix this properly. Require ↵Chad Horohoe2009-08-031-1/+1
| | | | | | | commandLine.inc/Maintenance.php using the full path every time. Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/54312
* Merge maintenance-work branch (now with less errors!):Chad Horohoe2009-08-021-1/+1
| | | | | | | | | | | * 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 Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/54225
* WARNING: HUGE COMMITAlexandre Emsenhuber2008-05-201-3/+7
| | | | | | | | | | | | | | | | | | Doxygen documentation update: * Changed alls @addtogroup to @ingroup. @addtogroup adds the comment to the group description, but doesn't add the file, class, function, ... to the group like @ingroup does. See for example http://svn.wikimedia.org/doc/group__SpecialPage.html where it's impossible to see related files, classes, ... that should belong to that group. * Added @file to file description, it seems that it should be explicitely decalred for file descriptions, otherwise doxygen will think that the comment document the first class, variabled, function, ... that is in that file. * Removed some empty comments * Removed some ?> Added following groups: * ExternalStorage * JobQueue * MaintenanceLanguage One more thing: there are still a lot of warnings when generating the doc. Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/35098
* Handy script to manually run a single sql patch file, with all the necessary ↵Brion Vibber2008-03-191-0/+32
options expanded (prefix, charset, etc). Commands like 'php maintenance/patchSql.php updatelog category' Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/32188