Commit graph

64 commits

Author SHA1 Message Date
Alexandre Emsenhuber
2a7478b4fb Improve documentation of maintenance scripts.
Change-Id: Id7a04ff816dc47a8cc81a4da5ab0dff26b688bd5
2012-09-03 20:10:09 +02:00
jeroendedauw
38c7f444e1 Use __DIR__ instead of dirname( __FILE__ )
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
2012-08-27 21:45:00 +02:00
Reedy
f1bec81eba Various updates needed to bump min php version to 5.3.2
Change-Id: I22015387e4ac5839a907059086d787f352746886
2012-04-16 15:38:22 +01:00
Sam Reed
fc7532449d Same for the getPostDatabaseUpdateMaintenance
We only need to run them once
2011-11-11 17:06:03 +00:00
Chad Horohoe
0d90d0b9ca Whoops, need a ! 2011-11-03 20:17:49 +00:00
Chad Horohoe
61ff866b4b *grumble grumble* know it alls think I'm abusing $wgMiserMode. So fine, have a SHINY NEW GLOBAL INSTEAD. bug 32072, r92109, yada-yada.
This is not a "useless" error message, regardless of what the bug claims.
2011-11-03 20:15:27 +00:00
Aaron Schulz
6447ae9f21 Renamed annoying --iknowwhatimdoing param to --force (bug 32073) 2011-10-31 17:30:47 +00:00
Sean Colombo
a11a1edafa Merged in a change which causes update.php to be gentler (tests slave-lag). Part of the many Wikia diffs: http://www.mediawiki.org/wiki/Wikia_code 2011-09-19 18:25:39 +00:00
Max Semenik
f86947bfe7 Fix r87731: update site stats only when explicitly asked to do so 2011-09-03 10:23:47 +00:00
Chad Horohoe
e5ca759a8f (bug 29558) Add config var to disable update.php. Did this by checking $wgMiserMode and bailing unless --iknowwhatimdoing 2011-07-13 22:14:19 +00:00
Tim Starling
6fec4e3fde Revert r87635, r87637, r87639, r87643 (MW_MIN_PHP_VERSION etc.): breaks HipHop support. 2011-05-15 13:21:16 +00:00
Happy-melon
cd128f4496 Follow-up r87637: the terrors of copy-and-paste. 2011-05-07 15:37:23 +00:00
Happy-melon
7055add799 Centralise the minimum-required-php-version in a MW_MIN_PHP_VERSION constant in Defines.php. This requires loading Defines.php before the PHP4 version checks, so include a big note reminding people not to include anything other than vanilla define() statements in there.
I have a sneaking suspicion that including Defines.php in the entry points might not play nicely with HipHop, but I can't test it (wrong OS).
2011-05-07 15:16:01 +00:00
OverlordQ
14ae286fb4 Followup to r85021, fix caller in updater maintenance script 2011-03-30 20:56:03 +00:00
Max Semenik
f2f298ba67 update.php: restore compatibility with PHP4 to die gracefully 2011-03-19 19:48:29 +00:00
Sam Reed
7f1c9f7b63 Fixup some more old version comparison stuff 2011-03-15 12:06:40 +00:00
Chad Horohoe
26505b170a Fix concern raised by Brion in r74108 (but has really existed since the 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().
2011-01-13 22:58:55 +00:00
Alexandre Emsenhuber
9f5d06527c Part of bug 26280: added license headers to PHP files in maintenance 2010-12-16 19:15:12 +00:00
Mark A. Hershberger
617a5b1e15 Whitespace fixup under tha maint directory. 2010-12-04 03:20:14 +00:00
Chad Horohoe
670602f082 Trying to kill install-utils.inc/old install crap:
* Cripple the old installer (entry point is gone, supporting code immediately exits). Keeping the latter for reference still :)
* Move posix_isatty() wrapper to Maintenance.php, all CLI scripts include this
* Clarify docs on archive() deprecation and removal - hasn't been used going back thru 1.15
* Clarify docs on dbsource() deprecation and removal - was in wide use thru 1.15. 1.16 removed all extension usages
* Move the two PHP bug tests to a file with the other installer files, moved them to more logical places in new install/update sequence
* Remove mw_have_dl/mw_get_session_save_path, zero callers
* Move readconsole() and helpers to be a static method on Maintenance, no extensions have used it since 1.15 either
2010-11-06 22:16:19 +00:00
Platonides
c7e101b7bf r75540 CR 2010-10-27 14:46:58 +00:00
Platonides
051fd41053 Make update.php obey --quiet 2010-10-27 14:38:31 +00:00
Platonides
f323cece43 Follow up r75474 2010-10-27 13:56:58 +00:00
Platonides
30d21e6d66 Keep maintenance/update.php php4 compatible up to the point where we can give a maeningful error. Check based in install_version_checks()
Follow up conversion to new maintenance format in r72539
2010-10-26 21:42:49 +00:00
Alexandre Emsenhuber
66234904b8 Use full path to Maintenance.php 2010-10-10 08:35:07 +00:00
Alexandre Emsenhuber
f8efa1a751 Fix doc: $wgExtensionFunctions, not $wgExtensionSetupFunctions 2010-10-02 21:09:23 +00:00
Chad Horohoe
9ec1f9ad44 (bug 20633) update.php has mixed language output 2010-09-13 17:01:04 +00:00
Alexandre Emsenhuber
da62fc431f * Use Maintenance::runChild() to get the child script instance
* Moved do_stats_init() to DatabaseUpdater and call it from doUpdates() for consistency with purgeCache(), this inverts the order of execution with default messages deletion, but I don't think this should break anything
* Removed the early return for postgres, which was a leftover from the old do_postgres_updates() crap
2010-09-12 09:07:51 +00:00
Alexandre Emsenhuber
7932db7e38 Follow-up r72829: we also have the hasOption() method for that 2010-09-11 21:56:11 +00:00
Sam Reed
3eb1798d51 Use $this->mOptions, and specify Maintenance class for location of DB_ADMIN constant 2010-09-11 20:43:45 +00:00
Alexandre Emsenhuber
e3d73b2987 added Maintenance::afterFinalSetup() instead of having to define a callback with MW_CMDLINE_CALLBACK 2010-09-07 20:45:04 +00:00
Chad Horohoe
32b450426b * do_all_updates() is dead
* Less $wgDatabase
* update.php now uses new Maintenance class
2010-09-07 14:33:11 +00:00
Sam Reed
659778619c Stylize maintenance folder.. 2010-05-22 16:50:39 +00:00
Aryeh Gregor
146377f8f6 Adjust wording of r62052
The "and" seems out of place to me.
2010-02-07 17:38:46 +00:00
Ævar Arnfjörð Bjarmason
a5933a3aeb Add note about how you can skip the update countdown with --quick 2010-02-06 00:03:22 +00:00
Chad Horohoe
9bdedcc2aa Let crazy people run updates on broken setups like 5.3.1 2010-01-27 17:02:48 +00:00
Tim Starling
25a5344514 (bug 20471) In update.php, disable the LocalisationCache storage backend before Setup.php is run, to avoid having extensions die when they try to access the l10n_cache table from $wgExtensionSetupFunctions. 2009-09-04 02:03:23 +00:00
Chad Horohoe
567f244e36 Revert r54244 which was stupid and fix this properly. Require commandLine.inc/Maintenance.php using the full path every time. 2009-08-03 21:56:41 +00:00
Tim Starling
371eb5b6e7 (bug 19447) Disable the localisation store backend during install and update. 2009-07-03 06:56:46 +00:00
Tim Starling
9177887791 Changes related to update.php:
* Removed counter.php. Whoever heard of adding a file for a single line of code? Refactored the callers to GlobalFunctions.php wfCountDown().
* Removed the requirement for $wgDBadminuser to be set in update.php. There really is no security benefit, it's just there to annoy users and cause bugs like #19127. Just use $wgDBuser, commandLine.inc will automatically set it to $wgDBadminuser if it's available.
* Since we're using $wgDBuser now, we may as well just use wfGetDB(DB_MASTER) instead of the rubbish special-case code that was already there. There's no need for special-case error handling, there's already special-case code for command line connection errors, if you don't think that message is informative enough then you can change it there.
* Don't set $options before including commandLine.inc, it doesn't do anything.
* Use require not require_once
2009-06-09 17:04:16 +00:00
Chad Horohoe
221967100c (bug 17948) Maintenance scripts now exit(0) or exit(1) as appropriate 2009-04-06 14:41:33 +00:00
Antoine Musso
15eb06032a Fix 12384 : comment on maintenance/*php files 2008-07-19 12:15:07 +00:00
Alexandre Emsenhuber
087a9f70c5 WARNING: HUGE COMMIT
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.
2008-05-20 17:13:28 +00:00
Aryeh Gregor
a15c419b3d Remove ?>'s from files. They're pointless, and just asking for people to mess with the files and add trailing whitespace. (Yes, I looked over every one and reverted those that were bogus. Slash-enter a million times in less worked well enough, although it was a bit mind-numbing.) 2007-06-29 01:19:14 +00:00
Antoine Musso
c771fc9c96 Use Doxygen @addtogroup instead of phpdoc @package && @subpackage 2007-01-20 15:09:52 +00:00
Rob Church
a9e40883ee (bug 8016) Purge objectcache table during upgrade processes - use the --nopurge option to prevent this when running maintennace/update.php 2006-12-23 13:55:24 +00:00
Brion Vibber
6c3c1786e9 * Run PHP install version checks on update.php so command-line updaters see
new version requirements
* Do a check for the PHP 5.0.x 64-bit bug, since this is much more disruptive
  as of MW 1.8 than it used to be. Install or upgrade now aborts with a
  warning and a request to upgrade.
2006-11-11 16:59:32 +00:00
Tim Starling
e174a4ddfb Abolished $wgDBname as a unique wiki identifier, it doesn't work with the new-fangled feature we call "table prefixes". Instead use wfWikiID() for an identifier containing the DB name and the prefix if there is one, and wfMemcKey() for cache key construction.
Caches for wikis with table prefixes will be lost on upgrade, caches for wikis without table prefixes will be preserved. Custom cache keys in extensions can be migrated at leisure. Extensions which write to core cache keys should be migrated ASAP, as I have done with Special:Makesysop.
2006-10-04 09:06:18 +00:00
Tim Starling
4f3e2e22c2 removed broken require_once 2006-10-03 15:48:38 +00:00
Ilmari Karonen
749458ac10 cleanup: remove redundant condition, already checked above 2006-07-17 21:36:19 +00:00