Commit graph

5642 commits

Author SHA1 Message Date
Alexandre Emsenhuber
32515c4bda Improve documentation of maintenance scripts.
Change-Id: If0af9922ede902c2c6f18b627d5810f3e888c944
2012-07-24 18:10:43 +02:00
Christian Aistleitner
e0db4e4c0c Eliminated deprecated functions in TextPassDumper
Change-Id: I9f3148fe6044cc718e57b4aaaaf507f3342dc4d3
2012-07-24 11:14:29 +00:00
Aaron Schulz
112c80d5fc Merge "(bug 37926) Split 'deleterevision' right for log entries" 2012-07-21 19:57:07 +00:00
Alex Monk
747e89ed57 (bug 37926) Split 'deleterevision' right for log entries
This change adds a new permission ('deletelogentry') which is required to be able
to delete log entries.

It does not affect who can see deleted content.

Change-Id: I6b69919a1bdc502becc1ae4ac9169b8b0e85bfdc
2012-07-21 20:34:23 +01:00
Aaron Schulz
fa0e2e615d [LockManager] Made LSLockManager session 32 chars (128 bits).
Change-Id: I1eba3eb44ebef02c771b518c2bcbdc0d41eb8086
2012-07-18 13:43:51 -07:00
Aaron Schulz
a3e0cd0886 Free up some memory by unsetting large arrays in backend copy script.
Change-Id: I55b6a6f8228370d948821dcd4de22fda51539fd0
2012-07-17 23:25:30 -07:00
Aaron Schulz
08ebae73ed Merge "updateCollation.php size histogram feature" 2012-07-18 04:12:44 +00:00
Aaron Schulz
6455336013 [FileBackend] Added "bypassReadOnly" flag.
* Added flag to bypass read-only checks to the 6 write functions.
* Made backend copy and sync scripts pass in this new flag.
* Also made sync script use doQuickOperations() since its faster.

Change-Id: Iee47f79ed7ab002cfc2d0adb5321c3a8520f971d
2012-07-17 20:55:49 -07:00
Tim Starling
8df24d5586 updateCollation.php size histogram feature
Added a feature allowing updateCollation.php to show a histogram of
sort key sizes, to assess the effect of index size truncation. Added
--dry-run and --target-collation options to allow the index truncation
to be assessed without actually changing the collation.

Change-Id: I497b5d0740384f5d6fdebc6d5ccfea5d853fbd37
2012-07-18 13:23:14 +10:00
Catrope
50d7729bea Merge "merge msg script now detects extensions main files" 2012-07-17 23:20:16 +00:00
Alexandre Emsenhuber
02cde99d29 Update messages.inc and rebuild MessagesEn.php.
It allways annoys me to have lot of unwanted changes when
changing MessagesEn.php and rebuilding it when adding a new
messages, so I'm doing this in a separate change.

Change-Id: I71e1a7028e96eedfa522f6270aa618aa33e3ce17
2012-07-13 19:32:57 +00:00
Aaron Schulz
0126fd93a1 [FileBackend] Made copy script retry on batch copy failure.
Change-Id: I5db35371a41fa72d449cba1fb7e15f19f0cefa21
2012-07-12 16:33:27 -07:00
Aaron Schulz
bd006888c9 [FileBackend] Tweaks to speed up backend copy script.
* Added 'missingonly' option to copy based only on a listing comparison.
* Made copy operation batches use doQuickOperations().

Change-Id: If5657a4c4d895980e27776357bb408b350727382
2012-07-12 11:11:45 -07:00
Aaron
46992c8bb4 [FileBackend] Added hash skipping option to speed up script.
Change-Id: If810bbdeffdbfa37a3609992c3e8038ee4deebe6
2012-07-11 16:34:43 -07:00
Aaron
a5821cf8be [FileBackend] Only show "copied file(s)" for files the script had to copy.
Change-Id: I22741303e05d6ea50d33875d9f7438d2b3905b18
2012-07-10 12:21:11 -07:00
Aaron
082cde1f9d [FileBackend] Improved copy/sync script output.
Change-Id: I5f76fdb579cf17959093e7a8659839e8b8829b1c
2012-07-10 11:33:24 -07:00
Brion VIBBER
700b4e0d84 Merge "[FileBackend] Added "ratefile" option for backend copy script." 2012-07-10 17:58:13 +00:00
Aaron
4a6a0632fe [FileBackend] Added "ratefile" option for backend copy script.
* This can be used to control the concurrency dynamically.

Change-Id: I7ebdbffa144928f559c34c4a4684b03597f616ce
2012-07-10 10:24:37 -07:00
Alexandre Emsenhuber
02e15ebd0b Improve documentation of maintenance scripts.
Change-Id: I0e2869970c46f4fd14b792f2978cc1ba9d8550be
2012-07-10 18:50:19 +02:00
Antoine Musso
12e608e3d5 converts '@fixme' to '@todo FIXME'
@fixme is simply not recognized by doxygen whereas @todo is used to
generate a nice ... todo list!!

Change-Id: If956c0a164373126ce48b791d45c56962034eecd
2012-07-10 17:16:46 +02:00
Alexandre Emsenhuber
a28e00cb4b Improve documentation of maintenance scripts.
Change-Id: I2433d23544e808e16f28805f93183b1af2409c94
2012-07-08 22:50:22 +02:00
Reedy
7e0f86a32f Merge "Improve documentation of maintenance scripts." 2012-07-07 21:03:24 +00:00
Reedy
23477c7ef6 Remove BOM from cleanupPreferences
Change-Id: I3c049c0229bb9ed1365f2781baa44b4c8e1e1e18
2012-07-07 16:19:58 +01:00
Antoine Musso
a9c1a81fe9 parse.php Windows uses CTRL+Z as a EOF sequence
Follow up:
1fc2bb9 - parse.php note about using ^D to end output

The previous patch assumed ^D to be the standard.

Change-Id: If573c1a03eb9679d74fcb24c1be6931eee361158
2012-07-06 20:23:24 +02:00
Antoine Musso
ad1609059f merge msg script now detects extensions main files
maintenance/mergeMessageFileList.php is used by `scap` to establish a
list of message files to load. To do that, it read extensions paths from
a manually maintained list: wmf-config/extension-list.

This patch adds an optional automatic detection system to add extension
messages. That will reduce the risk of forgetting to update the
extension-list file and will be of good use on labs.

The new parameter is named --extensions-dir and takes a path holding
MediaWiki extensions. The script will take the directory names there and
attempt to load a file named `Foobar/Foobar.php`. --list-file is still
required, you can skip it using /dev/null.

Synopsis:

php maintenance/mergeMessageFileList.php \
 --list-file /dev/null \
 --extensions-dir /srv/mw-trunk/extensions

Script will bail out whenever an expected PHP file is not found and will
list all of those "missing" files.

Change-Id: I8ab15f899f0333428fd8b2a98c58c07c2fce2962
2012-07-06 20:16:01 +02:00
Reedy
a8cdc7df3a Use estimateRowPage if wiki is using wgMiserMode
Change-Id: I59404e9514a87f65faf3eb865fafe358d9f01079
2012-07-06 17:57:40 +01:00
Reedy
c5d3a6a715 Merge "*(bug 30976) Add maintenance script to remove preferences from $wgHiddenPrefs" 2012-07-04 22:11:18 +00:00
TyA
67aa00f957 *(bug 30976) Add maintenance script to remove preferences from $wgHiddenPrefs
Change-Id: Ie74fab1edeac2c6b275c51e6af3a7924b3aac46b
2012-07-04 23:08:41 +01:00
Antoine Musso
1fc2bb9b0e parse.php note about using ^D to end output
Change-Id: I8ddc6b565044038ba1660dcd3a5942f82420ca9a
2012-07-03 14:04:52 +02:00
umherirrender
a2e40f12f5 (bug 31777) Upload unknown error ``fileexists-forbidden''
adding messages to ApiBase::$messageMap and to message files for client
side localisation

Change-Id: I37e03130c6b90e4614514cd76b73eab6890eb82f
2012-07-01 19:35:31 +02:00
Siebrand
5fb8b96195 Merge "Expose the log_id of the deletion log entry in the action=delete API" 2012-07-01 15:55:29 +00:00
Demon
e4fc2a8ab7 Merge "Disable the db LCStore if the maintenance script doesn't need a db." 2012-06-27 21:10:53 +00:00
Antoine Musso
a652d999fb debug start of jobs
We log a message whenever a job complete, regardless of its completion
status.  In some case, we might have very long running job that would
kill a jobrunner box, yet we would have no way to find out which jobs
were running on it.

This patch add a log entry before a job run is started.

This will double the traffic related to runJobs logs.

Change-Id: I20cb2cb69c7d125f7f531f3dadbac165b64a6998
2012-06-27 19:01:11 +02:00
Platonides
1bb25971f2 Disable the db LCStore if the maintenance script doesn't need a db.
If $wgLanguageCode != 'en', loading of the language class will
go to the LCStore looking for the fallbacks, even if the script
doesn't need a database.

Change-Id: I6a1920ba02d146622f3a5647bf02ddec3e3da54b
2012-06-26 18:58:37 +02:00
Antoine Musso
b1c1448d98 (bug 37627) generic exception for not logged in users
We have various place in MediaWiki core and in extensions which are
showing anonymous user a very standard error page about them not being
logged in. Each developer ends up writing its own because we do not
provide a generic error, that is what this patch does.

This UserNotLoggedIn exception, when called, will show the usual
ErrorPage with a default title and default reason text. That makes it as
easy to use as doing:

 if( $user->isAnon() ) {
 	throw new UserNotLoggedIn();
 }

One can override the default reason by passing a message key as the
first parameter:

 if( $user->isAnon() ) {
 	throw new UserNotLoggedIn( 'nologin-reason-text' );
 }

In that case, the page title will still be the default 'Not Logged In.'

Change-Id: Id81272995627bf0f5bbef785230a8e6e4e8582ca
2012-06-26 16:03:42 +02:00
Tim Starling
49df232e1e Merge "[FileBackend] Changed copy script to use batches for concurrency." 2012-06-26 05:45:33 +00:00
Alexandre Emsenhuber
f7c4c52ba0 Improve documentation of maintenance scripts.
Change-Id: I1c911eb0fd6108fdee0b4e96363d87b926aba396
2012-06-25 21:54:41 +02:00
Demon
7f45e77396 Merge "Bug 26911 - cli install doesn't ask for a password" 2012-06-25 11:03:27 +00:00
Mark A. Hershberger
7e6dfd88a0 Bug 26911 - cli install doesn't ask for a password
Make the password parameter mandatory and change the help message.

Change-Id: Ibea29858be70a5188d167b9c1267b2db2564a96b
2012-06-22 19:51:20 -04:00
Aaron
75b0c3230c [LockManager] Factored QuorumLockManager class out of LSLockManager.
Change-Id: I4031085faef4a1a7ce49dbeeb0b3ddf94d41132c
2012-06-19 12:52:47 -07:00
Alexandre Emsenhuber
9eee3153ae Improve documentation of maintenance scripts.
Change-Id: I328a3d42a09f2b082ebc153c2f399793e23942d7
2012-06-16 22:59:39 +02:00
Alexandre Emsenhuber
9fc3afc6cd Added missing GPLv2 headers in some places.
Also made file/class documentation more consistent.

Change-Id: I8ee0861bfc2e9ff6511ad61175f1f1273739816c
2012-06-14 14:26:37 +02:00
Max Semenik
22bb1e6a49 Allow cleanupSpam.php optionally delete offending pages
Change-Id: I69387df1b3d404a6d00d8073e58d7556c7ab9298
2012-06-13 23:43:14 +04:00
Mark A. Hershberger
99fdc6e838 Bug 24985 use $wgTmpDirectory when available
We had two way to get a temporary directory:

 - $wgTempDirectory: more or less stable accross sessions
 - wfTempDir(): set through environnement variable and could potentially
   vary from a session to another one thanks to tempnam()

This patch makes wfTempDir() to always use the global $wgTempDirectory
first when it is available. Thus explicitly overriding tempnam() or any
environnement variable such as TMP or TEMP.

Hence, people who don't have access to a system wide directory
specificed by their environnement (such as /tmp) can specify an
alternative straight from the MediaWiki configuration.

The patch remove references to $wgTmpDirectory and replace them with
calls to wfTempDir().  Make wfTempDir() use $wgTmpDirectory first.

The default setting of $wgTmpDirectory was removed in favor of having it
initialized through Setup.php by calling wfTempDir.

Note: this may also address Bug 36475 - Generating thumbnails does not
work when there is no access to /tmp

Change-Id: Ifdc79e9c5d95f978025b237a5eeb95fd75092f46
2012-06-13 21:30:22 +02:00
Max Semenik
63fb18bd4e Add a way for packagers to override some installation details
...after a discussion with Debian packagers. They can now override installer
classes and change LocalSettings.php the installer generates. The file
intended for such overrides, mw-config/overrides.php, has intentionally been
placed outside of includes to underline the "don't change includes" paradigm.

Change-Id: Id82b90f6740307609bc6c6f4fb8765bc3484dbe7
2012-06-12 20:18:44 +04:00
Reedy
7492e90cc6 Add a bit more slave waiting...
Change-Id: I329219bfdd56b57609237fc9f907f2b31628d282
2012-06-09 03:37:38 +01:00
Antoine Musso
dc9c2a6279 (but 37072) - infinite loop with runJobs.php
This is similar to fb69ee4 ( https://gerrit.wikimedia.org/r/9116 ) which
fixed nextJobDB.php. This patch make sure runJobs.php does not proceed
jobs listed in $wgJobTypesExcludedFromDefaultQueue , at least not by
default.

We will probably want to factor out common code between runJobs and
nextJobDB.

Change-Id: Id0c8896d7a0d5b58e678db1ce314174d44e1cae3
2012-06-08 14:29:43 +02:00
awjrichards
c29fd59775 Big oops - merged to wrong branch.
Revert "Revert to arbitrarily old point before initial remote branch creation to help clean up"

This reverts commit ee0d3d330f
2012-06-05 22:58:54 +00:00
awjrichards
ee0d3d330f Revert to arbitrarily old point before initial remote branch creation to help clean up
Change-Id: I41a3d1e55d3ea9dffa42451237fe065f9334361d
2012-06-02 08:43:04 -07:00
Siebrand
1cd5061d72 Merge "Add new message 'showhideselectedlogentries' for revdel of logs." 2012-06-05 06:50:08 +00:00