Platonides [Sun, 20 Feb 2011 00:13:26 +0000 (00:13 +0000)]
Save and restore $wgHooks in NewParserTest.
ParserGetVariableValueTs hook still being set to ParserTest::getFakeTimestamp was the reason for the crazy failures of MagicVariableTest inside phpunit that I was seeing.
Krinkle [Sun, 20 Feb 2011 00:12:24 +0000 (00:12 +0000)]
bug 27146
Krinkle [Sat, 19 Feb 2011 23:52:11 +0000 (23:52 +0000)]
mw.loader.implement now calls script without setting mw to mediaWiki since this is already globally avaiable
* Also shortens a few wrapper functions the same way
* Partial revert of r82496. Apparantly mw-alias is not available in startUp module. TODO: Find out why ?
(See also r82496 commit message)
Krinkle [Sat, 19 Feb 2011 22:59:44 +0000 (22:59 +0000)]
Using the mw alias for mediaWiki in core. Saves bandwidth and makes sense (there's no point in a wrapper function for ($,mw) if we use jQuery and mediaWiki inside of it).
TODO: Since the alias is globally available from the start, the 'mw' argument in the wrapper is redundant, so that should be removed at some point as well.
Krinkle [Sat, 19 Feb 2011 22:44:49 +0000 (22:44 +0000)]
(bug 3112) Adding colors for active and visited external links.
This is in-core for internal links and red links, but there's no visual clue of active and visited links for external links.
Normal external: #36b;
/* Added: */
Active external: #b63;
Visited external: #636;
These two colors (orange and purple -ish) are in the same saturation/brightness as the blue for normal (inactive/unvisited) external links.
Since these visual clues were also lacking in external links to interwikis I've replaced that override with similar colors as well.
Sam Reed [Sat, 19 Feb 2011 22:18:39 +0000 (22:18 +0000)]
And some more function level documentation
Sam Reed [Sat, 19 Feb 2011 22:08:26 +0000 (22:08 +0000)]
More function documentation
Rotem Liss [Sat, 19 Feb 2011 22:01:05 +0000 (22:01 +0000)]
Localization update for he.
Sam Reed [Sat, 19 Feb 2011 21:56:54 +0000 (21:56 +0000)]
More function documentation
Sam Reed [Sat, 19 Feb 2011 21:44:20 +0000 (21:44 +0000)]
Explicitally define variables
Sam Reed [Sat, 19 Feb 2011 21:34:44 +0000 (21:34 +0000)]
Explicitally define some variables
Bracify file
Sam Reed [Sat, 19 Feb 2011 21:16:47 +0000 (21:16 +0000)]
Improve method documentation
Few bits of fixup
Derk-Jan Hartman [Sat, 19 Feb 2011 21:03:52 +0000 (21:03 +0000)]
Don't use getCheck, because the opts array is reused to generate the query for the RSS/Atom feed.
getCheck checks for presence, not for true/false, so that was why rss feeds behaved as if
deletedOnly was set.
Follow up to r65651
Fixes bug #27546
Raimond Spekking [Sat, 19 Feb 2011 20:56:36 +0000 (20:56 +0000)]
Localisation updates for core and extension messages from translatewiki.net (2011-02-19 20:30:00 UTC)
Derk-Jan Hartman [Sat, 19 Feb 2011 20:35:51 +0000 (20:35 +0000)]
All functions of the importer have $title, origTitle, but processTitle() returned $title, origTitle.
This caused confusion and a misusage of the processTitle() result.
Follow up to r66267.
Fixes bug 27486
Platonides [Sat, 19 Feb 2011 20:16:54 +0000 (20:16 +0000)]
(Bug 27539) Allow attributes beginning with a digit in wiktext tag parameters.
Its removal in r70849 breaks ProofreadPage extension.
Restricted r82475 relaxation to just numbers.
Added tests.
This only affects wikitext (tag hooks).
MW_ATTRIBS_REGEX is only used through decodeTagAttributes() calls.
fixTagAttributes() calls decodeTagAttributes(), and would be nastier to
fix, since it is called with HTML parameters (eg. by removeHTMLtags)
but such incorrect parameters grabbed would be removed by validateTagAttributes()
Alexandre Emsenhuber [Sat, 19 Feb 2011 20:06:50 +0000 (20:06 +0000)]
* (bug 27560) Search queries no longer fail in walloon language
Sam Reed [Sat, 19 Feb 2011 19:52:08 +0000 (19:52 +0000)]
* (bug 27554) Update api information text to reflect change in bug 26125
Sean Colombo [Sat, 19 Feb 2011 19:25:26 +0000 (19:25 +0000)]
Relaxed the allowed format of parser tag attributes as per bug 27539. One side-effect is that this will fix the widely-used pagelist tag which has "1to10" as an attribute name.
Roan Kattouw [Sat, 19 Feb 2011 19:21:52 +0000 (19:21 +0000)]
Revert r74387: it may not fix the IE8 jumping bug in all cases, but it definitely fixes it in most cases. Reverting a partial fix for not being perfect, then never coming up with a full fix is not acceptable.
Mark A. Hershberger [Sat, 19 Feb 2011 19:18:02 +0000 (19:18 +0000)]
(Bug #27467) preload can leave UNIQ
Patch to fix from P.Copp
Alexandre Emsenhuber [Sat, 19 Feb 2011 19:15:45 +0000 (19:15 +0000)]
Follow-up r82452: need to transform entries sinces some wiki like to use variables or parser functions in the sidebar
Krinkle [Sat, 19 Feb 2011 17:46:30 +0000 (17:46 +0000)]
Improving jquery.makeCollapsible & small fixed mw.util
* Making makeCollapsible more DRY.
* Small optimalizations and fixes in mw.util
Roan Kattouw [Sat, 19 Feb 2011 17:07:05 +0000 (17:07 +0000)]
(bug 27302) Avoid unnecessary requests for user and site modules if the relevant wiki pages don't exist.
Done by adding isKnownEmpty() to ResourceLoaderModule and overriding it to check for page existence in ResourceLoaderWikiModule. Needed to rearrange some code in OutputPage::makeResourceLoaderLink() to have the emptiness check and dropping of modules work properly. Also factored the page_touched check in ResourceLoaderWikiModule::getModifiedTime() out to a separate method (getTitleMtimes()) and moved in-object caching there as well, so getModifiedTime() and isKnownEmpty() share code and caching for their timestamp/existence checks.
This does not account for the case where e.g. a user has user CSS but no user JS: I had implemented this by checking for $context->getOnly() in getTitleMtimes(), but then realized it's not safe to do this in a function called by getModifiedTime(): it causes the timestamp list in the startup module to only take scripts in account for wiki modules, because the startup module has &only=scripts set
Platonides [Sat, 19 Feb 2011 17:00:34 +0000 (17:00 +0000)]
Remove unused global.
Platonides [Sat, 19 Feb 2011 16:59:34 +0000 (16:59 +0000)]
Follow up r82091, which uses the local file constant SERVICES_JSON_LOOSE_TYPE.
Roan Kattouw [Sat, 19 Feb 2011 16:48:05 +0000 (16:48 +0000)]
Fix logic error in r73204 (!) causing ResourceLoaderContext::getHash() to always return null
Max Semenik [Sat, 19 Feb 2011 16:25:02 +0000 (16:25 +0000)]
Partial revert my accidental revert of r82366 in r82445.
Derk-Jan Hartman [Sat, 19 Feb 2011 15:42:02 +0000 (15:42 +0000)]
Close the xmlreader when we are done with it.
Roan Kattouw [Sat, 19 Feb 2011 14:58:16 +0000 (14:58 +0000)]
(bug 27328) Redo r82218 properly, expanding URLs with absolute paths
Roan Kattouw [Sat, 19 Feb 2011 14:46:49 +0000 (14:46 +0000)]
Revert r82218 , doesn't fix absolute path URLs but breaks them. Will fix properly in next commit
Alexandre Emsenhuber [Sat, 19 Feb 2011 14:40:56 +0000 (14:40 +0000)]
* Use OutputPage::getSyndicationLinks() to build feed links
* Ported r82395 to legacy skins (possible double "printable" parameter in URL and hidden dependency of $wgTitle)
Alexandre Emsenhuber [Sat, 19 Feb 2011 13:39:09 +0000 (13:39 +0000)]
* Use $this->mTitle instead of $wgTitle
* Put back the wfMsgForContentNoTrans() added in r66835 but reverted in r68707 since wfMsgForContent() is breaking the {{...}} syntax
Alexandre Emsenhuber [Sat, 19 Feb 2011 13:09:17 +0000 (13:09 +0000)]
Merged retrieval of request URL and header from WebRequest and Setup.php to avoid duplicate code and reduced the number of wfDebug() calls in Setup.php.
The only side effect is that headers name are in uppercase in the debug log.
Alexandre Emsenhuber [Sat, 19 Feb 2011 12:31:50 +0000 (12:31 +0000)]
We have a OutputPage object; so use it to get the Title object instead of $wgTitle
Antoine Musso [Sat, 19 Feb 2011 11:57:07 +0000 (11:57 +0000)]
Remove parentheses for Xmf file-info-size message
Now being done in the code. Should help fixing bug 27472
Max Semenik [Sat, 19 Feb 2011 11:49:14 +0000 (11:49 +0000)]
Bug 27518: Updater calls PopulateLogSearch before adding logging.log_user_text; populateLogUsertext not called
Max Semenik [Sat, 19 Feb 2011 08:01:45 +0000 (08:01 +0000)]
Bug 27053 - sourceFile() didn't expand all the required variables. Apparently, broken by r81084
Max Semenik [Sat, 19 Feb 2011 07:27:27 +0000 (07:27 +0000)]
Follow-up r76456: more thorough check for UTF-8 support. Now it checks whether PCRE can actually convert from uppercase to lowercase and vice versa.
Mark A. Hershberger [Sat, 19 Feb 2011 03:22:03 +0000 (03:22 +0000)]
Bug #26059 — Add support for KML/KMZ filetype
Patch from Derk-Jan Hartman of which he writes:
I figured adding kml support would be a breeze, but I had not
counted on the brain dead browser that is IE6.
Unfortunately, kml contains the element <heading, which triggers
the protection in detectScript() that protects from uploads that
IE6 might mistake for HTML. It triggers on "<head" not sure if we
can work around this, but Tim will know.
Jack Phoenix [Sat, 19 Feb 2011 02:09:53 +0000 (02:09 +0000)]
get rid of unnecessary double quotes
Jack Phoenix [Sat, 19 Feb 2011 02:07:10 +0000 (02:07 +0000)]
add braces + some other coding style tweaks
Sam Reed [Sat, 19 Feb 2011 01:02:56 +0000 (01:02 +0000)]
More function and variable documentation
Sam Reed [Sat, 19 Feb 2011 00:44:38 +0000 (00:44 +0000)]
More function level documentation
Fixup some indenting
Sam Reed [Sat, 19 Feb 2011 00:30:18 +0000 (00:30 +0000)]
More parameter documentation
Sam Reed [Fri, 18 Feb 2011 23:56:08 +0000 (23:56 +0000)]
More function level documentation
Platonides [Fri, 18 Feb 2011 23:44:18 +0000 (23:44 +0000)]
Follow up r63584. The change of resetArticleID() could have all kinds of
side effects, given that it stops lazy cache fillings.
Sam Reed [Fri, 18 Feb 2011 23:42:19 +0000 (23:42 +0000)]
Followup r49655
I'd guess there's never been a Title::newFromTitle method, swapping for Title::newFromText
Sam Reed [Fri, 18 Feb 2011 23:34:24 +0000 (23:34 +0000)]
Parameter documentation
Sam Reed [Fri, 18 Feb 2011 23:21:48 +0000 (23:21 +0000)]
Explicitally define some variables
Function documentation
Sam Reed [Fri, 18 Feb 2011 22:59:01 +0000 (22:59 +0000)]
Fixup assignment in loop
comment out undefined variable used in function call
Sam Reed [Fri, 18 Feb 2011 22:58:02 +0000 (22:58 +0000)]
Mark a fixme comment in Oracle DB file for undefined variable
Add documentation
Sam Reed [Fri, 18 Feb 2011 22:49:56 +0000 (22:49 +0000)]
Fixup whitespace, brackets etc
Remove usage of @
Mark A. Hershberger [Fri, 18 Feb 2011 21:54:19 +0000 (21:54 +0000)]
re bug #25523: add mime.info and mime.types for *.dwg files so that when people add dwg to $wgFileExtensions, they can move files.
Raimond Spekking [Fri, 18 Feb 2011 21:02:18 +0000 (21:02 +0000)]
Localisation updates for core and extension messages from translatewiki.net (2011-02-18 20:25:00 UTC)
Raimond Spekking [Fri, 18 Feb 2011 18:35:08 +0000 (18:35 +0000)]
Fix invalid HTML introduced in r68096: Xml::buildForm() adds <table></table> too
Alexandre Emsenhuber [Fri, 18 Feb 2011 16:03:07 +0000 (16:03 +0000)]
* Added a third parameter to ChangeTags::buildTagFilterSelector() to pass the Title object instead of using $wgTitle, only used when the second parameter is true (no such call both in core and extensions)
* Expanded documentation
Raimond Spekking [Fri, 18 Feb 2011 15:14:08 +0000 (15:14 +0000)]
Follow-up r82391 per Nikerabbit's CR: Fix it in a better way
Roan Kattouw [Fri, 18 Feb 2011 14:21:52 +0000 (14:21 +0000)]
Remove comment that makes no sense post r82399
Tim Starling [Fri, 18 Feb 2011 14:18:26 +0000 (14:18 +0000)]
Fix comments and whitespace for \\\\ .
Tim Starling [Fri, 18 Feb 2011 14:09:03 +0000 (14:09 +0000)]
JavaScriptDistiller fixes:
* Removed some repeated subexpressions, /(.)*/ etc. These cause the stack space to be rapidly exhausted, leading to a segfault for malicious input. I replaced the ([\r\n]|.) subexpressions with a dot with a /s modifier. Added a pcre.recursion_limit hack to take care of the rest.
* Supported assertions and non-capturing subpatterns in ParseMaster::add() by recognising that parentheses that aren't followed by "?" are capturing. Used another assertion to do this.
* Fixed a bug whereby if a single-line comment had a slash in it, it was recognised as a regex instead of a comment. This occurred because the leading whitespace caused the regex regex to match at an earlier string position than the comment regex, giving it undue precedence. This was the subject of several reports on IRC and the main reason for me starting work on JavaScriptDistiller. Used a lookbehind assertion.
* Give comments precedence over regexes and strings where there is ambiguity at the same string location. Not sure if this does anything, but it seemed like a good idea at the time.
* Removed unused variable ParseMaster::$TRIM.
* To test it, I ran the old and new jquery.js output through Google Closure Compiler. The result was the same, proving that there are no functional differences.
Alexandre Emsenhuber [Fri, 18 Feb 2011 12:25:22 +0000 (12:25 +0000)]
* Use appendQueryValue() instead of appendQuery() so that if e.g. printable=no is already present in the URL, it doesn't become printable=no&printable=yes
* Call getLocalURL() on the local Title object instead of $wgTitle in WebRequest
Alexandre Emsenhuber [Fri, 18 Feb 2011 11:55:11 +0000 (11:55 +0000)]
We have already have a printable flag in the OutputPage object, so use it.
This was causing to have the printable version for every non-empty version of the printable paramter, instead of only for "yes".
Happy-melon [Fri, 18 Feb 2011 11:27:33 +0000 (11:27 +0000)]
(bug 27526) B/C in Special:EmailUser
Raimond Spekking [Fri, 18 Feb 2011 11:20:49 +0000 (11:20 +0000)]
Don't clutter the HTML source with useless class=""
Sam Reed [Fri, 18 Feb 2011 10:34:01 +0000 (10:34 +0000)]
Remove useless elseif compare. If the else if is doing the inverse (!) of the original if, it's redundant
Sam Reed [Fri, 18 Feb 2011 10:32:11 +0000 (10:32 +0000)]
Comment out 2 unused lines in JavaScriptDistiller
Tim Starling [Fri, 18 Feb 2011 07:36:11 +0000 (07:36 +0000)]
* For readability, use /x in regexes. Removed the start and end slashes from the input to ParseMaster::add(), to avoid confusion over the lack of a /x modifier in that input.
* Broke up several regexes and added comments, so that humans might be able to understand them.
* Tested md5(minify(jquery.js)) as before. Checked speed, it's the same.
Tim Starling [Fri, 18 Feb 2011 06:54:46 +0000 (06:54 +0000)]
Made the regexes slightly more readable by undoubling the backslashes where possible. Tested by ensuring that the minifier output is the same before and after, with jquery.js as input.
Tim Starling [Fri, 18 Feb 2011 05:55:09 +0000 (05:55 +0000)]
Add the cache key to the filter output, like what we do with the parser cache, to make it easier to debug filter issues.
Sam Reed [Fri, 18 Feb 2011 01:10:38 +0000 (01:10 +0000)]
Remove unused variables
Sam Reed [Fri, 18 Feb 2011 01:06:04 +0000 (01:06 +0000)]
Remove unreachable line in DifferenceEngine
Documentation for ObjectCache.php
Remove unused variables from CompareParsers and PreprocessDump
Sam Reed [Fri, 18 Feb 2011 01:00:05 +0000 (01:00 +0000)]
Fix wrong static calls
Sam Reed [Fri, 18 Feb 2011 00:57:39 +0000 (00:57 +0000)]
Fixup assignment in conditional
Jeroen De Dauw [Fri, 18 Feb 2011 00:48:56 +0000 (00:48 +0000)]
rem not needed die() and made vars actually private
Sam Reed [Fri, 18 Feb 2011 00:33:45 +0000 (00:33 +0000)]
2 subclasses of ResourceLoaderWikiModule implement a duplicate version of getFlip. Move it up into ResourceLoaderWikiModule
(Almost looks like it could all go into ResourceLoaderModule... But that uses a different version, seemingly, the only one. 3 other subclasses of ResourceLoaderModule implement the same version of getFlip as is moved into a parent class here... Seems daft to have a different version in the base abstract class... Minor oversight?)
Some documentation
Roan Kattouw [Thu, 17 Feb 2011 22:36:11 +0000 (22:36 +0000)]
Fix a bug in string recognition in JSDistiller. This *really* fixes bug 27481
Roan Kattouw [Thu, 17 Feb 2011 22:13:52 +0000 (22:13 +0000)]
Version the minifier cache in ResourceLoader
Roan Kattouw [Thu, 17 Feb 2011 22:07:18 +0000 (22:07 +0000)]
Fix for r82344, which causes JSDistiller to stop minifying comments because it thought they were regexes. Make the regex regex a little bit stricter again, forbidding a regex from starting with * and other invalid things that were disallowed prior to r82344 (but still dropping / ) and forbidding multiline regexes
Raimond Spekking [Thu, 17 Feb 2011 21:07:10 +0000 (21:07 +0000)]
Localisation updates for core and extension messages from translatewiki.net (2011-02-17 20:45:00 UTC)
Alexandre Emsenhuber [Thu, 17 Feb 2011 19:26:38 +0000 (19:26 +0000)]
Pass the url to ChangesFeed::getFeedObject() instead of grabbing it from $wgTitle
(no use of that function in extensions)
Roan Kattouw [Thu, 17 Feb 2011 19:19:50 +0000 (19:19 +0000)]
Revert r82340, caused something linke bug 27481 where spaces were being wrongly collapsed. Fixed by changing regex to be more flexible in protecting regexes; nothing wrong with being overinclusive in what we're protecting
Mark A. Hershberger [Thu, 17 Feb 2011 18:41:44 +0000 (18:41 +0000)]
Followup bug #27447 and r82308 and r82328 with patch supplied by
Carsten Nielsen to take care of the warning and supply some
documentation. Also fixed up language in the comments.
Roan Kattouw [Thu, 17 Feb 2011 17:08:06 +0000 (17:08 +0000)]
(bug 27492) Fix regexes for matching JS regexes which could get messed up by the minifier in extreme circumstances
Alexandre Emsenhuber [Thu, 17 Feb 2011 17:06:06 +0000 (17:06 +0000)]
* Don't use assignment in a condition check
* Pass the Title object so that it doesn't rely on $wgTitle
Victor Vasiliev [Thu, 17 Feb 2011 16:29:13 +0000 (16:29 +0000)]
Fix broken Special:Newpages Atom feed.
Raimond Spekking [Thu, 17 Feb 2011 15:39:38 +0000 (15:39 +0000)]
Per r82285: Add new messages for the default user groups. This way they can be found in Special:AllMessages at least.
Messages fot WMF specific user groups can be added to WikimediaMessages.i18n.php when the function is live.
Niklas Laxström [Thu, 17 Feb 2011 10:12:05 +0000 (10:12 +0000)]
Rv part of r82308 that causes warnings
X! [Thu, 17 Feb 2011 00:30:19 +0000 (00:30 +0000)]
Reverting r76017 per discussion on Bugzilla. Lack of community consensus for change, and the whole purpose of the "new messages" box is *NOT* to fit into the skin, so people will see it immediately.
Krinkle [Thu, 17 Feb 2011 00:04:03 +0000 (00:04 +0000)]
more capitalization and less abbrevative ('T', 'err')
Sam Reed [Wed, 16 Feb 2011 23:38:21 +0000 (23:38 +0000)]
* (bug 27479) API error when using both prop=pageprops and prop=info&inprop=displaytitle
Followup r75282
Patch by Brad Jorsch
Krinkle [Wed, 16 Feb 2011 23:27:04 +0000 (23:27 +0000)]
Follow-up r82310. using mw.config instead
Krinkle [Wed, 16 Feb 2011 23:23:04 +0000 (23:23 +0000)]
Adding function to check if the current page is the main space or (optionally) related to the main page (eg. talk page). Compatible with both Vector and Monobook. Both namespace and page title may contain spaces (eg. Wiktionary talk:Main Page)
Mark A. Hershberger [Wed, 16 Feb 2011 23:21:19 +0000 (23:21 +0000)]
followup r82181 and r82215 to fix the FIXME and botched fix for FIXME.
Patch supplied by DieBuche (bug #27338) along with screenshot
demonstrating fix.
Took out fix for bug #27458 (“<gallery> has a white background now”)
since bug it conflicts with a fix for bug #26470.
Mark A. Hershberger [Wed, 16 Feb 2011 23:05:38 +0000 (23:05 +0000)]
(Bug #27447) Added option to toolbar-item to switch off text-selection
Carsten Nielsen explains:
A client of mine was a bit annoyed by the editor:
Every time he inserted - lets say - an image, the default contents of the
image-fields "thumbs|width|caption...." were automatically marked/selected. So
with a tip on the keyboard all "helping" text was gone.
I added an option to the toolbar-items to optional deactivate this behaviour.
Derk-Jan Hartman [Wed, 16 Feb 2011 22:45:30 +0000 (22:45 +0000)]
Add support for namespace prefixed elements in svg. ie. <svg:svg>
Fixes bug 27465
Happy-melon [Wed, 16 Feb 2011 22:29:52 +0000 (22:29 +0000)]
Revert r78585. While I definitely think this is an area where there's scope for improvement in clarity and security, I'm no longer convinced that this is the way to proceed.
Platonides [Wed, 16 Feb 2011 21:30:54 +0000 (21:30 +0000)]
Fix the issue where all links on Special:Contributions where marked as stubs (NS_MAIN pages, for users with a stub threshold) broken since r63584.
resetArticleId() is clearing the right data set by Title::newFromRow() and placing just the id, which in turn avoids to lookup the other items.
This was already done in 1.16 (since r46179, it was useful until r46181) but resetArticleID() did not reset everything (r63584 change) and so
the bug wasn't present there.
Raimond Spekking [Wed, 16 Feb 2011 21:00:04 +0000 (21:00 +0000)]
Localisation updates for core and extension messages from translatewiki.net (2011-02-16 20:35:00 UTC)
Bryan Tong Minh [Wed, 16 Feb 2011 20:37:16 +0000 (20:37 +0000)]
jQueryize the toggle upload source type code