lhc/web/wiklou.git
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 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 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"

10 years agoMerge "Fix Tidy quietly breaking TOC disabling"
jenkins-bot [Fri, 25 Oct 2013 19:44:11 +0000 (19:44 +0000)]
Merge "Fix Tidy quietly breaking TOC disabling"

10 years agoMerge changes I61f10917,Id5b9872e
jenkins-bot [Fri, 25 Oct 2013 19:38:15 +0000 (19:38 +0000)]
Merge changes I61f10917,Id5b9872e

* changes:
  mw.loader: Always log exceptions caught from userland callbacks
  mediawiki.js: Handle error better in log() and move out of mw.loader

10 years agomw.loader: Always log exceptions caught from userland callbacks
Timo Tijhof [Fri, 25 Oct 2013 19:15:00 +0000 (21:15 +0200)]
mw.loader: Always log exceptions caught from userland callbacks

We usually don't catch these at all (not supposed to, as they're
foreign). But in case of handlePending() we catch them because
we need to ensure the state is kept track of properly (an error
is never final in javascript since execution always continues).

However we should at least log it in that case. We already did this
in case of the error() callback, it now does this for the ready()
callback as well.

Bug: 55989
Change-Id: I61f109178833fed60fbba7725fd47b4ff3d2edf4

10 years agoFix Tidy quietly breaking TOC disabling
Max Semenik [Fri, 25 Oct 2013 18:02:11 +0000 (22:02 +0400)]
Fix Tidy quietly breaking TOC disabling

The functionality was introduced in I2889bcb9
but doesn't work in presence if Tidy.

Change-Id: Ibf96cc3bc94fac75fd92ec5b9205011fcb68f0c2

10 years agomediawiki.js: Handle error better in log() and move out of mw.loader
Timo Tijhof [Fri, 25 Oct 2013 18:45:46 +0000 (20:45 +0200)]
mediawiki.js: Handle error better in log() and move out of mw.loader

console.error (in Chrome dev tools) takes an Error object. It
renders the stack trace nicely (incl. dynamic references to files)
but doesn't stringify the exception itself. It renders it as an
object (eg. no "{}" instead of "TypeError: Foo bar").

Some of the callers were embedding e.message manually. That was
better though, that still omitted the class (eg. "TypeError").
Error#toString composes the full message incl. class name prefix.

Change-Id: Id5b9872e2050326ab83889e3a806d015ec2ff3eb

10 years agoLocalisation updates from http://translatewiki.net.
Translation updater bot [Fri, 25 Oct 2013 18:51:18 +0000 (18:51 +0000)]
Localisation updates from translatewiki.net.

Change-Id: I7d0ca25613dd2eb49dde2fb1cba56e24458ff442

10 years agoDistinguish redactions from the string "REDACTED" in formatRedactedTrace
Brad Jorsch [Fri, 25 Oct 2013 14:57:11 +0000 (10:57 -0400)]
Distinguish redactions from the string "REDACTED" in formatRedactedTrace

In the output of MWExceptionHandler::formatRedactedTrace, it is not
possible to determine (without checking the configuration) whether arg 0
in "foo('REDACTED')" was redacted or was merely passed the string
"REDACTED".

This patch changes redaction to instead output "foo(REDACTED)" in the
case of redaction. This parallels the situation with arrays and objects,
where for example "foo(Array)" was passed an array while "foo('Array')"
was passed the string "Array".

Change-Id: Ia2a761687c69b630afa3ccd8668b06b28e3ecdd3

10 years agoReplace php_sapi_name() with PHP_SAPI
Reedy [Fri, 25 Oct 2013 12:57:26 +0000 (13:57 +0100)]
Replace php_sapi_name() with PHP_SAPI

Change-Id: I222789cacaa2653c4dac62708ce228674c90af4c

10 years agoMerge "Fixed use of wrong callback array element"
jenkins-bot [Fri, 25 Oct 2013 11:18:12 +0000 (11:18 +0000)]
Merge "Fixed use of wrong callback array element"

10 years agoMerge "Use i18n instead of hardcoded brackets and spaces"
jenkins-bot [Fri, 25 Oct 2013 09:00:29 +0000 (09:00 +0000)]
Merge "Use i18n instead of hardcoded brackets and spaces"

10 years agoFixed use of wrong callback array element
Aaron Schulz [Fri, 25 Oct 2013 06:12:04 +0000 (23:12 -0700)]
Fixed use of wrong callback array element

bug: 56124
Change-Id: Ia9f058f42616f5c7c5936733747d0c3a8d56dc19

10 years agoAdd some missing :'s
Kunal Mehta [Fri, 25 Oct 2013 01:12:47 +0000 (18:12 -0700)]
Add some missing :'s

Change-Id: I4f48fdd3e5d81b8a0a34505795a7ab318c931a47

10 years agoMerge "@covers tags for unit tests"
Mwalker [Fri, 25 Oct 2013 01:11:03 +0000 (01:11 +0000)]
Merge "@covers tags for unit tests"

10 years agoMerge "@covers tags for more test classes"
Mwalker [Fri, 25 Oct 2013 01:09:58 +0000 (01:09 +0000)]
Merge "@covers tags for more test classes"

10 years agoMerge "@covers tags for the rest of test files.."
Mwalker [Fri, 25 Oct 2013 01:07:13 +0000 (01:07 +0000)]
Merge "@covers tags for the rest of test files.."

10 years agoMerge "add basic Status unit test"
Mwalker [Fri, 25 Oct 2013 01:06:28 +0000 (01:06 +0000)]
Merge "add basic Status unit test"

10 years agoMerge "Triple default $wgMaxShellMemory (raise to 300 MB)"
jenkins-bot [Fri, 25 Oct 2013 00:15:28 +0000 (00:15 +0000)]
Merge "Triple default $wgMaxShellMemory (raise to 300 MB)"

10 years agoPass language to File::getDescriptionText
umherirrender [Wed, 23 Oct 2013 18:36:52 +0000 (20:36 +0200)]
Pass language to File::getDescriptionText

Follow-Up: Ifcae821a51f4207e7816e710d3b3857c7ed438b6
Change-Id: I8e13f672fd37319add1c090a5b2f38c45d18fda5

10 years agoFixed broken quickDescribe() method
Aaron Schulz [Thu, 24 Oct 2013 23:34:07 +0000 (16:34 -0700)]
Fixed broken quickDescribe() method

Change-Id: Ic68f483c4008ff6ae8c4accef2f9d1f180a5d377

10 years agoTriple default $wgMaxShellMemory (raise to 300 MB)
Bartosz Dziewoński [Wed, 23 Oct 2013 20:56:50 +0000 (22:56 +0200)]
Triple default $wgMaxShellMemory (raise to 300 MB)

100 MB is no longer sufficient.

That value was chosen back in 2006 (r14795); the world has largely
moved on to 64-bit programs since then, and applications such as
ImageMagick seem to use 16-bit precision for each image channel.
It's not enough to scale regular large-ish images on default system
settings anymore.

Bug: 34241
Change-Id: I66bbe12925689f9273f3b5fb29adc8c15c828c70

10 years agoadd basic Status unit test
addshore [Thu, 24 Oct 2013 22:11:15 +0000 (23:11 +0100)]
add basic Status unit test

Adds unit tests for some of the more basic
parts of the Status class

has todos at the bottom of the file for all other
methods that need to be tested

Change-Id: Ic2f2abafb44ef86af207c7595e440672dfcf4f1e

10 years agoMerge "mediawiki.inspect: Support IE8's style.sheet.rules property"
jenkins-bot [Thu, 24 Oct 2013 21:36:16 +0000 (21:36 +0000)]
Merge "mediawiki.inspect: Support IE8's style.sheet.rules property"

10 years agoMerge "Set $parentLen in contributions"
jenkins-bot [Thu, 24 Oct 2013 21:04:36 +0000 (21:04 +0000)]
Merge "Set $parentLen in contributions"

10 years agoMerge "Localisation updates from http://translatewiki.net."
Translation updater bot [Thu, 24 Oct 2013 20:58:02 +0000 (20:58 +0000)]
Merge "Localisation updates from translatewiki.net."

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

Change-Id: I7d7dfd1a1e1a395c639b30489bacceedfbfc6330

10 years agoMerge "Fix undefined variable in Status::getMessage()"
jenkins-bot [Thu, 24 Oct 2013 20:54:57 +0000 (20:54 +0000)]
Merge "Fix undefined variable in Status::getMessage()"

10 years agoSet $parentLen in contributions
Bartosz Dziewoński [Thu, 24 Oct 2013 20:25:10 +0000 (22:25 +0200)]
Set $parentLen in contributions

Follow-up to I77dd45eb.

Bug: 56115
Change-Id: I17bd160577e6b287cc5a61e2a3b983b035c87f81

10 years ago@covers tags for the rest of test files..
addshore [Thu, 24 Oct 2013 20:30:43 +0000 (21:30 +0100)]
@covers tags for the rest of test files..

Change-Id: I0fafe80531325a412472ab7c9fc6d81c861b3751

10 years agomediawiki.inspect: Support IE8's style.sheet.rules property
Bartosz Dziewoński [Thu, 24 Oct 2013 19:31:49 +0000 (21:31 +0200)]
mediawiki.inspect: Support IE8's style.sheet.rules property

Standards-compliant browsers use 'cssRules', IE8 uses 'rules',
some browsers (e.g. Chrome) support both.

Bug: 56107
Change-Id: Ief0b5e38c8ff29efea510bf3725127c2bbfccd59

10 years ago@covers tags for more test classes
addshore [Thu, 24 Oct 2013 19:35:04 +0000 (20:35 +0100)]
@covers tags for more test classes

Change-Id: I19d49c279646a4b4c595700e53b790ba4eb9521e

10 years agoFix undefined variable in Status::getMessage()
aude [Thu, 24 Oct 2013 19:17:39 +0000 (19:17 +0000)]
Fix undefined variable in Status::getMessage()

If $shortContext and $longContext are false, and there
are errors, then $s is undefined.

Change-Id: Ie07f80b43a48a6fc4ed28b2c519f51fd32690bc8

10 years agoMerge "Make TOC hideable"
jenkins-bot [Thu, 24 Oct 2013 19:22:32 +0000 (19:22 +0000)]
Merge "Make TOC hideable"

10 years agoMerge SimpleAntiSpam extension into core
Kunal Mehta [Thu, 17 Oct 2013 06:48:48 +0000 (23:48 -0700)]
Merge SimpleAntiSpam extension into core

Adds an empty, hidden input field to the edit interface, and will
reject any edit if that field is filled in. This will protect
against the simplest form of spambots.

Localized messages will be imported separately.

Bug: 52063
Change-Id: I185b6a1e232299f496244a23f4bf0dc6ea22b6c9

10 years agoMerge "Cleanup Api phpunit Tests"
jenkins-bot [Thu, 24 Oct 2013 18:29:35 +0000 (18:29 +0000)]
Merge "Cleanup Api phpunit Tests"

10 years agoMerge "Add more ApiFormat format tests"
jenkins-bot [Thu, 24 Oct 2013 18:27:03 +0000 (18:27 +0000)]
Merge "Add more ApiFormat format tests"

10 years agoMerge "@covers tags for maintenance tests"
jenkins-bot [Thu, 24 Oct 2013 18:19:52 +0000 (18:19 +0000)]
Merge "@covers tags for maintenance tests"

10 years agoMerge "@covers tags for the rest of /media/* tests"
Mwalker [Thu, 24 Oct 2013 18:17:06 +0000 (18:17 +0000)]
Merge "@covers tags for the rest of /media/* tests"

10 years agoCleanup Api phpunit Tests
addshore [Wed, 23 Oct 2013 16:01:33 +0000 (17:01 +0100)]
Cleanup Api phpunit Tests

- Splits multiple classes into individual files
- Adds @covers tags
- Fixes scope

Change-Id: I7d2816d3574fa53a2aaa8e2a84b7a7ecdd245252

10 years ago@covers tags for maintenance tests
addshore [Thu, 24 Oct 2013 18:12:22 +0000 (19:12 +0100)]
@covers tags for maintenance tests

Change-Id: Ica5f351f71ee5fccae97560f2de6d75fc5da721b

10 years agoAdd more ApiFormat format tests
addshore [Wed, 23 Oct 2013 15:10:02 +0000 (16:10 +0100)]
Add more ApiFormat format tests

Adds tests for Json and wddx formats
Add @covers tags
Fixes some comments
Fixes scope

Change-Id: I5f22097ddcaeb917f856ba7aa0cb793caa17925e

10 years ago@covers tags for the rest of /media/* tests
addshore [Thu, 24 Oct 2013 18:04:38 +0000 (19:04 +0100)]
@covers tags for the rest of /media/* tests

Change-Id: I12879baf7810648d3ec0789feac5af364d5696f7

10 years agoMerge "@covers for ApiQuery stuff"
Mwalker [Thu, 24 Oct 2013 18:01:24 +0000 (18:01 +0000)]
Merge "@covers for ApiQuery stuff"

10 years agoMerge "@covers tags for inclues/*Test"
Mwalker [Thu, 24 Oct 2013 17:56:35 +0000 (17:56 +0000)]
Merge "@covers tags for inclues/*Test"

10 years ago@covers tags for unit tests
addshore [Thu, 24 Oct 2013 16:45:52 +0000 (17:45 +0100)]
@covers tags for unit tests

Change-Id: I2b486b38326bf23bd379efba2142034e24c0745f

10 years agoInitial bump to 1.23
Reedy [Thu, 24 Oct 2013 17:13:19 +0000 (18:13 +0100)]
Initial bump to 1.23

Change-Id: I1c2d7bdd1d861ace3f7e7bd8f8f0047c31194446

10 years ago@covers tags for inclues/*Test
addshore [Thu, 24 Oct 2013 10:54:02 +0000 (11:54 +0100)]
@covers tags for inclues/*Test

Change-Id: Id28acdd8fe0028bf1e46344cfed131076c8f4c95

10 years agoFix double-parsing of account creation messages.
Tyler Anthony Romeo [Sun, 30 Jun 2013 20:45:45 +0000 (22:45 +0200)]
Fix double-parsing of account creation messages.

Account creation messages don't need to be parsed. This is
a temporary fix to follow up when double-parsing was accidentally
added in 69ea4400037 (I402c6bebcfe).

Bug: 44718
Bug: 52191
Change-Id: I333d5468820994625348316ebf6c57d4df025284

10 years agoCleanup skins/SiteBarTest and @todo/covers
addshore [Tue, 22 Oct 2013 10:58:24 +0000 (12:58 +0200)]
Cleanup skins/SiteBarTest and @todo/covers

Change-Id: I501d04ddbeee23539337b68142ee6c1371a63d98

10 years ago@covers for ApiQuery stuff
addshore [Thu, 24 Oct 2013 10:04:00 +0000 (11:04 +0100)]
@covers for ApiQuery stuff

Change-Id: Id8a89abd545d8e2a95b1d246776049b9c888e53c

10 years ago@covers for all GlobalFunc tests
addshore [Thu, 24 Oct 2013 09:53:24 +0000 (10:53 +0100)]
@covers for all GlobalFunc tests

Also split 2 tests off into their correct test classes,
this methods are clearly no longer global functions

Change-Id: I482433f3099e72507a766e85d9576ff36e58b9ad

10 years agoImprove linkprefix regular expressions
Brad Jorsch [Tue, 27 Aug 2013 19:28:52 +0000 (15:28 -0400)]
Improve linkprefix regular expressions

The regular expression in the linkprefix message is run against the
entire page up to each wikilink, and is expected to capture one group
having everything except the prefix and another having only the prefix.
For long pages this winds up being a lot of text, so inefficient regular
expressions are going to cause problems.

The current regex is this:

  /^(.*?)([a-zA-Z\\x80-\\xff]+)$/sD

This is not efficient: it will scan through the string trying to match
against every run of one or more letters/non-ASCII characters,
backtracking at every one except possibly the last. The only reason this
hasn't been a huge problem everywhere is because only a few languages
have this feature enabled.

This change replaces this with this regex:

  /^((?>.*(?<![a-zA-Z\\x80-\\xff])))(.+)$/sD

This is rather more efficient: it will grab the whole string (which is
actually fast even for huge strings), then back off character by
character until it finds one that isn't a letter/non-ASCII.

Note that the above could be simplified somewhat:

  /^((?>.*[^a-zA-Z\\x80-\\xff]|))(.+)$/sD

The performance improvement here is minor, and Gujarati, Church Slavic,
Udmurt, and Ukrainian would still need the other style for their current
implementations.

For Gujarati, we also use another regex trick: a look-behind assertion
in PCRE must be fixed length, so something like (?<!a|bb) won't work.
But that regex fragment is equivalent to (?<!a)(?<!bb) which is allowed,
so we use that instead.

Bug: 52865
Change-Id: Iaa7eaa446b3f045a9ce970affcb2a889f44bdefd

10 years agoFix scope on all /phpunit test methods
addshore [Wed, 23 Oct 2013 22:51:31 +0000 (23:51 +0100)]
Fix scope on all /phpunit test methods

Change-Id: I3ce92463d485a0fb23e464e9a8059330f32d79af

10 years agoCleanup tests/includes/media
addshore [Wed, 23 Oct 2013 22:12:39 +0000 (23:12 +0100)]
Cleanup tests/includes/media

- Adds @covers tags
- fixes comments
- fixes scope
- adds @todos
- split files per class

Change-Id: Id5aaa20769725a96f22fb838d376697c250874a5

10 years agoMerge "mediawiki.inspect: use $.toJSON & add workaround for FF oddity"
jenkins-bot [Thu, 24 Oct 2013 00:53:48 +0000 (00:53 +0000)]
Merge "mediawiki.inspect: use $.toJSON & add workaround for FF oddity"

10 years agomediawiki.inspect: use $.toJSON & add workaround for FF oddity
Ori Livneh [Thu, 24 Oct 2013 00:37:21 +0000 (17:37 -0700)]
mediawiki.inspect: use $.toJSON & add workaround for FF oddity

* Use $.toJSON rather than JSON.stringify. Make mediawiki.inspect depend on
  jquery.json.
* Firefox doesn't define a console.table, but doesn't throw an exception either
  if you attempt to invoke it. Use Function.prototype#call to call Firefox's
  bluff.

Change-Id: Ib45487d10488f08a98d9635ab9a2a9212e9ef69f

10 years agoMerge "New hook accommodates non-revision rc queries"
jenkins-bot [Wed, 23 Oct 2013 23:44:42 +0000 (23:44 +0000)]
Merge "New hook accommodates non-revision rc queries"

10 years agoNew hook accommodates non-revision rc queries
Erik Bernhardson [Tue, 15 Oct 2013 22:21:34 +0000 (15:21 -0700)]
New hook accommodates non-revision rc queries

Within Special:RecentChanges the default non-extended query contains

    ( rc_this_oldid=page_latest OR rc_type=3 )

Wikidata has previously used the SpecialWatchlistQuery hook to look for
this exact string and change rc_type=3 to rc_type IN (3,5).  Flow is another
type of change that doesn't have a matching row in revisions to match
page_latest for and needs to be added to this query.

This patch adds a new hook, SpecialWatchlistGetNonRevisionTypes, which allows
different extensions to add to a list of values for rc_type (or rc_source once
85787 is merged).  This will allow multiple extensions to affect the resulting
query without them breaking eachother.

Change-Id: Id6916fe999c0faa38de878b7b5687e7ea00901bd

10 years agoAdd $wgSemiprotectedRestrictionLevels
Brad Jorsch [Fri, 18 Oct 2013 14:54:58 +0000 (10:54 -0400)]
Add $wgSemiprotectedRestrictionLevels

It's possible that a wiki could introduce new protection levels that
should be considered "semiprotected". For example, if an
"emailconfirmed" protection level were added and an appropriate entry
were made in $wgAutopromote, that might be considered semi-protection
since anyone can automatically gain the ability to edit those pages
merely by setting and confirming their email address.

The most straightforward way to take care of this is to add a config
variable to specify which protection levels are considered
"semiprotected". So let's do that.

Also, let's take the opportunity to make
$title->isSemiProtected( 'create' ) works correctly.

Bug: 43462
Change-Id: Ic9db6ff6cbd84bd9734be09efbea5a5891197fa0

10 years agoLocalisation updates from http://translatewiki.net.
Translation updater bot [Wed, 23 Oct 2013 18:58:35 +0000 (18:58 +0000)]
Localisation updates from translatewiki.net.

Change-Id: I0073d11e39dd5a11d7c8c44b80401ad7b8fd6313

10 years agoMerge "mediawiki.util: Use 'wikipage.content' hook for TOC hiding"
jenkins-bot [Wed, 23 Oct 2013 18:46:02 +0000 (18:46 +0000)]
Merge "mediawiki.util: Use 'wikipage.content' hook for TOC hiding"

10 years agoMerge "Remove all instances of the word "iff""
jenkins-bot [Wed, 23 Oct 2013 18:16:48 +0000 (18:16 +0000)]
Merge "Remove all instances of the word "iff""

10 years agoRemove all instances of the word "iff"
Tim Starling [Tue, 11 Jun 2013 23:01:52 +0000 (09:01 +1000)]
Remove all instances of the word "iff"

It's elitist mathematical jargon. In all cases dealt with here, it adds
no additional meaning compared to "if", beyond what was already obvious
from context. Thus, its only purpose is to smugly demonstrate that the
author attended their second-year mathematics classes, at the expense of
causing confusion for everyone who doesn't have such a background.

If you really think you need to convey extra information beyond what
"if" gives you, the English language contains plenty of devices for doing
so, without resorting to neologisms.

Change-Id: Iae21095d02ec2935c10e94f532235c2671c115b1

10 years agoMerge "Fix doc error in new incr test"
jenkins-bot [Wed, 23 Oct 2013 17:01:14 +0000 (17:01 +0000)]
Merge "Fix doc error in new incr test"

10 years agoFix doc error in new incr test
Matthew Flaschen [Wed, 23 Oct 2013 16:53:00 +0000 (12:53 -0400)]
Fix doc error in new incr test

It covers all implementations of the abstract class method BagOStuff::incr.

Change-Id: I763985477b8564857a0905019c4485dd36f84539

10 years agoMerge "tablesorter: Unbreak abbreviated month name support"
jenkins-bot [Wed, 23 Oct 2013 15:54:16 +0000 (15:54 +0000)]
Merge "tablesorter: Unbreak abbreviated month name support"

10 years agoAddress PHP CodeSniffer errors and warnings
Siebrand Mazeland [Wed, 23 Oct 2013 12:16:03 +0000 (14:16 +0200)]
Address PHP CodeSniffer errors and warnings

One class of errors left unaddressed: Class name "WebInstaller_Language"
is not in camel caps format. I think this can be changed, too, but I
wasn't able to quickly find out where class names are being created.

Change-Id: I920b0231db1b70b68c6c8907257c288a0e112668

10 years agoGeneral cleanup of Parser tests
addshore [Tue, 22 Oct 2013 23:50:38 +0000 (00:50 +0100)]
General cleanup of Parser tests

 - Fixes scope
 - Adds covers tags

Change-Id: I6024f2f7cc7a1812a417c6c389b0a15addde0b5e

10 years agotablesorter: Unbreak abbreviated month name support
Bartosz Dziewoński [Wed, 23 Oct 2013 09:59:40 +0000 (11:59 +0200)]
tablesorter: Unbreak abbreviated month name support

Regression from If758499f. Trailing dot was being removed
for genitive forms instead of abbreviated forms.

Bug: 56038
Change-Id: I353da785ff4a1203ae54a981c3c946f9df452902

10 years agoCleanup MagicVariableTest
addshore [Tue, 22 Oct 2013 09:46:48 +0000 (11:46 +0200)]
Cleanup MagicVariableTest

 - Give methods scope
 - Make providers static
 - Add @covers todo
 - Merge the Providers file that is only used in here

Change-Id: I60a6bbd5a8ad3d9d414de493ec2b083f52114a7b

10 years agoMerge "mw.api.postWithToken now forwards promise on fail if we have token"
jenkins-bot [Wed, 23 Oct 2013 07:11:21 +0000 (07:11 +0000)]
Merge "mw.api.postWithToken now forwards promise on fail if we have token"

10 years agoParser::replaceInternalLinks: fix batching
Kevin Israel [Tue, 15 Oct 2013 13:42:48 +0000 (09:42 -0400)]
Parser::replaceInternalLinks: fix batching

The parser unnecessarily made individual checks for existence of
pages that were neither in LinkCache nor linked only with a fragment.
A Title::isKnown() call in Parser::replaceInternalLinks2() (added in
bca8b8ad7d2f) caused this.

Title::isKnown() was used to avoid treating a link to a distinct page
as a self-link even when the title happened to match one of the variants
returned by Language::autoConvertToAllVariants(). This change fixes
the bug by moving the problematic portion of the self-link check into
LinkHolderArray::doVariants().

Change-Id: I586e11e8b47308980ea04087ebc4246c397a8f53

10 years agoUse restriction-level-* messages in Linker::formatTemplates
Brad Jorsch [Fri, 18 Oct 2013 14:29:36 +0000 (10:29 -0400)]
Use restriction-level-* messages in Linker::formatTemplates

The current implementation of Linker::formatTemplates only checks for
"sysop" and "autoconfirmed", and completely ignores any other protection
levels. That needs fixing.

Rather than introducing additional messages "template-protected-*" to
match template-protected and template-semiprotected, let's just use the
existing restriction-level-foo messages and wrap them in parentheses.

The old messages are kept for backwards compatability, but could
probably be considered deprecated.

Bug: 43462
Change-Id: I0c507f4ecc1921f599acbda834fa55e96388fa7b

10 years agoAvoid master queries in Revision::newFromTitle(..., Revision::READ_NORMAL)
Tim Starling [Fri, 7 Jun 2013 00:31:37 +0000 (10:31 +1000)]
Avoid master queries in Revision::newFromTitle(..., Revision::READ_NORMAL)

The fallback to master makes sense in Revision::newFromId(), since a
revision ID known to exist by some other means might be present in the
master but not in the slave. But it doesn't make sense for
Revision::newFromTitle(), where by far the most common cause of this
case being hit is the page being nonexistent.

Change-Id: I41189fcde1b8065ac134982241376d63b78732a1

10 years agoMerge "Fix Redis increment behavior by using BagOStuff->incr instead"
jenkins-bot [Tue, 22 Oct 2013 23:49:01 +0000 (23:49 +0000)]
Merge "Fix Redis increment behavior by using BagOStuff->incr instead"

10 years agoMerge "Test BagOStuff->incr method"
jenkins-bot [Tue, 22 Oct 2013 23:47:25 +0000 (23:47 +0000)]
Merge "Test BagOStuff->incr method"

10 years agoFix Redis increment behavior by using BagOStuff->incr instead
Matthew Flaschen [Tue, 22 Oct 2013 21:35:23 +0000 (17:35 -0400)]
Fix Redis increment behavior by using BagOStuff->incr instead

Due to the PHP serialization, the Redis native INCR and INCRBY do not
work.  This instead falls back on the parent class's incr, which uses
lock and unlock, and incrementing on the PHP side.

Bug: 55986
Change-Id: I500199aeb935963ca118fde163bd7ba0cba8f79f

10 years agoTest BagOStuff->incr method
Matthew Flaschen [Tue, 22 Oct 2013 05:55:25 +0000 (01:55 -0400)]
Test BagOStuff->incr method

Change-Id: I3b72f19df82ee302dee47dcf22b69ed9bb6ff8e0

10 years agomediawiki.util: Use 'wikipage.content' hook for TOC hiding
Fomafix [Sun, 22 Sep 2013 14:15:20 +0000 (16:15 +0200)]
mediawiki.util: Use 'wikipage.content' hook for TOC hiding

Bug: 54437
Change-Id: I82f441111bf3d6018b569dc728a3c152b721db7d

10 years agolockmanager: QuorumLockManager subclasses can get EX/SH locks at once
Aaron Schulz [Sun, 16 Jun 2013 20:48:17 +0000 (13:48 -0700)]
lockmanager: QuorumLockManager subclasses can get EX/SH locks at once

* Also reduced rount trips in doUnlockingRequestBucket().
* Also removed some redundant doc comments.

Change-Id: I81878e92332509bd7fda9ddeef950b774f5b015d

10 years agoCleanup /languages/* tests
addshore [Tue, 22 Oct 2013 10:32:29 +0000 (12:32 +0200)]
Cleanup /languages/* tests

This change:
 - Adds method scope
 - adds @covers tags
 - adds various @todos
 - fixes some comments

Before the changes tests ran with:
   1383 tests, 1412 assertions 10 skips
After changes the results remain the same

Change-Id: Iee57447bdb47026952ef5dcce6fed5dad0f80e52

10 years agomw.api.postWithToken now forwards promise on fail if we have token
Niklas Laxström [Tue, 22 Oct 2013 09:50:05 +0000 (09:50 +0000)]
mw.api.postWithToken now forwards promise on fail if we have token

Without this fix the callers of this function could not read the
failure code and result, because we returned undefined. Because
we are using a filter function, we need to explicitly return the
promise to pass it forward.

Change-Id: I71984ac827618459f723b0b9f47d4dc29e2a2f70

10 years agoAdd more @covers tags and test cleanup
addshore [Mon, 21 Oct 2013 21:09:13 +0000 (23:09 +0200)]
Add more @covers tags and test cleanup

Other cleanup includes
 - Adding method scopes
 - Fixing php comments
 - Adding todos

Change-Id: I0a231008e6a59110ffcab6af1bd8c4d3ee13f21d

10 years agoMerge "Mention the new HTMLForm 'vform' display format."
Mwalker [Tue, 22 Oct 2013 02:34:45 +0000 (02:34 +0000)]
Merge "Mention the new HTMLForm 'vform' display format."

10 years agoMerge "Fixes for duplicateStderr (I833aeb3a)"
jenkins-bot [Tue, 22 Oct 2013 02:34:27 +0000 (02:34 +0000)]
Merge "Fixes for duplicateStderr (I833aeb3a)"

10 years agoMention the new HTMLForm 'vform' display format.
S Page [Tue, 22 Oct 2013 02:26:08 +0000 (19:26 -0700)]
Mention the new HTMLForm 'vform' display format.

Change Id03d185bbee990595bfc469a61163cc598fc3441 added the feature.

Change-Id: I17ccb127e47047dc32f930ce1775496ea22410d2

10 years agoLocalisation updates from http://translatewiki.net.
Translation updater bot [Mon, 21 Oct 2013 22:51:33 +0000 (22:51 +0000)]
Localisation updates from translatewiki.net.

Change-Id: I0539a27c72b9a270db4e3b29a4c357e40d806353

10 years agoUse i18n instead of hardcoded brackets and spaces
Siebrand Mazeland [Mon, 21 Oct 2013 12:01:39 +0000 (14:01 +0200)]
Use i18n instead of hardcoded brackets and spaces

Change-Id: If914e26f2af23f04c46f011ad8a276a9d3190583

10 years agoMerge "mediawiki.inspect: add CSS report"
jenkins-bot [Mon, 21 Oct 2013 20:35:36 +0000 (20:35 +0000)]
Merge "mediawiki.inspect: add CSS report"

10 years agoMerge "Added a few more trx sanity checks to DatabaseBase"
jenkins-bot [Mon, 21 Oct 2013 20:28:44 +0000 (20:28 +0000)]
Merge "Added a few more trx sanity checks to DatabaseBase"

10 years agoMerge "Have list items occupy their own line"
jenkins-bot [Mon, 21 Oct 2013 20:24:22 +0000 (20:24 +0000)]
Merge "Have list items occupy their own line"

10 years agoLocalisation updates from http://translatewiki.net.
Translation updater bot [Mon, 21 Oct 2013 19:42:49 +0000 (19:42 +0000)]
Localisation updates from translatewiki.net.

Change-Id: I922e660fafc7a952129beebeaed001712f5c2bc1