lhc/web/wiklou.git
10 years agoredact exception traces and abstract getTrace
Antoine Musso [Mon, 28 Oct 2013 16:56:37 +0000 (17:56 +0100)]
redact exception traces and abstract getTrace

* Partially reverts I0a9e92448 (rationale:
   http://www.gossamer-threads.com/lists/wiki/wikitech/401558)
  - wfDebugLog()'d exceptions are always unredacted
  - Other backtraces are redacted by replacing all argument values with class /
    type names.
* Adds a pair of static methods to MWExceptionHandler:
  - MWExceptionHandler::getRedactedTrace
equivalent to Exception::getTrace, but replaces each argument value
in the trace with its class or type name.
  - MWExceptionHandler::getRedactedTraceAsString
    equivalent to Exception::getTraceAsString, but with argument values
likewise redacted.
* The rename of 'formatRedactedTrace' to 'getRedactedTraceAsString' is
  justified on two grounds:
  - 'formatRedactedTrace' didn't actually take a trace object (it took an
exception).
  - 'getRedactedTraceAsString' maintains the symmetry with
    Exception::getTraceAsString.

Change-Id: I3d570a6385f96a606e1af53c50faa03b9ebacd38

10 years agoUpdate docs and declare visibility on class props
Siebrand Mazeland [Fri, 4 Oct 2013 13:43:09 +0000 (15:43 +0200)]
Update docs and declare visibility on class props

Change-Id: Ib0f02202d075d4a56dc4e37b08d7ac9399e8c86c

10 years agoMerge "Renamed "Your name" to "Your username" to match with the Media wiki login...
jenkins-bot [Fri, 1 Nov 2013 10:41:19 +0000 (10:41 +0000)]
Merge "Renamed "Your name" to "Your username" to match with the Media wiki login page"

10 years agoMerge "SkinTemplate: Move debug HTML above bottomscripts"
jenkins-bot [Thu, 31 Oct 2013 21:33:40 +0000 (21:33 +0000)]
Merge "SkinTemplate: Move debug HTML above bottomscripts"

10 years agoMerge "mediawiki.inspect#dumpTable: fix broken FF workaround"
jenkins-bot [Thu, 31 Oct 2013 21:09:18 +0000 (21:09 +0000)]
Merge "mediawiki.inspect#dumpTable: fix broken FF workaround"

10 years agoLocalisation updates from http://translatewiki.net.
Translation updater bot [Thu, 31 Oct 2013 20:17:20 +0000 (20:17 +0000)]
Localisation updates from translatewiki.net.

Change-Id: I38c68bc52196182ebc0fe0ad538cb93b16c37300

10 years agoMerge "Sync up with Parsoid parserTests."
jenkins-bot [Thu, 31 Oct 2013 20:01:42 +0000 (20:01 +0000)]
Merge "Sync up with Parsoid parserTests."

10 years agoFix Oracle installation SQL
Freakolowsky [Fri, 23 Aug 2013 08:48:59 +0000 (10:48 +0200)]
Fix Oracle installation SQL

The starting and minimal values of sequences on Oracle are both '1' by
default. We want a user with id of 0 (used for anonymous edits), so
these were both set to '0' and the user was inserted with its id being
the next value in the sequence.

However, due to some low level caching settings you can miss the first
value in a sequence. It makes no difference to other sequences, but it
does with this one, as it must be 0 to maintain foreign key validity.
Therefore let's just set the sequence to default starting value of '1'
and insert the user with hardcoded id=0.

Bug: 38411
Change-Id: Ic9a17b92d6052fbdc24dd431726e4d82dbf48034

10 years agoMerge "Add clarification to wfUseMW() phpdoc"
jenkins-bot [Thu, 31 Oct 2013 19:21:38 +0000 (19:21 +0000)]
Merge "Add clarification to wfUseMW() phpdoc"

10 years agomediawiki.inspect#dumpTable: fix broken FF workaround
Ori Livneh [Thu, 31 Oct 2013 16:47:15 +0000 (09:47 -0700)]
mediawiki.inspect#dumpTable: fix broken FF workaround

In Ib45487d10, we changed to invocation of console#table from
'console.table( data )' to 'console.table.call( console.table, data )'
to force an exception on Firefox, which doesn't define console.table
but doesn't complain if you try to invoke it. It should have been
'console.table.call( console, data )' instead.

Change-Id: Ib2252003f29586a47efb9ec534becc6396936b34

10 years agoSync up with Parsoid parserTests.
Subramanya Sastry [Thu, 31 Oct 2013 16:49:04 +0000 (11:49 -0500)]
Sync up with Parsoid parserTests.

This now aligns with Parsoid commit 325c6e5a47a6b3bf7a26778e534c8acabaca0058

Change-Id: I5c7cf9186197c49de449784265ffd8b0bb2bbb2c

10 years agoUse HTTPS for the link in FAQ
Alexandre Emsenhuber [Thu, 31 Oct 2013 11:25:49 +0000 (12:25 +0100)]
Use HTTPS for the link in FAQ

For consistency with the ones in README.

Change-Id: Ia82694286a9f0797b3839cc0f5cbfefbf4e37461

10 years agoMerge "exception: Use MWExceptionHandler::logException in more places"
jenkins-bot [Thu, 31 Oct 2013 13:58:30 +0000 (13:58 +0000)]
Merge "exception: Use MWExceptionHandler::logException in more places"

10 years agoMerge "use getOldid and getNewid methods in DifferenceEngineTest"
jenkins-bot [Thu, 31 Oct 2013 10:48:34 +0000 (10:48 +0000)]
Merge "use getOldid and getNewid methods in DifferenceEngineTest"

10 years agoAvoid strip markes on transcluded Special:RecentChanges[Linked]
umherirrender [Fri, 25 Oct 2013 16:44:27 +0000 (18:44 +0200)]
Avoid strip markes on transcluded Special:RecentChanges[Linked]

OutputPage::wrapWikiText results in a Parser::parse call, which should
not be done recursively. Using workaround from the warning under
https://www.mediawiki.org?oldid=807703#OutputPage-.3EaddWikiText.28.29

This only was happen, when the special page has no result or for
RecentChangesLinked a bad title was given.

Bug: 56167
Change-Id: I334bc6c36800af80e311301d46c7d48be1b6a055

10 years agoMerge "More 1.22 -> 1.23"
jenkins-bot [Thu, 31 Oct 2013 10:41:00 +0000 (10:41 +0000)]
Merge "More 1.22 -> 1.23"

10 years agoPut get diff body cache key into own function
aude [Sun, 27 Oct 2013 02:47:28 +0000 (02:47 +0000)]
Put get diff body cache key into own function

This allows derivative DifferenceEngine classes to
generate cache keys in a different format, as appropriate.

(e.g. for Wikibase, allow diffs to be cached by language
and fully localized)

Bug: 55667
Change-Id: I22bf4e70f86da832a86baf6790ad4a403fce4bf1

10 years agouse getOldid and getNewid methods in DifferenceEngineTest
aude [Thu, 31 Oct 2013 10:22:02 +0000 (11:22 +0100)]
use getOldid and getNewid methods in DifferenceEngineTest

- instead of direct variable access.

Change-Id: I019017ca1b4f3c2a511e703bc65b93a8ce47fae9

10 years agoMore 1.22 -> 1.23
umherirrender [Thu, 31 Oct 2013 10:17:07 +0000 (11:17 +0100)]
More 1.22 -> 1.23

Follow-Up: I1c2d7bdd1d861ace3f7e7bd8f8f0047c31194446
Change-Id: Icc3d612d401c7c2a91678a4a5dc4a228383452e6

10 years agoMerge "Add .sass-cache to .gitignore"
jenkins-bot [Thu, 31 Oct 2013 07:56:16 +0000 (07:56 +0000)]
Merge "Add .sass-cache to .gitignore"

10 years agoMerge "Add method for inspecting module dependency relations"
jenkins-bot [Thu, 31 Oct 2013 04:44:34 +0000 (04:44 +0000)]
Merge "Add method for inspecting module dependency relations"

10 years agoMerge "Accessibility: Make the collapsible sidebar screen reader friendly"
jenkins-bot [Thu, 31 Oct 2013 00:29:44 +0000 (00:29 +0000)]
Merge "Accessibility: Make the collapsible sidebar screen reader friendly"

10 years agoMerge "mw.loader.store: temporarily allow users to opt-in via cookie"
jenkins-bot [Wed, 30 Oct 2013 23:26:15 +0000 (23:26 +0000)]
Merge "mw.loader.store: temporarily allow users to opt-in via cookie"

10 years agoMerge "Adding description how to use Special:Redirect"
Adamw [Wed, 30 Oct 2013 22:56:18 +0000 (22:56 +0000)]
Merge "Adding description how to use Special:Redirect"

10 years agomw.loader.store: temporarily allow users to opt-in via cookie
Ori Livneh [Wed, 30 Oct 2013 22:23:48 +0000 (15:23 -0700)]
mw.loader.store: temporarily allow users to opt-in via cookie

To facilitate mw.loader.store testing on production wikis, it would be good to
allow developers and JavaScript-savvy users to opt-in for mw.loader.store
testing by manually setting a cookie in their browser. With this patch in
place, this would be possible to do by executing the following statement in a
debug console:

    $.cookie( 'ResourceLoaderStorageEnabled', 1, { expires: 7, path: '/' } );

This will be removed from mediawiki.js (long) before the 1.23 release.

Bug: 56397
Change-Id: I51cfd563734a3aeed3667fbb19bf3be40fabbb6b

10 years agoexception: Use MWExceptionHandler::logException in more places
Timo Tijhof [Fri, 11 Oct 2013 19:22:40 +0000 (21:22 +0200)]
exception: Use MWExceptionHandler::logException in more places

Most code replaced wasn't exactly like what logException does
but most probably should be.

A few implementation differences with the code it replaced in
various places:

* MWException if-guards
  Was there only to prevent a crash because getLogMessage is an
  MWException method. Now that logException is generic, it seems
  sensible to start logging those as well (follows-up a97f3550a0).

* Exception::getTraceAsString
  Now using MWExceptionHandler::formatRedactedTrace instead.
  It wasn't using it because that method didn't exist yet.

Notes:

* DatabaseError::getLogMessage
  Removed as this override was no longer doing anything (we're using
  MWExceptionHandler::getLogMessage instead of $e->getLogMessage).
  Introduced isLoggable() to take over the responsibility of indicating
  when an exception should not be logged (follows-up bcb9f9e1c0d).

* DeferredUpdates and Wiki.php
  Both specificy MWException. Though ApiMain intends to catch all
  and only logged MWException because it couldn't otherwise, these
  actually only catch MWException (as opposed to catching all and
  having an if-statement inside). Left those as-is to have them
  continue propagate other exceptions.

* JobQueueFederated and JobQueueGroup
  All specify to catch JobQueueError only.
  Not sure whether it should catch other exceptions. It now can,
  but I'll leave it as is in case it intends to have those be
  handled elsewhere (or fatal).

Change-Id: I4578a0fe7d95a080f1a3b292ce7ae73a4d5fcaca

10 years agoMerge "Wrap up remaining legacy javascript (IEFixes, wikibits)"
jenkins-bot [Wed, 30 Oct 2013 22:15:32 +0000 (22:15 +0000)]
Merge "Wrap up remaining legacy javascript (IEFixes, wikibits)"

10 years agoMerge "Exception: Clean up html document for error pages"
jenkins-bot [Wed, 30 Oct 2013 21:57:43 +0000 (21:57 +0000)]
Merge "Exception: Clean up html document for error pages"

10 years agoException: Clean up html document for error pages
Timo Tijhof [Thu, 19 Sep 2013 16:22:51 +0000 (18:22 +0200)]
Exception: Clean up html document for error pages

Interface:
* Restore sitename as part of error page document title
  (follows-up 4ca9805). Moved to general Exception class as it
  is useful in general, this effectively changes the title from
  "This wiki has a problem" to "Internal error - Wikipedia".
* Added basic <style> to have it use a sans-serif font and a bit
  padding to offset it from the edge of the window.
* Output stacktrace in <pre> as-is (with linebreaks) instead of
  in a <p> with <br/>.

Clean up:
* Removed spurious "<!-- SiteSearch Google -->" comment.
* Change sitesearch radio button to not need the id/for
  attributes but simply nest them. Visual rendering and browser
  behaviour is identical.
* Renamed $text to $html since that is what it is (follows-up
  4ca9805 which reused that variable for html, it used to contain
  text).
* Remove odd linebreak from "dberr-problems" message, it was
  being output as-is in the html (html escaped, of course) and
  line breaks have no meaning inside an <h1> tag. Using a simple
  space instead. Visual rendering is identical.

Coding style:
* Using <!DOCTYPE html> instead of <!doctype html> for consistency
  with other documents we output.
* Switched a few inline #-style comments to use // instead.
* Switched a few strings from double quotes to single quotes in
  areas close to the changed code.

Change-Id: I33232d871200cbd23501c9a6c5f8a178931e135e

10 years agoMerge "vector: Restore gray search input placeholder"
jenkins-bot [Wed, 30 Oct 2013 21:33:51 +0000 (21:33 +0000)]
Merge "vector: Restore gray search input placeholder"

10 years agoVector: Remove media=screen from skins.vector.beta module
Timo Tijhof [Wed, 30 Oct 2013 20:25:31 +0000 (21:25 +0100)]
Vector: Remove media=screen from skins.vector.beta module

Follows-up 8b6ed4d

Change-Id: Iee20d5003470b794e288c0e40842696b2b6dccb0

10 years agoLocalisation updates from http://translatewiki.net.
Translation updater bot [Wed, 30 Oct 2013 19:34:17 +0000 (19:34 +0000)]
Localisation updates from translatewiki.net.

Change-Id: I525f42a0ea16e63b7c03c16b4cefd043dec51aeb

10 years agoRenamed "Your name" to "Your username" to match with the Media wiki login page
Tony Thomas [Wed, 30 Oct 2013 19:10:51 +0000 (19:10 +0000)]
Renamed "Your name" to "Your username" to match with the Media wiki login page

Bug: 56235
Change-Id: Id7d303932b3ddf74308e2d9f3b54e08c6b1df5eb

10 years agoMerge "Add tests for DifferenceEngine for revision loading"
jenkins-bot [Wed, 30 Oct 2013 15:52:20 +0000 (15:52 +0000)]
Merge "Add tests for DifferenceEngine for revision loading"

10 years agoAdd tests for DifferenceEngine for revision loading
aude [Tue, 29 Oct 2013 11:06:11 +0000 (11:06 +0000)]
Add tests for DifferenceEngine for revision loading

Change-Id: Ia206b396e96b52ba9ac4895aae0f2839dca6f958

10 years agoMerge "Remove linkprefix message, add $linkPrefixCharset"
jenkins-bot [Wed, 30 Oct 2013 15:12:39 +0000 (15:12 +0000)]
Merge "Remove linkprefix message, add $linkPrefixCharset"

10 years agoWrap up remaining legacy javascript (IEFixes, wikibits)
Timo Tijhof [Tue, 22 Oct 2013 22:22:39 +0000 (00:22 +0200)]
Wrap up remaining legacy javascript (IEFixes, wikibits)

IEFixes:

* Take String.prototype.hasClass off the prototype and into
  a local function.

* Removed module definition "mediawiki.legacy.IEFixes" as it
  is not used anywhere (only pollutes the startup module and
  gives a false impression that its dependencies are indeed
  properly being enforced). The file is loaded raw from
  wikibits.js if isIE6 is true.

wikibits:

* Re-ordered to group related methods together.
* Moved up wgBreakFrames so we don't waste any time running
  code if we'll break the frame anyway.
* All properties that haven't been removed to this date are now
  wrapped in mw.log.deprecate.
  - Replaced most with dummy values of the same type.
  - Kept a few ones around to make highly popular method still
    work (such as addOnloadHook).
  - Kept the importScript family of functions unwrapped for now
    as those don't have a proper replacement until users can
    create modules (bug 34958). Though we could promote these to
    mw.util or mw.loader, that would not solve anything and only
    require scripts to be changed again in the future. Can be kept
    as-is for now and is not yet formerly deprecated.
* Created a local reference to the "window" global as it is
  referenced quite often here.

Change-Id: Iab65de1a0a87abad38b834828cd838dfd1c48ba1

10 years agowfShellExec: Work around PHP 5.3 stream_select() issue
Kevin Israel [Wed, 30 Oct 2013 01:46:27 +0000 (21:46 -0400)]
wfShellExec: Work around PHP 5.3 stream_select() issue

Follows-up e53af95c9301ca092ffa1f7de022beb24d60ea52.

Bug: 56360
Change-Id: I66f2dc8a2f43236799c23f6e25bbbd0a440f4283

10 years agoMerge "mw.loader.store: do one eval per batch, rather than one per module"
jenkins-bot [Tue, 29 Oct 2013 23:55:34 +0000 (23:55 +0000)]
Merge "mw.loader.store: do one eval per batch, rather than one per module"

10 years agoRemove linkprefix message, add $linkPrefixCharset
Brad Jorsch [Wed, 23 Oct 2013 18:06:19 +0000 (14:06 -0400)]
Remove linkprefix message, add $linkPrefixCharset

The existing "linkprefix" message is unlikely to be accurately
customized by message translators (as shown by the fact that, of the 10
distinct customizations prior to Iaa7eaa44 (which made them even more
complicated), 3 were broken or entirely ineffective, 1 was half
ineffective, and 2 more seem to have included the Latin-1 Supplement by
accident) or by local wiki admins. So, like linktrail before it, let's
move it out of the system messages and into a separate language
variable.

At the same time, let's make it a simple character set (like
$wgLegalTitleChars) rather than a complicated regular expression. The
complicated regex now lives in the parser.

This also adjusts the output of the API's action=query&meta=siteinfo and
adds an accessor parallel to the linkTrail accessor to Language.

Note the following changes that are not simply extracting the existing
charset from the linkprefix message for $linkPrefixCharset:
* The En message matched all non-ASCII UTF-8 characters by matching the
  component bytes (\\x80-\\xff). The new character set is equivalent.
* Various languages were identical to En and so have no $linkPrefixCharset
  set. These are: Ary Az Ce Ga Id Ka Kiu Km Ltg Mk Ms Ne Nn Ro Roa_tara Sc Si
  Sr_ec Sr_el Tl Tt_cyrl Tt_latn Ug_arab War
* Cu, Uk, and Udm are changed to match any number of „ or « in the prefix.
* Cv tried to include "«" that was redundant to the range \\x80-\\xff
  (see En comment). This was removed.
* Diq was entirely bogus, and so was removed.
* Gu included many additional UTF-8 characters that are redundant to the
  range \\x80-\\xff (see En comment). These were removed, and the
  resulting character set is equivalent to En.
* Mt has been broken since it was introduced in r37242. The charset used is
  equivalent to the broken regex.

Bug: 56031
Change-Id: I3369851b33113fc118a1bace38f3ac310cdd9725

10 years agoMerge "Improve logging for wfShellExec() and ignore missing cgroup"
jenkins-bot [Tue, 29 Oct 2013 22:42:17 +0000 (22:42 +0000)]
Merge "Improve logging for wfShellExec() and ignore missing cgroup"

10 years agomw.loader.store: do one eval per batch, rather than one per module
Ori Livneh [Tue, 29 Oct 2013 08:35:05 +0000 (01:35 -0700)]
mw.loader.store: do one eval per batch, rather than one per module

Concatenating module implementations and calling $.globalEval on the result is
reproducibly faster for me than calling $.globalEval for each module.

Change-Id: I70e5bcedb43cd1331720a8e5e6c52cfeabb41ab7

10 years agoMerge "Rewrite Vector's special.preferences.less with LESS nesting"
jenkins-bot [Tue, 29 Oct 2013 21:29:06 +0000 (21:29 +0000)]
Merge "Rewrite Vector's special.preferences.less with LESS nesting"

10 years agoRewrite Vector's special.preferences.less with LESS nesting
jrobson [Wed, 16 Oct 2013 18:43:23 +0000 (11:43 -0700)]
Rewrite Vector's special.preferences.less with LESS nesting

Take advantage of LESS syntax to make this file more readable.

Change-Id: I8e77cd181a0b57a74aaac7c4dd45674bc3869ff3

10 years agoMerge "Move Vector's preferences css out of screen.less"
jenkins-bot [Tue, 29 Oct 2013 21:17:03 +0000 (21:17 +0000)]
Merge "Move Vector's preferences css out of screen.less"

10 years agoMove Vector's preferences css out of screen.less
jrobson [Wed, 16 Oct 2013 17:56:34 +0000 (10:56 -0700)]
Move Vector's preferences css out of screen.less

* Move the preferences styling out of screen.less,
  no need to penalise all our users with it.
* Limited to Vector skin for time being as other skins do not play nicely
  with these styles.

Change-Id: I121b3d88945d994c9e30d96bab7548c839510276

10 years agoMerge "Add language handling to imageinfo/extmetadata API"
jenkins-bot [Tue, 29 Oct 2013 18:33:32 +0000 (18:33 +0000)]
Merge "Add language handling to imageinfo/extmetadata API"

10 years agoMerge "Add extmetadata to the ForeignAPIFile iiprops"
jenkins-bot [Tue, 29 Oct 2013 18:32:53 +0000 (18:32 +0000)]
Merge "Add extmetadata to the ForeignAPIFile iiprops"

10 years agoMerge "Add "extended" file metadata to API"
jenkins-bot [Tue, 29 Oct 2013 18:29:32 +0000 (18:29 +0000)]
Merge "Add "extended" file metadata to API"

10 years agoMerge "Make FormatMetadata accept RequestContext, instead of hard coding $wgLang."
jenkins-bot [Tue, 29 Oct 2013 18:25:57 +0000 (18:25 +0000)]
Merge "Make FormatMetadata accept RequestContext, instead of hard coding $wgLang."

10 years agoMerge "Add an interface for getting "standard" file metadata."
jenkins-bot [Tue, 29 Oct 2013 18:23:10 +0000 (18:23 +0000)]
Merge "Add an interface for getting "standard" file metadata."

10 years agoAdd language handling to imageinfo/extmetadata API
tgr [Mon, 28 Oct 2013 18:18:05 +0000 (18:18 +0000)]
Add language handling to imageinfo/extmetadata API

Adds options to return metadata in all available languages, or in
a single selected language.

Change-Id: I78f096318904a08abd317a5ed3f74ee33d3289cb

10 years agoAdd extmetadata to the ForeignAPIFile iiprops
Mark Holmquist [Wed, 9 Oct 2013 22:14:52 +0000 (15:14 -0700)]
Add extmetadata to the ForeignAPIFile iiprops

Also clean up iiprop handling in ForeignAPIRepo.

Change-Id: I4a1b46669658cc7b7d074f8fb85dd172e6c45633

10 years agoAdd "extended" file metadata to API
Brian Wolff [Mon, 12 Aug 2013 16:18:29 +0000 (13:18 -0300)]
Add "extended" file metadata to API

Part of the point of this, is to add a hook to allow extensions to add
their own metadata (I intend to create a companion extension to parse
Commons description pages - I5e6bc45f9751)

It's hoped that this would provide a simple system to get file metadata,
and would be able to return information on any wiki (even without any
extensions installed to provide additional information). So it could
fallback to exif data, if there's no better source of information for
the file available. It's also meant to be done in such a way that, in
the future, when Wikibase is deployed on Commons, it could be integrated
without too much fuss.

marktraceur changed this patch to be a little less heavy-handed: it will
now return unformatted data by default from the API, but there's also a
method for formatting that data in the way that bawolff originally
intended. I'm still trying to figure out if there's much use in that
method, but for now it's not particularly useful.

Change-Id: I77303d8e535fc1c42e14cfb853814e5c434a81ec

10 years agoMake FormatMetadata accept RequestContext, instead of hard coding $wgLang.
Brian Wolff [Wed, 7 Aug 2013 23:03:34 +0000 (20:03 -0300)]
Make FormatMetadata accept RequestContext, instead of hard coding $wgLang.

The point of this patch is to allow someone to use this class
to get the metadata formatted in the language of their choice
(by passing in an appropriate context object), instead of
forcing $wgLang. This is important for future evil plans I
have.

To do this, some of the previous static methods were changed
to non-static. I checked and fixed all users of such methods
(including extensions). Some of the implied private methods
were also explicitly marked as such.

Change-Id: I673d99fa36280d1baf14c150f4aaff039676830a

10 years agoAdd an interface for getting "standard" file metadata.
Brian Wolff [Wed, 28 Aug 2013 23:09:07 +0000 (17:09 -0600)]
Add an interface for getting "standard" file metadata.

Currently file metadata is handler dependant. However they usually
end up extracting the same type of data (author, date, etc) plus
one or two handler specific things. This adds a handler independent
interface for getting metadata that is likely to be common for all
types of file (At the moment, this is the exif/iptc/xmp information)

This commit used to also contain stuff adding parser functions,
which is now split to its own commit. This commit is needed
by a bunch of other commits, in particular I0d957891e0.

Change-Id: I43d9252f69dc5b8ba0b848cf40aa1b97329c85ae

10 years agoUploadStash::removeFileNoAuth shouldn't need auth
Brad Jorsch [Tue, 29 Oct 2013 15:56:35 +0000 (11:56 -0400)]
UploadStash::removeFileNoAuth shouldn't need auth

UploadStash::getFile has a "noAuth" parameter, which should be set true
when this is called from UploadStash::removeFileNoAuth.

Callers should already be doing their own auth checking, or calling
UploadStash::removeFile.

Bug: 56298
Change-Id: Ic70c4e2bc6df5cb9b139a3631766f8ff0ec4ef02

10 years agoMerge "mediawiki.js: Fix docucumentation breakage"
jenkins-bot [Tue, 29 Oct 2013 09:42:05 +0000 (09:42 +0000)]
Merge "mediawiki.js: Fix docucumentation breakage"

10 years agoMerge "Backport information boxes' styles from vforms to shared CSS"
jenkins-bot [Tue, 29 Oct 2013 09:26:02 +0000 (09:26 +0000)]
Merge "Backport information boxes' styles from vforms to shared CSS"

10 years agoAdding description how to use Special:Redirect
Marco Falke [Mon, 30 Sep 2013 20:55:32 +0000 (22:55 +0200)]
Adding description how to use Special:Redirect

A description, how to use this, is essential and should be right in the 'redirect-summary'.

Using actual UserID and RevisionID to make examples more realistic. Also localization of "Special:Redirect".

GitHub: https://github.com/wikimedia/mediawiki-core/pull/11
Change-Id: I02d0150d7eec4ca5ad8db9b59b5478801f28e840

10 years agoMerge "Revert .htaccess permissions back to 0644"
jenkins-bot [Tue, 29 Oct 2013 07:20:09 +0000 (07:20 +0000)]
Merge "Revert .htaccess permissions back to 0644"

10 years agoRemove poorly-phrased doc comment and the FIXME which went with it
Tim Starling [Wed, 23 Oct 2013 05:58:29 +0000 (16:58 +1100)]
Remove poorly-phrased doc comment and the FIXME which went with it

Change-Id: I82994ba8f92322b420b4a3fed40d5d579b06a6d2

10 years agoFix double space in trigger_error() call
Reedy [Tue, 29 Oct 2013 01:24:26 +0000 (01:24 +0000)]
Fix double space in trigger_error() call

Change-Id: I31b0aab630bf4083f4fa15d3fbce8a0d0759c94e

10 years agomediawiki.js: Fix docucumentation breakage
Timo Tijhof [Tue, 29 Oct 2013 00:30:29 +0000 (01:30 +0100)]
mediawiki.js: Fix docucumentation breakage

* Unformatted code and unclosed <media> tag.
  Depending on which versions of other libs are installed, this
  error can occur. Current version (v4.x) in production doesn't
  require this yet. But local environment with the same version
  does. And the next version of jsduck (v5.x) will consistently
  work this way for compliance with Markdown.

* Simplified @link while at it to use the cleaner implied link
  instead like we do elsewhere ({@link} should rarely be
  used directly).

* Add /** @class */ because half the file was no longer indexed
  as part of mw (instead became part of mw.Message after 4f23099)

* Index the private mw#log as log_ instead because it clashes
  with the public mw#log. This should've clashed in 4f23099, but
  didn't because the other one was seen as part of mw.Message
  by the test.

Change-Id: Ic5b8c5c743ecdb1509652c3655d83e501f6fa9ee

10 years agoMerge "Cache ResourceLoader modules in localStorage"
jenkins-bot [Tue, 29 Oct 2013 00:13:09 +0000 (00:13 +0000)]
Merge "Cache ResourceLoader modules in localStorage"

10 years agoFix populateRevisionLength.php so it's not trying to select revision
Reedy [Mon, 28 Oct 2013 22:08:50 +0000 (22:08 +0000)]
Fix populateRevisionLength.php so it's not trying to select revision
fields from the archive table (they won't exist!)

Follows up https://gerrit.wikimedia.org/r/#/c/54111/

Change-Id: Ie161a08097a2cd3393d69574263cfe78e4329bb4

10 years agoMinor optimization to the AutoLoader
Adam Roses Wight [Sun, 27 Oct 2013 05:59:01 +0000 (22:59 -0700)]
Minor optimization to the AutoLoader

When MediaWiki autoloading fails, we should gracefully return false.
Instead, we have been calling strtolower roughly 1,000 times in the hope
of finding a case-insensitive match.

This patch preserves the legacy case-insensitivity, but improves its
performance by approximately 100x, by storing the case-insensitive class
lookups as a static variable.

There is a new global $wgAutoloadAttemptLowercase which will switch the
behavior if desired.  The default is to support case-insensitive loading.

Change-Id: Ifb12e05614a48390b730167e9d4ddcd8545db764

10 years agoMerge "installer: Run the LESS compiler for *.less files"
MarkAHershberger [Mon, 28 Oct 2013 21:39:31 +0000 (21:39 +0000)]
Merge "installer: Run the LESS compiler for *.less files"

10 years agoRevert .htaccess permissions back to 0644
Erik Bernhardson [Mon, 28 Oct 2013 21:38:07 +0000 (14:38 -0700)]
Revert .htaccess permissions back to 0644

Change Id6916fe999c0faa38de878b7b5687e7ea00901bd accidently
changed the permissions on this file, changing it back.

Change-Id: I14b68b066ed16b2221f4be52172ad7b32b86a61f

10 years agoCache ResourceLoader modules in localStorage
Ori Livneh [Tue, 1 Oct 2013 15:52:43 +0000 (08:52 -0700)]
Cache ResourceLoader modules in localStorage

To minimize the number of discrete requests that the browser has to make in
order to render the page, ResourceLoader tries to condense as many modules as
possible into each request. To ensure that the response is not stale,
ResourceLoader tacks the modification time of the most recently modified module
to the request. This behavior makes poor use of locality: an update to a single
module will change the URL that is used to retrieve it and a number of
unrelated modules, causing those modules to be re-retrieved even though they
have not changed since they were last retrieved. This is because the browser
cache is not aware that the response from load.php is a composite of modules
that should be versioned separately.

This patch adds mw.loader.store. On browsers that implement the localStorage
API, the module store serves as a smart complement to the browser cache. Unlike
the browser cache, the module store can slice a concatenated response from
ResourceLoader into its constituent modules and cache each of them separately,
using each module's versioning scheme to determine when the cache should be
invalidated.

Because the localStorage API is synchronous and slower than memory access,
modules are cached as a single JSON blob. At the beginning of the page load
process, the entire blob is loaded from storage into memory. During the load
process, any required modules that are not in the store are fetched from the
server and set in the in-memory store. When the DOM is complete, the store is
synced back to localStorage in a single operation.

* NOTE: The module store is enabled only if $wgResourceLoaderStorageEnabled is
  set to true; it is false by default. We can change the default if / when we
  establish conclusively that the feature is beneficial and stable.

Change-Id: If2ad2d80db2336fb447817f5c56599667141ec66

10 years agoImprove logging for wfShellExec() and ignore missing cgroup
Tim Starling [Tue, 22 Oct 2013 01:16:14 +0000 (12:16 +1100)]
Improve logging for wfShellExec() and ignore missing cgroup

Allow limit.sh to log its errors to an MW debug log channel, by opening
a separate FD for private communication.

Ensure that the log FD is always closed (3>&-) before executing a
subprocess, so that MW will not hang waiting for background processes
to close the log FD. This means using a fixed FD number, since the bash
syntax for closing a file requires a literal FD number.

The "exec" debug channel is now intended for production monitoring. In
addition to errors from limit.sh, it also records when a subprocess is
terminated by a signal.

The case where stream_select() returns false was tested by patching PHP
to inject EINTR or EBADF into errno.

When wfShellExec() is used with a memory cgroup, and the cgroup is missing, log and continue with no cgroup instead of immediately exiting.

Bug: 55709
Change-Id: Ie40befe9c0d00c9a0ddb01077df4afb774d17e15

10 years agoLocalisation updates from http://translatewiki.net.
Translation updater bot [Mon, 28 Oct 2013 20:11:03 +0000 (20:11 +0000)]
Localisation updates from translatewiki.net.

Change-Id: If1d555c052dbfacd3f5af202ebb9234346005c09

10 years agoAdd clarification to wfUseMW() phpdoc
Bryan Davis [Mon, 28 Oct 2013 19:48:53 +0000 (13:48 -0600)]
Add clarification to wfUseMW() phpdoc

While reviewing Ia5a7661c I happened to stumble in to the dark labyrinth
of PHP's version_compare() function. This comment attempts to leave
bread crumbs behind for the next unwary adventurer who stumbles into the
same damp cave.

The tricky bit is that when '1.22wmf22' is compared with '1.22'
internally it is as though you are comparing '1.22.wmf.22' with
'1.22.0.0'. By the component-wise comparison then performed 'wmf' is
considered the lowest priority value that could be in the third
position. When using '1.22c' for the required version the 'c' is given
the same lowest priority as 'wmf'.

Change-Id: I58aeb8dc6b1ff31897d72eb44904d96487ad3653

10 years agoAdd correct font color override to beta variables
jrobson [Mon, 28 Oct 2013 18:59:05 +0000 (11:59 -0700)]
Add correct font color override to beta variables

Note that originally the font color was specified incorrectly in
variables.less (fixed in I118215e7578e8af94a6909988620dcf04805d14a)

This restores the color to how it should be in beta
Also rename variable as the name is very misleading - it only applies
to the content

Change-Id: Iff397075ef4d11b6f815d8a596ed249d2708398a

10 years agoUpdate populateRevisionLength maintenance script to populate archive.ar_len
Reedy [Sat, 16 Mar 2013 01:37:27 +0000 (01:37 +0000)]
Update populateRevisionLength maintenance script to populate archive.ar_len

Bug: 24538
Change-Id: I0f685aa5ea48468279475b487a627ff73c70d5cd

10 years agoMerge "vector: Restore @body-font-color to black"
jenkins-bot [Mon, 28 Oct 2013 18:39:12 +0000 (18:39 +0000)]
Merge "vector: Restore @body-font-color to black"

10 years agoMerge "Revert "Revert "Add new recentchanges field rc_source to replace rc_type"""
jenkins-bot [Mon, 28 Oct 2013 17:53:55 +0000 (17:53 +0000)]
Merge "Revert "Revert "Add new recentchanges field rc_source to replace rc_type"""

10 years agoMerge "Remove unneeded methods in tests"
jenkins-bot [Mon, 28 Oct 2013 16:55:41 +0000 (16:55 +0000)]
Merge "Remove unneeded methods in tests"

10 years agoRemove unneeded methods in tests
addshore [Fri, 25 Oct 2013 09:30:44 +0000 (10:30 +0100)]
Remove unneeded methods in tests

Change-Id: Ia2da4027f2cc4a3aaff02695bab35de32a33ed60

10 years agovector: Restore gray search input placeholder
Bartosz Dziewoński [Sun, 27 Oct 2013 19:44:15 +0000 (20:44 +0100)]
vector: Restore gray search input placeholder

Broken in I1d9657a5.

Bug: 54069
Change-Id: I2d86d75dd023eda349fc9fe69416e9682201eeb3

10 years agoMerge "Fix typo in usage of mwjsduck-gen"
jenkins-bot [Mon, 28 Oct 2013 11:34:39 +0000 (11:34 +0000)]
Merge "Fix typo in usage of mwjsduck-gen"

10 years agoFix typo in doc comment for Message.prototype#toString
Ori Livneh [Mon, 28 Oct 2013 10:43:46 +0000 (03:43 -0700)]
Fix typo in doc comment for Message.prototype#toString

"it's string form" => "its string form".

Change-Id: I867283c5333aa17dd146c19684c1959e0de2a1ca

10 years agoFix typo in usage of mwjsduck-gen
Bartosz Dziewoński [Mon, 28 Oct 2013 10:37:16 +0000 (11:37 +0100)]
Fix typo in usage of mwjsduck-gen

Change-Id: Ib249c42d77059b18f8d6172599c631d5e1483c5d

10 years agoMerge "mediawiki.Title: Generalise filename-matching in newFromImg"
jenkins-bot [Mon, 28 Oct 2013 09:53:31 +0000 (09:53 +0000)]
Merge "mediawiki.Title: Generalise filename-matching in newFromImg"

10 years agomediawiki.Title: Generalise filename-matching in newFromImg
jarry1250 [Mon, 21 Oct 2013 19:44:38 +0000 (20:44 +0100)]
mediawiki.Title: Generalise filename-matching in newFromImg

Both core and extensions can (and do) modify the thumbnail string
e.g. to add page numbers, languages, etc.

As bawolff notes in the commentary to bug 55963, the assumption
that the filename itself appears twice is likely to be violated
from time to time, but for the moment it suffices to fix the
apparent regression described in that bug report.

Also includes some additional test cases.

Bug: 55963
Change-Id: I9bb29a24f9bf50924699b913e31f44689906c525

10 years agoMerge "Improve wording of eauthentsent message for email confirmation"
jenkins-bot [Mon, 28 Oct 2013 08:22:05 +0000 (08:22 +0000)]
Merge "Improve wording of eauthentsent message for email confirmation"

10 years agoImprove wording of eauthentsent message for email confirmation
aude [Sun, 27 Oct 2013 20:46:59 +0000 (20:46 +0000)]
Improve wording of eauthentsent message for email confirmation

eauthentsent message is used on Special:ChangeEmail confirmation page.

Change-Id: I34455b1452b670f5d1dcf58982d52326731c519d

10 years agoMerge "Localisation updates from http://translatewiki.net."
Translation updater bot [Sun, 27 Oct 2013 20:25:55 +0000 (20:25 +0000)]
Merge "Localisation updates from translatewiki.net."

10 years agoMerge "Set relevant User on Special:Unblock"
jenkins-bot [Sun, 27 Oct 2013 20:20:42 +0000 (20:20 +0000)]
Merge "Set relevant User on Special:Unblock"

10 years agoMerge "API: Remove leading/trailing spaces from error and description text"
jenkins-bot [Sun, 27 Oct 2013 20:16:08 +0000 (20:16 +0000)]
Merge "API: Remove leading/trailing spaces from error and description text"

10 years agoLocalisation updates from http://translatewiki.net.
Translation updater bot [Sun, 27 Oct 2013 19:59:56 +0000 (19:59 +0000)]
Localisation updates from translatewiki.net.

Change-Id: Ibf8e46c56d36a83f4c0bc225e34839a8c6e832d6

10 years agoCorrectly update wl_notificationtimestamp when viewing old revisions
Bartosz Dziewoński [Mon, 16 Sep 2013 10:31:40 +0000 (12:31 +0200)]
Correctly update wl_notificationtimestamp when viewing old revisions

== Prelude ==
wl_notificationtimestamp controls sending the user e-mail
notifications about changes to pages, as well as showing the "updated
since last visit" markers on history pages, recent changes and
watchlist.

== The bug ==
Previously, on every view of a page, the notification timestamp was
cleared, regardless of whether the user as actually viewing the latest
revision. When viewing a diff, however, the timestamp was cleared only
if one of the revisions being compared was the latest one of its page.

The same behavior applied to talk page message indicators (which are
actually stored sepately to cater to anonymous users).

This was inconsistent and surprising when one was attempting to, say,
go through the 50 new posts to a discussion page in a peacemeal
fashion.

== The fix ==
If the revision being viewed is the latest (or can't be determined),
the timestamp is cleared as previously, as this is necessary to
reenable e-mail notifications for given user and page.

If the revision isn't the latest, the timestamp is updated to
revision's timestamp plus one second. This uses up to two simple
(selectField) indexed queries per page view, only fired when we
do not already know we're looking at the latest version.

Talk page indicator is updated to point at the next revision after the
one being viewed, or cleared if viewing the latest revision. The
UserClearNewTalkNotification hook gained $oldid as the second argument
(a backwards-compatible change). In Skin, we no longer ignore the
indicator being present if we're viewing the talk page, as it might
still be valid.

== The bonus ==
Comments and formatting was updated in a few places, including
tables.sql and Wiki.php.

The following functions gained a second, optional $oldid parameter
(holy indirection, Batman!):
* WikiPage#doViewUpdates()
* User#clearNotification()
* WatchedItem#resetNotificationTimestamp()

DifferenceEngine gained a public method mapDiffPrevNext() used
to parse the ids from URL parameters like oldid=12345&diff=prev,
factored out of loadRevisionIds(). A bug where the NewDifferenceEngine
hook would not be called in some cases, dating back to its
introduction in r45518, was fixed in the process.

Bug: 41759
Change-Id: I4144ba1987b8d7a7e8b24f4f067eedac2ae44459

10 years agoAPI: Remove leading/trailing spaces from error and description text
umherirrender [Sun, 27 Oct 2013 16:24:15 +0000 (17:24 +0100)]
API: Remove leading/trailing spaces from error and description text

Change-Id: Id866c7258a297fe965a64d52e3458d53e140aa4c

10 years agoLocalisation updates from http://translatewiki.net.
Translation updater bot [Sat, 26 Oct 2013 19:23:07 +0000 (19:23 +0000)]
Localisation updates from translatewiki.net.

Change-Id: I5b8bcbcdd7538ba9856dff1c60502f6fa93a0116

10 years agovector: Restore @body-font-color to black
Bartosz Dziewoński [Sat, 26 Oct 2013 11:04:31 +0000 (13:04 +0200)]
vector: Restore @body-font-color to black

Changed in Ica0b69ad, I presume accidentally.

https://en.wikipedia.org/w/?oldid=578807552#Font_color_of_article_text

Change-Id: I118215e7578e8af94a6909988620dcf04805d14a

10 years agoTest for Status::hasMessage
Kunal Mehta [Sat, 26 Oct 2013 00:52:46 +0000 (17:52 -0700)]
Test for Status::hasMessage

Change-Id: I080e006fa6a7d8ad68bdf827c4bab7d0ea160230

10 years agoMerge "FormatJson: Remove whitespace from empty arrays and objects"
jenkins-bot [Fri, 25 Oct 2013 22:33:12 +0000 (22:33 +0000)]
Merge "FormatJson: Remove whitespace from empty arrays and objects"

10 years agoMerge "Add HTML ID to tag filter input"
jenkins-bot [Fri, 25 Oct 2013 20:40:47 +0000 (20:40 +0000)]
Merge "Add HTML ID to tag filter input"

10 years agoAdd HTML ID to tag filter input
Kunal Mehta [Fri, 25 Oct 2013 20:30:00 +0000 (13:30 -0700)]
Add HTML ID to tag filter input

Makes it so if you click "Tag filter" the input box is
now focused.

Bug: 56175
Change-Id: I502f86f227bc0d1cc5ea936d9047bc51d169323a

10 years agoMerge "Distinguish redactions from the string "REDACTED" in formatRedactedTrace"
jenkins-bot [Fri, 25 Oct 2013 20:27:01 +0000 (20:27 +0000)]
Merge "Distinguish redactions from the string "REDACTED" in formatRedactedTrace"