lhc/web/wiklou.git
13 years agoLocalisation updates for core and extension messages from translatewiki.net (2011...
Raimond Spekking [Sun, 19 Jun 2011 20:15:33 +0000 (20:15 +0000)]
Localisation updates for core and extension messages from translatewiki.net (2011-06-19 20:06:00 UTC)

13 years agoHTTP name
Platonides [Sun, 19 Jun 2011 19:39:54 +0000 (19:39 +0000)]
HTTP name

13 years agoFollow up r90334.
Platonides [Sun, 19 Jun 2011 18:53:55 +0000 (18:53 +0000)]
Follow up r90334.
Removes the space after the class name in $wgBetterDirectionality = false,
I think it is clearer to have the variable to hold the classes, instead of the *additional* classes.
Renamed to be clearer and be camelCase.
Added redundant htmlspecialchars() and spaces.

13 years agoFollowup r90385: Add new message key here too
Raimond Spekking [Sun, 19 Jun 2011 18:50:58 +0000 (18:50 +0000)]
Followup r90385: Add new message key here too

13 years agoRemove another empty test, courtesy of r65504.
Chad Horohoe [Sun, 19 Jun 2011 18:46:03 +0000 (18:46 +0000)]
Remove another empty test, courtesy of r65504.

13 years agoUpdate Chinese conversion tables.
Philip Tzou [Sun, 19 Jun 2011 18:10:24 +0000 (18:10 +0000)]
Update Chinese conversion tables.

13 years ago(bug 29342) Patrol preferences shouldn't be visible to users who don't have patrol...
Matěj Grabovský [Sun, 19 Jun 2011 18:07:13 +0000 (18:07 +0000)]
(bug 29342) Patrol preferences shouldn't be visible to users who don't have patrol permissions

Also show 'minordefault' only to those who can 'minoredit'

13 years agoFix up a couple of uses of context->object instead of context->getObject(). Fixes...
Chad Horohoe [Sun, 19 Jun 2011 17:38:02 +0000 (17:38 +0000)]
Fix up a couple of uses of context->object instead of context->getObject(). Fixes bug 29491

13 years agoChange $wgContLang->getDirMark() to wfUILang()->getDirMark() (improvement when $wgBet...
Robin Pepermans [Sun, 19 Jun 2011 14:27:55 +0000 (14:27 +0000)]
Change $wgContLang->getDirMark() to wfUILang()->getDirMark() (improvement when $wgBetterDirectionality is enabled)

13 years agoAlign text right to ensure that the icons are pushed to the margin, and do not line...
Siebrand Mazeland [Sun, 19 Jun 2011 13:44:48 +0000 (13:44 +0000)]
Align text right to ensure that the icons are pushed to the margin, and do not line left with the beginning of text as observed in translatewiki.net.

13 years agoMoved wfIsLocallyBlockedProxy() to User::isLocallyBlockedProxy() to put it near other...
Alexandre Emsenhuber [Sun, 19 Jun 2011 12:57:31 +0000 (12:57 +0000)]
Moved wfIsLocallyBlockedProxy() to User::isLocallyBlockedProxy() to put it near other proxy checks. No other call to that function in core or extension.

Also added a check to not execute a part of User::getBlockedStatus() if $ip is null.

13 years agoAdded back some rounding code lost in r90385
Aaron Schulz [Sun, 19 Jun 2011 09:27:08 +0000 (09:27 +0000)]
Added back some rounding code lost in r90385

13 years agoMore doc typos from r90385...coding at 4AM :)
Aaron Schulz [Sun, 19 Jun 2011 08:32:19 +0000 (08:32 +0000)]
More doc typos from r90385...coding at 4AM :)

13 years agoFixed doc typo in r90385
Aaron Schulz [Sun, 19 Jun 2011 07:28:37 +0000 (07:28 +0000)]
Fixed doc typo in r90385

13 years ago* Added (and use) $format param to formatTimePeriod() to make output less verbose...
Aaron Schulz [Sun, 19 Jun 2011 07:25:55 +0000 (07:25 +0000)]
* Added (and use) $format param to formatTimePeriod() to make output less verbose for ValidationStatistics_body.php
* Small w/s changes to FlaggedRevsStats.php

13 years ago(bug 29485) For rss feed of the RC, it groups consecutive edits by same user, but...
Brian Wolff [Sun, 19 Jun 2011 05:45:40 +0000 (05:45 +0000)]
(bug 29485) For rss feed of the RC, it groups consecutive edits by same user, but then links
to the diff of only one edit, instead of all of the grouped edits (but displays the combined diff directly in feed)

Also well I'm here, make it not group new page creation with subsequent edit, because that doesn't really work right.

13 years ago(bug 29437) Multiple apostrophes in deleted article title cause odd rendering
Matěj Grabovský [Sat, 18 Jun 2011 21:57:40 +0000 (21:57 +0000)]
(bug 29437) Multiple apostrophes in deleted article title cause odd rendering

Fixed by wrapping the username in corresponding messages in <nowiki>

13 years ago(bug 29325) Setting $wgStrictFileExtensions to false gives incorrect warning
Matěj Grabovský [Sat, 18 Jun 2011 21:27:24 +0000 (21:27 +0000)]
(bug 29325) Setting $wgStrictFileExtensions to false gives incorrect warning

Also use Language::commaList

13 years agoFix outputting AJAX
Matěj Grabovský [Sat, 18 Jun 2011 21:13:46 +0000 (21:13 +0000)]
Fix outputting AJAX

When calling remote functions, MW was outputting the result followed by page HTML. This was caused by calling the cleanup function, which also output the HTML, even after an AJAX request. Fixed by moving the call after AJAX is all safely handled.

13 years agoFollow-up r90356 & r90363: test deleteJoin() on SQLite
Max Semenik [Sat, 18 Jun 2011 20:37:02 +0000 (20:37 +0000)]
Follow-up r90356 & r90363: test deleteJoin() on SQLite

13 years agoAll the databases but MySQL were overriding DatabaseBase::deleteJoin() with the same...
Platonides [Sat, 18 Jun 2011 20:26:31 +0000 (20:26 +0000)]
All the databases but MySQL were overriding DatabaseBase::deleteJoin() with the same code.
Move DatabaseBase::deleteJoin() to DatabaseMysql::deleteJoin() and the common code to DatabaseBase::deleteJoin()
Follow up r90356

13 years agoFollow up r90361
Platonides [Sat, 18 Jun 2011 20:15:48 +0000 (20:15 +0000)]
Follow up r90361

13 years agoThere is a nice $limit parameter in PHP 5.4, but calling debug_backtrace on earlier...
Platonides [Sat, 18 Jun 2011 20:11:45 +0000 (20:11 +0000)]
There is a nice $limit parameter in PHP 5.4, but calling debug_backtrace on earlier versions with too much parameters, it errors returning null, so we need a PHP_VERSION comparison.

13 years agoLocalisation updates for core and extension messages from translatewiki.net (2011...
Raimond Spekking [Sat, 18 Jun 2011 20:03:21 +0000 (20:03 +0000)]
Localisation updates for core and extension messages from translatewiki.net (2011-06-18 19:52:00 UTC)

13 years ago(bug 29443) Special:Undelete should invert checkboxes without reloading
Matěj Grabovský [Sat, 18 Jun 2011 19:57:17 +0000 (19:57 +0000)]
(bug 29443) Special:Undelete should invert checkboxes without reloading

Committed patch with code originally by [[b:User:Darklama]]

13 years ago(bug 29476) DatabaseBase::deleteJoin fails for Sqlite
Matěj Grabovský [Sat, 18 Jun 2011 18:58:26 +0000 (18:58 +0000)]
(bug 29476) DatabaseBase::deleteJoin fails for Sqlite

Added deleteJoin() to DatabaseSqlite, C&P from DatabasePostgres

13 years agoUse makeTitle instead of newFromText since it comes from the DB
Aaron Schulz [Sat, 18 Jun 2011 18:11:28 +0000 (18:11 +0000)]
Use makeTitle instead of newFromText since it comes from the DB

13 years agoFollow-up r84718: updated enotif msg
Aaron Schulz [Sat, 18 Jun 2011 17:53:09 +0000 (17:53 +0000)]
Follow-up r84718: updated enotif msg

13 years agoTest suite for mw.Title (Follow-up r90331). Right now it matches the test suite in...
Krinkle [Sat, 18 Jun 2011 17:44:07 +0000 (17:44 +0000)]
Test suite for mw.Title (Follow-up r90331). Right now it matches the test suite in UploadWizard exactly (converted from jasmin to QUnit)

13 years agoFollow-up r90340: just add the test file to SVN, which hopefully fixes the cruisecont...
Bryan Tong Minh [Sat, 18 Jun 2011 17:27:32 +0000 (17:27 +0000)]
Follow-up r90340: just add the test file to SVN, which hopefully fixes the cruisecontrol problems.

13 years agowfProfileIn/wfProfileOut to the whole main()
Platonides [Sat, 18 Jun 2011 15:14:59 +0000 (15:14 +0000)]
wfProfileIn/wfProfileOut to the whole main()

13 years agoFollow-up r90007: clarify release notes about MacBinary a bit.
Bryan Tong Minh [Sat, 18 Jun 2011 15:11:43 +0000 (15:11 +0000)]
Follow-up r90007: clarify release notes about MacBinary a bit.

13 years agoFix double setTargetLanguage of r90337
Robin Pepermans [Sat, 18 Jun 2011 15:08:05 +0000 (15:08 +0000)]
Fix double setTargetLanguage of r90337

13 years ago(bug 29408) Key 'something.' is not in a proper format
Bryan Tong Minh [Sat, 18 Jun 2011 14:56:14 +0000 (14:56 +0000)]
(bug 29408) Key 'something.' is not in a proper format
Fixed this by relaxing the stash key regex. For some files MediaWiki is simply not able to guess an extension. If the wiki has been configured to allow them, we should just let them pass in the stash as well.

13 years agoAdd deprecated $wgArticle again. Fixes r88588.
Platonides [Sat, 18 Jun 2011 14:55:22 +0000 (14:55 +0000)]
Add deprecated $wgArticle again. Fixes r88588.

13 years agoAs discussed in r85918 CR. Move everything from wfIndexMain() at index.php to MediaWi...
Platonides [Sat, 18 Jun 2011 14:50:26 +0000 (14:50 +0000)]
As discussed in r85918 CR. Move everything from wfIndexMain() at index.php to MediaWiki class.
This makes index.php compatible again with PHP4 (as in showing a nice error message
instead of a parser error), which had been broken in r88959.

13 years agoAddress comment by Platonides on r90320:
Robin Pepermans [Sat, 18 Jun 2011 14:49:01 +0000 (14:49 +0000)]
Address comment by Platonides on r90320:
* undefined variable $list in CategoryPage.php
* move code in ParserOptions to a new member of Title class, which falls back to $wgContLang

13 years agoFollow up r90320. The purpose of wfProfileIn/Out is to profile
Platonides [Sat, 18 Jun 2011 14:01:12 +0000 (14:01 +0000)]
Follow up r90320. The purpose of wfProfileIn/Out is to profile
the contents of the function. So it shall be the last instruction.

13 years agoFollow-up to r90265: directionality improvements as part of bug 6100 (under $wgBetter...
Robin Pepermans [Sat, 18 Jun 2011 13:12:52 +0000 (13:12 +0000)]
Follow-up to r90265: directionality improvements as part of bug 6100 (under $wgBetterDirectionality):
* Correct directionality when viewing diffs
* Correct arrows for Pager
* CSS/JS pages always 'en' (LTR)
* Messages on Special:Allmessages have lang and dir attributes based on the selected language

13 years agoImplement mw.Title in core
Krinkle [Sat, 18 Jun 2011 09:17:09 +0000 (09:17 +0000)]
Implement mw.Title in core

* Based on UploadWizard/resources/mw.Title.js

* Refactored to use local scope and prototypes instead of re-declaring them per-instance in the private scope through 'this' (re-use by reference, faster instantiation and performance)

* Fix potential ReferenceError in the check for wgArticlePath (inline if statements will fail for undeclared variables, needs typeof undefined check). Using mw.config instead to avoid this problem.

* The following two methods were not ported from UploadWizard because they were or became redundant and/or merged with another method:
-- setNameText (redundant with the improved setName)
-- setPrefix (redundant wit the improved setNamespace)

* Ported all jasmine tests to QUnit. Left them exactly the same to make sure it's compatible with UploadWizard. Perhaps I'll expand or adjust the suite later to be less file-specific, but for now make letting this revision go through TestSwarm to be sure it's compatible and behaves exactly the same.

* Added getName() method instead, replacing direct access to '_name' This in order to check for wgCaseSensitiveNamespaces (bug 29441; r90234)
-- Prevents breakages on wiktionary and other wikis with case sensitivity. ie. on a Wiktionary:
new mw.Title('apple').toString()
> "Apple"
-- This fix will make it return 'apple' instead of 'Apple' (that is, if 0 is in wgCaseSensitiveNamespaces).

* There used to be a strip-bug in scenarios where a namespace-like string appears inside of a title. Imagine pagename: "Category:Wikipedia:Foo bar" (exist on several wikis; NS_CATEGORY= 14)

new mw.Title( 'Wikipedia:Foo bar', 14 ).toString()
> "Category:Foo_bar" // Stripped "Wikipedia:" !!

In order to fix this:
-- Removed assumption that every title has a namespace prefix. UploadWizard/mw.Title has one initialization RegExp (which was ported as-is to "setAll"). In addition there is now a "setNameAndExtension" method (which doesn't extract or set the namespace). Now the above case:

new mw.Title( 'Wikipedia:Foo bar', 14 ).toString()
> "Category:Wikipedia_Foo_bar" // Better, but now the colon is gone..

-- In order to fix that, "\x3a" was removed from the clean() function. Colons are valid in MediaWiki titles, no need to escape.

new mw.Title( 'Wikipedia:Foo bar', 14 ).toString()
> "Category:Wikipedia:Foo_bar" // Yay!

* Last but not least, another little bug fixed due to the previous point. It also fixed a thrown exception in case a colon is part of the title in the main namespace (not rare for movies and books):

new mw.Title( 'The Wiki: Awesomeness')
> Error: mw.Title> Unrecognized canonical namespace: the_wiki

This exception is thrown from setNamespace(). That exception would make sense if setNamespace() was called by the user direcly, but when called from setAll() it should gracefully fallback by putting the prefix in the name instead and assuming NS_MAIN (just like the server side does). To achieve this I added a try/catch around setAll() and fallback to the new setNameAndExtension().

* Passes JSHint.

* Additional feature: exists(). Return true/false if known, otherwise null. Extensions can populate this for titles they are interested in and the front-end can construct url's and UI elements with correct redlink-status. Gadgets can populate it as well but that would require an API-request to get the information. A bit of a stub for later use, although I think it works fine.

* Bugfix in jquery.qunit.completenessTest.js (first triggered by the introduction of mw.Title). Don't traverse the 'constructor' property (recursive loop, ouch!)

---

(bug 29397) Implement mw.Title module in core

13 years agofix invocation of static function
Neil Kandalgaonkar [Sat, 18 Jun 2011 03:36:44 +0000 (03:36 +0000)]
fix invocation of static function

13 years agoTweaked comments and code in confusing spot of doAutoblock()
Aaron Schulz [Sat, 18 Jun 2011 00:29:32 +0000 (00:29 +0000)]
Tweaked comments and code in confusing spot of doAutoblock()

13 years agogenerate random triangles (so we can test EXIF orientation, eventually)
Neil Kandalgaonkar [Fri, 17 Jun 2011 23:26:45 +0000 (23:26 +0000)]
generate random triangles (so we can test EXIF orientation, eventually)

13 years agoFollow-up to r90265: directionality improvements as part of bug 6100 (under $wgBetter...
Robin Pepermans [Fri, 17 Jun 2011 21:48:43 +0000 (21:48 +0000)]
Follow-up to r90265: directionality improvements as part of bug 6100 (under $wgBetterDirectionality):
* Use ParserOptions()->getTargetLanguage() for setting the page language/direction
* Set headings on categories in user language/direction
* Only set language/direction when viewing a page (or editing but only preview and textarea)

13 years agoskip gzip tests if gzip is turned off
Ryan Kaldari [Fri, 17 Jun 2011 21:15:24 +0000 (21:15 +0000)]
skip gzip tests if gzip is turned off

13 years agoless confusing error message
Ryan Kaldari [Fri, 17 Jun 2011 20:58:36 +0000 (20:58 +0000)]
less confusing error message

13 years agoFix type in code doc from r82433
Max Semenik [Fri, 17 Jun 2011 20:02:39 +0000 (20:02 +0000)]
Fix type in code doc from r82433

13 years agoLocalisation updates for core and extension messages from translatewiki.net (2011...
Raimond Spekking [Fri, 17 Jun 2011 19:27:16 +0000 (19:27 +0000)]
Localisation updates for core and extension messages from translatewiki.net (2011-06-17 19:08:00 UTC)

13 years agoRemove unneeded div with dir on Special:Version. It used to be English-only (LTR...
Robin Pepermans [Fri, 17 Jun 2011 18:11:15 +0000 (18:11 +0000)]
Remove unneeded div with dir on Special:Version. It used to be English-only (LTR-only) and was changed in r51839 but it inherits the page directionality anyway.

13 years agoIn wfBacktrcae(): print "->" or "::" whether the function was called dynamically...
Alexandre Emsenhuber [Fri, 17 Jun 2011 17:13:43 +0000 (17:13 +0000)]
In wfBacktrcae(): print "->" or "::" whether the function was called dynamically or statically instead of always "::"

13 years agoFix r85635. Move LocalFile::publish() magic to LocalFile::publishTo() which has an...
Bryan Tong Minh [Fri, 17 Jun 2011 17:12:20 +0000 (17:12 +0000)]
Fix r85635. Move LocalFile::publish() magic to LocalFile::publishTo() which has an explicit $destRel argument.

13 years agoPer comments on r88145: unlink file if it is broken
Bryan Tong Minh [Fri, 17 Jun 2011 16:48:42 +0000 (16:48 +0000)]
Per comments on r88145: unlink file if it is broken

13 years agoPer comments revert r88904 and remove session_write_close entirely. This will leave...
Bryan Tong Minh [Fri, 17 Jun 2011 16:42:58 +0000 (16:42 +0000)]
Per comments revert r88904 and remove session_write_close entirely. This will leave async uploads broken until somebody writes a way to interact with the session per comments on r87235.

13 years agoRemoved useless check for existence of wfWaitForSlaves()
Alexandre Emsenhuber [Fri, 17 Jun 2011 16:39:21 +0000 (16:39 +0000)]
Removed useless check for existence of wfWaitForSlaves()

13 years agoSwap else if for elseif
Sam Reed [Fri, 17 Jun 2011 16:05:35 +0000 (16:05 +0000)]
Swap else if for elseif

Trimming trailing whitespace also

Doing in 3 commits (3/3), so hopefully reviewable in CR...

13 years agoSwap else if for elseif
Sam Reed [Fri, 17 Jun 2011 16:05:05 +0000 (16:05 +0000)]
Swap else if for elseif

Trimming trailing whitespace also

Doing in 3 commits (2/3), so hopefully reviewable in CR...

13 years agoSwap else if for elseif
Sam Reed [Fri, 17 Jun 2011 16:03:52 +0000 (16:03 +0000)]
Swap else if for elseif

Trimming trailing whitespace also

Doing in 3 commits, so hopefully reviewable in CR...

13 years agoFix trailing whitespace
Sam Reed [Fri, 17 Jun 2011 15:59:55 +0000 (15:59 +0000)]
Fix trailing whitespace

13 years ago* (bug 25133) allow redirects also for action=parse&pageid
Sam Reed [Fri, 17 Jun 2011 15:57:00 +0000 (15:57 +0000)]
* (bug 25133) allow redirects also for action=parse&pageid

13 years agoFollowup r89539, per CR, we don't need to append iw string as it already exists in...
Sam Reed [Fri, 17 Jun 2011 15:24:40 +0000 (15:24 +0000)]
Followup r89539, per CR, we don't need to append iw string as it already exists in rawTitleStr

13 years agoAdd setOuput method
Sam Reed [Fri, 17 Jun 2011 15:07:51 +0000 (15:07 +0000)]
Add setOuput method

13 years agoRelated to bug 29278, and from the comments in bug 14210, mention the edit token...
Sam Reed [Fri, 17 Jun 2011 14:55:03 +0000 (14:55 +0000)]
Related to bug 29278, and from the comments in bug 14210, mention the edit token should be sent last/after the text parameter

13 years agoEmpower our Database object so that it is possible to perform NOT NULL queries (SELEC...
Platonides [Fri, 17 Jun 2011 14:54:41 +0000 (14:54 +0000)]
Empower our Database object so that it is possible to perform NOT NULL queries (SELECT abc WHERE xyz IS NOT NULL)

13 years agoFix more __get() calls on RequestContext
Sam Reed [Fri, 17 Jun 2011 13:27:39 +0000 (13:27 +0000)]
Fix more __get() calls on RequestContext

13 years agoImprove lang and dir of content div (when $wgBetterDirectionality is enabled):
Robin Pepermans [Fri, 17 Jun 2011 11:49:37 +0000 (11:49 +0000)]
Improve lang and dir of content div (when $wgBetterDirectionality is enabled):
* Do not set lang and dir for special pages (those are in the user language)
* Set lang and dir of content of pages in MediaWiki namespace based on the current page instead of site language, e.g. MediaWiki:Message/ar is lang="ar" and dir="rtl"

13 years ago(part of bug 6100) Set the directionality based on user language instead of content...
Robin Pepermans [Fri, 17 Jun 2011 11:32:42 +0000 (11:32 +0000)]
(part of bug 6100) Set the directionality based on user language instead of content language (as in r81622, but only when $wgBetterDirectionality is enabled)

13 years agoAdd release note for r89329 (renamed localisation 'roa-rup' to 'rup')
Robin Pepermans [Fri, 17 Jun 2011 10:49:39 +0000 (10:49 +0000)]
Add release note for r89329 (renamed localisation 'roa-rup' to 'rup')

13 years agoFixing up most of the magic get/set stuff
Sam Reed [Fri, 17 Jun 2011 10:29:39 +0000 (10:29 +0000)]
Fixing up most of the magic get/set stuff

13 years ago(29 lines skipped) [17-Jun-2011 10:03:59] PHP Notice: Use of RequestContext::__get...
Sam Reed [Fri, 17 Jun 2011 10:07:40 +0000 (10:07 +0000)]
(29 lines skipped) [17-Jun-2011 10:03:59] PHP Notice:  Use of RequestContext::__get() is deprecated; use $context->getFoo() instead is  deprecated. [Called from MediaWiki::parseTitle in /www/w/includes/Wiki.php at line 36] in /www/w/includes/GlobalFunctions.php on line 3342

Swap $this->context->request to $this->context->getRequest()

13 years agorevert r87808 - Its broken, and looks rather complex to fix, especially with namespac...
Brian Wolff [Fri, 17 Jun 2011 03:56:21 +0000 (03:56 +0000)]
revert r87808 - Its broken, and looks rather complex to fix, especially with namespace aliases.

See comments on r87808 for details.

13 years ago(follow-up r86567) per CR rename the class JpegOrTiffHandler to ExifBitmapHandler.
Brian Wolff [Fri, 17 Jun 2011 03:37:59 +0000 (03:37 +0000)]
(follow-up r86567) per CR rename the class JpegOrTiffHandler to ExifBitmapHandler.

13 years agoMinor doc fix to r84741
Sam Reed [Thu, 16 Jun 2011 23:40:13 +0000 (23:40 +0000)]
Minor doc fix to r84741

Remove unreachable code from WatchAction

Documentation added to Init.php

13 years agofollow up r84134 — removing passing $this by reference
Mark A. Hershberger [Thu, 16 Jun 2011 23:36:41 +0000 (23:36 +0000)]
follow up r84134 — removing passing $this by reference

13 years agostray tab removal
Mark A. Hershberger [Thu, 16 Jun 2011 23:35:23 +0000 (23:35 +0000)]
stray tab removal

13 years agoFix Bug #28344 - “Links doesn't work inside collapsible toggles”
Mark A. Hershberger [Thu, 16 Jun 2011 22:27:22 +0000 (22:27 +0000)]
Fix Bug #28344 - “Links doesn't work inside collapsible toggles”
Patch from mybugs.mail

    If a link is added inside of a collapsible toggle and a user click on it, the
    target page should be opened.
    …
    The attached patch was tested locally and fixes this bug (clicking outside the
    link toogles the collapsed content, and clicking on the link opens the target
    page).

    PS: It is the same code which was used to fix the problem on Commons.

    http://commons.wikimedia.org/w/index.php?diff=45383826&oldid=45265712

13 years agoRelease-notes for r90234
Krinkle [Thu, 16 Jun 2011 21:22:51 +0000 (21:22 +0000)]
Release-notes for r90234

13 years ago(bug 29441) Expose CapitalLinks config in JS to allow modules to properly handle...
Krinkle [Thu, 16 Jun 2011 21:20:05 +0000 (21:20 +0000)]
(bug 29441) Expose CapitalLinks config in JS to allow modules to properly handle titles on case-sensitive wikis.

This brings us one step closer towards:
(bug 29397) Implement mw.Title module in core

13 years agoRevert r90232.
Krinkle [Thu, 16 Jun 2011 21:18:40 +0000 (21:18 +0000)]
Revert r90232.

13 years agoImplement mw.Title in core
Krinkle [Thu, 16 Jun 2011 21:16:50 +0000 (21:16 +0000)]
Implement mw.Title in core
* Based on UploadWizard/resources/mw.Title.js
* Refactored to use local scope and prototypes instead of per-instance private scope (less references, faster instantiation)
* Fix potential ReferenceError in the check for wgArticlePath (inline if statements will fail to evaluate for undeclared variables). Using mw.config instead
* The following were not ported because they are or were already redundant and/or merged with another method:
-- setNameText (redundant with the improved setName)
-- setPrefix (redundant wit the improved setNamespace)
* Ported all jasmine tests to QUnit. Left them exactly the same to make sure it's compatible with UploadWizard. Perhaps I'll expand or adjust the suite later to be less file-specific, but for now make sure it's compatible and the same.

@todo FIXME

* Removed assumption that every title has a namespace prefix in it by creating a separate RegExp when there is a namespace given

** Fixes strip-bug in cases where a namespace appears to be part of a title when the namespace is also given: "Project:User:Foobar"

new mw.Title( 'User:Foobar', 4 ).toString()
> 'Project:Foobar'

** Fixes a thrown exception in case a colon is part of the title (colons are valid in MediaWiki pagenames!)

new mw.Title( 'Just some:Random page')
> Error: mw.Title> Unrecognized canonical namespace: just_some

* Added check for capitalLinks et (wasn't possible before due to bug X)

** Prevents breakages on wiktionary and other wikis with case sensitivity.

13 years agoCopy teardownUploadDir(),deleteFiles(),deleteDirs() from parserTest.inc Move down...
Platonides [Thu, 16 Jun 2011 21:07:37 +0000 (21:07 +0000)]
Copy teardownUploadDir(),deleteFiles(),deleteDirs() from parserTest.inc Move down teardownGlobals()
This almost fixes the issue of hundreds of leaking mwParser-*-images files at temp dir.
For some unknown reason, there's still one instance left, though.

PS: I thought I had committed this time ago...

13 years agoMark as needing a db.
Platonides [Thu, 16 Jun 2011 21:06:11 +0000 (21:06 +0000)]
Mark as needing a db.
Remove double data insertion

13 years agoRemove trailing newline from pass, which is very unlikely to be intended.
Platonides [Thu, 16 Jun 2011 21:01:52 +0000 (21:01 +0000)]
Remove trailing newline from pass, which is very unlikely to be intended.

13 years agoAllow to provide the db password inside a file instead of using
Platonides [Thu, 16 Jun 2011 20:58:12 +0000 (20:58 +0000)]
Allow to provide the db password inside a file instead of using
the command line, so that it isn't exposed in the process list.

Sadly, use of /dev/stdin or <(process) doesn't work in Linux,
since they are shown as symlinks to pipe:[12345678] and php
dereferences all of them. It has to be a real file.
However, such constructs work in Solaris, where they are
presented as character devices.

13 years agoFix indenting
Sam Reed [Thu, 16 Jun 2011 20:57:31 +0000 (20:57 +0000)]
Fix indenting

13 years agoPer ^demon, added entry for r87557 (removal of LogPageValidTypes, LogPageLogName...
Alexandre Emsenhuber [Thu, 16 Jun 2011 20:21:53 +0000 (20:21 +0000)]
Per ^demon, added entry for r87557 (removal of LogPageValidTypes, LogPageLogName, LogPageLogHeader and LogPageActionText hooks)

13 years agoGroupped URL-related functions
Alexandre Emsenhuber [Thu, 16 Jun 2011 19:09:03 +0000 (19:09 +0000)]
Groupped URL-related functions

13 years ago* (bug 29426) Fix wrong use of Block::load's second parameter in BlockTest
Brion Vibber [Thu, 16 Jun 2011 17:58:26 +0000 (17:58 +0000)]
* (bug 29426) Fix wrong use of Block::load's second parameter in BlockTest

It was accidentally passing a username where it should have passed a user ID, causing PostgreSQL's stricter comparisons to fail, while MySQL's allowed it to run without complaint but returned bad results.
Of course that bug got hidden by the test.... testing the wrong thing... :)

Now correctly loads using the user id instead of name, checks the proper return values, and actually compares the right object.

13 years agoRemoved usage of error suppression operator
Alexandre Emsenhuber [Thu, 16 Jun 2011 17:38:26 +0000 (17:38 +0000)]
Removed usage of error suppression operator

13 years ago* (bug 29091) Fix form of native name for Ossetic language (Иронау -> Ирон)
Brion Vibber [Thu, 16 Jun 2011 17:34:40 +0000 (17:34 +0000)]
* (bug 29091) Fix form of native name for Ossetic language (Иронау -> Ирон)

13 years agoRevert r88988
Platonides [Thu, 16 Jun 2011 16:54:06 +0000 (16:54 +0000)]
Revert r88988

13 years agoFixes for r90105, r90193:
Tim Starling [Thu, 16 Jun 2011 05:52:16 +0000 (05:52 +0000)]
Fixes for r90105, r90193:
* Actually removed $wgProto.
* Per Aryeh's suggestions on the future of $wgServer: made $wgServer detection in DefaultSettings.php more permanent by merging it with the new code from r90105. This means that bug 14977 is properly fixed now.
* Require entry points to set up the autoloader before including DefaultSettings.php. Comments on bug 14977 indicate that at some point in the past, this may have broken something. Anything that breaks now should just be fixed, we need the autoloader. Tested the most common entry points.
* Since the detection code has moved from Installer to WebRequest, I also moved the relevant test file and updated the test. The function under test is now public static, so r90154 is superseded.

13 years agoRemoved $wgProto. Previously, setting this undocumented global variable to anything...
Tim Starling [Thu, 16 Jun 2011 05:13:29 +0000 (05:13 +0000)]
Removed $wgProto. Previously, setting this undocumented global variable to anything other than the part of $wgServer before the first colon would cause various things to subtly screw up. Similarly, forgetting to set it when you override $wgServer in LocalSettings.php would break things too.

Exposing it in the default LocalSettings.php as I did in r90105 was not a good solution, really the only way to avoid breakage is to just get the protocol from $wgServer whenever you need the protocol.

Fixed $wgCookieSecure so that it will be enabled automatically if the user sets $wgServer to an https URL in LocalSettings.php. Added documentation for other cookie-related globals.

Grep indicates that $wgProto is not used by any extensions. $wgCookieSecure is used, hence the need for the Setup.php patch.

13 years agoFollowup to r89452, remove ftp test cases since Http::isValidUri() doesn't do ftp...
Chad Horohoe [Thu, 16 Jun 2011 02:58:00 +0000 (02:58 +0000)]
Followup to r89452, remove ftp test cases since Http::isValidUri() doesn't do ftp anymore

13 years agoAnother stub test file...this one has been like this since r72258
Chad Horohoe [Wed, 15 Jun 2011 23:24:23 +0000 (23:24 +0000)]
Another stub test file...this one has been like this since r72258

13 years agoAnother empty "Has not been implemented" test
Chad Horohoe [Wed, 15 Jun 2011 23:17:11 +0000 (23:17 +0000)]
Another empty "Has not been implemented" test

13 years agoAdd dummy assertion to shut up phpunit yelling about it
Chad Horohoe [Wed, 15 Jun 2011 23:15:36 +0000 (23:15 +0000)]
Add dummy assertion to shut up phpunit yelling about it

13 years agoFollowup 90161 (which breaks the test). Need to hack around to avoid a reload from db.
Platonides [Wed, 15 Jun 2011 21:32:08 +0000 (21:32 +0000)]
Followup 90161 (which breaks the test). Need to hack around to avoid a reload from db.

13 years agoDocument from r87129 summary
Platonides [Wed, 15 Jun 2011 21:23:47 +0000 (21:23 +0000)]
Document from r87129 summary

13 years agor87164 removed mDataLoaded and broke this test databaseless nature.
Platonides [Wed, 15 Jun 2011 21:22:08 +0000 (21:22 +0000)]
r87164 removed mDataLoaded and broke this test databaseless nature.

13 years agoMake sure to die if there are more MediaWikiLangTestCase::tearDowns than setUp()s...
Platonides [Wed, 15 Jun 2011 21:07:12 +0000 (21:07 +0000)]
Make sure to die if there are more MediaWikiLangTestCase::tearDowns than setUp()s (such as r90150 & r90155)