lhc/web/wiklou.git
10 years agoFix rebuildall.php fatal error with PostgreSQL
lethosor [Sun, 26 Jan 2014 16:49:16 +0000 (11:49 -0500)]
Fix rebuildall.php fatal error with PostgreSQL

The fix for 47055 introduced a fatal error when running rebuildall.php. This
is a workaround suggested by gebhkla on Bugzilla (idle for 10+ days). It just
checks to make sure $options is actually an array before calling array_search
on it.

Bug: 60094
Change-Id: Ib54420b5a749c60b82a4757a9f5fa511f48fdb72

10 years agoMerge "SpecialWantedcategories: Actually strike the category if it was emptied"
jenkins-bot [Sun, 26 Jan 2014 15:25:36 +0000 (15:25 +0000)]
Merge "SpecialWantedcategories: Actually strike the category if it was emptied"

10 years agoMerge "Add Special:Diff as an internally-linkable redirect to diff pages"
jenkins-bot [Sun, 26 Jan 2014 04:52:59 +0000 (04:52 +0000)]
Merge "Add Special:Diff as an internally-linkable redirect to diff pages"

10 years agoMerge "+Test for Status->CleanParams with a callback"
jenkins-bot [Sat, 25 Jan 2014 22:24:00 +0000 (22:24 +0000)]
Merge "+Test for Status->CleanParams with a callback"

10 years agoMerge "Add test that covers Status::fatal"
jenkins-bot [Sat, 25 Jan 2014 22:23:47 +0000 (22:23 +0000)]
Merge "Add test that covers Status::fatal"

10 years agoMerge "Add test for Status->merge with overrideValue true"
jenkins-bot [Sat, 25 Jan 2014 22:23:02 +0000 (22:23 +0000)]
Merge "Add test for Status->merge with overrideValue true"

10 years agoMerge "Cleanup RefreshLinksPartitionTest"
jenkins-bot [Sat, 25 Jan 2014 22:15:11 +0000 (22:15 +0000)]
Merge "Cleanup RefreshLinksPartitionTest"

10 years agoMerge "Add release notes for removed RdfMetaData class"
jenkins-bot [Sat, 25 Jan 2014 21:23:54 +0000 (21:23 +0000)]
Merge "Add release notes for removed RdfMetaData class"

10 years agoAdd Special:Diff as an internally-linkable redirect to diff pages
Jérémie Roquet [Sun, 12 May 2013 22:10:47 +0000 (00:10 +0200)]
Add Special:Diff as an internally-linkable redirect to diff pages

This is similar to Special:PermanentLink added in r79036 and has been
asked for several times in different places, including:
- on the English Wikipedia (oldid=539308532)
- on mediawiki.org (lqt_oldid=31691)
- on the French Wikipedia (oldid=93029892)
- on the English Wikipedia again (oldid=588408888)

A notable use-case is linking to diffs in the edit summaries, where
external links are not yet allowed (bug 14892).

All of the following are valid usages:
- [[Special:Diff/12345]] (diff of a revision with the previous one)
- [[Special:Diff/12345/prev]] (diff of a revision with the previous one as well)
- [[Special:Diff/12345/next]] (diff of a revision with the next one)
- [[Special:Diff/12345/cur]] (diff of a revision with the latest one of that page)
- [[Special:Diff/12345/98765]] (diff between arbitrary two revisions)

Co-authored-by: Jérémie Roquet <jroquet@arkanosis.net>
Co-authored-by: Bartosz Dziewoński <matma.rex@gmail.com>
Change-Id: I77fdaf8e04375caa1d67ca4a3ec3bd93920c3309

10 years agoAdd release notes for removed RdfMetaData class
umherirrender [Fri, 24 Jan 2014 16:23:41 +0000 (17:23 +0100)]
Add release notes for removed RdfMetaData class

Follow-Up: I3454d605a741bc97a51a1ad471a17eb3053d662f
Change-Id: Id1a04ea330da90ed84dae692bde7c64a5ac06cd5

10 years agoSplit Timestamp.php into class and exception files
addshore [Sat, 25 Jan 2014 15:21:09 +0000 (16:21 +0100)]
Split Timestamp.php into class and exception files

Change-Id: I438adfe5479a1017baee8f2b663f3fb2e49c685a

10 years ago+Test for Status->CleanParams with a callback
addshore [Sat, 25 Jan 2014 15:14:49 +0000 (16:14 +0100)]
+Test for Status->CleanParams with a callback

Change-Id: I4e7570ea041d28303388c630b3ca07225faf8551

10 years agoAdd test that covers Status::fatal
addshore [Sat, 25 Jan 2014 15:11:57 +0000 (16:11 +0100)]
Add test that covers Status::fatal

Change-Id: I7cb1e19569f77df5230808d7b35200b0ec9a6698

10 years agoAdd test for Status->merge with overrideValue true
addshore [Sat, 25 Jan 2014 15:08:49 +0000 (16:08 +0100)]
Add test for Status->merge with overrideValue true

Change-Id: I049c67e80277f8dbbbadae6e7a8f30d66066e7bf

10 years agoCleanup RefreshLinksPartitionTest
addshore [Sat, 25 Jan 2014 13:15:42 +0000 (14:15 +0100)]
Cleanup RefreshLinksPartitionTest

Change-Id: I9c8e66b7370f8ea8d9b4f8843718b29e992b1180

10 years agoMerge "Improve organization of TestsAutoLoader"
jenkins-bot [Sat, 25 Jan 2014 08:42:10 +0000 (08:42 +0000)]
Merge "Improve organization of TestsAutoLoader"

10 years agoUpdate jStorage
Niklas Laxström [Fri, 24 Jan 2014 21:20:32 +0000 (21:20 +0000)]
Update jStorage

Contains bugfixes, new license and smaller file size: mw.loader.inspect
went from 16.6 to 11.9. This is still bigger than what they claim:
"jStorage is really small, just about 7kB when minified (4kB when gzipped)!"

Change-Id: I0b6f083a72a27af1e3fd367f61e8f98f74fea5d8

10 years agoAdd .gitignore to the /skins directory
huji [Wed, 1 Jan 2014 00:25:54 +0000 (19:25 -0500)]
Add .gitignore to the /skins directory

To make it easier to work on 3rd party skins.

Bug: 55486
Change-Id: I986b6fe71bba429d1274bd86822448838601af64

10 years agoAdded some constants to speed up Setup.php
Aaron Schulz [Sun, 22 Dec 2013 23:19:23 +0000 (15:19 -0800)]
Added some constants to speed up Setup.php

Change-Id: I528b362d6ef3d07c6c301e7a1767a1be0fc93725

10 years agoAdd support for "tabindex" in HTMLFormField subclasses
Alexandre Emsenhuber [Thu, 2 May 2013 18:27:44 +0000 (20:27 +0200)]
Add support for "tabindex" in HTMLFormField subclasses

It is already set for some fields in Special:Block, but are
discarded by HTMLForm and its fields.

Some notes:
- fields with multiple inputs (radio, select and other, select
  or other) will have the same tabindex set on all elements
- Some items such as multi-select and check matrix are not yet
  implemented

Change-Id: I3e1ba7f16f3a3183f231afcf60dd392ce6d6eb6b

10 years agoAdd direct links to translation interface on Special:AllMessages
Federico Leva [Wed, 6 Nov 2013 23:08:02 +0000 (00:08 +0100)]
Add direct links to translation interface on Special:AllMessages

The local Special:AllMessages page is the first and most friendly place
where average users will look for the message and try to translate it:
when they find it, add a link to translatewiki.net so that they can start
translating without searching for it from scratch.

Special:SearchTranslations is the only target usable for this: the solr
search is smart enough to present the most relevant results first and the
translation interface is directly available in place.
On the bright side, similar messages popping up from other projects or areas
of the code will provide suggestions and help find other occurrences of
translations which can similarly be improved.

More specifically, we are using a combined language, key and text search:
* the English text is the only thing guaranteed to exist, if the message is
  available, though quoting it can give some false negatives and not quoting
  it would give it too much weight if it's long;
* the key can be used thanks to the feature revealed by Niklas Laxström in
  comments to this patch: it is simpler to handle but allows only exact matches
  and can be wrong if TWN adds a prefix for the extension, so it can't be used
  alone, but in the best case it's what we're looking for;
* the language makes sense in combination with the key match.
We boost key and language to get the current translation of the message where
possible; if it's not, the first result will usually be English text.
https://wiki.apache.org/solr/SolrQuerySyntax
https://lucene.apache.org/core/2_9_4/queryparsersyntax.html

From the initial search, the user can further refine its search and navigate
the interface to find the message(s) and editor where to add or edit the
translation.

Change-Id: I8de3faba829c50cdc0f2d09726f738c585792e00

10 years agoi18n: Native digits on #wpLocalTime
Ebrahim Byagowi [Sat, 14 Dec 2013 18:07:11 +0000 (18:07 +0000)]
i18n: Native digits on #wpLocalTime

Change-Id: Ief3c4700247809e59dda30b9b224e3f9dfaa5e62

10 years agoMerge "Little change of readability in Title::secureAndSplit"
jenkins-bot [Sat, 25 Jan 2014 00:41:54 +0000 (00:41 +0000)]
Merge "Little change of readability in Title::secureAndSplit"

10 years agoMerge "StatusTest is language dependant"
jenkins-bot [Fri, 24 Jan 2014 23:57:43 +0000 (23:57 +0000)]
Merge "StatusTest is language dependant"

10 years agoMerge "More use of Title::hasFragment"
jenkins-bot [Fri, 24 Jan 2014 23:57:41 +0000 (23:57 +0000)]
Merge "More use of Title::hasFragment"

10 years agoMerge "Add hints to two function comments in Title.php"
jenkins-bot [Fri, 24 Jan 2014 23:56:53 +0000 (23:56 +0000)]
Merge "Add hints to two function comments in Title.php"

10 years agoMerge "Replace <i> and <b> by <em> and <strong> in i18n"
jenkins-bot [Fri, 24 Jan 2014 23:51:43 +0000 (23:51 +0000)]
Merge "Replace <i> and <b> by <em> and <strong> in i18n"

10 years agoAdd hints to two function comments in Title.php
umherirrender [Fri, 24 Jan 2014 21:35:52 +0000 (22:35 +0100)]
Add hints to two function comments in Title.php

Change-Id: I47627892c6450396cfb658ddef7617046fdf4209

10 years agoLittle change of readability in Title::secureAndSplit
umherirrender [Fri, 24 Jan 2014 21:30:33 +0000 (22:30 +0100)]
Little change of readability in Title::secureAndSplit

Move init of mArticleId to bottom, where other fields are filled and
change ternary operator to a simple if for better readability.
Break a double assignment in two statements.

Change-Id: Ib61435e62e883142dd0c5dcb40e0e50e7ca18439

10 years agoMore use of Title::hasFragment
umherirrender [Fri, 24 Jan 2014 21:22:45 +0000 (22:22 +0100)]
More use of Title::hasFragment

Missing two places for the new method.

Also change a remaining var access of Title::mFragment to accessor.

Follow-Up: I27d9c3e40e6de6800f4488de167cf06e83c88ce6
Change-Id: I5d26b9a7662673b902e3f7147cbc95ca0626d721

10 years agoMerge "Ignore testRunLegacyHooks in findHooks.php"
jenkins-bot [Fri, 24 Jan 2014 21:09:33 +0000 (21:09 +0000)]
Merge "Ignore testRunLegacyHooks in findHooks.php"

10 years agoMerge "Remove preference "Show table of contents (for pages with more ...)""
jenkins-bot [Fri, 24 Jan 2014 21:08:08 +0000 (21:08 +0000)]
Merge "Remove preference "Show table of contents (for pages with more ...)""

10 years agoRemove preference "Show table of contents (for pages with more ...)"
tonythomas01 [Thu, 5 Dec 2013 17:54:27 +0000 (23:24 +0530)]
Remove preference "Show table of contents (for pages with more ...)"

The table of contents box is auto-inserted, can trivially be hidden or
exposed on a per-page basis with __MAGICWORDS__, includes a sticky
[show|hide] link, and can be easily hidden with site-wide CSS as
necessary. It needlessly adds complexity and user interface clutter.

Bug: 52813
Change-Id: If2139317dae4aa980b373c73d7b81dac627b5af8

10 years agoReplace <i> and <b> by <em> and <strong> in i18n
Siebrand Mazeland [Thu, 12 Dec 2013 12:34:19 +0000 (13:34 +0100)]
Replace <i> and <b> by <em> and <strong> in i18n

Change-Id: If84e78e413fd042ef9451c68df2321fd52a35c79

10 years agoMerge "Localisation updates from https://translatewiki.net."
Translation updater bot [Fri, 24 Jan 2014 20:18:35 +0000 (20:18 +0000)]
Merge "Localisation updates from https://translatewiki.net."

10 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Fri, 24 Jan 2014 20:00:37 +0000 (20:00 +0000)]
Localisation updates from https://translatewiki.net.

Change-Id: Idf89d2bff84d9c4e74be06a2532222891b0fb30e

10 years agoMerge "Change behavior of Special:Watchlist when user's watchlist is empty"
jenkins-bot [Fri, 24 Jan 2014 19:45:43 +0000 (19:45 +0000)]
Merge "Change behavior of Special:Watchlist when user's watchlist is empty"

10 years agoMerge "Fix comment on JobQueue::push"
jenkins-bot [Fri, 24 Jan 2014 19:34:24 +0000 (19:34 +0000)]
Merge "Fix comment on JobQueue::push"

10 years agoFix comment on JobQueue::push
Marius Hoch [Fri, 24 Jan 2014 19:14:11 +0000 (20:14 +0100)]
Fix comment on JobQueue::push

Change-Id: I2a7e570ee29ca9dcab2e5c92616ecb69310ae7d5

10 years agoMerge "User::saveOptions() optimization"
jenkins-bot [Fri, 24 Jan 2014 19:13:25 +0000 (19:13 +0000)]
Merge "User::saveOptions() optimization"

10 years agoUser::saveOptions() optimization
Antoine Musso [Wed, 22 May 2013 14:39:31 +0000 (16:39 +0200)]
User::saveOptions() optimization

Since we only want to save non default user options, we have to strip
out any user option that match the default ones. We did that by calling
User::getDefaultOption( 'some option name' ); on each of the option.

Since the User mOptions property is a merge of the default option, we
end up doing a lot of unneeded processing. The loop roughly looks like:

 User::getDefaultOption()
   User::getDefaultOptions()
     Language->getCode()
     SearchEngine::searchableNamespaces()
       language->getNamespaces()
       wfRunHooks('SearcheableNamespaces')
     wfRunHooks('UserGetDefaultOptions')

For EACH of the mOptions.

Instead this patch does an array_diff to strip out from mObjects any
default option.  We still skip options whose value is false or null.

Test provided to make sure we only save what we want.

Change-Id: Ie98d3a17edab74401ed32f759ba11f723b56e376

10 years agoRemoved "Enable section editing via [edit] links" from preferences
tonythomas01 [Wed, 4 Dec 2013 17:47:33 +0000 (23:17 +0530)]
Removed "Enable section editing via [edit] links" from preferences

Unwanted user preference option in MW adding to the clutter.
Users interested in hiding section-edit links can use per-user
(or site-wide) CSS.
Removed 'editsection' from Defaultsettings.php and
ResourceLoaderUserCSSPrefsModule.php
Updated Release Notes

Bug: 52811
Change-Id: I5fc49106621943ca7180ddb37590b624edac67d5

10 years agoAdd Title::hasFragment and use it
umherirrender [Thu, 2 Jan 2014 11:16:21 +0000 (12:16 +0100)]
Add Title::hasFragment and use it

Makes checks against the fragment easier to read and all the same.
At the moment some using strval, some use type safe comparsion.

Change-Id: I27d9c3e40e6de6800f4488de167cf06e83c88ce6

10 years agoMerge "API: Remove obsolete wgRightsCode from siteinfo"
jenkins-bot [Fri, 24 Jan 2014 15:19:48 +0000 (15:19 +0000)]
Merge "API: Remove obsolete wgRightsCode from siteinfo"

10 years agoAPI: Remove obsolete wgRightsCode from siteinfo
Reedy [Fri, 24 Jan 2014 06:38:30 +0000 (06:38 +0000)]
API: Remove obsolete wgRightsCode from siteinfo

This was apparently a companion to $wgRightsPage, $wgRightsUrl,
$wgRightsText, and $wgRightsIcon, added in r3148.

But even then it was commented out as "not yet used", and appears to
have eventually disappeared without ever having been used.

Change-Id: I63f4393c22912f04e4ea690ebb1cd02bae65faab

10 years agoFix testValidyntax to testValidSyntax
Reedy [Fri, 24 Jan 2014 06:29:11 +0000 (06:29 +0000)]
Fix testValidyntax to testValidSyntax

Change-Id: I6157fec56a5455888200752d757602ddb640fd1e

10 years agoMerge "AutoLoaderTest: Add support for class aliases"
jenkins-bot [Fri, 24 Jan 2014 02:15:40 +0000 (02:15 +0000)]
Merge "AutoLoaderTest: Add support for class aliases"

10 years agoMerge "Do not load special pages in WatchedItem::load"
jenkins-bot [Fri, 24 Jan 2014 02:01:28 +0000 (02:01 +0000)]
Merge "Do not load special pages in WatchedItem::load"

10 years agoMerge "Remove TODO for use of TRUNCATE and replace with comment"
jenkins-bot [Fri, 24 Jan 2014 02:00:29 +0000 (02:00 +0000)]
Merge "Remove TODO for use of TRUNCATE and replace with comment"

10 years agoMerge "ChangesListSpecialPage and subclasses: Reorder functions"
jenkins-bot [Fri, 24 Jan 2014 00:56:12 +0000 (00:56 +0000)]
Merge "ChangesListSpecialPage and subclasses: Reorder functions"

10 years agoMerge "Changes list legend modules cleanup"
jenkins-bot [Fri, 24 Jan 2014 00:55:23 +0000 (00:55 +0000)]
Merge "Changes list legend modules cleanup"

10 years agoMerge "Create ChangesListSpecialPage as a base class for Watchlist and RC"
jenkins-bot [Fri, 24 Jan 2014 00:51:07 +0000 (00:51 +0000)]
Merge "Create ChangesListSpecialPage as a base class for Watchlist and RC"

10 years agoMerge "Don't pass $this by reference to SkinVectorStyleModules hook."
jenkins-bot [Thu, 23 Jan 2014 23:44:28 +0000 (23:44 +0000)]
Merge "Don't pass $this by reference to SkinVectorStyleModules hook."

10 years agoMerge "Replace a bunch of extension_loaded() checks with checkPHPExtension()"
jenkins-bot [Thu, 23 Jan 2014 23:43:42 +0000 (23:43 +0000)]
Merge "Replace a bunch of extension_loaded() checks with checkPHPExtension()"

10 years agoMerge "Begin abstracting more of the database-specific search backend out"
jenkins-bot [Thu, 23 Jan 2014 23:39:34 +0000 (23:39 +0000)]
Merge "Begin abstracting more of the database-specific search backend out"

10 years agoDon't pass $this by reference to SkinVectorStyleModules hook.
Alexandre Emsenhuber [Sun, 15 Dec 2013 13:58:20 +0000 (14:58 +0100)]
Don't pass $this by reference to SkinVectorStyleModules hook.

Fix for Ica0b69ad95 (8b6ed4d0).

$this cannot be changed, so there is not any reason to pass
it by reference.

Change-Id: I916ccabbaff9f60edb344550111f62c833bb137b

10 years agoReplace a bunch of extension_loaded() checks with checkPHPExtension()
Platonides [Sat, 23 Nov 2013 19:20:23 +0000 (20:20 +0100)]
Replace a bunch of extension_loaded() checks with checkPHPExtension()

Change-Id: I7bd9bc3a753975f45e63532d4f07aeff853b9970

10 years agoAdd $context to the ArticleFromTitle hook
Brian Wolff [Wed, 11 Dec 2013 21:59:48 +0000 (14:59 -0700)]
Add $context to the ArticleFromTitle hook

Most of the time people wouldn't need this - this hook is mostly
used to inject a custom Article subclass for a specific
namespace to do fancy things, but lets give users the most
flexibility.

Asked for by leaves on irc.

Change-Id: I3386ff4abe0e5b3eb783604ae222b7703428db44

10 years agoFix git repository viewer URLs so they support more variants of the Wikimedia URLs
Simon Walker [Sun, 6 Oct 2013 03:18:40 +0000 (04:18 +0100)]
Fix git repository viewer URLs so they support more variants of the Wikimedia URLs

I've tested this against the URLs that are exposed within gitblit and gerrit, specifically:

* https://gerrit.wikimedia.org/r/p/mediawiki/extensions/AbuseFilter.git
* ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/AbuseFilter.git
* https://gerrit.wikimedia.org/r/mediawiki/extensions/AbuseFilter
* ssh://stwalkerster@gerrit.wikimedia.org:29418/mediawiki/extensions/AbuseFilter
* https://stwalkerster@gerrit.wikimedia.org/r/mediawiki/extensions/AbuseFilter

Change-Id: I36008eced60e32d554a5801bae155611f259f2d1

10 years agoCreate and move some functions for class ArrayUtils
Liangent [Thu, 18 Oct 2012 09:33:15 +0000 (09:33 +0000)]
Create and move some functions for class ArrayUtils

Change-Id: Id9ca20925f49e314918810fb54b3819ba9cf9c39

10 years agoFollow-up I49b7d8a - Add api module for common metadata
Brian Wolff [Mon, 12 Aug 2013 14:24:11 +0000 (11:24 -0300)]
Follow-up I49b7d8a - Add api module for common metadata

Change-Id: I0d957891e0778ba0454f6fecb06524211506f6b9

10 years agoCreate ApiBase::requireAtLeastOneParameter helper
Tyler Anthony Romeo [Tue, 21 May 2013 00:51:23 +0000 (00:51 +0000)]
Create ApiBase::requireAtLeastOneParameter helper

Added new ApiBase::requireAtLeastOneParameter() helper method for modules
that need one or more of a combination of parameters. The associated help
message function has also been added.

Change-Id: Iae6649ed503fdbf14b313d0be1a82f3dca8d7162

10 years agoAutoLoaderTest: Add support for class aliases
Kevin Israel [Thu, 23 Jan 2014 20:49:39 +0000 (15:49 -0500)]
AutoLoaderTest: Add support for class aliases

* Changed the regex to match class aliases, and added a check to
  also ensure that all aliases for a class are in the same file as
  the class (see cb77e59f7c99 for explanation).
* Removed support for the seemingly unmaintained Parsekit extension
  (no release since 2009, and known not to compile against PHP 5.4).
  The test would currently fail if Parsekit were used anyway because
  the class MyLocalSettingsGenerator is commented out.

Change-Id: I7be2352f4659abc7b4952a9f74a14d0cef911614

10 years agoMerge "Localisation updates from https://translatewiki.net."
Translation updater bot [Thu, 23 Jan 2014 20:27:41 +0000 (20:27 +0000)]
Merge "Localisation updates from https://translatewiki.net."

10 years agoMerge "Add Status outparam for AbortNewAccount hook to fix API error handling"
jenkins-bot [Thu, 23 Jan 2014 20:27:00 +0000 (20:27 +0000)]
Merge "Add Status outparam for AbortNewAccount hook to fix API error handling"

10 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Thu, 23 Jan 2014 20:05:14 +0000 (20:05 +0000)]
Localisation updates from https://translatewiki.net.

Change-Id: I6034169b0cb9f50d581683b2b66854a733c552c7

10 years agoMerge "Split documentation for $wgRCLinkLimits/$wgRCLinkDays"
jenkins-bot [Thu, 23 Jan 2014 20:04:07 +0000 (20:04 +0000)]
Merge "Split documentation for $wgRCLinkLimits/$wgRCLinkDays"

10 years agoMerge "Remove `login-throttled` system message reuse"
jenkins-bot [Thu, 23 Jan 2014 19:13:03 +0000 (19:13 +0000)]
Merge "Remove `login-throttled` system message reuse"

10 years agoMerge "Remove the fade in image in favour of background gradient"
jenkins-bot [Thu, 23 Jan 2014 18:12:41 +0000 (18:12 +0000)]
Merge "Remove the fade in image in favour of background gradient"

10 years agoRemove the fade in image in favour of background gradient
jrobson [Wed, 22 Jan 2014 00:43:04 +0000 (16:43 -0800)]
Remove the fade in image in favour of background gradient

* Introduces vertical-gradient mixin (tried and tested
in MobileFrontend)
* Add additional LESS variables
* Just dont give versions with no vertical gradient support a fade
effect - it's not a big deal
* Save a single asset download

Change-Id: Ie36708f32edf0d83a0be843c115ad82d8014e4e1

10 years agoAdd Status outparam for AbortNewAccount hook to fix API error handling
Brion Vibber [Fri, 17 Jan 2014 20:26:41 +0000 (12:26 -0800)]
Add Status outparam for AbortNewAccount hook to fix API error handling

With this fix and relevant fix for ConfirmEdit in, an API account creation
attempt that fails the captcha check will return a much cleaner error such as:

{
  'error': {
    'code': 'captcha-createaccount-fail',
    'info': 'Incorrect or missing CAPTCHA.'
  }
}

Abort hooks that use the old interface and send a text message will now
be reported with the generic 'createaccount-hook-abort' message code, with the
string passed back intact.

Previously, the returned result would list the contents of the message
_as_ the error code, making it hard for a client to determine the error.

'AbortNewAccount' hook clients can add a '&$status=null' function paramater
on their signature, and along with the back-compat message parameter
you can set something like:

  $msg = wfMessage( 'captcha-createaccount-fail' )->text(); // back-compat
  $status = Status::newFatal( 'captcha-createaccount-fail' ); // new

This is done for ConfirmEdit in If9cc08e

Bug: 60008
Change-Id: I6ae34c00d1051d34363b6d654424be17dcb1ea30

10 years agoMerge "Installer: Remove two environmental checks"
jenkins-bot [Thu, 23 Jan 2014 18:01:05 +0000 (18:01 +0000)]
Merge "Installer: Remove two environmental checks"

10 years agoMerge "(Bug 60030) Use $content of the hook for toc hiding"
jenkins-bot [Thu, 23 Jan 2014 17:55:34 +0000 (17:55 +0000)]
Merge "(Bug 60030) Use $content of the hook for toc hiding"

10 years agoSplit documentation for $wgRCLinkLimits/$wgRCLinkDays
umherirrender [Sun, 19 Jan 2014 20:27:15 +0000 (21:27 +0100)]
Split documentation for $wgRCLinkLimits/$wgRCLinkDays

Each var should have it own doc block

Change-Id: Iec2b37687c009be9412103081ff5fc020c6dad03

10 years agoCorrect Title::getInterwiki method name case on call
Adrian Lang [Thu, 23 Jan 2014 09:21:57 +0000 (10:21 +0100)]
Correct Title::getInterwiki method name case on call

Change-Id: Iad9652b3d43ec1d80a8152c41f114acaa7ec3997

10 years agoMerge "Generate CSS for KSS through ResourceLoader"
jenkins-bot [Thu, 23 Jan 2014 06:56:54 +0000 (06:56 +0000)]
Merge "Generate CSS for KSS through ResourceLoader"

10 years agoInstaller: Remove two environmental checks
Kevin Israel [Wed, 22 Jan 2014 22:23:09 +0000 (17:23 -0500)]
Installer: Remove two environmental checks

* envCheckPHP531: Message is outdated ("downgrade to 5.3.0"; the
  current minimum PHP version is 5.3.2), and PHP Bug #50394 has
  not reappeared in any later version.
* envCheckZE1: zend.ze1_compatibility_mode was removed in 5.3.0.

Also updated the error message for envCheckBrokenXML to remove
the "Upgrade to PHP 5.2.9 or later" wording.

Change-Id: Ifc8754151dd23a0314c6739cb78c7ac61a306bc4

10 years agoRemove some deprecated global functions
Siebrand Mazeland [Sat, 11 Jan 2014 20:08:56 +0000 (21:08 +0100)]
Remove some deprecated global functions

Some uses remained in Gerrit extensions, and patches have been submitted
to replace the usages. See below for details.

* in_string (deprecated in 1.21)
* wfGenerateToken (deprecated in 1.20) (had 2 uses)
* wfStreamFile (deprecated in 1.19) (had 1 use)
* wfUILang (deprecated in 1.18)

Change-Id: Ic67a968da8f37daf44503b98d00710eb99180805

10 years agoGenerate CSS for KSS through ResourceLoader
Matthew Flaschen [Wed, 22 Jan 2014 04:27:42 +0000 (20:27 -0800)]
Generate CSS for KSS through ResourceLoader

This ensures the LESS is processed the same, so the behavior and output
exactly match.

Change-Id: I9bba8f2c328c9f9b9f7763cd335e280e973d03d6

10 years agoMerge "Re-remove experiment code for moduleStorage"
jenkins-bot [Thu, 23 Jan 2014 00:29:17 +0000 (00:29 +0000)]
Merge "Re-remove experiment code for moduleStorage"

10 years agoRe-remove experiment code for moduleStorage
Ori.livneh [Thu, 23 Jan 2014 00:25:02 +0000 (00:25 +0000)]
Re-remove experiment code for moduleStorage

The second iteration of the experiment is done, so this can once again be
removed. This patch reverts commit Ifa97d36d3.

Change-Id: If85b392d3e29de57316d32ba81c9b172bef758dd

10 years agoRemove deprecated ParserOptions::getSkin()
Siebrand Mazeland [Sat, 11 Jan 2014 09:11:38 +0000 (10:11 +0100)]
Remove deprecated ParserOptions::getSkin()

Has been deprecated since 1.18. One remaining use in a Gerrit extension
replaced.

Change-Id: I7eba24593368047ca48a5e1cb60378319c1e51b2

10 years agoMerge "Remove deprecated MediaWiki::articleFromTitle() and WikiPage::createUpdates()"
jenkins-bot [Wed, 22 Jan 2014 23:37:44 +0000 (23:37 +0000)]
Merge "Remove deprecated MediaWiki::articleFromTitle() and WikiPage::createUpdates()"

10 years agoMerge "Provide correct type as input for LoadMonitor::postConnectionBackoff()"
jenkins-bot [Wed, 22 Jan 2014 22:06:12 +0000 (22:06 +0000)]
Merge "Provide correct type as input for LoadMonitor::postConnectionBackoff()"

10 years agoMerge "Update/add documentation in the LoadBalancer class"
jenkins-bot [Wed, 22 Jan 2014 22:05:20 +0000 (22:05 +0000)]
Merge "Update/add documentation in the LoadBalancer class"

10 years agoMerge "Expand documentation around $wgAPI*Modules"
jenkins-bot [Wed, 22 Jan 2014 21:27:48 +0000 (21:27 +0000)]
Merge "Expand documentation around $wgAPI*Modules"

10 years agoRemove TODO for use of TRUNCATE and replace with comment
umherirrender [Wed, 22 Jan 2014 20:17:05 +0000 (21:17 +0100)]
Remove TODO for use of TRUNCATE and replace with comment

The new comment explain why truncate is not possible

Change-Id: I8dacff0784a07a0e20a4da0cc71043379ded6eb0

10 years agoRemove deprecated MediaWiki::articleFromTitle() and WikiPage::createUpdates()
Siebrand Mazeland [Sat, 11 Jan 2014 20:16:51 +0000 (21:16 +0100)]
Remove deprecated MediaWiki::articleFromTitle() and WikiPage::createUpdates()

No uses found in core or Gerrit extensions.

* MediaWiki::articleFromTitle() (deprecated in 1.18)
* WikiPage::createUpdates() (deprecated in 1.18)

Change-Id: I689249b579ee89f883b97fdb4ac79fb3502c45dc

10 years agoRemove FakeMemCachedClient
Siebrand Mazeland [Sat, 11 Jan 2014 19:49:38 +0000 (20:49 +0100)]
Remove FakeMemCachedClient

Was deprecated in 1.18. Not used in core or Gerrit extensions.

Change-Id: I06bc9c6f01f21386c772fa7fad57b55a7c7b2fe4

10 years agoShort circuit in notifyRCFeeds
Reedy [Wed, 22 Jan 2014 07:14:13 +0000 (07:14 +0000)]
Short circuit in notifyRCFeeds

Save instantiating classes unnecesserily

Add getEngine return type hint. Also make public

Change-Id: Ie2610516f99fe7b01742e7e95e13c4b1b90c77d7

10 years agoBegin abstracting more of the database-specific search backend out
Chad Horohoe [Sat, 18 Jan 2014 00:43:40 +0000 (16:43 -0800)]
Begin abstracting more of the database-specific search backend out

There's a lot in the base search implementations that is specific
to the database backed search. This starts moving some of that out
into a shared base class for those.

For starters, let's not grab a connection to the slave DB for
every single search for backends unless they need it.

Change-Id: Ib66696841eea901e04b21dd309784af889a45ab1

10 years agoMerge "Clean up whitespace in various javascript files"
jenkins-bot [Wed, 22 Jan 2014 00:39:15 +0000 (00:39 +0000)]
Merge "Clean up whitespace in various javascript files"

10 years agoClean up whitespace in various javascript files
Fomafix [Tue, 21 Jan 2014 20:49:07 +0000 (20:49 +0000)]
Clean up whitespace in various javascript files

Change-Id: I62fe370493b269618a0277ea06ed6ad22b97616a

10 years agoMerge "Move initial setting of $extNode out of the conditional"
jenkins-bot [Tue, 21 Jan 2014 22:49:38 +0000 (22:49 +0000)]
Merge "Move initial setting of $extNode out of the conditional"

10 years agoMove initial setting of $extNode out of the conditional
Reedy [Thu, 16 Jan 2014 02:04:32 +0000 (02:04 +0000)]
Move initial setting of $extNode out of the conditional

Change-Id: I3d13bfde15085d8c17ef41c6729bec2e9f8f84a2

10 years agoCheck for very old PCRE versions in installer and updater
Kevin Israel [Mon, 16 Dec 2013 16:02:51 +0000 (11:02 -0500)]
Check for very old PCRE versions in installer and updater

RE_IPV6_ADD uses (?(-n)) ("relative reference condition"), and CSSMin uses
\K ("reset start of match"), which only work in PCRE 7.2 and later -- newer
versions than the PCRE 6.6 included with Red Hat Enterprise Linux 5 and its
derivatives (e.g. CentOS 5).

Because the WMF developers, in general, do not seem to support maintaining
compatibility with such old software versions, I have opted to add a check
to the MediaWiki installer for these versions of PCRE. Affected users are
directed to a MediaWiki.org page advising the use of a different PHP package
that uses the bundled PCRE version instead of the older system version.

For now, the minimum PCRE version is set to 7.2, the oldest version not
known to break MediaWiki core. Once PHP 5.3 support is dropped, we may be
able to require PCRE 8.12 (bundled with PHP 5.4.0) or later.

The existing check for mere existence of the PCRE functions is removed;
since PHP 5.3, it is impossible to compile PHP without PCRE support.

Bug: 58213
Change-Id: Icf3732b6f84eeb25990178ae8fe3bd0fe4cc833f

10 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Tue, 21 Jan 2014 19:45:39 +0000 (19:45 +0000)]
Localisation updates from https://translatewiki.net.

Change-Id: I2bf221ca2d246108335c61947a464d23961a6551

10 years agoMerge "Removed RdfMetaData"
jenkins-bot [Tue, 21 Jan 2014 17:02:18 +0000 (17:02 +0000)]
Merge "Removed RdfMetaData"

10 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Mon, 20 Jan 2014 20:17:10 +0000 (20:17 +0000)]
Localisation updates from https://translatewiki.net.

Change-Id: I36b88d4b387ed2313b2160a6ba9fc6be056ded96

10 years agoRemove `login-throttled` system message reuse
Douglas Gardner [Mon, 20 Jan 2014 05:55:06 +0000 (05:55 +0000)]
Remove `login-throttled` system message reuse

Replaced calls to the `login-throttled` system message to new, separate system
messages for [[Special:ChangeEmail]] and [[Special:ChangePassword]] in order to
minimise message reuse.

* [[Special:ChangeEmail]] now uses `changeemail-throttled` instead of
  `login-throttled`.
* [[Special:ChangePassword]] now uses `changepassword-throttled` instead of
  `login-throttled`.

Follow-up to I565971a90fc383327a51d717a80013cb7a3e9c9b.

Bug: 53655
Change-Id: Icc7ad829b381514627dca16cde62ccf0831967b6