lhc/web/wiklou.git
11 years ago(bug 42173) Standardize categories special pages output
Dereckson [Fri, 16 Nov 2012 01:01:36 +0000 (02:01 +0100)]
(bug 42173) Standardize categories special pages output

This change removes namespace prefix from [[Special:UncategorizedCategories]],
so the output is consistent with the other categories pages.

Change-Id: I033e570754ca81be900a1f5482b8429583ab9172

11 years agoAdd test for table row followed by newlines and table heading
Gabriel Wicke [Fri, 16 Nov 2012 00:02:15 +0000 (16:02 -0800)]
Add test for table row followed by newlines and table heading

Change-Id: I208f5464523ef3e76cd9ddc5c1198aa231bca9b8

11 years agoLocalisation updates from http://translatewiki.net.
Translation updater bot [Thu, 15 Nov 2012 20:32:17 +0000 (20:32 +0000)]
Localisation updates from translatewiki.net.

Change-Id: I620f7ee98965b8d07caeeaf19d7db40efcfc7975

11 years agoMerge "Made SSL validation in Curl HTTP requests the default."
IAlex [Thu, 15 Nov 2012 10:24:11 +0000 (10:24 +0000)]
Merge "Made SSL validation in Curl HTTP requests the default."

11 years agoMerge "Bug 42039 - Fix some file-related issues in the distribution Minor issues."
IAlex [Thu, 15 Nov 2012 10:17:23 +0000 (10:17 +0000)]
Merge "Bug 42039 - Fix some file-related issues in the distribution Minor issues."

11 years agoMerge "Uniform $rtl usage in Arabic-script Messages*.php"
IAlex [Thu, 15 Nov 2012 10:14:43 +0000 (10:14 +0000)]
Merge "Uniform $rtl usage in Arabic-script Messages*.php"

11 years agoMerge "Add 'contentmodel' to resultproperties in prop=revisions"
IAlex [Thu, 15 Nov 2012 10:10:00 +0000 (10:10 +0000)]
Merge "Add 'contentmodel' to resultproperties in prop=revisions"

11 years agoMerge "When returning rev content, always include model."
IAlex [Thu, 15 Nov 2012 10:05:28 +0000 (10:05 +0000)]
Merge "When returning rev content, always include model."

11 years agoMerge "Fixed action=query list=blocks for IPv6 addresses"
IAlex [Thu, 15 Nov 2012 09:59:23 +0000 (09:59 +0000)]
Merge "Fixed action=query list=blocks for IPv6 addresses"

11 years agoFix typo: exipration => expiration
Ori Livneh [Thu, 15 Nov 2012 09:47:54 +0000 (01:47 -0800)]
Fix typo: exipration => expiration

Change-Id: I73d19cfeed0596b66e16e4c383b3658594c211e3

11 years agoMoved "create" function definitions before "store" for consistency.
Aaron Schulz [Thu, 8 Nov 2012 17:50:00 +0000 (09:50 -0800)]
Moved "create" function definitions before "store" for consistency.

Change-Id: Ic44470d7a178cb8dcd8f6a9343f961c26fb92988

11 years ago[JobQueue] Fixed de-listing updates to pending job cache.
Aaron Schulz [Thu, 15 Nov 2012 08:49:48 +0000 (00:49 -0800)]
[JobQueue] Fixed de-listing updates to pending job cache.

Change-Id: Ied0f2962fcbcde62a041592933c667c861f54715

11 years agoAdd a test for indent pres with content wrapped in inline element
Gabriel Wicke [Thu, 15 Nov 2012 01:04:30 +0000 (17:04 -0800)]
Add a test for indent pres with content wrapped in inline element

A line of content fully wrapped in an inline element was an issue in Parsoid
round-tripping, so make sure this is detected in the future.

Parsoid fix: https://gerrit.wikimedia.org/r/#/c/33496/

Change-Id: I2497c90174fac69e9c4dc1cc898844e94e604b1b

11 years agoFix intermittent QUnit failure
Brad Jorsch [Wed, 14 Nov 2012 22:51:06 +0000 (14:51 -0800)]
Fix intermittent QUnit failure

Occasionally the test 'mediawiki: mw.loader.implement( styles={ "url": {
<media>: [url, ..] } } )' will fail because it only ran 5 of 7 expected
assertions, while at the same time a later test will fail because it had
two extra assertions.

The problem is that the test is performing two external CSS loads, but
calls QUnit.start() after the ''first'' one is loaded. If the second
doesn't manage to get loaded at close to the same time, QUnit moves on
to the next test, and then when the second external CSS file finally
does load it will get counted towards whichever test is running at that
time. This can be reliably reproduced by arranging for
tests/qunit/data/styleTest.css.php to take longer for one than the other
of these two external CSS loads.

The solution is to wait until *both* of those external CSS loads to
complete (or time out) before calling QUnit.start().

Change-Id: Id695e95733b4c3f58234d9688c6b6e1b9ba591cc

11 years agoMerge "(bug 2865) Add lang attribute to firstHeading of CologneBlue"
Amire80 [Wed, 14 Nov 2012 21:25:05 +0000 (21:25 +0000)]
Merge "(bug 2865) Add lang attribute to firstHeading of CologneBlue"

11 years agoMerge "Localisation updates from http://translatewiki.net."
Translation updater bot [Wed, 14 Nov 2012 21:00:37 +0000 (21:00 +0000)]
Merge "Localisation updates from translatewiki.net."

11 years ago(bug 2865) Add lang attribute to firstHeading of CologneBlue
Derk-Jan Hartman [Wed, 14 Nov 2012 20:59:48 +0000 (21:59 +0100)]
(bug 2865) Add lang attribute to firstHeading of CologneBlue

This is a follow up to I55dd392d

Change-Id: I20bd5b6aae6a26f149a4a822aefdea860f148093

11 years agoMerge "(bug 42097) $.tablesorter fix when wgDefaultDateFormat is unrecognized"
Anomie [Wed, 14 Nov 2012 20:59:03 +0000 (20:59 +0000)]
Merge "(bug 42097) $.tablesorter fix when wgDefaultDateFormat is unrecognized"

11 years ago(bug 42097) $.tablesorter fix when wgDefaultDateFormat is unrecognized
MatmaRex [Wed, 14 Nov 2012 20:25:43 +0000 (21:25 +0100)]
(bug 42097) $.tablesorter fix when wgDefaultDateFormat is unrecognized

The 'date' parser assumed all wikis use wgDefaultDateFormat that is
either 'mdy' or 'dmy', but this is not the case; for example
fi.wikipedia uses 'fi normal'. Therefore the correct value was not set,
a string was not changed to an array, and a loop that assumed an array
would be present hanged forever.

Change-Id: Iba17bc6b44d6a2fff491b7462d7a5457f85d19c5

11 years ago(bug 2865) Add lang attribute to firstHeading
Amir E. Aharoni [Mon, 12 Nov 2012 17:45:22 +0000 (23:15 +0530)]
(bug 2865) Add lang attribute to firstHeading

Adds a lang attribute to <h1 id="firstHeading">.

Interface language is applied to <html> and content language is
applied to <div id="mw-content-text">. This leaves firstHeading
with the interface language, which is wrong in general. It
also causes incorrect display of the title for languages that
have custom line-height.

This patch is based on code written by Munirathnam M at
the Bangalore DevCamp (he couldn't submit it because of network
issues). It looks OK to me, but it's my first time doing anything
with $this->data in a skin, so please correct me if I'm wrong.

Change-Id: I55dd392dbf0d4f768344b66e6ceb3a023b1d5c9b

11 years agoLocalisation updates from http://translatewiki.net.
Translation updater bot [Wed, 14 Nov 2012 20:33:44 +0000 (20:33 +0000)]
Localisation updates from translatewiki.net.

Change-Id: Ic7c0ea324127520a1e62d0ceeda1003990d318b3

11 years ago(bug 41886) jquery.tablesorter should not explode rowspans until sorted
Brad Jorsch [Fri, 9 Nov 2012 19:48:46 +0000 (11:48 -0800)]
(bug 41886) jquery.tablesorter should not explode rowspans until sorted

jquery.tablesorter should not explode rowspans until the table is
actually sorted.

Also adds a testcase to verify this behavior, and updates another test
case that was depending on the broken behavior.

Change-Id: Ibe4cc7e92de6cc8e370c5912c9eda062b466c538

11 years agoWhen returning rev content, always include model.
daniel [Wed, 14 Nov 2012 11:17:13 +0000 (12:17 +0100)]
When returning rev content, always include model.

query=revisions can be used with rvprop=content to retrieve the
content of revisions. The contentmodel should always be included
with the content (just like the contenformat is), so the client
is able to interpret the structure contained in the content blob.

Change-Id: I67cf48f905ff83a86992e1a54f7ad0feaf2b2c94

11 years ago[JobQueue] Added missing delete query.
Aaron Schulz [Wed, 14 Nov 2012 07:00:09 +0000 (23:00 -0800)]
[JobQueue] Added missing delete query.

Change-Id: I8f900f5d7af3f42e348ac733cdf8deff37d4d055

11 years agoTypofix
Niklas Laxström [Wed, 14 Nov 2012 07:43:02 +0000 (07:43 +0000)]
Typofix

Change-Id: I50bf84c3d7f75f6d2a0f3d4f8e86622486f2be28

11 years ago[JobQueue] Added support for retrying jobs when runners die.
Aaron Schulz [Wed, 24 Oct 2012 00:29:54 +0000 (17:29 -0700)]
[JobQueue] Added support for retrying jobs when runners die.

* This adds a new 'claimTTL' setting which recycles jobs into the queue
  if they have been claimed for longer than that duration (in seconds).
* This also purges jobs for such cases when job retries are not enabled.
* This adds a new job_attempts column and adds an index to improve the
  query and semantics for FIFO ordered queues.

Change-Id: Idb6217a694d86a4d6fc881768deed424628f015d

11 years agoMerge "Separated validation login in SpecialBlock."
Anomie [Tue, 13 Nov 2012 23:32:27 +0000 (23:32 +0000)]
Merge "Separated validation login in SpecialBlock."

11 years agoMerge "(bug 7851) Implement mediawiki.page.patrol.ajax"
Anomie [Tue, 13 Nov 2012 23:28:59 +0000 (23:28 +0000)]
Merge "(bug 7851) Implement mediawiki.page.patrol.ajax"

11 years agoMerge "Set default type attribute for button html elements"
Anomie [Tue, 13 Nov 2012 23:08:16 +0000 (23:08 +0000)]
Merge "Set default type attribute for button html elements"

11 years agoAdd a test covering template targets containing wiki links
Gabriel Wicke [Tue, 13 Nov 2012 21:43:43 +0000 (13:43 -0800)]
Add a test covering template targets containing wiki links

Change-Id: I0db7b0387dde5a9b450af486a66f451377de1d7e

11 years ago(bug 7851) Implement mediawiki.page.patrol.ajax
Marius Hoch [Wed, 3 Oct 2012 01:33:55 +0000 (03:33 +0200)]
(bug 7851) Implement mediawiki.page.patrol.ajax

Implement AJAX patrolling with the new mediawiki.page.patrol.ajax
module, which makes use of the API via mediawiki.api.

During the patrol process a spinner (created by jquery.spinner)
shows up and after it a suitable message gets shown via
mediawiki.notify.

Depending on whether we had success or not the link then turns up
again or the brackets completely disappear just like on a normal page view.

On top of adding the module, I've changed the following:
- Added the patrol token to the ResourceLoaderUserTokensModule.
- Registered messages 'markedaspatrollednotify' and
  'markedaspatrollederrornotify'.

Change-Id: I472357566dda0ab572c20e2e4b87508b0f2f4c73

11 years agoMerge "(bug 41989) tests/parserTests.php missing classes"
GWicke [Tue, 13 Nov 2012 21:29:16 +0000 (21:29 +0000)]
Merge "(bug 41989) tests/parserTests.php missing classes"

11 years ago(bug 41989) tests/parserTests.php missing classes
Antoine Musso [Tue, 13 Nov 2012 20:41:40 +0000 (21:41 +0100)]
(bug 41989) tests/parserTests.php missing classes

It has been broken since I0a307f23 / 7c6c05a which moved the parser test
classes from the main autoloader to the one dedicated to test.
Workaround that by simply requiring the two .inc file we need.

Change-Id: Ib865e4e84969d633ad9173f0824322078793b8b4

11 years agoLocalisation updates from http://translatewiki.net.
Translation updater bot [Tue, 13 Nov 2012 20:52:49 +0000 (20:52 +0000)]
Localisation updates from translatewiki.net.

Change-Id: I0b01fe52457790ea132defbf45a31b8cb1f5b199

11 years agoUniform $rtl usage in Arabic-script Messages*.php
Amir E. Aharoni [Tue, 13 Nov 2012 13:40:31 +0000 (15:40 +0200)]
Uniform $rtl usage in Arabic-script Messages*.php

Also fix the name of aeb (Tunisian Arabic).

Change-Id: I63c414c090d67e61b16df234eeb2043733203e1a

11 years agoMerge "Fix typo (ResourceLodaer => ResourceLoader)"
Ori Livneh [Tue, 13 Nov 2012 04:20:07 +0000 (04:20 +0000)]
Merge "Fix typo (ResourceLodaer => ResourceLoader)"

11 years agoFix typo (ResourceLodaer => ResourceLoader)
Ori Livneh [Tue, 13 Nov 2012 04:18:59 +0000 (20:18 -0800)]
Fix typo (ResourceLodaer => ResourceLoader)

Change-Id: Ie349853f3fbcd7a9eb038d5988497f115684ebeb

11 years agoRelease-notes: Fixup for I70656b41bd2.
Timo Tijhof [Tue, 13 Nov 2012 03:10:13 +0000 (04:10 +0100)]
Release-notes: Fixup for I70656b41bd2.

Change-Id: If786a387101a7e801c901f00bca8c4a875ceb56d

11 years agoLocalisation updates from http://translatewiki.net.
Translation updater bot [Mon, 12 Nov 2012 20:52:16 +0000 (20:52 +0000)]
Localisation updates from translatewiki.net.

Change-Id: I6b51ce2eb452830792d858e143ca06a017648699

11 years ago(Bug 41706) preload to convert content as needed.
daniel [Tue, 6 Nov 2012 13:05:30 +0000 (14:05 +0100)]
(Bug 41706) preload to convert content as needed.

Use the new Content::convert function to convert preloaded content
if the page being edited uses a different content model. This allows
e.g. a page like User:Foo/bar to be preloaded when creating
User:Foo/common.css. This currently fails, because it is not possible
to use wikitext to pre-fill a CSS page.

Change-Id: I70656b41bd203e5722528e889a242fa54cbfbf62

11 years ago(bug 41990) Fix regression in API edit of redirect
Brad Jorsch [Mon, 12 Nov 2012 05:42:26 +0000 (21:42 -0800)]
(bug 41990) Fix regression in API edit of redirect

Before ContentHandler, an API edit passing a redirect for title and
redirect=true and omitting basetimestamp would use the last revision
timestamp of the target page. When ContentHandler was merged, this was
accidentally changed to use the last revision timestamp of the redirect
page, which was likely much earlier than the target page's last revision
and so causes an edit conflict in almost all cases.

Some scripts took advantage of this along with appendtext to add notices
to users' talk pages, so restore that old behavior. We'll also adjust
the contentmodel/contentformat detection added by ContentHandler to use
the model and format of the target page rather than the redirect in this
case, as that seems more likely to be less wrong.

Change-Id: If0c674e26a4deb54ec14f0bf45418d666a397347

11 years agoBug 42039 - Fix some file-related issues in the distribution
MarkAHershberger [Mon, 12 Nov 2012 14:23:51 +0000 (09:23 -0500)]
Bug 42039 - Fix some file-related issues in the distribution
Minor issues.

Tested the removal of
maintenance/postgres/archives/patch-ipb_address_unique.sql in a new
installation but haven't tested it on an upgrade.

Change-Id: I58aa11c5acab5de427cbc000e6786a208fc6b26f

11 years agofix conflict marker in comment
daniel [Mon, 12 Nov 2012 13:37:32 +0000 (14:37 +0100)]
fix conflict marker in comment

Change-Id: I23e9593890ab5899e10d8eb61f63f38fb98072a7

11 years ago(bug 42036) Account creation email link needs protocol
Brad Jorsch [Mon, 12 Nov 2012 04:53:22 +0000 (20:53 -0800)]
(bug 42036) Account creation email link needs protocol

In other words, use $wgCanonicalServer instead of $wgServer.

Change-Id: I110db4d27ce935d732e16830951af0f349e99e99

11 years agoMerge "Fix E_STRICT in ForeignAPIRepo"
TheDJ [Sun, 11 Nov 2012 21:06:49 +0000 (21:06 +0000)]
Merge "Fix E_STRICT in ForeignAPIRepo"

11 years agoMerge "Localisation updates from http://translatewiki.net."
Translation updater bot [Sun, 11 Nov 2012 21:06:35 +0000 (21:06 +0000)]
Merge "Localisation updates from translatewiki.net."

11 years agoLocalisation updates from http://translatewiki.net.
Translation updater bot [Sun, 11 Nov 2012 20:29:48 +0000 (20:29 +0000)]
Localisation updates from translatewiki.net.

Change-Id: I6b4b6352c7debed2fab97b7f72f960613f41c496

11 years agoMerge "Remove unneeded third param"
IAlex [Sun, 11 Nov 2012 20:23:41 +0000 (20:23 +0000)]
Merge "Remove unneeded third param"

11 years agoMerge "Set wgLanguageCode/wgContLang for backup_PageTest.php"
IAlex [Sun, 11 Nov 2012 20:18:46 +0000 (20:18 +0000)]
Merge "Set wgLanguageCode/wgContLang for backup_PageTest.php"

11 years agoMerge "fix @depends"
IAlex [Sun, 11 Nov 2012 20:15:16 +0000 (20:15 +0000)]
Merge "fix @depends"

11 years agoMerge changes I4ac3bc14,I470acb8b
Demon [Sun, 11 Nov 2012 19:16:38 +0000 (19:16 +0000)]
Merge changes I4ac3bc14,I470acb8b

* changes:
  make addPortletLink work with CologneBlue
  (bug 18338) WAI-ARIA landmark roles in most used skins

11 years agoMerge "Make sure that SQLite uses no prefix"
Nikerabbit [Sun, 11 Nov 2012 08:14:35 +0000 (08:14 +0000)]
Merge "Make sure that SQLite uses no prefix"

11 years agoCleanup Hebrew grammar code a little.
Amir E. Aharoni [Sun, 11 Nov 2012 04:39:37 +0000 (10:09 +0530)]
Cleanup Hebrew grammar code a little.

Added comments and changed == to ===.

Change-Id: I3124bfd7341b1b3b46bb3e5215001d6967845f48

11 years agoFixed action=query list=blocks for IPv6 addresses
Marius Hoch [Sun, 11 Nov 2012 02:25:17 +0000 (03:25 +0100)]
Fixed action=query list=blocks for IPv6 addresses

Queries like the following return wrong rangestart and rangeend
data cause the IP addresses are formated with only IPv4 in mind.
As IP::formatHex is able to format both I've switched over to
that.

Example:
http://en.wikipedia.org/w/api.php?format=xml&action=query&list=blocks&bkprop=range&bkip=2002%3AB752%3AD225%3A0%3A0%3A0%3A0%3A1

Change-Id: I6138240bb03bbf5af61851d3e96354a050e56fed

11 years agoMerge "test classes autoloading path was broken"
Krinkle [Sat, 10 Nov 2012 20:53:02 +0000 (20:53 +0000)]
Merge "test classes autoloading path was broken"

11 years agotest classes autoloading path was broken
Antoine Musso [Sat, 10 Nov 2012 20:39:54 +0000 (21:39 +0100)]
test classes autoloading path was broken

Since 7c6c05a, the ORMTableTest and SeleniumTestConstants classes points
to a wrong path. The reason is the variable name has not been renamed
for them.

Change-Id: I430031d0d00a8f0da047184285d1797a145bd389

11 years agoLocalisation updates from http://translatewiki.net.
Translation updater bot [Sat, 10 Nov 2012 20:33:18 +0000 (20:33 +0000)]
Localisation updates from translatewiki.net.

Change-Id: Ic5565a4999b2212f6be13506f413ac918c6e8fc0

11 years agoRemoved unused var from jquery.badge.js
Ori Livneh [Sat, 10 Nov 2012 19:49:36 +0000 (11:49 -0800)]
Removed unused var from jquery.badge.js

Change-Id: Ia3313ee272218d6467675e8e855710a9365d3fa2

11 years agofix @depends
umherirrender [Sat, 10 Nov 2012 19:15:03 +0000 (20:15 +0100)]
fix @depends

No need for the parentheses there

Change-Id: Id2ba72a7fb7bdd592de0642468994c9dab29adcd

11 years agoSet wgLanguageCode/wgContLang for backup_PageTest.php
umherirrender [Sat, 10 Nov 2012 18:50:13 +0000 (19:50 +0100)]
Set wgLanguageCode/wgContLang for backup_PageTest.php

There is namespace handling, which fails on $wgLanguageCode = 'de';

Change-Id: I99a4a1837e5db5eb22cb879898da3ac37439264d

11 years ago(bug 41833) Test: Add AutoLoaderTest.
Timo Tijhof [Wed, 7 Nov 2012 01:27:30 +0000 (02:27 +0100)]
(bug 41833) Test: Add AutoLoaderTest.

* Move scattered pieces from tests/* in main AutoLoader.php
  into tests/TestsAutoLoader.php.
  Verified with:
  'ack -Q i --ignore-dir tests/phpunit/ <classname>'
  on mediawiki/core that these classes are not used outside
  tests/phpunit/.

* Moved entry for maintenance/backup.inc to the main AutoLoader.

* Refactored assertion logic in maintenance/checkAutoLoader.php
  into a public static method used in it's execute method
  and in the (new) AutoLoaderTest suite.

* The new test was immediately failing, added missing classes
  and removed old ones that don't exist.

  And CheckAutoLoader itself, so that it can actually be used
  in AutoLoaderTest.php

* Per discussion on Gerrit, moved the logic into the unit test
  instead of refactoring the maintenance script, we no longer
  need the maintenance script.

* Fixed the regex to also detect abstract, final and interface.
  The test was failing badly, claiming many classes did not
  exist.

* Improved the logic to also catch entries in the AutoLoader
  configuration for inexisting classes in existing files.
  So far it only catched entries with wrong files and missing
  entries for classes in known files.
  An entry like "BlablaSomethingHere => includes/Action.php"
  did not emit any kind of warning. The refactored logic
  builds a reverse index and uses a simple assertEquals to
  find any inconsistencies (whatever the cause).

Change-Id: I0a307f23175d52345180cdfc7c2d5e172536be1b

11 years agoavoid STDERR diff3 messages when using wfMerge()
Daniel Kinzler [Sat, 10 Nov 2012 16:18:12 +0000 (17:18 +0100)]
avoid STDERR diff3 messages when using wfMerge()

diff3 issues a warning to stderr if any of the files does not end with a
newline character.

TextContent::preSaveTransform() does normalize revision text by simply
calling trim().  Thus to avoid a diff3 error we simply apply the same
normalization and add a newline to please the command.

Change-Id: I7baa3df95dd70cbc865b2491ccc791e60f8b9e6e

11 years agoMerge "(Bug 41352) Provide tests for edit conflicts."
Hashar [Sat, 10 Nov 2012 16:44:44 +0000 (16:44 +0000)]
Merge "(Bug 41352) Provide tests for edit conflicts."

11 years ago(Bug 41352) Provide tests for edit conflicts.
daniel [Sat, 10 Nov 2012 16:24:48 +0000 (17:24 +0100)]
(Bug 41352) Provide tests for edit conflicts.

This provides several test cases for EditPage, including some for
detecting and resolving edit conflicts. This is in preparation for
finding and eliminating the root cause of bug 41352.

Change-Id: I8f23c6535f7b3ee6462d9c5a19dd06070e77f9d1

11 years agoRemove unneeded third param
umherirrender [Sat, 10 Nov 2012 16:23:32 +0000 (17:23 +0100)]
Remove unneeded third param

the 'messages' are already part of 'preload', so there is no need for
that. Last changes there: r101507/r102304

Change-Id: I6c9daa3c46bd7f1db851cc4620ecf59f81e6f9aa

11 years agoMerge "Follow-up Ib2b8dfb8 (803abc7): fix a typo in a variable name"
Reedy [Sat, 10 Nov 2012 16:15:56 +0000 (16:15 +0000)]
Merge "Follow-up Ib2b8dfb8 (803abc7): fix a typo in a variable name"

11 years agoFollow-up Ib2b8dfb8 (803abc7): fix a typo in a variable name
Alexandre Emsenhuber [Sat, 10 Nov 2012 16:12:45 +0000 (17:12 +0100)]
Follow-up Ib2b8dfb8 (803abc7): fix a typo in a variable name

$mRetypePass should exist, the correct name is $mRetype.

Change-Id: I0bd65951f42a244a8810087f900b4a3c82358405

11 years agoMerge "Explicitly define member variables"
IAlex [Sat, 10 Nov 2012 16:11:33 +0000 (16:11 +0000)]
Merge "Explicitly define member variables"

11 years ago* (bug 41966) Follow-up I551a90b0 (c2172d4): fix fatal error in PoolWorkArticleView...
Alexandre Emsenhuber [Sat, 10 Nov 2012 15:29:56 +0000 (16:29 +0100)]
* (bug 41966) Follow-up I551a90b0 (c2172d4): fix fatal error in PoolWorkArticleView::doWork()

The error is Fatal error:  Call to a member function getParserOutput() on a non-object in includes/WikiPage.php on line 3363.

The problem is that if the fifth parameter passed to PoolWorkArticleView::__construct() is not given or is null, which is now
the case since the change mentioned on the first line of this commit summary, the content is fetched from Page::getContent().
When the Page object is a WikiPage instance there is no problem, but when this is an Article instance, Article::getContent()
actually returns the content as *string* and not as object, like it did before the Wikidata branch merge.

Worked arround this by passing the WikiPage object to PoolWorkArticleView from Article::view().

Also removed non-existing sixth parameter to PoolWorkArticleView::__construct().

Change-Id: I537862f519542de4f034be29bba4b75898382f59

11 years agoExplicitly define member variables
Reedy [Sat, 10 Nov 2012 15:05:02 +0000 (15:05 +0000)]
Explicitly define member variables

Change-Id: Ib2b8dfb84570557f1aeab474f4939e3a657c5732

11 years ago(Bug 41244) Gracefully handle failure to load text blob.
daniel [Mon, 29 Oct 2012 17:38:11 +0000 (18:38 +0100)]
(Bug 41244) Gracefully handle failure to load text blob.

This change fixes fatal errors ocurring when Revision::loadText
returns false because of a failure to load the text blob.
Revision::getContent() should simply return null in such a case.

Change-Id: I1e13de14ff15b124b5a2e07155d368595a16fda7

11 years agoMerge "(Bug 41352) Proper fix for vanishing content."
Reedy [Sat, 10 Nov 2012 13:47:47 +0000 (13:47 +0000)]
Merge "(Bug 41352) Proper fix for vanishing content."

11 years agoFollow-up I551a90b0 (c2172d4): add one more check for null content
Alexandre Emsenhuber [Sat, 10 Nov 2012 13:02:51 +0000 (14:02 +0100)]
Follow-up I551a90b0 (c2172d4): add one more check for null content

Change-Id: Ifa26ea8df0c5dd1f4c6ecabb9c8020bb84401ea3

11 years agoMerge "Beware that getContent() may return null"
IAlex [Sat, 10 Nov 2012 12:17:21 +0000 (12:17 +0000)]
Merge "Beware that getContent() may return null"

11 years agoMerge "Simplify cached check in Special:SpecialPages"
IAlex [Sat, 10 Nov 2012 11:54:10 +0000 (11:54 +0000)]
Merge "Simplify cached check in Special:SpecialPages"

11 years agoMerge "Lint: Go-go-gadget jshint! Passing entire JS code base (again)."
Hashar [Sat, 10 Nov 2012 11:52:26 +0000 (11:52 +0000)]
Merge "Lint: Go-go-gadget jshint! Passing entire JS code base (again)."

11 years agoLint: Go-go-gadget jshint! Passing entire JS code base (again).
Timo Tijhof [Wed, 26 Sep 2012 07:14:52 +0000 (09:14 +0200)]
Lint: Go-go-gadget jshint! Passing entire JS code base (again).

There were still some files not passing jshint, and for files
that did, we managed to screw 'em up again.

Added more explicit settings in .jshintrc to avoid relying on a
kind of default somewhere. There are too many default-factors:
closest(.jshintrc), ~/.jshintrc, IDE/editor, node-jshint..

Added node_modules/ and extensions/ to .jshintignore.
Previously "$ jshint ." would recurse over all kinds of
unrelated code. Extensions should have their own jshint
dotfiles. When linting from Jenkins this won't be a problem as
those will be ran per repo (so when linting core it will skip extensions and when in an extension dir, the core dotfiles
don't apply as they'll be out of scope).

Some of our modules are really messy and should be refactored
to be less spaghetti-ish and have more descriptive variable
names and more manageable function-level complexity.
But for this commit, I'm keeping it as much as-is as possible,
because its hard/large enough to review as it is.

A few errors are cited below to give an impression of the kind
of warnings I addressed (for cases where the diff isn't
so obvious):

* jquery.hidpi.js: line 110, col 15, Empty block.
* mediawiki.jqueryMsg.js: line 34, col 17, Too many var statements.
* mediawiki.jqueryMsg.js: line 145, col 33, Strings must use singlequote.
* mediawiki.action.edit.js: line 74, col 73, 'selectText' is defined but never used.
* startup.js: line 19, col 22, 'isCompatible' is defined but never used.
* jquery.byteLength.test.js: line 26, col 9, Identifier 'U_00A2' is not in camel case.
* jquery.localize.test.js: line 63, col 29, 'attrs' is defined but never used.
* mediawiki.cldr.test.js: line 72, col 27, 'mw' is not defined.
* mediawiki.jscompat.test.js: line 6, col 17, Strings must use singlequote.
* mediawiki.api.parse.test.js: line 9, col 17, Strings must use singlequote.
* mediawiki.api.parse.test.js: line 7, col 15, 'mw' is not defined.
* mediawiki.api.parse.test.js: line 14, col 24, '$' is not defined.
* mediawiki.api.test.js: line 43, col 28, 'data' is defined but never used.

Other fixes:
* Add closures fix implied global errors ($, mw and more),
  and prevents local variables from becoming globals.
* Avoid jQ magic map arg etc. (per code conventions).
* Fix incorrect usage of jQuery methods (prop instead of attr,
  prop false instead of removeProp, ..).
* Unquote keys in object literals for consistency, and
  enforce single quotes (no magic quotes in javascript, as much
  as we might think "\n" and '/n' are really exactly the same).
  Chose single quotes over double quotes since that's what most
  code already had and what conventions seemed to prefer
  (both the old generic ones and the new per-lang ones since
  2011/2012).
* Enforce camelCase variable names with jshint per code
  conventions.
* $foo.on('x', fn).trigger('x') -> $foo.on('x', fn); fn()
  (No event simulation overhead, unless intended of course)
* Incorrect indentation (ignore whitespace in the diff!).
* Avoid proprietary selectors like ':first' when .eq(0)
  afterwards is just as possible (significantly faster in
  jQuery due to mostly avoiding the Sizzle engine and going
  native in modern browsers).
* When at it, convert deprecated jQuery methods to new ones.
  Mostly just .delegate(sel, type, fn) -> .on(type, sel, fn).
* Addressed whitespace here and there.

Interesting:
* mediawiki.js: local function "compare" wasn't used anymore
  (hasn't been in a while!) removed per jshint warning.

* mediawiki.special.recentchanges.js: Was a mess, only a few
  lines of code, rewritten.

Pfew, let's hope it's the last one before we lint from Jenkins!

Change-Id: I23ad60a1d804c542d9b91454aaa20ce7be4ff289

11 years agoMerge "Add grammar tests for Hebrew"
Siebrand [Sat, 10 Nov 2012 10:28:05 +0000 (10:28 +0000)]
Merge "Add grammar tests for Hebrew"

11 years agoMerge "(bug 35923) tweaks to mediawiki.action.history.diff.css"
TheDJ [Sat, 10 Nov 2012 10:09:43 +0000 (10:09 +0000)]
Merge "(bug 35923) tweaks to mediawiki.action.history.diff.css"

11 years agoMake sure that SQLite uses no prefix
Max Semenik [Sat, 10 Nov 2012 09:54:10 +0000 (15:24 +0530)]
Make sure that SQLite uses no prefix

Otherwise, when user selects MySQL, sets the prefix,
then switches  to SQLite, the tables will created with  prefix
however the prefix will be absent from LocalSettings, making the
wiki dead on arrival.

Change-Id: I6360af819f87b03c2e9967207c43bca95f931a00

11 years agoAdd grammar tests for Hebrew
Amir E. Aharoni [Sat, 10 Nov 2012 09:45:27 +0000 (15:15 +0530)]
Add grammar tests for Hebrew

Change-Id: I0114c87ec63cc224f42c81497af41fe6e72a59bc

11 years agoMerge "Minor fixes to User and ApiQueryUsers"
IAlex [Sat, 10 Nov 2012 07:44:25 +0000 (07:44 +0000)]
Merge "Minor fixes to User and ApiQueryUsers"

11 years agoMerge "Localisation updates from http://translatewiki.net."
Translation updater bot [Fri, 9 Nov 2012 22:00:43 +0000 (22:00 +0000)]
Merge "Localisation updates from translatewiki.net."

11 years agoLocalisation updates from http://translatewiki.net.
Translation updater bot [Fri, 9 Nov 2012 21:42:28 +0000 (21:42 +0000)]
Localisation updates from translatewiki.net.

Change-Id: Id8e5a864eab7b0165aaa5bdb4546c54bff3e9364

11 years agoMerge "It should not be possible for a RequestContext's WikiPage and Title to be...
IAlex [Fri, 9 Nov 2012 21:38:09 +0000 (21:38 +0000)]
Merge "It should not be possible for a RequestContext's WikiPage and Title to be different."

11 years agoMinor fixes to User and ApiQueryUsers
Marius Hoch [Fri, 9 Nov 2012 21:23:14 +0000 (22:23 +0100)]
Minor fixes to User and ApiQueryUsers

I've fixed several PHP notices and the problem that rights returned
by User::getRights() might have duplicates if altered by a hook
(same for User::getEffectiveGroups).

Change-Id: Id92af387d8c09414076bac40e83052cd6f913f42

11 years agoBeware that getContent() may return null
daniel [Wed, 24 Oct 2012 13:00:13 +0000 (15:00 +0200)]
Beware that getContent() may return null

Before the introduction of the content handler, missing content was
signified by getText() returning null instead of a string. null will
work much like an empty string in most contexts, so in many places,
it was not checked explcitely whether the conent was null.

Now, when getContent() returns null, this often caused a fatal error,
because the code would access whatever getContent() returned as an object,
without checking whether it was null (because no such check was performed
previously, when the content was represented as a string).

This check introduces explicite checks for getContent() returning null
in the most essential core classes.

Change-Id: I551a90b0b67b8edc7570ca5d252ecc1de903f097

11 years agoMerge "Sanitize text input to $.fn.badge"
Kaldari [Fri, 9 Nov 2012 18:22:33 +0000 (18:22 +0000)]
Merge "Sanitize text input to $.fn.badge"

11 years agoMerge "Define $wgAlwaysUseTidy to false where needed in unit tests"
Nikerabbit [Fri, 9 Nov 2012 17:55:23 +0000 (17:55 +0000)]
Merge "Define $wgAlwaysUseTidy to false where needed in unit tests"

11 years agoSanitize text input to $.fn.badge
Ori Livneh [Fri, 9 Nov 2012 17:15:23 +0000 (09:15 -0800)]
Sanitize text input to $.fn.badge

Closes a potential XSS vector, as pointed out by Krinkle in
32091.

Change-Id: Iea702fb8736799dc7f8238e4cb357da22304c1dd

11 years agoSimplify cached check in Special:SpecialPages
umherirrender [Fri, 9 Nov 2012 15:57:54 +0000 (16:57 +0100)]
Simplify cached check in Special:SpecialPages

There is no need to repeat the condition from QueryPage::isCached and
check the misermode self.

Moved the method QueryPage::isCached to SpecialPage::isCached for easy
calling. Maybe in future some special pages would get cached and define
its own condition for that, so making false as default.

Simplify a count and add some spaces.

Change-Id: I71c9991e136f9c1a6a0123ae5305b39777d9135c

11 years agoMerge "Change copy of talk page link in personal tools"
Siebrand [Fri, 9 Nov 2012 15:40:31 +0000 (15:40 +0000)]
Merge "Change copy of talk page link in personal tools"

11 years agoFix E_STRICT in ForeignAPIRepo
Alexandre Emsenhuber [Fri, 9 Nov 2012 15:02:37 +0000 (16:02 +0100)]
Fix E_STRICT in ForeignAPIRepo

The error is "Strict Standards:  Declaration of ForeignAPIRepo::getZoneUrl() should be compatible with that of FileRepo::getZoneUrl() in includes/filerepo/ForeignAPIRepo.php on line 426".
The second parameter of ForeignAPIRepo::getZoneUrl() was missing.

Change-Id: I8f60ff9d6152225ae99c1420d3a80c72c40974eb

11 years agoMerge "fix testEditCount to work with non-wikitext content in main NS"
Hashar [Fri, 9 Nov 2012 13:14:27 +0000 (13:14 +0000)]
Merge "fix testEditCount to work with non-wikitext content in main NS"

11 years agomove ORMTableTest from Wikibase to core
aude [Thu, 8 Nov 2012 12:04:24 +0000 (12:04 +0000)]
move ORMTableTest from Wikibase to core

- this is more generally useful than to be buried inside Wikibase client.
- it was in Wikibase/client/tests/phpunit/includes/store/EntityCacheTableTest.php

- patchset 2: add to test autoloader

Change-Id: I5bc41d6d205f28bcc5bf0c8a78b782c8888c18eb

11 years agoOops, restoring the line I accidently deleted.
Kaldari [Fri, 9 Nov 2012 02:19:04 +0000 (18:19 -0800)]
Oops, restoring the line I accidently deleted.

Change-Id: Iefef1881648190c96ac8f6e0b57642018beb3643

11 years agoMerge "(bug 39383, bug 40059) Allowing badges to use strings and returning this"
Ori.livneh [Fri, 9 Nov 2012 01:25:01 +0000 (01:25 +0000)]
Merge "(bug 39383, bug 40059) Allowing badges to use strings and returning this"

11 years ago(bug 39383, bug 40059) Allowing badges to use strings and returning this
Kaldari [Tue, 6 Nov 2012 19:46:22 +0000 (11:46 -0800)]
(bug 39383, bug 40059) Allowing badges to use strings and returning this

Change-Id: Ic79c6116dfb3c7248eae4ad66092bd1edb8ef0a2

11 years agoChange copy of talk page link in personal tools
Ori Livneh [Sun, 4 Nov 2012 09:02:43 +0000 (01:02 -0800)]
Change copy of talk page link in personal tools

Adds message with key "mytalk-parenthetical", specifying the
text for "Talk" when it is wrapped in parentheses and
conjoined to the user page label.

Change is guarded by config variable "wgVectorCombineUserTalk",
set to false by default (which preserves the old behavior).

Per discussion on IRC and in
https://bugzilla.wikimedia.org/show_bug.cgi?id=41672

Change-Id: I822a73901c9b220983356e9e4a4ad5e7f8ebc7f1

11 years ago[FileJournal] Randomly prune old log entries.
Aaron Schulz [Wed, 7 Nov 2012 22:21:23 +0000 (14:21 -0800)]
[FileJournal] Randomly prune old log entries.

Change-Id: I667bfdaf167f2154d833b06de7115b4b292a0d2b