lhc/web/wiklou.git
12 years agoUpdate punctuation for error messages.
Siebrand Mazeland [Tue, 2 Aug 2011 08:10:47 +0000 (08:10 +0000)]
Update punctuation for error messages.

12 years ago* ApiTest: mark testApiGotCookie() broken, since it is
Chad Horohoe [Tue, 2 Aug 2011 04:04:03 +0000 (04:04 +0000)]
* ApiTest: mark testApiGotCookie() broken, since it is
* ApiTest: partially cleanup testApiListPages() to make it not depend on broken testApiGotCookie(). Not sure what we're testing here, so still marking incomplete.
* ApiWatchTest: mark testWatchClear() as broken rather than skipped due to failing testWatchEdit(). This class needs some love <3

12 years agomediawiki.Title: Removing public setter functions. Title object should be immutable.
Krinkle [Tue, 2 Aug 2011 03:11:08 +0000 (03:11 +0000)]
mediawiki.Title: Removing public setter functions. Title object should be immutable.
- To avoid repetition, instead of substituting, changed them to private helper functions
- Updated test suite to create new objects for different titles, rather than modifying the existing one.
- Adding missing unit tests, now 100% complete according to QUnit CompletnessTest
  + Test for Title.prototype.getNamespaceId
  + Test forTitle.prototype.getPrefixedText
  + Test forTitle.prototype.getExtension

Follows-up r90331 CR

12 years agobreaks in this file cause odd things to happen with RTL, removing line breaks
Neil Kandalgaonkar [Tue, 2 Aug 2011 00:38:36 +0000 (00:38 +0000)]
breaks in this file cause odd things to happen with RTL, removing line breaks

12 years agoadd maxWidth param
Neil Kandalgaonkar [Tue, 2 Aug 2011 00:36:38 +0000 (00:36 +0000)]
add maxWidth param

12 years agoCommit Preprocessor_DOM live hacks
Sam Reed [Mon, 1 Aug 2011 23:39:34 +0000 (23:39 +0000)]
Commit Preprocessor_DOM live hacks

12 years agoCommit live hack
Sam Reed [Mon, 1 Aug 2011 23:35:39 +0000 (23:35 +0000)]
Commit live hack

Commit to trunk also

12 years agoAdd Profiling to trunk from r93681
Sam Reed [Mon, 1 Aug 2011 23:28:16 +0000 (23:28 +0000)]
Add Profiling to trunk from r93681

12 years agoMerge live hack - Extra debugging on connection failures
Chad Horohoe [Mon, 1 Aug 2011 23:28:06 +0000 (23:28 +0000)]
Merge live hack - Extra debugging on connection failures

12 years agoMerge live hack - bumping version of minified stuff
Chad Horohoe [Mon, 1 Aug 2011 23:20:58 +0000 (23:20 +0000)]
Merge live hack - bumping version of minified stuff

12 years agoSqlite fails to open a connection when $user is given.
Chad Horohoe [Mon, 1 Aug 2011 22:57:34 +0000 (22:57 +0000)]
Sqlite fails to open a connection when $user is given.
Reported by lokkju in #wikimedia-tech

12 years agoPort 'editondblclick' js to ResourceLoader.
Krinkle [Mon, 1 Aug 2011 22:13:32 +0000 (22:13 +0000)]
Port 'editondblclick' js to ResourceLoader.
- Fixes (bug 27894) Move 'editondblclick' event listener down from body to
  div#bodyContent
- Patch by Nik <niknyby@gmail.com>
- Changes since patch:
  * Moved from OutputPage->headElement (where the bodyAttr-hack used to be) to addDefaultModules where other additions live
  * Added dependency on 'mediawiki.util', it must be initialized before mw.util.$content can be used
  * Whitespace conventions

12 years agoReorder some modules in Resources.php to match directory tree and alphabetical sorting.
Krinkle [Mon, 1 Aug 2011 21:46:54 +0000 (21:46 +0000)]
Reorder some modules in Resources.php to match directory tree and alphabetical sorting.

12 years agoFollows-up r93515 CR: Whitespace
Krinkle [Mon, 1 Aug 2011 21:03:57 +0000 (21:03 +0000)]
Follows-up r93515 CR: Whitespace

12 years ago[ResourceLoader2] Create getModuleNames() function
Krinkle [Mon, 1 Aug 2011 21:01:32 +0000 (21:01 +0000)]
[ResourceLoader2] Create getModuleNames() function
- Returns all keys from the (private) registry object as an array
- Needed for ResourceLoader 2 in order to do autosuggestions for dependancies and cheap non-http-request lookups to avoid duplicate keys when creating new modules/gadgets.

(bug 30160 ) Add public method to mw.loader to get module names from registry

12 years agoFixes Bug #30061 - Command line installer $wgScriptPath
Mark A. Hershberger [Mon, 1 Aug 2011 18:03:06 +0000 (18:03 +0000)]
Fixes Bug #30061 - Command line installer $wgScriptPath

Patch from Edward Z. Yang

12 years agoFixes Bug #30149 - Handling of parentheses for Korean, Chinese and Japanese
Mark A. Hershberger [Mon, 1 Aug 2011 17:37:25 +0000 (17:37 +0000)]
Fixes Bug #30149 - Handling of parentheses for Korean, Chinese and Japanese

Adapts the pipe trick with parens for fullwidth parentheses.  Adds parsertests.

Patch from Dan Collins.

12 years agoFix 'exif-gpsdestdistance-k' to use american spelling
Sam Reed [Mon, 1 Aug 2011 16:39:07 +0000 (16:39 +0000)]
Fix 'exif-gpsdestdistance-k' to use american spelling

12 years agow/s changes: “svn diff -x-w” is clean
Mark A. Hershberger [Mon, 1 Aug 2011 16:01:13 +0000 (16:01 +0000)]
w/s changes: “svn diff -x-w” is clean

12 years agofollow up r93626 - Forgot to credit Gero Scholz
Mark A. Hershberger [Mon, 1 Aug 2011 15:54:36 +0000 (15:54 +0000)]
follow up r93626 - Forgot to credit Gero Scholz

12 years agofixes Bug #27543 - “Warning: in_array() [function.in-array]: Wrong datatype for secon...
Mark A. Hershberger [Mon, 1 Aug 2011 15:50:49 +0000 (15:50 +0000)]
fixes Bug #27543 - “Warning: in_array() [function.in-array]: Wrong datatype for second argument in ParserOptions.php”

AFAICT, result of ParserOutput::getUsedOptions() is only used by ParserOptions::optionsHash() but that method doesn't account for a non-array value.

Patch supplied on bug.

12 years agow/s changes: “svn diff -x-w” is clean
Mark A. Hershberger [Mon, 1 Aug 2011 15:40:02 +0000 (15:40 +0000)]
w/s changes: “svn diff -x-w” is clean

12 years agoUpdate punctuation for a few fatal error messages.
Siebrand Mazeland [Mon, 1 Aug 2011 14:22:38 +0000 (14:22 +0000)]
Update punctuation for a few fatal error messages.

12 years agoLocalization update for he.
Rotem Liss [Sun, 31 Jul 2011 12:45:20 +0000 (12:45 +0000)]
Localization update for he.

12 years agoFixing Bug 27540 : width of <gallery> always 100%, by setting display to inline...
Leo Koppelkamm [Sun, 31 Jul 2011 09:25:02 +0000 (09:25 +0000)]
Fixing Bug 27540 :  width of <gallery> always 100%, by setting display to inline-block.

12 years agoFU r93017 : Reorder gallery css, to avoid unwanted indent.
Leo Koppelkamm [Sun, 31 Jul 2011 08:46:07 +0000 (08:46 +0000)]
FU r93017 : Reorder gallery css, to avoid unwanted indent.

12 years ago* (bug 30131) XCache with variable caching disabled no longer used for variable cachi...
Brion Vibber [Sun, 31 Jul 2011 01:52:38 +0000 (01:52 +0000)]
* (bug 30131) XCache with variable caching disabled no longer used for variable caching (CACHE_ACCEL)

Patch from John Du Hart: https://bugzilla.wikimedia.org/attachment.cgi?id=8849&action=diff

If XCache is present, but the xcache.var_size setting is off, we'll now consider it as xcache being disabled for CACHE_ACCEL purposes. It won't trigger view of the accelerator option in the installer, and at runtime if using CACHE_ACCEL and no other modules are available, it'll throw an error so you know that it doesn't work!

12 years agoClarify dual-licensing (GPL&Apache) of CSSJanus. Has no significant contributions...
Roan Kattouw [Sun, 31 Jul 2011 01:32:19 +0000 (01:32 +0000)]
Clarify dual-licensing (GPL&Apache) of CSSJanus. Has no significant contributions (i.e. changes other than very minor whitespace and Doxygen changes) by anyone other than me.

12 years agoFollow-up r93527: $value can also be null when not set
Alexandre Emsenhuber [Sat, 30 Jul 2011 20:27:32 +0000 (20:27 +0000)]
Follow-up r93527: $value can also be null when not set

12 years ago* Made OutputPage extend ContextSource instead of duplicating its code; this also...
Alexandre Emsenhuber [Sat, 30 Jul 2011 19:37:19 +0000 (19:37 +0000)]
* Made OutputPage extend ContextSource instead of duplicating its code; this also adds getLang() that was missing
* Use getLang() instead of $wgLang

12 years ago* Call Linker methods statically
Alexandre Emsenhuber [Sat, 30 Jul 2011 19:06:43 +0000 (19:06 +0000)]
* Call Linker methods statically
* Factorised calls to Skin::getTitle() in StandardTemplate::quickBar()

12 years agoLocalisation updates for core and extension messages from translatewiki.net (2011...
Raimond Spekking [Sat, 30 Jul 2011 19:06:20 +0000 (19:06 +0000)]
Localisation updates for core and extension messages from translatewiki.net (2011-07-30 18:43:00 UTC)

12 years agoBack out r93533, r93531, r93530
Sam Reed [Sat, 30 Jul 2011 15:56:54 +0000 (15:56 +0000)]
Back out r93533, r93531, r93530

Breaks unit tests as below, not going to be able to fix them before I disappear for the evening, so might aswell leave trunk clean

ArticleTablesTest testbug14404

Error:
ArticleTablesTest::testbug14404
Undefined offset: 0

/home/ci/cruisecontrol-bin-2.8.3/projects/mw/source/tests/phpunit/includes/ArticleTablesTest.php:31
/home/ci/cruisecontrol-bin-2.8.3/projects/mw/source/tests/phpunit/MediaWikiTestCase.php:60
/home/ci/cruisecontrol-bin-2.8.3/projects/mw/source/tests/phpunit/MediaWikiPHPUnitCommand.php:20
/home/ci/cruisecontrol-bin-2.8.3/projects/mw/source/tests/phpunit/phpunit.php:60

ParserTests testParserTest #552 - testParserTest with data set #551

Failure:
ParserTests::testParserTest with data set #551 ('RAW magic word', '{{RAW:QUERTY}}', '<p><a href="/index.php?title=Template:QUERTY&amp;action=edit&amp;redlink=1" class="new" title="Template:QUERTY (page does not exist)">Template:QUERTY</a>
</p>', '', '')
RAW magic word
Failed asserting that two strings are equal.
--- Expected
+++ Actual
@@ @@
-<p><a href="/index.php?title=Template:QUERTY&amp;action=edit&amp;redlink=1" class="new" title="Template:QUERTY (page does not exist)">Template:QUERTY</a>
+<p><a href="/index.php?title=Template:RAW:QUERTY&amp;action=edit&amp;redlink=1" class="new" title="Template:RAW:QUERTY (page does not exist)">Template:RAW:QUERTY</a>
 </p>

/home/ci/cruisecontrol-bin-2.8.3/projects/mw/source/tests/phpunit/includes/parser/NewParserTest.php:545
/home/ci/cruisecontrol-bin-2.8.3/projects/mw/source/tests/phpunit/MediaWikiTestCase.php:60
/home/ci/cruisecontrol-bin-2.8.3/projects/mw/source/tests/phpunit/MediaWikiPHPUnitCommand.php:20
/home/ci/cruisecontrol-bin-2.8.3/projects/mw/source/tests/phpunit/phpunit.php:60

12 years agoAdd FIXME on undefined variable
Sam Reed [Sat, 30 Jul 2011 15:51:58 +0000 (15:51 +0000)]
Add FIXME on undefined variable

12 years agoFollowup r93530
Sam Reed [Sat, 30 Jul 2011 15:41:39 +0000 (15:41 +0000)]
Followup r93530

Fix SqliteUpdater

Fix Undefined index: globaltemplatelinks in LinksUpdate

12 years agoMerge iwtransclusion branch into trunk
Sam Reed [Sat, 30 Jul 2011 15:30:01 +0000 (15:30 +0000)]
Merge iwtransclusion branch into trunk

12 years agoIn Special:ComparePages:
Alexandre Emsenhuber [Sat, 30 Jul 2011 15:03:21 +0000 (15:03 +0000)]
In Special:ComparePages:
* Validate title and revision when passed
* Don't display the diff if a field is not valid
* Pass the context to the HTMLForm and removed the setTitle() call

12 years ago:facepalm: Installer checked for magic_quotes_runtime instead of register_globals
Max Semenik [Sat, 30 Jul 2011 09:52:10 +0000 (09:52 +0000)]
:facepalm: Installer checked for magic_quotes_runtime instead of register_globals

12 years agoIncreasing coverage of mw.Title with unit tests.
Krinkle [Sat, 30 Jul 2011 08:08:24 +0000 (08:08 +0000)]
Increasing coverage of mw.Title with unit tests.

* QUnit Completeness Test – Before:
Title.prototype.getNamespaceId
Title.prototype.getPrefixedText
Title.prototype.getExtension
Title.prototype.setNameAndExtension
Title.prototype.getUrl
Title.prototype.exists

* QUnit Completeness Test – After:
Title.prototype.getNamespaceId
Title.prototype.getPrefixedText
Title.prototype.getExtension

12 years agoRelease-notes for r93517
Krinkle [Sat, 30 Jul 2011 07:41:57 +0000 (07:41 +0000)]
Release-notes for r93517

12 years agoAdding fix for bug 27427. Fixes unit test. Patch provided by Michael M. through BugZilla.
Krinkle [Sat, 30 Jul 2011 07:39:01 +0000 (07:39 +0000)]
Adding fix for bug 27427. Fixes unit test. Patch provided by Michael M. through BugZilla.

* (bug 27427) mw.util.getParamValue shouldn't return value from hash even if param is only present in hash.

(Follows-up r93516)

12 years agoAdding unit test for bug 27427. Currently broken. Fix (provided by Michael M. through...
Krinkle [Sat, 30 Jul 2011 07:38:01 +0000 (07:38 +0000)]
Adding unit test for bug 27427. Currently broken. Fix (provided by Michael M. through BugZilla) will be committed afterwards.

* (bug 27427) mw.util.getParamValue shouldn't return value from hash even if param is only present in hash

12 years agomediawiki.js request() caching deep level object member access.
Krinkle [Sat, 30 Jul 2011 06:33:46 +0000 (06:33 +0000)]
mediawiki.js request() caching deep level object member access.
- Instead of requesting index 0 of dependancies-argument, and the value of that of the registry, and the dependancies object in that of which we read the length property is very deep. Even worse when doing that both in the head and in the body of a for()-loop.
- Instead caching reference access to dependancies object of the registry item.
- Plus a simple by-value of the length property

12 years agoLocalisation update for core and extension messages from translatewiki.net (2011...
Raimond Spekking [Fri, 29 Jul 2011 21:25:33 +0000 (21:25 +0000)]
Localisation update for core and extension messages from translatewiki.net (2011-07-29 20:10:00)

12 years agoChanged stash age parameter from a constant to a config option, switched to seconds...
Ian Baker [Fri, 29 Jul 2011 18:46:24 +0000 (18:46 +0000)]
Changed stash age parameter from a constant to a config option, switched to seconds for consistency.
followup to r92030

12 years agoFixed r93468, made setCachedLastEditTime() public
Aaron Schulz [Fri, 29 Jul 2011 17:56:32 +0000 (17:56 +0000)]
Fixed r93468, made setCachedLastEditTime() public

12 years ago* Follow-up r93093: set the touch key for page moves too
Aaron Schulz [Fri, 29 Jul 2011 16:44:22 +0000 (16:44 +0000)]
* Follow-up r93093: set the touch key for page moves too
* Tweaked related WikiPage.php comments

12 years agofollowup r93415 — there is no “$this” in a static method.
Mark A. Hershberger [Fri, 29 Jul 2011 01:15:52 +0000 (01:15 +0000)]
followup r93415 — there is no “$this” in a static method.

12 years agoProvisional revert of r93319 -- change to TOC styles without coordinated cache updates.
Brion Vibber [Thu, 28 Jul 2011 22:00:09 +0000 (22:00 +0000)]
Provisional revert of r93319 -- change to TOC styles without coordinated cache updates.

Definitely shows different padding with the old cached markup and new styles in FF 5 though it's not a huge difference. Haven't tested in other browsers; IE needs testing in particular as it has funky special style bits.

Recommend:
* old markup should work uncahnged with the new styles -- this avoids any transition problems
* secondarily, consider updating parser cache version to force updates .... but you'd still want to do the above for pages that have been HTTP-cached!
* test all these renderings in all supported browsers and confirm that all is well with old & new markup

12 years agoRevert r93386 -- PLEASE STOP COMMITTING THESE THINGS WITHOUT CONFIRMING THAT THEY...
Brion Vibber [Thu, 28 Jul 2011 21:41:41 +0000 (21:41 +0000)]
Revert r93386 -- PLEASE STOP COMMITTING THESE THINGS WITHOUT CONFIRMING THAT THEY DO WHAT NEEDS TO BE DONE, THAT THEY DON'T CAUSE PROBLEMS, AND THAT THEY WON'T JUST GET REVERTED FOR THE FOURTH OR FIFTH TIME. THANK YOU.

12 years agooff-white background color matting should be applied only within the thumbnail box...
Ryan Kaldari [Thu, 28 Jul 2011 21:12:18 +0000 (21:12 +0000)]
off-white background color matting should be applied only within the thumbnail box, not to the gallerybox; also there is no point in printing the off-white matting, so I removed it completely from the print version

12 years agoRemoved useless $out variable from Skin::getCopyright()
Alexandre Emsenhuber [Thu, 28 Jul 2011 20:42:56 +0000 (20:42 +0000)]
Removed useless $out variable from Skin::getCopyright()

12 years agoLocalisation updates for core and extension messages from translatewiki.net (2011...
Raimond Spekking [Thu, 28 Jul 2011 20:16:14 +0000 (20:16 +0000)]
Localisation updates for core and extension messages from translatewiki.net (2011-07-28 19:51:00 UTC)

12 years agoFollowup r93412: Register new message key in maintenance file
Raimond Spekking [Thu, 28 Jul 2011 19:46:50 +0000 (19:46 +0000)]
Followup r93412: Register new message key in maintenance file
Consistent spelling of e-mail: email -> e-mail

12 years agowtf, who made this typo?
Mark A. Hershberger [Thu, 28 Jul 2011 19:44:53 +0000 (19:44 +0000)]
wtf, who made this typo?

12 years agofollow up r93397 — missed msgid
Mark A. Hershberger [Thu, 28 Jul 2011 19:38:28 +0000 (19:38 +0000)]
follow up r93397 — missed msgid

12 years agoAdd hook that could be the solution for Bug #28026 (“Enable e-mail
Mark A. Hershberger [Thu, 28 Jul 2011 19:19:42 +0000 (19:19 +0000)]
Add hook that could be the solution for Bug #28026 (“Enable e-mail
notifications for watchlist (EnotifWatchlist) on all small wikis”) to
make logging sent emails easier.

12 years agofurther sanity checks for sending email … bomb out if we aren't given
Mark A. Hershberger [Thu, 28 Jul 2011 19:15:58 +0000 (19:15 +0000)]
further sanity checks for sending email … bomb out if we aren't given
any user with an email address.

12 years agotabs are tabs, not spaces
Mark A. Hershberger [Thu, 28 Jul 2011 19:13:58 +0000 (19:13 +0000)]
tabs are tabs, not spaces

12 years ago* followup r93397 — missing $dest
Mark A. Hershberger [Thu, 28 Jul 2011 19:03:54 +0000 (19:03 +0000)]
* followup r93397 — missing $dest
* Otherwise clean up $dest usage
* Clean up Debug messages

12 years agoAdded typehint per my own suggestion in bug 28827. Otherwise we get pretty useless...
Niklas Laxström [Thu, 28 Jul 2011 17:48:35 +0000 (17:48 +0000)]
Added typehint per my own suggestion in bug 28827. Otherwise we get pretty useless errors if Title object is not passed here.

12 years agoarray of objects tostring conversion works correctly in php 5.2.3+
Mark A. Hershberger [Thu, 28 Jul 2011 17:25:19 +0000 (17:25 +0000)]
array of objects tostring conversion works correctly in php 5.2.3+

12 years agoReduce mail header differences by moving all the header creation code
Mark A. Hershberger [Thu, 28 Jul 2011 16:56:03 +0000 (16:56 +0000)]
Reduce mail header differences by moving all the header creation code
to one place.

12 years agoFollow-up r93386: fix editsection when user language direction != content lang dir
Robin Pepermans [Thu, 28 Jul 2011 13:34:57 +0000 (13:34 +0000)]
Follow-up r93386: fix editsection when user language direction != content lang dir

12 years agoRedo r93284 ( Make editsection link more understandable by positioning it directly...
Leo Koppelkamm [Thu, 28 Jul 2011 12:26:04 +0000 (12:26 +0000)]
Redo r93284 ( Make editsection link more understandable by positioning it directly left ( RTL: right ) of the title ) in a more simple way and also include parserTests and release notes this time

12 years agoFu r92231: PHP Fatal error: Call to a member function parse() on a non-object in...
Niklas Laxström [Thu, 28 Jul 2011 12:13:54 +0000 (12:13 +0000)]
Fu r92231: PHP Fatal error:  Call to a member function parse() on a non-object in /www/w/includes/specials/SpecialEditWatchlist.php on line 46

Maybe the method names need to be reconsidered to avoid errors like these?

12 years agor91728 : Fix a problem for api.php5 users and remove an unneeded function parameter...
Leo Koppelkamm [Thu, 28 Jul 2011 11:22:42 +0000 (11:22 +0000)]
r91728 : Fix a problem for api.php5 users and remove an unneeded function parameter from deliverResult

12 years agor91728 : Fix whitespace and two vars per CR
Leo Koppelkamm [Thu, 28 Jul 2011 11:02:21 +0000 (11:02 +0000)]
r91728 : Fix whitespace and two vars per CR

12 years agoreword r93378 per suggestion of Nikerabbit
Robin Pepermans [Thu, 28 Jul 2011 08:55:47 +0000 (08:55 +0000)]
reword r93378 per suggestion of Nikerabbit

12 years agoRelease note for r92832
Robin Pepermans [Thu, 28 Jul 2011 08:16:07 +0000 (08:16 +0000)]
Release note for r92832

12 years agoFixed typo. w/s cleanup.
Aaron Schulz [Thu, 28 Jul 2011 07:27:40 +0000 (07:27 +0000)]
Fixed typo. w/s cleanup.

12 years agoFu r93351: remove extra space
Niklas Laxström [Thu, 28 Jul 2011 06:41:45 +0000 (06:41 +0000)]
Fu r93351: remove extra space

12 years agoFollowup r93366: fix Opera bugs in textSelection. All tests pass in Opera now. Before...
Roan Kattouw [Thu, 28 Jul 2011 06:40:31 +0000 (06:40 +0000)]
Followup r93366: fix Opera bugs in textSelection. All tests pass in Opera now. Before, there were five failures
* replace \r\n with \n in the obtained output from getSelection. This fixes one failure
* In continuation of r93366, which updated post for added newlines in insertText, do the same for pre and also do this in the non-IE branch. This fixes one failure
* Look for \r as well as \n where line endings are concerned in the non-IE branch, just like in the IE branch. This fixes one failure
* Have the test case generator remap selection positions for Opera to account for the fact that a newline is double-counted. This fixes the remaining two failures

12 years agoFu r93249: I see no reason to mark this private - protected should be the default...
Niklas Laxström [Thu, 28 Jul 2011 06:13:13 +0000 (06:13 +0000)]
Fu r93249: I see no reason to mark this private - protected should be the default value, only use private if you have some reason to. Avoids most of the breakage in out of tree extensions.

12 years agoFu r93249 failed grepping
Niklas Laxström [Thu, 28 Jul 2011 06:11:24 +0000 (06:11 +0000)]
Fu r93249 failed grepping

12 years agoFix broken textSelection test case in IE. All textSelection tests are passing in...
Roan Kattouw [Thu, 28 Jul 2011 05:57:29 +0000 (05:57 +0000)]
Fix broken textSelection test case in IE. All textSelection tests are passing in IE now (at least on my local machine)

12 years agoApplying code conventions:
Krinkle [Thu, 28 Jul 2011 05:53:34 +0000 (05:53 +0000)]
Applying code conventions:
* size() -> length
* strict comparison to undefined instead of typeof + string comparison
* merge var statements
* strict comparison to 0 and ''
* dot notation
* trailing whitespace

12 years agoMake mw.user.options and mw.user.tokens work in debug mode in IE. Now that mw.user...
Roan Kattouw [Thu, 28 Jul 2011 05:48:57 +0000 (05:48 +0000)]
Make mw.user.options and mw.user.tokens work in debug mode in IE. Now that mw.user is a separate module, we have to make these depend on that and make sure dependencies are actually processed.
* Make ResourceLoaderUserOptionsModule and ResourceLoaderUserTokensModule depend on mw.user
* Load mw.user.{tokens,options,groups} load as TYPE_COMBINED instead of TYPE_SCRIPT. The latter wouldn't wrap the code in mw.loader.implement()
** ...but make sure 'user' (user scripts) is excluded, that one needs to not be wrapped in a closure
* Make TYPE_COMBINED actually work in makeResourceLoaderLink()
* Add a comment in makeModuleResponse() to explain what the weird is_array( $scripts ) stuff is all about
* Add FIXME about how mw.user.options should split off the CSS part into a separate module

12 years agoAjaxCategories rewrite:
Krinkle [Thu, 28 Jul 2011 00:43:21 +0000 (00:43 +0000)]
AjaxCategories rewrite:

Solving syntax problems, performance improvements and applying code conventions:

* Replaced sprite image with separate images and letting ResourceLoader embed them with @embed (@embed means 0 http requests, less maintenance, none of the known limitations with sprites, and more readable code (named files rather than pixel offsets)

* Many functions were floating in the global namespace (like window.makeCaseInsensitive). A statement ends after a semi-colon(;). All functions declared after "catUrl" were assigned to the window object. I've instead turned the semi-colons back into comma's, merged some other var statements and moved them to the top of the closure. Changed local function declarations into function expressions for clarity.

* fetchSuggestions is called by $.fn.suggestions like ".call( $textbox, $textbox.val() )". So the context (this) isn't the raw element but the jQuery object, no need to re-construct with "$(this)" or "$(that)" which is slow and shouldn't even work. jQuery methods can be called on it directly. I've also replaced "$(this).val()" with the value-argument passed to fetchSuggestions which has this exact value already.

* Adding more function documentation. And changing @since to 1.19 as this was merged from js2-branch into 1.19-trunk and new features aren't backported to 1.18.

* Optimizing options/default construction to just "options = $.extend( {}, options )". Caching defaultOptions is cool, but doesn't really work if it's in a context/instance local variable. Moved it up to the module closure var statements, now it's static across all instances.

* In makeSuggestionBox(): Fixing invalid html fragments passed to jQuery that fail in IE. Shortcuts (like '<foo>' and '<foo/>') are only allowed for createElement triggers, not when creating longer fragments with content and/or attributes which are created through innerHTML, in the latter case the HTML must be completely valid and is not auto-corrected by IE.

* Using more jQuery chaining where possible.

* In buildRegex(): Using $.map with join( '|' ), (rather than $.each with += '|'; and substr).

* Storing the init instance of mw.ajaxCategories in mw.page for reference (rather than local/anonymous).

* Applied some best practices and "write testable code"
** Moved some of the functions created on the fly and assigned to 'this' into prototype (reference is cheaper)
** Making sure at least all 'do', 'set' and/or 'prototype' functions have a return value. Even if it's just a simple boolean true or context/this for chain-ability.
** Rewrote confirmEdit( .., .., .., ) as a prototyped method named "doConfirmEdit" which takes a single props-object with named valuas as argument, instead of list with 8 arguments.

* Removed trailing whitespace and other minor fixes to comply with the code conventions.
** Removed space between function name and caller: "foo ()" => foo())
** Changing "someArray.indexOf() + 1" into "someArr.indexOf() !== -1". We want a Boolean here, not a Number.
** Renamed all underscore-variables to non-underscore variants.

== Bug fixes ==

* When adding a category that is not already on the page as-is but of which the clean() version is already on the page, the script would fail. Fixed it by moving the checks up in handleCategoryAdd() and making sure that createCatLink() actually returned something.

* confirmEdit() wasn't working properly and had unused code (such as submitButton), removed hidden prepending to #catlinks, no need to, it can be dialog'ed directly from the jQuery object without being somewhere in the document.

* in doConfirmEdit() in submitFunction() and multiEdit: Clearing the input field after adding a category, so that when another category is being added it doesn't start with the previous value which is not allowed to be added again...

12 years agoFollowup r93343
Sam Reed [Thu, 28 Jul 2011 00:28:18 +0000 (00:28 +0000)]
Followup r93343

Swap function_exists for MWInit::functionExists()

12 years agoFix syntax error from r93343
Sam Reed [Thu, 28 Jul 2011 00:23:52 +0000 (00:23 +0000)]
Fix syntax error from r93343

12 years agoFollowup r93344: forgot to fix test. In other news: inline data providing is eww.
Chad Horohoe [Thu, 28 Jul 2011 00:14:49 +0000 (00:14 +0000)]
Followup r93344: forgot to fix test. In other news: inline data providing is eww.

12 years agoMove wfFixBoxImage() out of ImageFunctions and into MediaHandler. It's only used...
Chad Horohoe [Thu, 28 Jul 2011 00:07:08 +0000 (00:07 +0000)]
Move wfFixBoxImage() out of ImageFunctions and into MediaHandler. It's only used by ImageHandler and OggHandler.

Where to move wfIsBadImage() so we can kill ImageFunctions?

12 years agomake sure sockets are enabled
Ryan Kaldari [Wed, 27 Jul 2011 23:54:21 +0000 (23:54 +0000)]
make sure sockets are enabled

12 years agoRevert r93237 ("use User::getBlock() accessor rather than accessing $mBlock directly...
Roan Kattouw [Wed, 27 Jul 2011 22:28:59 +0000 (22:28 +0000)]
Revert r93237 ("use User::getBlock() accessor rather than accessing $mBlock directly ..."): breaks a test (specifically TitlePermissionTest::testUserBlock()). From what I can tell it looks like the test case is expecting the text of the infinite-block message, but got a Message object instead

12 years agoRecommit r93264 ( Remove semantically incorrect wrapper table from toc and replace...
Leo Koppelkamm [Wed, 27 Jul 2011 21:53:28 +0000 (21:53 +0000)]
Recommit r93264 ( Remove semantically incorrect wrapper table from toc and replace it with an inline-blocked diff. Update some skin css, since we don't have the implicit table padding anymore and need to increase to padding to maintain the current look. ) with parser tests and release notes

12 years agosiprop=interwikimap and siprop=languages can now use silanguagecode to have a best...
Siebrand Mazeland [Wed, 27 Jul 2011 21:16:32 +0000 (21:16 +0000)]
siprop=interwikimap and siprop=languages can now use silanguagecode to have a best effort language name translation. Use CLDR extension for best result.

12 years agoTypo in message autoblockedtext
Antoine Musso [Wed, 27 Jul 2011 19:46:56 +0000 (19:46 +0000)]
Typo in message autoblockedtext

Follow up r85951

12 years agoLocalisation updates for core and extension messages from translatewiki.net (2011...
Raimond Spekking [Wed, 27 Jul 2011 19:26:23 +0000 (19:26 +0000)]
Localisation updates for core and extension messages from translatewiki.net (2011-07-27 19:08:00 UTC)

12 years agorevert r93284 and follow up r93285
Antoine Musso [Wed, 27 Jul 2011 19:24:43 +0000 (19:24 +0000)]
revert r93284 and follow up r93285

breaks parser tests. Please update the parser tests and reapply.

12 years agorevert r93264 : breaks ton of parser tests.
Antoine Musso [Wed, 27 Jul 2011 19:20:06 +0000 (19:20 +0000)]
revert r93264 : breaks ton of parser tests.

Please update the parser tests and reapply.

12 years agoUnicode space separator characters (Zs) now terminates links
Antoine Musso [Wed, 27 Jul 2011 18:03:01 +0000 (18:03 +0000)]
Unicode space separator characters (Zs) now terminates links

Fix 19052 which was only reporting the issue for U+3000 IDEOGRAPHIC SPACE.
Covers both external links and images links. See parser tests for examples.

Unicode 'Zs' includes all characters from the 'separator, space' category.
Characters part of this category are:

Char    Name
U+0020  SPACE
U+00A0  NO-BREAK SPACE
U+1680  OGHAM SPACE MARK
U+180E  MONGOLIAN VOWEL SEPARATOR
U+2000  EN QUAD
U+2001  EM QUAD
U+2002  EN SPACE
U+2003  EM SPACE
U+2004  THREE-PER-EM SPACE
U+2005  FOUR-PER-EM SPACE
U+2006  SIX-PER-EM SPACE
U+2007  FIGURE SPACE
U+2008  PUNCTUATION SPACE
U+2009  THIN SPACE
U+200A  HAIR SPACE
U+202F  NARROW NO-BREAK SPACE
U+205F  MEDIUM MATHEMATICAL SPACE
U+3000  IDEOGRAPHIC SPACE

TEST PLAN:

$ php parserTests.php --quiet
This is MediaWiki version 1.19alpha (r93258).

Reading tests from "tests/parser/parserTests.txt"...
Reading tests from "tests/parser/extraParserTests.txt"...
Reading tests from "../mwexts/LabeledSectionTransclusion/lstParserTests.txt"...
Passed 686 of 686 tests (100%)... ALL TESTS PASSED!

Sounds good :-)

12 years agoSkinLegacy:
Robin Pepermans [Wed, 27 Jul 2011 17:20:53 +0000 (17:20 +0000)]
SkinLegacy:
* fix Fatal error: Call to undefined method CologneBlueTemplate::makeExternalLink()
* Use static Linker functions for all other link functions
CologneBlue: check if browseLinks is an array (in a rare case it isn't, which returns a Warning, see e.g. r91432#c19211)

12 years agor93284 : Update rightClickEdit.js
Leo Koppelkamm [Wed, 27 Jul 2011 16:56:17 +0000 (16:56 +0000)]
r93284 : Update rightClickEdit.js

12 years agoFix Bug 11270 & Bug 11555 : Make editsection link more understandable by positioning...
Leo Koppelkamm [Wed, 27 Jul 2011 16:43:04 +0000 (16:43 +0000)]
Fix Bug 11270 & Bug 11555 : Make editsection link more understandable by positioning it directly left ( RTL: right ) of the title.
Patch by Aryeh Gregor, updated by Roan Kattouw, and updated again by me. I also fixed one bug with modern.css.
Tested in IE6,7,8, Chrome & FF in all skins and both LTR and RTL contexts. I tested with floating images above and below the headers and couldn't find regressions.

12 years agosmall style tweaks
Jeroen De Dauw [Wed, 27 Jul 2011 15:58:56 +0000 (15:58 +0000)]
small style tweaks

12 years agoFollow up r93253. Do not mark DatabaseSqliteTest.php as needing a db.
Platonides [Wed, 27 Jul 2011 14:50:10 +0000 (14:50 +0000)]
Follow up r93253. Do not mark DatabaseSqliteTest.php as needing a db.
An existing db is not needed, since it uses a memory one.
Having this in Database group fails in DatabaseSqlite->listTables
since it is working with a MockDatabaseSqlite whose query() return true.

12 years agoFix toc margin in modern skin per DieBuche on r90743
Robin Pepermans [Wed, 27 Jul 2011 14:38:23 +0000 (14:38 +0000)]
Fix toc margin in modern skin per DieBuche on r90743

12 years agoRename PROT_* constants to PROTO_*
Platonides [Wed, 27 Jul 2011 14:06:43 +0000 (14:06 +0000)]
Rename PROT_* constants to PROTO_*
Follow up r93258

12 years agoRemove semantically incorrect wrapper table from toc and replace it with an inline...
Leo Koppelkamm [Wed, 27 Jul 2011 13:24:19 +0000 (13:24 +0000)]
Remove semantically incorrect wrapper table from toc and replace it with an inline-blocked diff. Update some skin css, since we don't have the implicit table padding anymore and need to increase to padding to maintain the current look. Bug 13766