lhc/web/wiklou.git
9 years agoMerge "Make Title::makeTitleSafe() not need user variant"
jenkins-bot [Wed, 19 Nov 2014 18:57:34 +0000 (18:57 +0000)]
Merge "Make Title::makeTitleSafe() not need user variant"

9 years agoUse cdb library and provide a back-compat layer
Kunal Mehta [Wed, 12 Nov 2014 18:34:11 +0000 (10:34 -0800)]
Use cdb library and provide a back-compat layer

The new cdb library is pulled in via composer. Since the
library uses namespaces, a backwards-compatability layer
is provided for the old class names:
* CdbReader
* CdbWriter
* CdbException

The PHP/DBA-specific classes should never have been used directly.

Depends on I98302bdf1 in mediawiki/vendor

Change-Id: I39549ac8540b262cf91f7d1830d36327afb3033d

9 years agoMake Title::makeTitleSafe() not need user variant
Brad Jorsch [Wed, 19 Nov 2014 17:51:27 +0000 (12:51 -0500)]
Make Title::makeTitleSafe() not need user variant

In trying to avoid hitting RequestContext::getLanguage() from a call to
User::idFromName(), I05aacd30 made it no longer safe for user input.

A closer analysis of the call stack involved reveals that
Title::makeTitleSafe() is constructing a prefixed dbkey using the
localized name for NS_USER, and then Language::getNsIndex() is needing
to get the variant in order to handle that localized name. But if we use
the canonical name for NS_USER, Language::getNsIndex() short-circuits
and skips the problematic code path.

And it turns out that it doesn't actually matter which prefix
Title::makeTitleSafe() uses, since the prefix doesn't make it anywhere
into the resulting Title object. So let's revert I05aacd30 and Ibeef0409
and just do that instead.

Change-Id: Ib902573996c69d1e77527cc7b2faf4e7fa5d3daf

9 years agoAdd logging context to database logs
Bryan Davis [Mon, 23 Jun 2014 22:25:55 +0000 (16:25 -0600)]
Add logging context to database logs

* Add optional $context parameter to wfDebug, wfDebugLog, wfLogDBError
  and wfErrorLog that will be passed to MWLogger.
* Add support for PSR-3 style log message parameter interpolation in
  MWLoggerLegacyLogger.
* Add context information to wfLogDBError calls made from DatabaseBase,
  DatabaseMysqlBase and LoadBalancer instances.
* Deprecate wfDebugTimer() which now appears to be unused.

Change-Id: Ic90d593d00a2b0b5b80ed205908cbe624042603c

9 years agoMerge "Bug: Append to wgAutoloadClasses"
Legoktm [Wed, 19 Nov 2014 07:25:26 +0000 (07:25 +0000)]
Merge "Bug: Append to wgAutoloadClasses"

9 years agoBug: Append to wgAutoloadClasses
Erik Bernhardson [Wed, 19 Nov 2014 06:23:31 +0000 (22:23 -0800)]
Bug: Append to wgAutoloadClasses

When generating $wgAutoloadClasses for an extension the generator
currently outputs an assignment (=), but it is unlikely this is
the desired result. An extension wants to append to the existing
$wgAutoloadClasses. This bug is an unintended consequence of I75403ace
which changed the generator from assigning one key per line to using
an array literal.

This patch changes the output only when generating $wgAutoloadClasses
to the += operator which adds to the array any value that is not
already in the array.

Change-Id: I7d42ee5dc829991c6562878f0c90a06fadb1b6a6

9 years agoFix vim folding
Tim Starling [Wed, 19 Nov 2014 03:25:45 +0000 (14:25 +1100)]
Fix vim folding

The "@{" in these two doc comments was being interpreted as an opening
mark and was causing almost the whole file to be in a single section.

Change-Id: I818ecd2f7621a22b6e8f5a4b93faee6fbf3664dc

9 years agoMerge "Follow-up to I05aacd30b: normalize case in User::idFromName"
jenkins-bot [Wed, 19 Nov 2014 04:12:13 +0000 (04:12 +0000)]
Merge "Follow-up to I05aacd30b: normalize case in User::idFromName"

9 years agoFollow-up to I05aacd30b: normalize case in User::idFromName
Ori Livneh [Tue, 18 Nov 2014 22:42:18 +0000 (14:42 -0800)]
Follow-up to I05aacd30b: normalize case in User::idFromName

Change-Id: Ibeef04093338bfef8e65f40b1f9db588c8d5a79d

9 years agoMerge "Omit 'window.' when accessing browsing location"
jenkins-bot [Wed, 19 Nov 2014 04:01:58 +0000 (04:01 +0000)]
Merge "Omit 'window.' when accessing browsing location"

9 years agoMerge "Expose ID of relevant page in JS variables"
jenkins-bot [Wed, 19 Nov 2014 04:01:50 +0000 (04:01 +0000)]
Merge "Expose ID of relevant page in JS variables"

9 years agoMerge "Don't re-apply EXIF rotation to chained thumbnails"
jenkins-bot [Wed, 19 Nov 2014 02:06:00 +0000 (02:06 +0000)]
Merge "Don't re-apply EXIF rotation to chained thumbnails"

9 years agoOmit 'window.' when accessing browsing location
Timo Tijhof [Wed, 19 Nov 2014 00:11:04 +0000 (00:11 +0000)]
Omit 'window.' when accessing browsing location

The location object is a global, just like document.

Using it via 'window' needlessly adds complexity and, for example,
makes it harder to catch typos in static analysis.

Also standardise on location.href in place of the many different
variants, like:

 location =
 location.href =
 location.assign() =

And each with 'window', 'document' and without host object.

Change-Id: I77510294d8b5bd4b8a1b08e06817762a7839d43d

9 years agoMerge "Cleaned up template profile report tabbing"
jenkins-bot [Tue, 18 Nov 2014 23:42:21 +0000 (23:42 +0000)]
Merge "Cleaned up template profile report tabbing"

9 years agoCleaned up template profile report tabbing
Aaron Schulz [Tue, 18 Nov 2014 22:58:02 +0000 (14:58 -0800)]
Cleaned up template profile report tabbing

Change-Id: I46abfc856d718d4db73d0510bde3e2b589341b10

9 years agoMW_NO_OUTPUT_BUFFER is never defined
Chad Horohoe [Tue, 18 Nov 2014 22:02:32 +0000 (14:02 -0800)]
MW_NO_OUTPUT_BUFFER is never defined

It may have been defined at one time, but now it's just
function overhead to check on every request.

Change-Id: I05963a0e496e0a960a4feb6877a03e67c5a6fc85

9 years agoMerge "profiler: Simplify code for class name mapping"
jenkins-bot [Tue, 18 Nov 2014 20:56:11 +0000 (20:56 +0000)]
Merge "profiler: Simplify code for class name mapping"

9 years agoMerge "Fixed some incorrect Profiler comments"
jenkins-bot [Tue, 18 Nov 2014 20:48:19 +0000 (20:48 +0000)]
Merge "Fixed some incorrect Profiler comments"

9 years agoMerge "Use upsert() in ProfilerOutputDb"
jenkins-bot [Tue, 18 Nov 2014 20:47:34 +0000 (20:47 +0000)]
Merge "Use upsert() in ProfilerOutputDb"

9 years agoprofiler: Simplify code for class name mapping
Timo Tijhof [Tue, 18 Nov 2014 20:46:41 +0000 (20:46 +0000)]
profiler: Simplify code for class name mapping

Follows-up 000c6529d. Handle errors first.

Change-Id: I70308783a2e8b140b3c850758cce36544b32eb20

9 years agoFixed some incorrect Profiler comments
Aaron Schulz [Tue, 18 Nov 2014 20:39:01 +0000 (12:39 -0800)]
Fixed some incorrect Profiler comments

Change-Id: Ibadc9c7aa0e199e3bd0776a3d563fb6afc1ff7cd

9 years agoMerge "Localisation updates from https://translatewiki.net."
Translation updater bot [Tue, 18 Nov 2014 20:11:54 +0000 (20:11 +0000)]
Merge "Localisation updates from https://translatewiki.net."

9 years agoUse upsert() in ProfilerOutputDb
Aaron Schulz [Tue, 18 Nov 2014 20:06:05 +0000 (12:06 -0800)]
Use upsert() in ProfilerOutputDb

Change-Id: I807ee78c602b67c99530ecaab90af74410106fc7

9 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Tue, 18 Nov 2014 20:05:56 +0000 (21:05 +0100)]
Localisation updates from https://translatewiki.net.

Change-Id: I72e27a8e125fc604c5fe47f73b243b96b9b50cc6

9 years agoMerge "ProfilerOutput: Remove logStandardData() and make log() abstract"
jenkins-bot [Tue, 18 Nov 2014 20:02:06 +0000 (20:02 +0000)]
Merge "ProfilerOutput: Remove logStandardData() and make log() abstract"

9 years agoProfilerOutput: Remove logStandardData() and make log() abstract
Chad Horohoe [Tue, 18 Nov 2014 19:51:49 +0000 (11:51 -0800)]
ProfilerOutput: Remove logStandardData() and make log() abstract

Became unused layer of abtraction as I266ed820 went through iterations

Change-Id: Ic739fb4519bb2e23e679828b191c11c0158ade78

9 years agoProfiler: Explicitly convert output type to class name
Kunal Mehta [Tue, 18 Nov 2014 19:12:07 +0000 (11:12 -0800)]
Profiler: Explicitly convert output type to class name

Follows-up b8d93fb4fd06.

Change-Id: I50faa25fdc4fb980e0ff71014b8d1b2a5818af80

9 years agoMerge "Refactor profiling output from profiling"
jenkins-bot [Tue, 18 Nov 2014 19:01:41 +0000 (19:01 +0000)]
Merge "Refactor profiling output from profiling"

9 years agomediawiki.action.history.diff: Rework print styles
Bartosz Dziewoński [Tue, 18 Nov 2014 12:32:11 +0000 (13:32 +0100)]
mediawiki.action.history.diff: Rework print styles

* Remove extremely old print styles for diffs from commonPrint.css,
  added back in r6970. These were created for the old yellow-green-red
  diff styles and look terrible now.
* Add new, minimal print styles, that replace background colors with
  text decoration (underline for inserted text, line-through for
  deleted). Motivation is the same as in r6970: light colored backgrounds
  work great on displays, but not very well in black-and-white print.
* Fixed diff styles demo (mediawiki.action.history.diff.html), updated
  with print styles and better example.

Bug: 73544
Change-Id: Ibf08fa11f84ac0cf8c7ed4da8af2b8804de6ab6f

9 years agoMerge "filebackend: Log more details about backend-fail-internal errors"
jenkins-bot [Tue, 18 Nov 2014 03:52:13 +0000 (03:52 +0000)]
Merge "filebackend: Log more details about backend-fail-internal errors"

9 years agoRefactor profiling output from profiling
Chad Horohoe [Fri, 14 Nov 2014 18:58:07 +0000 (10:58 -0800)]
Refactor profiling output from profiling

* Added a standard getFunctionStats() method for Profilers to return
  per function data as maps. This is not toolbar specific like getRawData().
* Cleaned up the interface of SectionProfiler::getFunctionStats() a bit.
* Removed unused cpu_sq, real_sq fields from profiler UDP output.
* Moved getTime/getInitialTime to ProfilerStandard.

Co-Authored-By: Aaron Schulz <aschulz@wikimedia.org>
Change-Id: I266ed82031a434465f64896eb327f3872fdf1db1

9 years agoAvoid calling Title::makeTitleSafe in User::idFromName
Ori Livneh [Tue, 18 Nov 2014 01:52:20 +0000 (17:52 -0800)]
Avoid calling Title::makeTitleSafe in User::idFromName

We don't want to call Title::makeTitleSafe yet, since that call path
ends up needing the user language, which ends up trying to load the
user object, which ends up back in User::idFromName.

Bug: 54193
Change-Id: I05aacd30be66fe505b5c211113ea938fa82e2492

9 years agoUpdate OOjs UI to v0.1.0-pre (f1abca8e82)
Roan Kattouw [Mon, 17 Nov 2014 23:49:37 +0000 (18:49 -0500)]
Update OOjs UI to v0.1.0-pre (f1abca8e82)

New changes:
5883e65 Add 'indeterminate' state to progress bar widget
fbe9248 Fix documentation for getRelativeSelectableItem
27f8805 Localisation updates from https://translatewiki.net.
2edfdaa Localisation updates from https://translatewiki.net.
40d08f0 Localisation updates from https://translatewiki.net.
ce8438f Update OOjs to v1.1.3
5721411 Prepare repository for RuboCop
f1abca8 Followup ca6a16f: use parent selector both for hiding and showing windows

Change-Id: I7b49bbc81e9b8ba501f0593daaacf7025f16bf00

9 years agofilebackend: Log more details about backend-fail-internal errors
Gilles Dubuc [Mon, 17 Nov 2014 18:05:52 +0000 (19:05 +0100)]
filebackend: Log more details about backend-fail-internal errors

Bug: 73094
Change-Id: I9e45284e3cfd55bc34d87009387a2c1766e2db4a
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/991

9 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Mon, 17 Nov 2014 20:54:11 +0000 (21:54 +0100)]
Localisation updates from https://translatewiki.net.

Change-Id: I2e0ff8b47f799752f656915729510dad81c00d4a

9 years agoUpdate OOjs to v1.1.3
James D. Forrester [Mon, 17 Nov 2014 19:26:17 +0000 (11:26 -0800)]
Update OOjs to v1.1.3

Release notes:
 https://git.wikimedia.org/blob/oojs%2Fcore.git/v1.1.3/History.md

Change-Id: I1bd75ea6f259ca8b35ca8e379a443788d4642f28

9 years agoAPI: Always request page_is_redirect from ApiQueryInfo
Brad Jorsch [Mon, 17 Nov 2014 16:18:09 +0000 (11:18 -0500)]
API: Always request page_is_redirect from ApiQueryInfo

The ApiPageSet doesn't know for sure whether it will be resolving
redirects until it is executed, as the revids parameter may override
that (and it can't easily check before being executed because it might
never actually be executed). So ApiQueryInfo needs to just
unconditionally request page_is_redirect and only consider later whether
to try using it.

Bug: 73464
Change-Id: I2297158188dae5476c5b9b5755ea26cf5b8ae487

9 years agoRemove profiler support from debugging toolbar
Chad Horohoe [Thu, 13 Nov 2014 19:14:37 +0000 (11:14 -0800)]
Remove profiler support from debugging toolbar

It never worked and creates extra dependencies on the profiler

Change-Id: I584c9e94d144baf48a654e23dd9f47690d94f13b

9 years agoPrettier wfLogProfilingData() log message
Bryan Davis [Mon, 17 Nov 2014 17:32:45 +0000 (10:32 -0700)]
Prettier wfLogProfilingData() log message

Make the profiler logging output introduced in Iae11e1e a little nicer.
Stop adding the Profiler::getRawData() information and add the URL and
textual report to the default log message. When testing with a Monolog
logger and Logstash the getRawData output from the Xhprof profiler was
found to be too big to be usable. The default message output was found
to be less informative than desirable when a PSR-3 logger other than
MWLoggerLegacyLogger was used. MWLoggerLegacyLogger implements special
backwards compatible formatting for the profileoutput channel that will
not be effected by this change.

Change-Id: Id326aed4f72a3489fac30661c101ac3bb3af2530

9 years agoMerge "Consistently handle trailing slashes in subpage links."
jenkins-bot [Mon, 17 Nov 2014 17:05:58 +0000 (17:05 +0000)]
Merge "Consistently handle trailing slashes in subpage links."

9 years agoDoc: Mention the php command in autoload.php to regenerate it
Erik Bernhardson [Fri, 14 Nov 2014 19:00:36 +0000 (11:00 -0800)]
Doc: Mention the php command in autoload.php to regenerate it

Adds a comment to the top of the generated autoload.php directing
developers to the command to regenerate the file so they may just
copy and paste the command.

Change-Id: If098a1eb51ed732378677215c0e438c73d506697

9 years agoStandardize indentation of multiline 'if'/'elseif' conditions
Bartosz Dziewoński [Sun, 16 Nov 2014 19:18:00 +0000 (20:18 +0100)]
Standardize indentation of multiline 'if'/'elseif' conditions

Always indent the continuation one level deeper, and always place the
closing parenthesis on the next line, per coding conventions.
https://www.mediawiki.org/wiki/Manual:Coding_conventions#Indenting_and_alignment
https://www.mediawiki.org/wiki/Manual:Coding_conventions#Line_continuation

Regexp used: (\t+)(if|while|\} elseif|foreach).+(?<![;}])\n\1\S

Also:
* Change to just one line if line length stays under 100 characters.
* Add "// Do nothing" comment in empty 'if' bodies.
* Change '#' comments to '//' comments near affected code.

Change-Id: I4f62658fddb5a0ed18bbf9b2231cd794683d6402

9 years agoMerge "Keep buttons from changing size when they change state"
jenkins-bot [Mon, 17 Nov 2014 10:49:38 +0000 (10:49 +0000)]
Merge "Keep buttons from changing size when they change state"

9 years agoMerge "WebInstallerOutput: Apply wfBCP47() to lang attribute"
jenkins-bot [Mon, 17 Nov 2014 09:27:39 +0000 (09:27 +0000)]
Merge "WebInstallerOutput: Apply wfBCP47() to lang attribute"

9 years agoMerge "Allow maxlength attribute on HTMLSelectAndOtherField"
jenkins-bot [Sun, 16 Nov 2014 23:48:45 +0000 (23:48 +0000)]
Merge "Allow maxlength attribute on HTMLSelectAndOtherField"

9 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Sun, 16 Nov 2014 21:10:30 +0000 (22:10 +0100)]
Localisation updates from https://translatewiki.net.

Change-Id: I3cc1a14ecadf25d0abb58fbaa9d464bb6b6af9dd

9 years agoAllow maxlength attribute on HTMLSelectAndOtherField
umherirrender [Sat, 26 Jul 2014 21:56:37 +0000 (23:56 +0200)]
Allow maxlength attribute on HTMLSelectAndOtherField

A reason on a SelectAndOtherField can have two parts, one of the scroll
down box and a free text field. The free text field is actually
unlimited.
This patch allows the maxlength on that field. To respect the concat of
the two parts, also javascript code is added, which adds a dynamic
maxlength to respect also the text from the scroll down box.

The HTMLSelectAndOtherField is only used on Special:Block,
where the maxlength attribute is now set to 255 (length of the database
field ipb_reason).

Change-Id: I5c164b41ab047e7ecf9d92db6eddcc980e2db048

9 years agoCSSMin: Rewrite encodeImageAsDataURI()
Bartosz Dziewoński [Fri, 7 Nov 2014 19:21:58 +0000 (20:21 +0100)]
CSSMin: Rewrite encodeImageAsDataURI()

* Make it actually check against the URI length, not file size.
  Previous code could produce URIs that edged just over the limit.
* Replace $sizeLimit parameter with $ie8Compat, because that's the
  only use case and the file size limit approach was flawed per above,
  anyway.
* Remove CSSMin::EMBED_SIZE_LIMIT constant, which is not used anymore.
  CSSMin::DATA_URI_SIZE_LIMIT still exists.
* Change code flow to avoid repetition.
* Split off new method, encodeStringAsDataURI(), that does actual
  encoding rather than file handling.

Change-Id: I3704404ce831d7e0f6e3a65f23c76f313ad13238

9 years agoMWException: Log stack traces for php errors (not exceptions)
Timo Tijhof [Sun, 16 Nov 2014 11:49:25 +0000 (12:49 +0100)]
MWException: Log stack traces for php errors (not exceptions)

* Remove use of 'error' where it's redundant.
* Remove call to logException from responsibility of MWException.
  Call from exception handler instead.

Change-Id: I8764cf5df87b226813c9b9cf99f9b4f3fa4b7c92

9 years agoMerge "doc: raise doxygen lookup cache"
jenkins-bot [Sun, 16 Nov 2014 09:43:27 +0000 (09:43 +0000)]
Merge "doc: raise doxygen lookup cache"

9 years agoUse correct case of function ImageGallery::toHTML
umherirrender [Mon, 3 Nov 2014 16:39:45 +0000 (17:39 +0100)]
Use correct case of function ImageGallery::toHTML

Change-Id: I8040c02618a58bb8840658bb7a5c697766c77d2d

9 years agoRemove LinkSearchPage::doQuery override
umherirrender [Fri, 26 Sep 2014 17:31:51 +0000 (19:31 +0200)]
Remove LinkSearchPage::doQuery override

It is not called and not working, because it missed return statements.

The validation check is done in getQueryInfo and the message is added in
execute, when needed.

Change-Id: I9acbd2f09a922d5a7d66e8ce55e8d24ae65ab560

9 years agoAutoloadGenerator: Add newline at end of output file
Kevin Israel [Fri, 14 Nov 2014 23:33:04 +0000 (18:33 -0500)]
AutoloadGenerator: Add newline at end of output file

Change-Id: I2b5a1adc115afd9430c1ea91285516c9c4290875

9 years agoMerge "Localisation updates from https://translatewiki.net."
Translation updater bot [Sat, 15 Nov 2014 21:41:20 +0000 (21:41 +0000)]
Merge "Localisation updates from https://translatewiki.net."

9 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Sat, 15 Nov 2014 21:31:09 +0000 (22:31 +0100)]
Localisation updates from https://translatewiki.net.

Change-Id: I15904e6e70bb623ae6c5259ce2e37ccb5d61c9dd

9 years agoSet default value for $wgSharedSchema
umherirrender [Thu, 13 Nov 2014 18:43:06 +0000 (19:43 +0100)]
Set default value for $wgSharedSchema

Was added in I25df82065a307b9abc30c694f8c8afff0996d7c1 back in REL1_23

Change-Id: I291e770861751e037befe1db004e5e3f8b449f6c

9 years agoSimplify checks on Special:UserLogin/signup
umherirrender [Mon, 25 Aug 2014 18:12:27 +0000 (20:12 +0200)]
Simplify checks on Special:UserLogin/signup

I27c488e4008a924117ff6bac2216f148cd5e7abd changed the validation code in
User::getCanonicalName, the # and Title::makeTitleSafe checks now done
there and can be removed here.

Follow-Up: I27c488e4008a924117ff6bac2216f148cd5e7abd
Follow-Up: I88c479cea2bc9d2eab882e0ee8ebcbe2d1dd125e
Follow-Up: I983e3f528491817f9f31f71a92d8d2946ce5941d
Change-Id: I17bf88be6398dc402295264ca9bfd57809c872d7

9 years agoMerge "Increase QUnit.config.testTimeout to 30s"
jenkins-bot [Sat, 15 Nov 2014 16:44:39 +0000 (16:44 +0000)]
Merge "Increase QUnit.config.testTimeout to 30s"

9 years agoIncrease QUnit.config.testTimeout to 30s
Erik Bernhardson [Thu, 13 Nov 2014 22:31:19 +0000 (14:31 -0800)]
Increase QUnit.config.testTimeout to 30s

The default value of 10s is ocasionally failing when loading resources
via RL.  Increase to 30s as suggested in the qunit documentation.

http://api.qunitjs.com/QUnit.config/#config-testTimeout

Change-Id: I288db068c8dd1041e0a9be959b3b0c6ddcc7606e

9 years agoUpdate "apihelp-upload-param-stash"
Siebrand Mazeland [Fri, 14 Nov 2014 12:35:54 +0000 (13:35 +0100)]
Update "apihelp-upload-param-stash"

Per suggestion by Lokal Profil at
https://translatewiki.net/wiki/Thread:Support/About_MediaWiki:Apihelp-upload-param-stash/sv

Change-Id: I377fb210ee191deab612a156268eca57c6746337

9 years agoMerge "generateLocalAutoload.php: Abort for web requests"
jenkins-bot [Fri, 14 Nov 2014 23:41:46 +0000 (23:41 +0000)]
Merge "generateLocalAutoload.php: Abort for web requests"

9 years agogenerateLocalAutoload.php: Abort for web requests
Kevin Israel [Fri, 14 Nov 2014 22:27:16 +0000 (17:27 -0500)]
generateLocalAutoload.php: Abort for web requests

The Maintenance class already does this, though this script does not use it
for the obvious reason that when there is a missing or incorrect autoloader
entry, it may not be possible to initialize MediaWiki.

Hence it is necessary to do that explicitly in this script. Overwriting
autoload.php potentially could disrupt the operation of a production wiki
(the file is truncated when it is opened).

Change-Id: I05d5d4b7c30c4643e71ca5819783627688e15da7

9 years agomediawiki.skinning: Provide SVG version of the "magnify clip" icon
James D. Forrester [Mon, 10 Nov 2014 10:45:48 +0000 (10:45 +0000)]
mediawiki.skinning: Provide SVG version of the "magnify clip" icon

PNGs re-generated from the SVG.

Bug: 69705
Change-Id: Ica2e82598f545764a734399462231fe3c4ea7005

9 years agoMerge "Delete skins/common/images/bullet.gif"
jenkins-bot [Fri, 14 Nov 2014 22:22:59 +0000 (22:22 +0000)]
Merge "Delete skins/common/images/bullet.gif"

9 years agoMerge "Delete skins/common/images/magnify-clip.png"
jenkins-bot [Fri, 14 Nov 2014 22:22:51 +0000 (22:22 +0000)]
Merge "Delete skins/common/images/magnify-clip.png"

9 years agoMerge "Delete skins/common/{ajax.js, wikibits.js, images/{magnify-clip-rtl.png, redir...
jenkins-bot [Fri, 14 Nov 2014 22:10:59 +0000 (22:10 +0000)]
Merge "Delete skins/common/{ajax.js, wikibits.js, images/{magnify-clip-rtl.png, redirectltr.png, redirectrtl.png}}"

9 years agoConsistently handle trailing slashes in subpage links.
C. Scott Ananian [Fri, 14 Nov 2014 21:38:04 +0000 (16:38 -0500)]
Consistently handle trailing slashes in subpage links.

The link text for [[/Foo/]] is `Foo` and the link text for
[[../Foo/]] is `Foo`.  So far so good.

But the link text for [[/Foo//]] is `Foo` while the link text
for [[../Foo//]] is `Foo/`.  We are stripping all trailing slashes
in the first case, but not the second.

Fix the code so that we strip all trailing slashes in both cases.
Update some of the comments in the code while we are at it.

Change-Id: Id61eacafea9820c404699a7902c8eb8102779516

9 years agoDelete skins/common/images/bullet.gif
Bartosz Dziewoński [Fri, 14 Nov 2014 21:56:59 +0000 (22:56 +0100)]
Delete skins/common/images/bullet.gif

There are still some requests for it per bug 69277 comment 90, but per
bug 69678 comment 12 all usages have been already removed.

This is the last file in the skins/common/ directory.

Bug: 69277
Change-Id: Id9de81d0efa91fa20dfd10d56a8ae814de43ff6e

9 years agoDelete skins/common/images/magnify-clip.png
Bartosz Dziewoński [Fri, 14 Nov 2014 21:27:37 +0000 (22:27 +0100)]
Delete skins/common/images/magnify-clip.png

There are still some requests for it per bug 69277 comment 90, but per
bug 69678 comment 10 all usages are forward-compatible or have been
already removed.

Bug: 69277
Change-Id: If6a16fb5aa5a826a58c8dec67e3583ccf12761e2

9 years agoMerge "mediawiki.special.changeslist.legend: Avoid legend as stairs"
jenkins-bot [Fri, 14 Nov 2014 21:12:59 +0000 (21:12 +0000)]
Merge "mediawiki.special.changeslist.legend: Avoid legend as stairs"

9 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Fri, 14 Nov 2014 20:54:28 +0000 (21:54 +0100)]
Localisation updates from https://translatewiki.net.

Change-Id: I25f795abac11cdcf3c3aede626b026407f67e699

9 years agomediawiki.special.changeslist.legend: Avoid legend as stairs
Fomafix [Fri, 14 Nov 2014 20:30:49 +0000 (20:30 +0000)]
mediawiki.special.changeslist.legend: Avoid legend as stairs

Skin Modern has
  dt { margin-bottom: 0.1em }
This generates a legend like a stair.
This change resets the margin to the default for .mw-changeslist-legend.

Change-Id: I3cf0301c1f46cfbb1b9170b18ca4dc52a7a7a903

9 years agoAutoloadGenerator: Don't throw MWExceptions
Kunal Mehta [Fri, 14 Nov 2014 19:47:52 +0000 (11:47 -0800)]
AutoloadGenerator: Don't throw MWExceptions

The class won't have been autoloaded, so it can't be used.

Change-Id: I54a9be600839c7bffe7debb8ee35ac46694390b4

9 years agoAvoid sending spammy @X xhprof entries over UDP
Aaron Schulz [Thu, 13 Nov 2014 21:01:25 +0000 (13:01 -0800)]
Avoid sending spammy @X xhprof entries over UDP

Change-Id: I8509932f7368cab2a5426f437845e2849a82d9b4

9 years agoKeep buttons from changing size when they change state
kaldari [Fri, 14 Nov 2014 18:34:50 +0000 (10:34 -0800)]
Keep buttons from changing size when they change state

Right now if a button changes from a light color to a dark color
based on some user action or state change, the button width also
changes, potentially reflowing the content and making the button
move to a completely different location. Both the height and width
need to stay the same (as was discussed in mw-ui standardization
meetings). The effect on the hover-shadow gimmick is virtually
imperceptable.

Bug: 73381
Change-Id: I27edeb4f1317c9d163bc87f54f35a161cdcd686e

9 years agoPerformance improvements for autoload generator
Erik Bernhardson [Fri, 14 Nov 2014 18:18:09 +0000 (10:18 -0800)]
Performance improvements for autoload generator

Both zend and HHVM run through the autoload file faster when it
is a single array literal rather than individual key assignments.

The __DIR__ string concatenation remains because HHVM and Zend >= 5.5.0
optimize away constant string concatenation.

Change-Id: I75403ace264b09930d5cc545e62b8d7c3f1ad064

9 years agoDelete skins/common/{ajax.js, wikibits.js, images/{magnify-clip-rtl.png, redirectltr...
Bartosz Dziewoński [Mon, 10 Nov 2014 15:38:04 +0000 (16:38 +0100)]
Delete skins/common/{ajax.js, wikibits.js, images/{magnify-clip-rtl.png, redirectltr.png, redirectrtl.png}}

* ajax.js, wikibits.js:
  Was kept for third parties. (user scripts etc.)
* redirectltr.png, redirectrtl.png:
  Was kept for cached stylesheets, after I8fa565833545e41d02 removed
  usage in MediaWiki core.
* magnify-clip-rtl.png:
  Was kept for third parties. (user scripts etc.)

Bug: 69277
Change-Id: I54b170b557414e2f3cda4c85053cd0f2cbefc10d

9 years agoMerge "Update OOjs UI to v0.1.0-pre (fe4076af75)"
jenkins-bot [Fri, 14 Nov 2014 05:58:33 +0000 (05:58 +0000)]
Merge "Update OOjs UI to v0.1.0-pre (fe4076af75)"

9 years agoMerge "Generate $wgAutoloadLocalClasses with a maint script"
jenkins-bot [Fri, 14 Nov 2014 02:25:46 +0000 (02:25 +0000)]
Merge "Generate $wgAutoloadLocalClasses with a maint script"

9 years agoMerge "Doc: Document problem sorting inserted data"
jenkins-bot [Fri, 14 Nov 2014 00:36:45 +0000 (00:36 +0000)]
Merge "Doc: Document problem sorting inserted data"

9 years agoDoc: Document problem sorting inserted data
Erik Bernhardson [Sat, 8 Nov 2014 00:43:57 +0000 (16:43 -0800)]
Doc: Document problem sorting inserted data

Adds documentation referencing the root cause of the linked intermittent
failures caused by some versions of sqlite mis-handling this data. Logs
an error indicating that this is a known buggy workaroung along with
the solution.

Bug: 72367
Change-Id: If26346e4d71560d6a8a3f79a52e52ee6e90e0304

9 years agoGenerate $wgAutoloadLocalClasses with a maint script
Erik Bernhardson [Fri, 26 Sep 2014 23:13:23 +0000 (16:13 -0700)]
Generate $wgAutoloadLocalClasses with a maint script

Currently all new classes in core need to be registered
with the autoloader.  This is acceptable but inconvenient.

This patch adds a script to read the output of php's tokenizer
to determine the names of all the classes within mediawiki core.
Patches with new or removed classes will just need to rerun
the maint script rather than manually adjusting the arrays.

A full conversion to psr-0 + composer would solve this as well,
but this is a very non-intrusive patch that can get us some
portion of the benefit(reduced manual maintenance) today rather
than months down the line once we figure out all the intricacies
of mediawiki + composer.

Change-Id: I8b1bdb84a9699de79f8b9951fa61e5437d083c55

9 years agoWebInstallerOutput: Apply wfBCP47() to lang attribute
Fomafix [Thu, 13 Nov 2014 22:43:52 +0000 (22:43 +0000)]
WebInstallerOutput: Apply wfBCP47() to lang attribute

Change-Id: I7dce46380f56ff2960de7f6d9644c4cdc972a372

9 years agoUpdate OOjs UI to v0.1.0-pre (fe4076af75)
James D. Forrester [Thu, 13 Nov 2014 22:25:31 +0000 (22:25 +0000)]
Update OOjs UI to v0.1.0-pre (fe4076af75)

New changes:
b758cff Localisation updates from https://translatewiki.net.
2584648 MenuWidget: Don't close menu when you click the scroll bar
16d057c Don't close PopupToolGroups when the scroll bar is clicked
fe4076a Localisation updates from https://translatewiki.net.

Change-Id: I1872d16e33e8ad8f4d0e13ce7533587ab3b0614a

9 years agoAdded wfLogDBError() call to LoadBalancer::doWait()
Aaron Schulz [Mon, 6 Oct 2014 17:42:58 +0000 (10:42 -0700)]
Added wfLogDBError() call to LoadBalancer::doWait()

Change-Id: Ida0970754a2a7287c129bb5ad633765dab97133a

9 years agoMerge "Use setMwGlobals on execption tests"
jenkins-bot [Thu, 13 Nov 2014 21:17:37 +0000 (21:17 +0000)]
Merge "Use setMwGlobals on execption tests"

9 years agoMerge "ObjectCacheSessionHandler::getCache() returns BagOStuff"
jenkins-bot [Thu, 13 Nov 2014 21:14:52 +0000 (21:14 +0000)]
Merge "ObjectCacheSessionHandler::getCache() returns BagOStuff"

9 years agoUse setMwGlobals on execption tests
umherirrender [Thu, 6 Nov 2014 20:17:20 +0000 (21:17 +0100)]
Use setMwGlobals on execption tests

Simplify $wgOut handling by setting the global with setMwGlobals

Change-Id: I64bf23e657ea82316e1cd71df6491322e537d5d1

9 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Thu, 13 Nov 2014 20:57:59 +0000 (21:57 +0100)]
Localisation updates from https://translatewiki.net.

Change-Id: I277c686c6cabce222ba6279670581383bb17de0d

9 years agoObjectCacheSessionHandler::getCache() returns BagOStuff
Kunal Mehta [Thu, 13 Nov 2014 20:53:50 +0000 (12:53 -0800)]
ObjectCacheSessionHandler::getCache() returns BagOStuff

Change-Id: I7f514857154297c7033dd26af97b6ac83c13f104

9 years agoMerge "Deprecate rarely or unused *LinkAttributes methods in Linker"
jenkins-bot [Thu, 13 Nov 2014 20:41:33 +0000 (20:41 +0000)]
Merge "Deprecate rarely or unused *LinkAttributes methods in Linker"

9 years agoWork around test provider running before setUp()
Bryan Davis [Thu, 13 Nov 2014 20:18:08 +0000 (13:18 -0700)]
Work around test provider running before setUp()

If the xhprof extension is not present we skip running the test, but
phpunit runs the test provider function before that check so we need to
guard against missing constants to avoid spurious warnings in the test
output.

Change-Id: I5541a062ff0c47ca8802315554b3f32dfd01dcd0

9 years agoExpose legaltitlechars through the API
Arlo Breault [Thu, 13 Nov 2014 17:35:48 +0000 (09:35 -0800)]
Expose legaltitlechars through the API

Bug: 47651
Change-Id: I79fdd698e6df75b1823b0d2d150db68e862c640f

9 years agoDeprecate rarely or unused *LinkAttributes methods in Linker
aude [Thu, 13 Nov 2014 16:14:53 +0000 (17:14 +0100)]
Deprecate rarely or unused *LinkAttributes methods in Linker

Linker::getInterwikiLinkAttributes and Linker::getInternalLinkAttributesObj
are not not used any code in gerrit.

Linker::getInternalLinkAttributes is used once, in the Video extension.

Change-Id: I76d9b549e0fdccb9c1b4d9c12ba40a67c2733637

9 years agoMerge "SpecialRecentchanges: Repair recentchangestext in content language"
jenkins-bot [Thu, 13 Nov 2014 14:22:35 +0000 (14:22 +0000)]
Merge "SpecialRecentchanges: Repair recentchangestext in content language"

9 years agoRemove deprecated Linker::getExternalLinkAttributes method
aude [Thu, 13 Nov 2014 13:39:16 +0000 (14:39 +0100)]
Remove deprecated Linker::getExternalLinkAttributes method

deprecated since 1.18 and unused anywhere else in
core or all the extensions in gerrit:

https://github.com/search?utf8=%E2%9C%93&q=getExternalLinkAttributes+%40wikimedia&type=Code&ref=searchresults

Change-Id: Id5ae9186b3a83672c8310adb5dfdaf07bfec3d74

9 years agoSpecialRecentchanges: Repair recentchangestext in content language
Fomafix [Thu, 13 Nov 2014 13:37:22 +0000 (13:37 +0000)]
SpecialRecentchanges: Repair recentchangestext in content language

* Use getHtmlCode() instead of getCode() to generate a BCP 47 conform
  HTML lang attribute.
* Use <div> instead of <p> because the <p> gets rendered as

<p lang="en" dir="ltr"></p>
<p>Text</p>
<p></p>

and the <div> gets rendered as

<div lang="en" dir="ltr">
<p>Text</p>
</div>

* Set $lineStart = true

Change-Id: I62ce26ba550fb25bc2e770186cea3435374bb4e6

9 years agoMerge "Clarify that $wgAmericanDates is not limited to English"
jenkins-bot [Thu, 13 Nov 2014 13:04:44 +0000 (13:04 +0000)]
Merge "Clarify that $wgAmericanDates is not limited to English"

9 years agoMerge "Remove require_once from some tests by adding classes to TestsAutoLoader"
jenkins-bot [Thu, 13 Nov 2014 13:03:55 +0000 (13:03 +0000)]
Merge "Remove require_once from some tests by adding classes to TestsAutoLoader"

9 years agoDon't re-apply EXIF rotation to chained thumbnails
Gilles Dubuc [Thu, 13 Nov 2014 10:26:15 +0000 (11:26 +0100)]
Don't re-apply EXIF rotation to chained thumbnails

Change-Id: I2f0674e4aea508ad7e00b7742a9d47bd0659e399
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/600
Bug: 67525
Bug: 73352