lhc/web/wiklou.git
11 years agoMerge "Make DateFormatter work in any language, by default in the page content language"
Nikerabbit [Fri, 27 Jul 2012 11:02:29 +0000 (11:02 +0000)]
Merge "Make DateFormatter work in any language, by default in the page content language"

11 years agoMerge "Ugrade jQuery UI to 1.8.22"
Krinkle [Fri, 27 Jul 2012 07:04:12 +0000 (07:04 +0000)]
Merge "Ugrade jQuery UI to 1.8.22"

11 years agoUgrade jQuery UI to 1.8.22
Reedy [Thu, 26 Jul 2012 23:18:09 +0000 (00:18 +0100)]
Ugrade jQuery UI to 1.8.22

http://blog.jqueryui.com/2012/07/jquery-ui-1-8-22/

Change-Id: I770ca9eaae180dbac8ac785113a5787b71acc67d

11 years agoMerge "Use WebRequest instead of $_SERVER in OutputPage."
Aaron Schulz [Fri, 27 Jul 2012 01:14:39 +0000 (01:14 +0000)]
Merge "Use WebRequest instead of $_SERVER in OutputPage."

11 years agoMerge "explode()'ing the callback is no longer needed in AjaxDispatcher."
Aaron Schulz [Fri, 27 Jul 2012 01:10:54 +0000 (01:10 +0000)]
Merge "explode()'ing the callback is no longer needed in AjaxDispatcher."

11 years agoMerge "Fix for I5211ec50 (d969a27): more refactoring of the code."
Aaron Schulz [Thu, 26 Jul 2012 21:49:49 +0000 (21:49 +0000)]
Merge "Fix for I5211ec50 (d969a27): more refactoring of the code."

11 years agoMerge "Use WikiPage::loadPageData() to reload data from the master."
Aaron Schulz [Thu, 26 Jul 2012 21:45:26 +0000 (21:45 +0000)]
Merge "Use WikiPage::loadPageData() to reload data from the "

11 years agoMerge "fix logic bug in assertArrayEquals"
Aaron Schulz [Thu, 26 Jul 2012 21:37:37 +0000 (21:37 +0000)]
Merge "fix logic bug in assertArrayEquals"

11 years agoMerge "Various thumb.php fixes."
Catrope [Thu, 26 Jul 2012 21:23:12 +0000 (21:23 +0000)]
Merge "Various thumb.php fixes."

11 years agoVarious thumb.php fixes.
Aaron [Thu, 26 Jul 2012 19:00:22 +0000 (12:00 -0700)]
Various thumb.php fixes.

* Made wfThumbHandle404() handle full REQUEST_URI urls.
* Made wfExtractThumbParams() handle protocal relative zone urls.
* Added FileRepo::getZoneHandlerUrl() and site zone configuration to simplify wmf rewrite rules.
* Renamed some variables to be less misleading.

Change-Id: Ic3e23c2a623c1241ee22a9811aee073fb07aa68c

11 years agoMerge "Add Turoyo (tru) language to MediaWiki"
Siebrand [Thu, 26 Jul 2012 18:45:49 +0000 (18:45 +0000)]
Merge "Add Turoyo (tru) language to MediaWiki"

11 years agofix logic bug in assertArrayEquals
daniel [Thu, 26 Jul 2012 18:08:54 +0000 (20:08 +0200)]
fix logic bug in assertArrayEquals

Change-Id: I442ebfe77292918f29121aba1205de664723e468

11 years agoMerge "mediawiki.Uri: Optional url use default location."
Krinkle [Thu, 26 Jul 2012 17:20:59 +0000 (17:20 +0000)]
Merge "mediawiki.Uri: Optional url use default location."

11 years agoMerge "Improve documentation of maintenance scripts."
Hashar [Thu, 26 Jul 2012 14:53:58 +0000 (14:53 +0000)]
Merge "Improve documentation of maintenance scripts."

11 years agomediawiki.Uri: Optional url use default location.
Mark Holmquist [Thu, 19 Jul 2012 20:55:21 +0000 (13:55 -0700)]
mediawiki.Uri: Optional url use default location.

This patch does three things:

1. If mw.Uri doesn't get any arguments, it will return the default
   URI. This is a good default, because it's something that will be
   used often, and the URI object that refers to the default location
   already exists locally, we're just using it to return a clone of
   that.

2. Fixes a strange logic error that prevents #1 from taking effect
   properly. The last clause in the 'if' statement on line 120
   meant that if uri is undefined, the if block would execute. I
   doubt that was intended, but it happened, and now it's fixed.
   There may be some error handling in mw.Uri.parse that could be
   removed since the URI passed in will almost never be undefined.

3. Adds tests for the new constructor values.

Change-Id: I9254b89bba41572c6dce72d2100d7085c37fb2c3

11 years agosome doc for the ORM system
jeroendedauw [Sat, 21 Jul 2012 19:20:30 +0000 (21:20 +0200)]
some doc for the ORM system

Change-Id: Icdfe6c754fdeddb42f0df04efcb1e06df8b73173

11 years agoMerge "Add Burmese to list of languages with wider headings"
Siebrand [Thu, 26 Jul 2012 04:44:44 +0000 (04:44 +0000)]
Merge "Add Burmese to list of languages with wider headings"

11 years agoMerge "Add 皮膚 for better word segmentation."
Siebrand [Thu, 26 Jul 2012 04:38:52 +0000 (04:38 +0000)]
Merge "Add 皮膚 for better word segmentation."

11 years agoMerge "Drop conversion from 游標 to 光标 which can also refer to verniers"
Siebrand [Thu, 26 Jul 2012 04:38:19 +0000 (04:38 +0000)]
Merge "Drop conversion from 游標 to 光标 which can also refer to verniers"

11 years agoMerge "Add 路面 for better word segmentation."
Siebrand [Thu, 26 Jul 2012 04:37:30 +0000 (04:37 +0000)]
Merge "Add 路面 for better word segmentation."

11 years agoMerge "(bug 14237) Allow PAGESINCATEGORY to distinguish between 'all', 'pages', ...
Catrope [Thu, 26 Jul 2012 02:11:05 +0000 (02:11 +0000)]
Merge "(bug 14237) Allow PAGESINCATEGORY to distinguish between 'all', 'pages', 'files' and 'subcats'"

11 years agoMerge "allow combined width/height param in {{filepath:}}"
Catrope [Thu, 26 Jul 2012 02:08:57 +0000 (02:08 +0000)]
Merge "allow combined width/height param in {{filepath:}}"

11 years ago[FileBackend] Made copy script use error() for status dump.
Aaron Schulz [Thu, 26 Jul 2012 01:45:07 +0000 (18:45 -0700)]
[FileBackend] Made copy script use error() for status dump.

Change-Id: I68a359e9ac1490683fb650d4c43f9b643e321701

11 years ago(bug 260) Wrap <pre> overflow properly.
Timo Tijhof [Sat, 21 Jul 2012 21:26:21 +0000 (14:26 -0700)]
(bug 260) Wrap <pre> overflow properly.

The previous approach with overflow: hidden; had issues.
This is much better. See inline comment as well as the discussion
on bug 260 for more information and the cross-browser test.

And it took only 8 years!

* Ref:
- bug 260
- bug 414
- bug 22060

Change-Id: I7eec3ffeaa5ad633270714ce06023b29a71519f9

11 years agoMerge "Revert "(bug 260) Handle <pre> overflow automatically with a scroll bar""
Krinkle [Wed, 25 Jul 2012 21:21:49 +0000 (21:21 +0000)]
Merge "Revert "(bug 260) Handle <pre> overflow automatically with a scroll bar""

11 years agoMerge "Split Generic into MediaHandler and ImageHandler"
Aaron Schulz [Wed, 25 Jul 2012 20:16:27 +0000 (20:16 +0000)]
Merge "Split Generic into MediaHandler and ImageHandler"

11 years agoImprove documentation of maintenance scripts.
Alexandre Emsenhuber [Wed, 25 Jul 2012 19:31:06 +0000 (21:31 +0200)]
Improve documentation of maintenance scripts.

Change-Id: I93e80edcfc3dc2d5630f7514808cafc22daf39f7

11 years agoMerge "Revert "memcached: better error messaging""
Aaron Schulz [Wed, 25 Jul 2012 19:30:46 +0000 (19:30 +0000)]
Merge "Revert "memcached: better error messaging""

11 years agoRevert "memcached: better error messaging"
Aaron Schulz [Wed, 25 Jul 2012 19:28:08 +0000 (19:28 +0000)]
Revert "memcached: better error messaging"

This always issues PHP notices when the code is hit.

This reverts commit fe6da52a11375c83d86f73bf4725d14acfbf4cbf

11 years ago(bug 14237) Allow PAGESINCATEGORY to distinguish between 'all', 'pages',
umherirrender [Wed, 25 Jul 2012 15:51:05 +0000 (17:51 +0200)]
(bug 14237) Allow PAGESINCATEGORY to distinguish between 'all', 'pages',
'files' and 'subcats'

Change-Id: I6dc90c6701c857256343f3c8f874dc20c6cc098a

11 years agoallow combined width/height param in {{filepath:}}
umherirrender [Wed, 25 Jul 2012 15:31:47 +0000 (17:31 +0200)]
allow combined width/height param in {{filepath:}}

Using the same regex like [[File:|]]
With heigth, the width inside the thumb link can be calculated, if the
height not fit in the width.

Change-Id: If188d923d6cd25ea6a5118098f3a513ca5135d43

11 years agoMerge "Add correct rtl value to some languages"
Nikerabbit [Wed, 25 Jul 2012 12:38:54 +0000 (12:38 +0000)]
Merge "Add correct rtl value to some languages"

11 years agoAdd 皮膚 for better word segmentation.
Liangent [Wed, 25 Jul 2012 09:13:41 +0000 (17:13 +0800)]
Add 皮膚 for better word segmentation.

Change-Id: I677293c2669f606b2c51a4354c74bd4a775d1c7e

11 years agoUse WikiPage::loadPageData() to reload data from the master.
Alexandre Emsenhuber [Wed, 25 Jul 2012 10:22:47 +0000 (12:22 +0200)]
Use WikiPage::loadPageData() to reload data from the 

There's no need to do this using custom code when we already
have methods for this.

Change-Id: I348dd9a01322b7e9b521e7a014959e91254dd2aa

11 years agoAdd correct rtl value to some languages
Amir E. Aharoni [Wed, 25 Jul 2012 09:28:45 +0000 (12:28 +0300)]
Add correct rtl value to some languages

The language ku-arab and kk-cn weren't defined as RTL in their
message files. This commit fixes that.

Change-Id: Id55c17e6cdb2238993dc52b17b1297a352ba14d3

11 years agoAdd 路面 for better word segmentation.
Liangent [Wed, 25 Jul 2012 09:29:06 +0000 (17:29 +0800)]
Add 路面 for better word segmentation.

Change-Id: Ie5e2fa49a36ebc96898ca8af73fcc59727beff35

11 years agoDrop conversion from 游標 to 光标 which can also refer to verniers
Liangent [Wed, 25 Jul 2012 09:07:31 +0000 (17:07 +0800)]
Drop conversion from 游標 to 光标 which can also refer to verniers

Change-Id: I4445c9befae8f2d134340e8354ba4379c19f30d8

11 years agoDo checks in the correct order in Linker::getLinkColour().
Alexandre Emsenhuber [Tue, 24 Jul 2012 12:44:27 +0000 (14:44 +0200)]
Do checks in the correct order in Linker::getLinkColour().

There's no point doing potentially expensive checks (exists() and
getLength()) if the page is simply not in a content namespace.

Change-Id: I86a2b3a36071cf508b8e99ef20bdf3e0e20f3c82

11 years agoAdd Burmese to list of languages with wider headings
Amir E. Aharoni [Wed, 25 Jul 2012 07:23:49 +0000 (10:23 +0300)]
Add Burmese to list of languages with wider headings

The Burmese script, like other Indic languages, has marks above and
below line. These marks appear cut off if the line height is too narrow.

This commit adds Burmese (code 'my') to the list of languages that have
larger line-height. It also changes the line-height value for <h1>,
because apparently the current value is too narrow for Burmese, at
least on my machine.

Change-Id: I097632b4ea77acad40ca55de828211a9cab88949

11 years agoMerge "Removed now obsolete compat-code"
Tim Starling [Wed, 25 Jul 2012 04:09:03 +0000 (04:09 +0000)]
Merge "Removed now obsolete compat-code"

11 years agoMerge "Add @since annotation to Language::formatExpiry()"
Siebrand [Wed, 25 Jul 2012 01:16:32 +0000 (01:16 +0000)]
Merge "Add @since annotation to Language::formatExpiry()"

11 years agoMerge "Fix regression in API log events (bug 35635)"
Catrope [Tue, 24 Jul 2012 23:18:41 +0000 (23:18 +0000)]
Merge "Fix regression in API log events (bug 35635)"

11 years ago(bug 27610) Add archivename to list=filearchive
umherirrender [Fri, 20 Jul 2012 17:46:08 +0000 (19:46 +0200)]
(bug 27610) Add archivename to list=filearchive

Change-Id: I485ff58ad57030cbfb3a0ee7803bf0e25c363d95

11 years agoMerge "[FileBackend] Bumped Swift listing page size."
Catrope [Tue, 24 Jul 2012 22:28:59 +0000 (22:28 +0000)]
Merge "[FileBackend] Bumped Swift listing page size."

11 years agoAdd @since annotation to Language::formatExpiry()
Reedy [Tue, 24 Jul 2012 22:20:26 +0000 (23:20 +0100)]
Add @since annotation to Language::formatExpiry()

Change-Id: I022762a3a5e6fa6e45824f963c9301a83930b850

11 years agoMerge "show old protection in prop=info, if no new protection exists"
Catrope [Tue, 24 Jul 2012 22:08:24 +0000 (22:08 +0000)]
Merge "show old protection in prop=info, if no new protection exists"

11 years agoMerge "make list of 'Languages that support variant conversion' dynamic"
Catrope [Tue, 24 Jul 2012 21:53:20 +0000 (21:53 +0000)]
Merge "make list of 'Languages that support variant conversion' dynamic"

11 years agoMerge "(bug 35893) Special:Block should load mediawiki.special.block.js"
Catrope [Tue, 24 Jul 2012 21:14:52 +0000 (21:14 +0000)]
Merge "(bug 35893) Special:Block should load mediawiki.special.block.js"

11 years ago(bug 35893) Special:Block should load mediawiki.special.block.js
Brad Jorsch [Tue, 24 Jul 2012 20:59:42 +0000 (16:59 -0400)]
(bug 35893) Special:Block should load mediawiki.special.block.js

Special:Block is showing checkboxes that apply only to IP blocks when
blocking usernames, and vice versa. The code to hide these checkboxes
already exists in resources/mediawiki.special/mediawiki.special.block.js,
but it's not being loaded.

Change-Id: I875125b56e9f234dbff87bff3b045877fb1614be

11 years agoMerge "mw.toolbar: Clean up the API of the classic toolbar."
Trevor Parscal [Tue, 24 Jul 2012 20:43:28 +0000 (20:43 +0000)]
Merge "mw.toolbar: Clean up the API of the classic toolbar."

11 years agoMerge "Remove weird, confusing, unreachable code"
Krinkle [Tue, 24 Jul 2012 20:42:05 +0000 (20:42 +0000)]
Merge "Remove weird, confusing, unreachable code"

11 years agoRemove weird, confusing, unreachable code
Catrope [Tue, 24 Jul 2012 20:29:04 +0000 (13:29 -0700)]
Remove weird, confusing, unreachable code

The removed code was doing first-order dependency resolution if a single
module was passed in as a string.

This is crazy because:
* passing in 'foo' triggered it but passing in ['foo'] didn't
* dependency resolution is resolve()'s responsibility
* all callers were passing in arrays produced by resolve(), so this code
  was never reached

Change-Id: I081e2bf90cead63437e495006c78254cf65e3847

11 years agoWhitespace fix
Catrope [Tue, 24 Jul 2012 20:31:53 +0000 (13:31 -0700)]
Whitespace fix

Change-Id: I439b39ffad2989afe1c01a1d430082730ae38151

11 years agodon't use message when the 'nodb' flag is set
Alexandre Emsenhuber [Wed, 27 Jun 2012 08:18:08 +0000 (10:18 +0200)]
don't use message when the 'nodb' flag is set

Fix for If5f1c26f (69591db):
This breaks maintenance/language/transstat.php when there's no db connection.

Change-Id: I3f4416234ecce34c93ba14a66771379cb427e83b

11 years agoPass the local User object to Revision::userCan()
Alexandre Emsenhuber [Mon, 16 Jul 2012 09:03:02 +0000 (11:03 +0200)]
Pass the local User object to Revision::userCan()

Change-Id: Iffd857a577593642464371a988b7b7829d246748

11 years agoReorder methods in the MediaWiki class for better consistency.
Alexandre Emsenhuber [Sat, 21 Jul 2012 20:35:05 +0000 (22:35 +0200)]
Reorder methods in the MediaWiki class for better consistency.

Change-Id: I651606b3d675212891c5075b3114c451810a3ec5

11 years agoImprove documentation of maintenance scripts.
Alexandre Emsenhuber [Tue, 17 Jul 2012 05:40:40 +0000 (07:40 +0200)]
Improve documentation of maintenance scripts.

Change-Id: If0af9922ede902c2c6f18b627d5810f3e888c944

11 years agoSplit Generic into MediaHandler and ImageHandler
Jan Gerber [Mon, 23 Jul 2012 18:59:38 +0000 (11:59 -0700)]
Split Generic into MediaHandler and ImageHandler

media/Generic.php contains two classes, split it
into MediaHandler.php and ImageHandler.php

Change-Id: Id5027b397e3156cf70312b3ffa37227ca5c3b81c

11 years agoEliminated deprecated functions in TextPassDumper
Christian Aistleitner [Fri, 29 Jun 2012 14:18:28 +0000 (16:18 +0200)]
Eliminated deprecated functions in TextPassDumper

Change-Id: I9f3148fe6044cc718e57b4aaaaf507f3342dc4d3

11 years agoRemoved unused $wgAntiLockFlags flags.
Aaron Schulz [Tue, 24 Jul 2012 03:55:21 +0000 (20:55 -0700)]
Removed unused $wgAntiLockFlags flags.

Change-Id: I56a24db564906256f78b5d1903de4ddd70a13bc4

11 years agoMerge "(bug 27567) Add file repo support to prop=duplicatefiles"
Aaron Schulz [Tue, 24 Jul 2012 00:22:49 +0000 (00:22 +0000)]
Merge "(bug 27567) Add file repo support to prop=duplicatefiles"

11 years agoAdd Turoyo (tru) language to MediaWiki
robin [Mon, 23 Jul 2012 23:25:36 +0000 (01:25 +0200)]
Add Turoyo (tru) language to MediaWiki

About 23% is translated so far on translatewiki.net

Change-Id: I1a6afc1cbfeaad65b152acfd338a29fe0db0dc5d

11 years agoMerge "(bug 38333) Check global blocks on account create"
Reedy [Mon, 23 Jul 2012 20:17:43 +0000 (20:17 +0000)]
Merge "(bug 38333) Check global blocks on account create"

11 years ago(bug 38333) Check global blocks on account create
csteipp [Fri, 20 Jul 2012 18:54:14 +0000 (11:54 -0700)]
(bug 38333) Check global blocks on account create

Before displaying an account creation form, checks against
GlobalBlocking are run, but not when the actual account is
created.

At this time, User::isBlockedFromCreateAccount() does not
run the hooks for which GlobalBlocking is registered.

Change-Id: Ieb3696bc49d6f4c4e3e95d8c55121b7ffa07b506

11 years agoRemove <i> tags from MessagesKsh.php, they aren't parsed
Reedy [Mon, 23 Jul 2012 19:18:42 +0000 (20:18 +0100)]
Remove <i> tags from MessagesKsh.php, they aren't parsed

Change-Id: I24b5ceb61170c0150e805b243642b9335d770aab

11 years agoMerge "More accurate function description for isAllowed()"
Kaldari [Mon, 23 Jul 2012 18:18:08 +0000 (18:18 +0000)]
Merge "More accurate function description for isAllowed()"

11 years agoMore accurate function description for isAllowed()
Kaldari [Mon, 23 Jul 2012 08:02:04 +0000 (01:02 -0700)]
More accurate function description for isAllowed()

Change-Id: Idf95efc20714bfb2595259bcce6ba9eaf9a63fae

11 years ago(bug 27567) Add file repo support to prop=duplicatefiles
umherirrender [Mon, 23 Jul 2012 16:45:38 +0000 (18:45 +0200)]
(bug 27567) Add file repo support to prop=duplicatefiles

This adds a new method findBySha1s to the FileRepo classes to support
the multiple hash search against all repos (with only one query for each
db repo).

Change-Id: I745cae7a1db3a32c20aa0067b744402fcf1a3122

11 years ago[FileBackend] Bumped Swift listing page size.
Aaron Schulz [Mon, 23 Jul 2012 15:07:55 +0000 (08:07 -0700)]
[FileBackend] Bumped Swift listing page size.

Change-Id: I44cab543246c0ff65b2bd64020d642a18c48cb67

11 years agoLocalisation updates from http://translatewiki.net.
Translation updater bot [Mon, 23 Jul 2012 13:12:00 +0000 (13:12 +0000)]
Localisation updates from translatewiki.net.

Change-Id: I7db66b78968b5627b3936631a4d18b12ab77a65a

11 years agoAdd testRomanNumerals
Reedy [Tue, 17 Jul 2012 22:56:51 +0000 (23:56 +0100)]
Add testRomanNumerals

Up Language::romanNumeral() to work upto 10,000

Does anyone know how do do letters with an underscore ontop of them? ;)

Change-Id: Ib1b1415126af855ce5fb55f81b71534c26d84cc9

11 years agoMerge "Fixed DATA_FOR_UPDATE loading in WikiPage."
Tim Starling [Mon, 23 Jul 2012 03:29:55 +0000 (03:29 +0000)]
Merge "Fixed DATA_FOR_UPDATE loading in WikiPage."

11 years agoMerge "Reverted "FOR UPDATE" in 61f246aa786d824d0653522ed679c16be719da80."
Tim Starling [Mon, 23 Jul 2012 03:28:54 +0000 (03:28 +0000)]
Merge "Reverted "FOR UPDATE" in 61f246aa786d824d0653522ed679c16be719da80."

11 years agoMerge "Fix missing occurence change in I6b69919a (747e89e)."
Aaron Schulz [Sun, 22 Jul 2012 19:42:28 +0000 (19:42 +0000)]
Merge "Fix missing occurence change in I6b69919a (747e89e)."

11 years agoFix missing occurence change in I6b69919a (747e89e).
Alexandre Emsenhuber [Sun, 22 Jul 2012 19:03:43 +0000 (21:03 +0200)]
Fix missing occurence change in I6b69919a (747e89e).

The line above changed in that revision, but not this one,
so I highly suspect that this occurence of deleterevision
should have been changed to deletelogentry.

Change-Id: Ief4ca9acf08bccc8ff064cea5795a2dbeae44d19

11 years agoRemoved now obsolete compat-code
jeroendedauw [Sun, 22 Jul 2012 11:33:31 +0000 (13:33 +0200)]
Removed now obsolete compat-code

Change-Id: I64dc4beb4f8a084bfc5b7c60cbdaa6b65838b79b

11 years agoMerge "Use User::getDefaultOption() instead of $wgDefaultUserOptions"
Aaron Schulz [Sun, 22 Jul 2012 09:45:18 +0000 (09:45 +0000)]
Merge "Use User::getDefaultOption() instead of $wgDefaultUserOptions"

11 years agomw.toolbar: Clean up the API of the classic toolbar.
Timo Tijhof [Sat, 21 Jul 2012 23:49:46 +0000 (16:49 -0700)]
mw.toolbar: Clean up the API of the classic toolbar.

* Several methods were added here recently during 1.20 development
  that should not have been public methods.

* Also in the creation of this new module (replacing the old
  mwCustomEditButtons) a design flaw was made. Instead of using
  a key-value pair object, the signature was changed to a tentacle
  function with 7 (for callers, unnamed) arguments.

* Changed it back with the compatibility fix the other way around.
  So everything is backwards compatible.

* Moved to local scope:
 - buttons queue
 - $toolbar
 - insertButton
 These were recently introduced during 1.20 development but not
 meant to be public. When used too early or too late from outside
 the module it will break or be ignored. For example $toolbar is
 false before dom ready, buttons queue is ignored after domready,
 insertButton will break if called before dom ready because the
 target element doesn't exist yet. These are not bugs, but result
 of calling internal methods before they are initialized.
 The public API takes care of these state differences by using
 the queue and the dom ready handler.

 Scripts should (and do) only use the addButton API.

* Kept:
 - addButton
 - insertTags
 - init (empty b/c function, was already there)

* Improved:
 - addButton: Now takes an object as well, just like
   mwCustomEditButtons used to do.
 - Cache Array.prototype.slice instead of re-grabbing from
   a new dummy array.
 - Store buttons[i] in a local variable in both cases, not just
   for legacy. Saves 2 property lookups. Minor gain, but
   in this case it was already going to be stored in a local
   variable, so might as well do it in the other case.

* Fixes:
 - Clear queue array after it has been used. Though in practice
   it should never happen that it is iterated over twice, just in
   case.
 - Added comment to init() function explaining where it is used.
 - Updated closure arguments per code conventions.
 - Made it a position-top module so that it actually can be used
   before the document is ready.

* Example usages tested:
<code>
// Legacy way from wikibits.js:
// Has to be done before document ready
window.mwCustomEditButtons[window.mwCustomEditButtons.length] = {
  imageFile: 'http://placehold.it/23x22',
  speedTip: 'tool tip',
  tagOpen: 'x-',
  tagClose: '-y'
};

// mw.toolbar: List of arguments
mw.toolbar.addButton( 'http://placehold.it/23x22', 'tooltip', 'x-', '-y' );

// mw.toolbar: Object
mw.toolbar.addButton({
  imageFile: 'http://placehold.it/23x22',
  speedTip: 'tool tip',
  tagOpen: 'x-',
  tagClose: '-y'
});
</code>

Change-Id: Id19819707c937c2c3144ad8177b75baa46f5073c

11 years agoMerge "(bug 37926) Split 'deleterevision' right for log entries"
Aaron Schulz [Sat, 21 Jul 2012 19:57:07 +0000 (19:57 +0000)]
Merge "(bug 37926) Split 'deleterevision' right for log entries"

11 years ago(bug 37926) Split 'deleterevision' right for log entries
Alex Monk [Mon, 25 Jun 2012 16:07:51 +0000 (17:07 +0100)]
(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

11 years agoMerge "[LockManager] Made LSLockManager session 32 chars (128 bits)."
Aaron Schulz [Sat, 21 Jul 2012 18:45:50 +0000 (18:45 +0000)]
Merge "[LockManager] Made LSLockManager session 32 chars (128 bits)."

11 years agoReverted "FOR UPDATE" in 61f246aa786d824d0653522ed679c16be719da80.
Aaron Schulz [Sat, 21 Jul 2012 18:39:18 +0000 (11:39 -0700)]
Reverted "FOR UPDATE" in 61f246aa786d824d0653522ed679c16be719da80.

* Previously, this code would select FOR UPDATE unless ALF_NO_LINK_LOCK
was set in $wgAntiLockFlags (which in fact was set for wmf sites for ages
to reduce contention). In this case, it was just loading from the master,
without locking, and relying on the page_latest check. Now, it just never
selects FOR UPDATE, regardless of the lock flags, relying on page_latest.

Change-Id: Ie6301de4415f56e6be3899cf4ab37924963ce8c4

11 years agoFixed DATA_FOR_UPDATE loading in WikiPage.
Aaron Schulz [Sat, 21 Jul 2012 18:21:15 +0000 (11:21 -0700)]
Fixed DATA_FOR_UPDATE loading in WikiPage.

Change-Id: Ifc4259942eb8bf5e91e80ec0009c2a2ab191ae11

11 years agoUse User::getDefaultOption() instead of $wgDefaultUserOptions
umherirrender [Sat, 16 Jun 2012 08:16:28 +0000 (10:16 +0200)]
Use User::getDefaultOption() instead of $wgDefaultUserOptions

Using User::getDefaultOption() in User::setOption() sets preferences like
'language' to the right default value, whereas using $wgDefaultOptions
sets the language to null because language is not part of $wgDefaultUserOptions,
but it is part of return value of User::getDefaultOption().

This only makes problems when reusing the same user object, because when
a new user object is created, the value of 'language' is correct.

Change-Id: I43a32c66fc3997a4f842c63af374e84d234602b2

11 years agoMerge "Updated result properties in paraminfo API"
Aaron Schulz [Sat, 21 Jul 2012 09:09:02 +0000 (09:09 +0000)]
Merge "Updated result properties in paraminfo API"

11 years agoMerge "Revert "Do not show empty categories with list=allcategories""
Aaron Schulz [Sat, 21 Jul 2012 09:07:36 +0000 (09:07 +0000)]
Merge "Revert "Do not show empty categories with list=allcategories""

11 years agoExecute jobs on all index.php requests.
Alexandre Emsenhuber [Fri, 20 Jul 2012 20:38:24 +0000 (22:38 +0200)]
Execute jobs on all index.php requests.

The problem is that currently deferred updates are not executed
after action=ajax requests or file cache hits. This means that,
e.g. ViewCountUpdates are not executed after file cache hits.
The code to execute jobs (both deferred updates and job queue)
is now in MediaWiki::restInPeace() so that it's also executed
after what is mentioned above, and the remaining code of
MediaWiki::finalCleanup() is moved directly MediaWiki::main()
since that function is only used in one place and it make no
sense to keep a method for such little code.

Change-Id: I6f511a74c59a2e3653c10bfcff9b0d15118e699f

11 years ago(bug 38190) Add "required" flag to some token params
umherirrender [Wed, 18 Jul 2012 17:24:38 +0000 (19:24 +0200)]
(bug 38190) Add "required" flag to some token params

action=block/action=unblock can not have the token required because when
using the gettoken param, the token param can not set.

Change-Id: I15317f16c06f150d29c1b17de76f41a6cfa84820

11 years agoMake DateFormatter work in any language, by default in the page content language
robin [Fri, 1 Jun 2012 09:52:57 +0000 (11:52 +0200)]
Make DateFormatter work in any language, by default in the page content language

Add a lang parameter to DateFormatter so it can work in any language instead of only the site content language.
(The memcached key is now per language code.)
Use by default parser->getTargetLanguage() so it is parsed in the page content language by default.
Also add some documentation and remove unneeded whitespace.

If needed, a parameter to {{#dateformatter}} can now be easily added, to specify the language to format in.

Change-Id: If61854920065f7c3b4170ab89e9aa66b299f9dd8

11 years agoRevert "(bug 260) Handle <pre> overflow automatically with a scroll bar"
Trevor Parscal [Fri, 20 Jul 2012 21:20:35 +0000 (21:20 +0000)]
Revert "(bug 260) Handle <pre> overflow automatically with a scroll bar"

Even after 8 years, we can't seem to make up our minds. That said, I think using word-wrap is the way to go, see comments on the bug.

This reverts commit b9f5fc10ae1fd7fab754db023e7d622355894f58

11 years agoMerge "(bug 260) Handle <pre> overflow automatically with a scroll bar"
Trevor Parscal [Fri, 20 Jul 2012 20:59:32 +0000 (20:59 +0000)]
Merge "(bug 260) Handle <pre> overflow automatically with a scroll bar"

11 years agoUse WebRequest instead of $_SERVER in EditPage.
Alexandre Emsenhuber [Fri, 20 Jul 2012 18:46:24 +0000 (20:46 +0200)]
Use WebRequest instead of $_SERVER in EditPage.

Change-Id: I30cdcffe8c520f9a4031c31e3e08db9b699da597

11 years agoMerge "Undo feature: Add a wpUndidRevision field that can be used to distinguish...
Reedy [Fri, 20 Jul 2012 18:31:48 +0000 (18:31 +0000)]
Merge "Undo feature: Add a wpUndidRevision field that can be used to distinguish (undo) edits from other edits"

11 years ago[FileBackend] Cleanups for doxygen.
Aaron Schulz [Fri, 20 Jul 2012 10:13:43 +0000 (03:13 -0700)]
[FileBackend] Cleanups for doxygen.

Change-Id: I82cd7e4ef01c6fa10fbdb6ccce5cc8e42e8aac67

11 years agocleanup temp files left around by UploadStash
Jan Gerber [Fri, 20 Jul 2012 01:18:31 +0000 (01:18 +0000)]
cleanup temp files left around by UploadStash

stashFile renames files to add an extension, this way it is no longer
cleaned up by php. So we have to unlink it after storing it in the FileRepo.

Change-Id: Iab697fc4535546dd25231dddf220e18f3b0b73be

11 years agoFix bug in moveTo() with $auth=false and $createRedirect=false
Catrope [Thu, 19 Jul 2012 21:22:27 +0000 (14:22 -0700)]
Fix bug in moveTo() with $auth=false and $createRedirect=false

Even when $auth=false, moveToInternal() would unconditionally check
$wgUser's 'suppressredirect' permissions and override $createRedirect.
This means it was impossible to suppress redirect creation when moving
pages in a maintenance script, even when telling moveTo() to disable
permissions checks.

Fixed by moving the check from moveToInternal() up into moveTo() and
respecting $auth there

Change-Id: I9b52dc67c7ae2dbda3ca62f78d4d7df118771c0f

11 years ago(bug 35060) more allowed params to Special:MyPage, Special:MyTalk
Derrick Coetzee [Thu, 10 May 2012 03:12:42 +0000 (20:12 -0700)]
(bug 35060) more allowed params to Special:MyPage, Special:MyTalk

I investigated the available parameters and considered which could be
plausibly useful for Special:MyPage and Special:MyTalk, and there are
quite a few. See inline documentation for a list of them. More could
potentially be added in the future if a use case is discovered.

This patch also make it possible for extensions to add their own
parameters to this list, through the new hook:
RedirectSpecialArticleRedirectParams

It has at least one application - with FlaggedRevs, it's desirable to
pass the "stable" flag through Special:MyPage. It also makes it simple
for individual servers that have some special reason to pass on a
particular parameter to do so in LocalSettings.php, simplifying
upgrades.

Change-Id: I3101fbe2eba8712b87a53706583f4e8f3e907478

11 years agomake list of 'Languages that support variant conversion' dynamic
umherirrender [Thu, 19 Jul 2012 18:49:55 +0000 (20:49 +0200)]
make list of 'Languages that support variant conversion' dynamic

see bug 33223. Placing this list in LanguageConverter,
so people see the list, when adding new Converters

Change-Id: I088bc1f0ea01d7d6e02c736261311919a0956a57

11 years agoUse WebRequest instead of $_SERVER in OutputPage.
Alexandre Emsenhuber [Thu, 19 Jul 2012 16:35:25 +0000 (18:35 +0200)]
Use WebRequest instead of $_SERVER in OutputPage.

Also moved debug string generation a bit lower so that
it's executed only when it will actually be used.

Change-Id: Ia01e7fb1dba1f2f55c156d3ac097acf2a68dca70

11 years ago(bug 38333) test blocked user cant createaccount
Antoine Musso [Fri, 13 Jul 2012 09:43:17 +0000 (11:43 +0200)]
(bug 38333) test blocked user cant createaccount

This patch adds BlockTest::testBlockedUserCanNotCreateAccount() which
test that a new user can createaccount and that blocking him will
prevents to the createaccount right.

Does not solve bug 38333 though!

Change-Id: Ia10e26825d50d47b4770900ee91dea666337f969