Commit graph

51 commits

Author SHA1 Message Date
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
Brion Vibber
908c51e127 Revert to r15092; massive breakage, unable to connect to MySQL at all 2006-06-27 16:11:47 +00:00
Greg Sabino Mullane
ef89ec541c Add concept of a distinct port separate from a server.
Add some functions to DatabasePostgres.php.
2006-06-27 15:37:35 +00:00
Rob Church
fd7eab1731 Improvements to update scripts; print out the version, check for superuser credentials before attempting a connection, and produce a friendlier error if the connection fails 2006-04-26 20:42:15 +00:00
Antoine Musso
a0d5387beb a little warning about AdminSettings.php (see bug #5725) 2006-04-26 19:47:47 +00:00
Tim Starling
cf4f3da185 Moved the bulk of dbsource() to Database.php. Added support for updating wikis with $wgSharedDB set (installing is still not supported) 2006-01-17 11:48:18 +00:00
Brion Vibber
8718fd3287 * Don't die() when update.php reaches the end of the warning count 2005-12-01 07:57:33 +00:00
Ævar Arnfjörð Bjarmason
54e6deaf2f * Use the preeety count 2005-11-01 19:23:18 +00:00
Tim Starling
94fa9213e4 forward porting from REL1_5 2005-08-20 01:57:32 +00:00
River Tarnell
b817c0c15f merge ORACLE_WORK. sorry, this may break some parts of MySQL, i did not test extensively. 2005-08-02 13:35:19 +00:00
River Tarnell
e93f65b672 typo 2005-06-22 10:11:08 +00:00
Brion Vibber
718e54bdfa add --quick option to skip the 5 second "you are destroying your wiki omfg" warning 2005-04-25 12:03:57 +00:00
Antoine Musso
7b06b2383d implement #1667, 5 second countdown before crashing database. Patch by ��var Arnfj��r�� Bjarmason 2005-03-09 15:12:19 +00:00
Brion Vibber
21cd7ad7b1 Print the database name and give a chance to abort 2004-12-10 06:05:30 +00:00