lhc/web/wiklou.git
13 years agoFix global var leaks in jquery.tablersorter.js
Derk-Jan Hartman [Wed, 22 Jun 2011 20:40:00 +0000 (20:40 +0000)]
Fix global var leaks in jquery.tablersorter.js

13 years agoLocalisation updates for core and extension messages from translatewiki.net (2011...
Raimond Spekking [Wed, 22 Jun 2011 20:28:03 +0000 (20:28 +0000)]
Localisation updates for core and extension messages from translatewiki.net (2011-06-22 20:10:00 UTC)

13 years agoAdd initial QUnit JS test cases for jquery.tablesorter -- NOTE THERE ARE IN FACT...
Brion Vibber [Wed, 22 Jun 2011 19:30:31 +0000 (19:30 +0000)]
Add initial QUnit JS test cases for jquery.tablesorter -- NOTE THERE ARE IN FACT REGRESSIONS FROM 1.17 VISIBLE HERE!

The numeric sorting doesn't work correctly, and the alphabetic sorting sometimes returns wrong results.

13 years agoUpdated calls to Linker to call them statically and removed useless parameter to...
Alexandre Emsenhuber [Wed, 22 Jun 2011 18:24:58 +0000 (18:24 +0000)]
Updated calls to Linker to call them statically and removed useless parameter to OutputPage::getSkin()

13 years agoRemoved usage of error suppression operator
Alexandre Emsenhuber [Wed, 22 Jun 2011 18:02:28 +0000 (18:02 +0000)]
Removed usage of error suppression operator

13 years agoRemoved hidden usage of $wgTitle in parser and the workarround in ExtraParserTest.php
Alexandre Emsenhuber [Wed, 22 Jun 2011 17:45:31 +0000 (17:45 +0000)]
Removed hidden usage of $wgTitle in parser and the workarround in ExtraParserTest.php

13 years agoFollow-up r90482: escape some more wikitext
Matěj Grabovský [Wed, 22 Jun 2011 14:59:05 +0000 (14:59 +0000)]
Follow-up r90482: escape some more wikitext

13 years agoFollow-up r90359: modify code per Krinkle's comments
Matěj Grabovský [Wed, 22 Jun 2011 14:51:25 +0000 (14:51 +0000)]
Follow-up r90359: modify code per Krinkle's comments

13 years ago* removed DEFAULT '' NOT NULL constraints as '' is internaly converted to NULL in...
Jure Kajzer [Wed, 22 Jun 2011 14:10:55 +0000 (14:10 +0000)]
* removed DEFAULT '' NOT NULL constraints as '' is internaly converted to NULL in Oracle and throws an error
* fixed tableName handling doSchemaUpgrade17 (must be careful to avoid multiple tableName calls as names don't get taged in DDL mode)
* exit/reenter DDL mode on updatelog inserts

13 years agoFollow-up r90369: Add third parameter to filetype-unwanted-type (for PLURAL)
Matěj Grabovský [Wed, 22 Jun 2011 13:35:24 +0000 (13:35 +0000)]
Follow-up r90369: Add third parameter to filetype-unwanted-type (for PLURAL)

Also use params() insted of numParams() on an ocassion, as it's not really needed there

13 years agoDirectionality improvements as part of bug 6100 (under $wgBetterDirectionality) for...
Robin Pepermans [Wed, 22 Jun 2011 13:10:46 +0000 (13:10 +0000)]
Directionality improvements as part of bug 6100 (under $wgBetterDirectionality) for the File namespace:
* exclude File namespace from div with lang & dir attributes, since most information on file pages is in the user language
* add <div id="mw-imagepage-content"> around the actual wikitext that is in the content language

13 years agoFix comment formatting
Sam Reed [Wed, 22 Jun 2011 00:37:34 +0000 (00:37 +0000)]
Fix comment formatting

13 years agoProvisional revert of r90538. I can't replicate the failures, but CI's been complaini...
Chad Horohoe [Wed, 22 Jun 2011 00:01:15 +0000 (00:01 +0000)]
Provisional revert of r90538. I can't replicate the failures, but CI's been complaining since this commit

13 years agoFollowup r90261
Sam Reed [Tue, 21 Jun 2011 23:28:50 +0000 (23:28 +0000)]
Followup r90261

Restore returning old value

13 years ago*grumble grumble* stupid fime on r90192
Chad Horohoe [Tue, 21 Jun 2011 21:38:29 +0000 (21:38 +0000)]
*grumble grumble* stupid fime on r90192

13 years agoFollowup r90020: use startid for consistency, and document endid
Chad Horohoe [Tue, 21 Jun 2011 21:14:26 +0000 (21:14 +0000)]
Followup r90020: use startid for consistency, and document endid

13 years agoLocalisation updates for core and extension messages from translatewiki.net (2011...
Raimond Spekking [Tue, 21 Jun 2011 20:39:02 +0000 (20:39 +0000)]
Localisation updates for core and extension messages from translatewiki.net (2011-06-21 20:15:00 UTC)

13 years agoSimplify checks by using wfMessage() instead of wfEmptyMsg()
Alexandre Emsenhuber [Tue, 21 Jun 2011 20:05:00 +0000 (20:05 +0000)]
Simplify checks by using wfMessage() instead of wfEmptyMsg()

13 years agoUploadTest::testTitleValidation accessed the database to fetch the interwikis.
Platonides [Tue, 21 Jun 2011 17:41:25 +0000 (17:41 +0000)]
UploadTest::testTitleValidation accessed the database to fetch the interwikis.
phase3/includes/upload/UploadBase.php:620
phase3/tests/phpunit/includes/UploadTest.php:120
phase3/tests/phpunit/includes/UploadTest.php:55
phase3/tests/phpunit/includes/UploadTest.php:35

$wgContLang not needed, TitlePermissionTest.php changes the language, inheriting from MediaWikiLangTestCase

13 years agoFollow up with the problem noted in r90530.
Platonides [Tue, 21 Jun 2011 15:13:03 +0000 (15:13 +0000)]
Follow up with the problem noted in r90530.
You can't pass the result of a function to reset(), since it expects a reference.

Those random errors show now as UploadStashFileException: error storing file in
'tests/phpunit/includes/upload/bug29408.': fileexistserror images/temp/0/02/20110621151405!bug29408.
because it gets run twice in the same second.

13 years agoRevert r90483, if tesla has problems, it should get proper permissions to the affecte...
Platonides [Tue, 21 Jun 2011 15:06:59 +0000 (15:06 +0000)]
Revert r90483, if tesla has problems, it should get proper permissions to the affected folders (or change the test to use a temp folder)
The test was not consistent, since first time it would use the svn file, which renames it... and on next run it would be missing!
I added the '.' to the unlik() step so it properly cleans up. Opened bug 29512 for the strange UploadStash behavior.

However, although it passes now most of the times, it sometimes fails with the strange exception:
Only variables should be passed by reference

phase3/includes/upload/UploadStash.php:143
phase3/tests/phpunit/includes/upload/UploadStashTest.php:22
phase3/tests/phpunit/MediaWikiTestCase.php:64
phase3/tests/phpunit/MediaWikiPHPUnitCommand.php:20
phase3/tests/phpunit/phpunit.php:60

13 years agoLocalization update for he.
Rotem Liss [Tue, 21 Jun 2011 14:12:15 +0000 (14:12 +0000)]
Localization update for he.

13 years agoFix r90500: move release note from API to bug fixes section
Robin Pepermans [Tue, 21 Jun 2011 12:16:01 +0000 (12:16 +0000)]
Fix r90500: move release note from API to bug fixes section

13 years ago* Improvements as part of bug 6100: Use wfUILang() instead of $wgContLang where appro...
Robin Pepermans [Tue, 21 Jun 2011 10:14:34 +0000 (10:14 +0000)]
* Improvements as part of bug 6100: Use wfUILang() instead of $wgContLang where appropriate
* Remove $wgContLang in SpecialVersion per r90302

13 years agoPer comment by Platonides on r90337: use wfGetLangObj() instead of Language::factory...
Robin Pepermans [Tue, 21 Jun 2011 09:45:06 +0000 (09:45 +0000)]
Per comment by Platonides on r90337: use wfGetLangObj() instead of Language::factory() and this->mPageLanguage is not needed

13 years ago* Made $useDB parameter of wfMsgGetKey() optional as in wfMsgReal() and removed it...
Alexandre Emsenhuber [Tue, 21 Jun 2011 07:43:27 +0000 (07:43 +0000)]
* Made $useDB parameter of wfMsgGetKey() optional as in wfMsgReal() and removed it where possible
* Removed it from the call to wfMsgReal() in wfMsg() too

13 years agocreate images with orientation (had to use exiv2 hack, imagemagick not helpful)
Neil Kandalgaonkar [Tue, 21 Jun 2011 03:40:53 +0000 (03:40 +0000)]
create images with orientation (had to use exiv2 hack, imagemagick not helpful)

13 years ago(bug 29492) Long-running steps in the installer (such as Upgrade and Install) can...
Chad Horohoe [Tue, 21 Jun 2011 01:13:45 +0000 (01:13 +0000)]
(bug 29492) Long-running steps in the installer (such as Upgrade and Install) can sometimes timeout

13 years ago(bug 29507) Change 'image link' to 'file link' in Special:Whatlinkshere
Brian Wolff [Mon, 20 Jun 2011 23:59:38 +0000 (23:59 +0000)]
(bug 29507) Change 'image link' to 'file link' in Special:Whatlinkshere

aka change english translation of 'isimage' message to file link.

13 years ago* Cleaned up tableNamesWithUseIndexOrJOIN() and removed some duplicated code
Aaron Schulz [Mon, 20 Jun 2011 23:21:24 +0000 (23:21 +0000)]
* Cleaned up tableNamesWithUseIndexOrJOIN() and removed some duplicated code
* Avoid @ operator in selectSQLText()
* Use array typecasting instead of manual checks

13 years ago* (bug 29278) server error 500 when attempting to add text to a page via redirect...
Sam Reed [Mon, 20 Jun 2011 22:32:08 +0000 (22:32 +0000)]
* (bug 29278) server error 500 when attempting to add text to a page via redirect (redirect points to the page and page is edited)

Needs 1.17 and 1.18 backporting, so release notes will go in 1.17

13 years agoRevert r90488, rename variable from r90487
Sam Reed [Mon, 20 Jun 2011 22:18:11 +0000 (22:18 +0000)]
Revert r90488, rename variable from r90487

13 years agoFollowup r90487, kill $result=null in middle
Sam Reed [Mon, 20 Jun 2011 22:16:22 +0000 (22:16 +0000)]
Followup r90487, kill $result=null in middle

13 years agoDefine a local variable for $result
Sam Reed [Mon, 20 Jun 2011 22:13:45 +0000 (22:13 +0000)]
Define a local variable for $result

13 years agoCode cleanups to ListFiles including r85548
Aaron Schulz [Mon, 20 Jun 2011 21:13:33 +0000 (21:13 +0000)]
Code cleanups to ListFiles including r85548

13 years agoMark test incomplete for a legitimate reason like trying to serialize a PDO object...
Chad Horohoe [Mon, 20 Jun 2011 20:24:53 +0000 (20:24 +0000)]
Mark test incomplete for a legitimate reason like trying to serialize a PDO object--rather than imaginary ones such as blaming memory_limit being too low when the test was being stupid and lowering it for us.

13 years agoFollow-up r90371, per comment by ^demon
Matěj Grabovský [Mon, 20 Jun 2011 19:45:35 +0000 (19:45 +0000)]
Follow-up r90371, per comment by ^demon

Escape wikitext in username before passing it to certain messages; also remove <nowiki>s in those as they're superfluous.

13 years agoLocalisation updates for core and extension messages from translatewiki.net (2011...
Raimond Spekking [Mon, 20 Jun 2011 18:56:46 +0000 (18:56 +0000)]
Localisation updates for core and extension messages from translatewiki.net (2011-06-20 18:39:00 UTC)

13 years agoMoved action=info to an Action subclass; also changed display to use a table (a bit...
Alexandre Emsenhuber [Mon, 20 Jun 2011 18:55:17 +0000 (18:55 +0000)]
Moved action=info to an Action subclass; also changed display to use a table (a bit like Special:Statistics) with a column for the page and one for the talk page

13 years agoExpand return documentation for r84357
Sam Reed [Mon, 20 Jun 2011 13:57:22 +0000 (13:57 +0000)]
Expand return documentation for r84357

13 years agoFollowup r90429:
Tim Starling [Mon, 20 Jun 2011 12:09:22 +0000 (12:09 +0000)]
Followup r90429:
* Reverted the public -> protected changes from r90429, except for doQuery() after a review of usage:
** resultObject() is used by lots of things in core and extensions.
** makeSelectOptions() is used by SMW, and if that's going to be public, the other two probably should be too, for consistency.
** doQuery() was used by several things, but mostly by mistake. It's been marked private since r21359 which is before almost all of them. I updated the callers to use query().

* Added "protected" to doQuery() declarations in other database classes.

13 years agoFu r90453. Updates comments
Niklas Laxström [Mon, 20 Jun 2011 10:19:52 +0000 (10:19 +0000)]
Fu r90453. Updates comments

13 years agoProposed fix for bug 29450. Don't use the current user's gender for invalid users.
Niklas Laxström [Mon, 20 Jun 2011 10:04:55 +0000 (10:04 +0000)]
Proposed fix for bug 29450. Don't use the current user's gender for invalid users.
Any ideas how to write tests for this?

13 years agoPartial revert of r86734: restore mPrefix - I still don't know what it does
Niklas Laxström [Mon, 20 Jun 2011 09:35:44 +0000 (09:35 +0000)]
Partial revert of r86734: restore mPrefix - I still don't know what it does

13 years agoFix for r90406: giving an OutputPage object instead of an User object is not really...
Alexandre Emsenhuber [Mon, 20 Jun 2011 08:07:50 +0000 (08:07 +0000)]
Fix for r90406: giving an OutputPage object instead of an User object is not really a good idea

13 years agoFix for r90429: removed call to protected method
Alexandre Emsenhuber [Mon, 20 Jun 2011 07:45:19 +0000 (07:45 +0000)]
Fix for r90429: removed call to protected method

13 years agoRevert the dbname -> dbName part of r90430. dbname actually dates back to r32578...
Tim Starling [Mon, 20 Jun 2011 07:40:07 +0000 (07:40 +0000)]
Revert the dbname -> dbName part of r90430. dbname actually dates back to r32578 and is referenced in the documentation for $wgDBservers, so it can't be easily changed. We can still kill tablename though, it's not too late.

13 years agoRemoved deprecated functions wfMsgNoDB(), wfMsgNoDBForContent() and wfMsgWeirdKey...
Alexandre Emsenhuber [Mon, 20 Jun 2011 07:26:14 +0000 (07:26 +0000)]
Removed deprecated functions wfMsgNoDB(), wfMsgNoDBForContent() and wfMsgWeirdKey(); no remaining use in core or extensions.

13 years agoFix for fatal error in r90429: you can't have a protected function in an interface.
Tim Starling [Mon, 20 Jun 2011 07:19:20 +0000 (07:19 +0000)]
Fix for fatal error in r90429: you can't have a protected function in an interface.

13 years agoFix for r72150: rename getSchema() to getSchemaPath(). This terminology creates an...
Tim Starling [Mon, 20 Jun 2011 07:16:09 +0000 (07:16 +0000)]
Fix for r72150: rename getSchema() to getSchemaPath(). This terminology creates an unfortunate and potentially confusing conflict with the PostgreSQL usage of the term. At some point in the future I'd like to have a getSchema() that gives you the PostgreSQL schema name ($wgDBmwschema). Strictly speaking, tables.sql is not a schema, it's an SQL file that creates a schema.

13 years agoFixes for r80864 for 1.18 backport:
Tim Starling [Mon, 20 Jun 2011 07:00:50 +0000 (07:00 +0000)]
Fixes for r80864 for 1.18 backport:
* Use camel case in tableName and dbName, dontrunallyourwordstogetherlikethis
* Call the function factory() instead of newFromType(), for consistency with the rest of MediaWiki

13 years agoIn Database.php:
Tim Starling [Mon, 20 Jun 2011 06:52:44 +0000 (06:52 +0000)]
In Database.php:
* Improved function documentation and doxygen output. Wrote extensive documentation for DatabaseBase::select().
* Broke some long lines.
* Made doQuery(), makeSelectOptions(), makeInsertOptions(), makeUpdateOptions() and resultObject() protected instead of public. Fixed a caller of doQuery(), the only one I could find in core and extensions.
* In Database::query(), removed some commented-out code, and made the comment style consistent within the function.

13 years ago(bug 29471) Exception thrown for files with invalid date in metadata
Bryan Tong Minh [Sun, 19 Jun 2011 21:38:58 +0000 (21:38 +0000)]
(bug 29471) Exception thrown for files with invalid date in metadata
MediaWiki doesn't handle BC dates nicely, so check for that.

13 years agoUse [] instead of { } for accessing string characters
Platonides [Sun, 19 Jun 2011 21:05:26 +0000 (21:05 +0000)]
Use [] instead of { } for accessing string characters

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