lhc/web/wiklou.git
12 years agoPrevent undefined offset when formatBitrate is given a significantly large enough...
Sam Reed [Sat, 31 Dec 2011 22:53:50 +0000 (22:53 +0000)]
Prevent undefined offset when formatBitrate is given a significantly large enough number (10^27)

> echo $wgLang->formatBitrate( pow( 10, 27 ) );
PHP Notice:  Undefined offset: 9 in /home/reedy/mediawiki/trunk/phase3/languages/Language.php on line 3827
PHP Stack trace:
PHP   1. {main}() /home/reedy/mediawiki/trunk/phase3/maintenance/eval.php:0
PHP   2. eval() /home/reedy/mediawiki/trunk/phase3/maintenance/eval.php:82
PHP   3. Language->formatBitrate() /home/reedy/mediawiki/trunk/phase3/maintenance/eval.php(82) : eval()'d code:1

Notice: Undefined offset: 9 in /home/reedy/mediawiki/trunk/phase3/languages/Language.php on line 3827

Call Stack:
    0.0006     650736   1. {main}() /home/reedy/mediawiki/trunk/phase3/maintenance/eval.php:0
   61.6539   21593432   2. eval(''echo $wgLang->formatBitrate( pow( 10, 27 ) );;'') /home/reedy/mediawiki/trunk/phase3/maintenance/eval.php:82
   61.6540   21593512   3. Language->formatBitrate() /home/reedy/mediawiki/trunk/phase3/maintenance/eval.php(82) : eval()'d code:1

1bps

12 years agoRELEASE-NOTES-1.19 to go with formatSize/formatBitrate work
Sam Reed [Sat, 31 Dec 2011 22:34:44 +0000 (22:34 +0000)]
RELEASE-NOTES-1.19 to go with formatSize/formatBitrate work

* (bug 33014) Language::formatSize()/formatBitrate() should be able to deal
  with larger numbers (tera-yotta).

12 years agoFixup and add rest of tests
Sam Reed [Sat, 31 Dec 2011 22:30:31 +0000 (22:30 +0000)]
Fixup and add rest of tests

Followup r107734

bug 33014 done too?

12 years agoFix 0bps or less
Sam Reed [Sat, 31 Dec 2011 21:57:47 +0000 (21:57 +0000)]
Fix 0bps or less

r107744

12 years agoFixup r107744, r107743
Sam Reed [Sat, 31 Dec 2011 21:54:28 +0000 (21:54 +0000)]
Fixup r107744, r107743

12 years agoFollowup r107743, use messages in formatBitrate
Sam Reed [Sat, 31 Dec 2011 21:32:42 +0000 (21:32 +0000)]
Followup r107743, use messages in formatBitrate

Add method description

12 years agoMessage-ify bitrate units
Sam Reed [Sat, 31 Dec 2011 21:30:48 +0000 (21:30 +0000)]
Message-ify bitrate units

Add to messageTypes.inc and messages.inc too

12 years ago[Core JS] More fixing of global config variable usage
Krinkle [Sat, 31 Dec 2011 21:25:00 +0000 (21:25 +0000)]
[Core JS] More fixing of global config variable usage
* mw.config is the new way, and global config variable lookups are deprecated

* Based on two phase3-wide quick searches:
-- of " wg": http://toolserver.org/~krinkle/wikimedia-svn-search/view.php?id=321&hash=81700bf7486e4fee3b7bc1f83eb9eba6
-- of "!wg": http://toolserver.org/~krinkle/wikimedia-svn-search/view.php?id=327&hash=47c9d54a7a1d5d58a724dd834585f40d

Related changes:
* Changed some php comments mentioning "wg" variables to include the dollar sign, and a typo when the wf function prefix was meant.
* Removed TODO comment in wikibits.js and made it use the JS equivalent of wfUrlencode, which we have now, mw.util.wikiUrlencode
* SpecialUpload.php: use OutputPage::addJsConfigVars instead of creating a new script tag through OutputPage::addScript(Skin::makeVariablesScript(..))
* Renamed wgUploadSetup in upload.js and made it local. Not used anywhere in ./trunk/phase3 and ./trunk/extensions
* Fix OutputPage::addJsConfigVars so that it can actually be called with an array instead of two arguments for key/value
* Some minor whitespace/convention stuff around the same line

12 years agoShut up Jenkins!
Sam Reed [Sat, 31 Dec 2011 21:01:30 +0000 (21:01 +0000)]
Shut up Jenkins!

Ping r107734

12 years agoFail, fix Ypbs from r107735
Sam Reed [Sat, 31 Dec 2011 20:36:43 +0000 (20:36 +0000)]
Fail, fix Ypbs from r107735

12 years agobug 33014 and r107734
Sam Reed [Sat, 31 Dec 2011 20:35:35 +0000 (20:35 +0000)]
bug 33014 and r107734

Add Tbps through Ybps (yay for code that just works (tm))

12 years agoStart adding tests for Language::formatBitrate()
Sam Reed [Sat, 31 Dec 2011 20:30:06 +0000 (20:30 +0000)]
Start adding tests for Language::formatBitrate()

1Gbps commented out as for some reason it's returning 1.1Gbps...

12 years agoFollowup r106791, r107692 and bug 33014
Sam Reed [Sat, 31 Dec 2011 20:20:15 +0000 (20:20 +0000)]
Followup r106791, r107692 and bug 33014

Make Language::formatNum() handle  TB through YB

Rewrote code to be simpler and less indenty

Though, something like formatBitrate might be be better in future... We'll see!

12 years agoFix for r106752: manually add the backend to the fake local repo to avoid exception...
Alexandre Emsenhuber [Sat, 31 Dec 2011 14:43:14 +0000 (14:43 +0000)]
Fix for r106752: manually add the backend to the fake local repo to avoid exception when running parser tests.
See https://www.mediawiki.org/wiki/Special:Code/MediaWiki/106752#c28264 for the report.

12 years agoPer Nikerabbit, fix for r107653: don't show the "missing revision" warning on non...
Alexandre Emsenhuber [Sat, 31 Dec 2011 11:54:06 +0000 (11:54 +0000)]
Per Nikerabbit, fix for r107653: don't show the "missing revision" warning on non-existing page (obviously)

12 years agoDon't use legacy globals
Niklas Laxström [Sat, 31 Dec 2011 09:05:55 +0000 (09:05 +0000)]
Don't use legacy globals

12 years agoRegister new message keys added with r107692 for maintenance files properly
Raimond Spekking [Sat, 31 Dec 2011 09:01:40 +0000 (09:01 +0000)]
Register new message keys added with r107692 for maintenance files properly

12 years agoPer GrafZahl, fix for r103202: forgot to change two instances of $title to $this...
Alexandre Emsenhuber [Sat, 31 Dec 2011 08:29:22 +0000 (08:29 +0000)]
Per GrafZahl, fix for r103202: forgot to change two instances of $title to $this->title

12 years agoAdded size units for tera through yotta
Sam Reed [Sat, 31 Dec 2011 02:22:19 +0000 (02:22 +0000)]
Added size units for tera through yotta

12 years agoAdd some tests for formatSize
Sam Reed [Sat, 31 Dec 2011 02:13:59 +0000 (02:13 +0000)]
Add some tests for formatSize

12 years agoFollowup r107393, treat '' the same as getting false from getExamples, the default...
Sam Reed [Sat, 31 Dec 2011 00:22:37 +0000 (00:22 +0000)]
Followup r107393, treat '' the same as getting false from getExamples, the default if it's not overridden

12 years agoAdd braces
Sam Reed [Sat, 31 Dec 2011 00:21:27 +0000 (00:21 +0000)]
Add braces

Fix documentation

12 years ago+ complementary <tbody> involved rules in wikitable definitions for browsers which...
Danny B [Sat, 31 Dec 2011 00:00:27 +0000 (00:00 +0000)]
+ complementary <tbody> involved rules in wikitable definitions for browsers which add <tbody> not only virtually (follow-up to r107669)

12 years ago* more specific selectors for wikitable - don't inherit properties to nested tables...
Danny B [Fri, 30 Dec 2011 23:23:50 +0000 (23:23 +0000)]
* more specific selectors for wikitable - don't inherit properties to nested tables which causes various rendering issues
** (bug 30485) Hieroglyphs look scary if embedded in tables with class="wikitable"
** (bug 33434) math extension: integral expressions display with boxes/frames/borders

12 years agoRelated to bug 33223
Sam Reed [Fri, 30 Dec 2011 22:44:07 +0000 (22:44 +0000)]
Related to bug 33223

Update static list of languages that support variants

12 years agoPer Raymond, fix for r107653: missed two changes from $section to $this->section
Alexandre Emsenhuber [Fri, 30 Dec 2011 21:34:19 +0000 (21:34 +0000)]
Per Raymond, fix for r107653: missed two changes from $section to $this->section

12 years agofix tablesorter unit test in ie7. Add semicolon to end of statement in tablesorter...
Rob Moen [Fri, 30 Dec 2011 21:30:17 +0000 (21:30 +0000)]
fix tablesorter unit test in ie7.  Add semicolon to end of statement in tablesorter class

12 years ago* Style fixes in EditPage::showEditForm() to more readable
Alexandre Emsenhuber [Fri, 30 Dec 2011 21:30:04 +0000 (21:30 +0000)]
* Style fixes in EditPage::showEditForm() to more readable
* Use style="display:none;" instead of non-existing type="hidden" for the textarea when asking user for confirmation to save the edit if the page was deleted during edition; also drop other attributes since they are useless in that case

12 years agoLocalisation updates for core and extension messages from translatewiki.net
Raimond Spekking [Fri, 30 Dec 2011 21:17:13 +0000 (21:17 +0000)]
Localisation updates for core and extension messages from translatewiki.net

12 years ago* Inverted the precedence between section edition and revision undoing, now undo...
Alexandre Emsenhuber [Fri, 30 Dec 2011 20:43:08 +0000 (20:43 +0000)]
* Inverted the precedence between section edition and revision undoing, now undo and undoafter will be ignored if the section (or even wpSection) is provided to be consistent the remaining of the interface
* Modified EditPage::getContent() to load the original content only when really needed
* Don't put the 'missing-article' in the textbox when a non-existing revision is provided, instead display it above the form
* Always diff to the current version when showing a conflict or a spam filter match
* Factorised code to get the current text on edit conflict
* Compare the correct text in EditPage::internalAttemptSave()
* Some little coding style fixes

12 years agoFollow up to r107645, corrected Russian.
Amir E. Aharoni [Fri, 30 Dec 2011 19:05:05 +0000 (19:05 +0000)]
Follow up to r107645, corrected Russian.

12 years agoFollowup r107559. Added male aliases for "User:" to Russian and Hebrew. Requested...
Amir E. Aharoni [Fri, 30 Dec 2011 19:01:48 +0000 (19:01 +0000)]
Followup r107559. Added male aliases for "User:" to Russian and Hebrew. Requested by nikerabbit and reedy.

12 years ago[mediawiki.debug] attempt at fixing off-screen mega wide cells for some queries.
Krinkle [Fri, 30 Dec 2011 18:21:49 +0000 (18:21 +0000)]
[mediawiki.debug] attempt at fixing off-screen mega wide cells for some queries.
* See also r107610 CR

12 years ago* Removed usage of Article where possible in EditPage
Alexandre Emsenhuber [Fri, 30 Dec 2011 16:12:46 +0000 (16:12 +0000)]
* Removed usage of Article where possible in EditPage
* Added Article::getRevisionFetched() and use it in EditPage instead of accessing the member directly

12 years ago* Moved post-deletion code from WikiPage::doDeleteArticle() to WikiPage::doDeleteUpda...
Alexandre Emsenhuber [Fri, 30 Dec 2011 15:54:11 +0000 (15:54 +0000)]
* Moved post-deletion code from WikiPage::doDeleteArticle() to WikiPage::doDeleteUpdates() so that it can be shared with page move
* Use WikiPage::doEditUpdates() and WikiPage::onArticleDelete() to do updates instead of reimplementing the whole thing in Title::moveTo(); avoids some bugs since the implementation differs from the one from WikiPage (notably the page and article count). This adds some more cache clearing, but they are needed depending on parameters (e.g. if the redirect is not created).

12 years agoPer Krinkle, fix for r102406: use strict comparison
Alexandre Emsenhuber [Fri, 30 Dec 2011 11:37:57 +0000 (11:37 +0000)]
Per Krinkle, fix for r102406: use strict comparison

12 years ago(bug 31469) Make sure tracking category messages expand variables like
Brian Wolff [Fri, 30 Dec 2011 06:44:38 +0000 (06:44 +0000)]
(bug 31469) Make sure tracking category messages expand variables like
{{NAMESPACE}} relative to the Title of the currently being parsed page.

Basically wfMsgForContent expands messages with wrong title while doing linksupdate stuff via job queue. For the broken file tracking category (r86534),Wikipedia folk want to sort the page into different categories based on namespace, and for some namespaces not categorize them at all (After all, a broken file link in a talk namespace is often not a bad thing).

Anyhow, explicitly set the title object for the message using wfMessage. There's probably deeper issues here in regards to why wfMsg et al is using wrong title, but this should fix the immediate issue.

12 years ago[mediawiki.debug] highlight current pane and styling
Krinkle [Fri, 30 Dec 2011 01:08:57 +0000 (01:08 +0000)]
[mediawiki.debug] highlight current pane and styling
* wrapping bits in container and centering tabs
* letting includes-pane use same markup and styling as queries
* move appendTo action into common function (more DRY)

12 years ago[mediawiki.debug] apply code conventions
Krinkle [Thu, 29 Dec 2011 23:49:38 +0000 (23:49 +0000)]
[mediawiki.debug] apply code conventions
* Quote "class"-key in object literals. It's stupid that JavaScript does not allow reserved words in this position but that's the way it is. As of ES5 (which Chrome/Firefox already started to implement) this is now part of the standard and no longer have to be quoted, still required for the browsers we support though.
* Fix usage of Array to Object. Arrays are for numeral keys only.
* Make usage of $() for building elements from HTML strings more consistent. Using shortag syntax for new elements creation. And valid HTML for snippets (as supposed to $("<div></div>") and $("<span class="foo">")). valid HTML is always okay, but shortag should only be used for creating plain elements (which jQuery recognizes and calls document-createElement for. Anything else goes into innerHTML which causes problems in browsers that require it to be valid and don't apply normalization.
* Remove empty style rule
* Moving declaration inside for-blocks to the function scope. JavaScript doesn't have just-in-time variables or block scope, only function scope.
* Apply general code conventions
* Follows-up r105122

12 years agoLocalisation updates for core and extension messages from translatewiki.net
Raimond Spekking [Thu, 29 Dec 2011 21:54:17 +0000 (21:54 +0000)]
Localisation updates for core and extension messages from translatewiki.net

12 years agoUse wfTimestampNow() instead of wfTimestamp() without second parameter
Alexandre Emsenhuber [Thu, 29 Dec 2011 20:45:47 +0000 (20:45 +0000)]
Use wfTimestampNow() instead of wfTimestamp() without second parameter

12 years ago* (bug 32702) Fix for r82273: readded Skin::makeGlobalVariablesScript() for backward...
Alexandre Emsenhuber [Thu, 29 Dec 2011 20:39:29 +0000 (20:39 +0000)]
* (bug 32702) Fix for r82273: readded Skin::makeGlobalVariablesScript() for backward compatibility and marked it as deprecated

12 years agoUse local context to get messages
Alexandre Emsenhuber [Thu, 29 Dec 2011 19:17:16 +0000 (19:17 +0000)]
Use local context to get messages

12 years agoUse WikiPage instead of Article to call doEdit()
Alexandre Emsenhuber [Thu, 29 Dec 2011 18:51:23 +0000 (18:51 +0000)]
Use WikiPage instead of Article to call doEdit()

12 years ago* Added Title::getLinksFrom() and Title::getTemplateLinksFrom() for consistency with...
Alexandre Emsenhuber [Thu, 29 Dec 2011 15:12:00 +0000 (15:12 +0000)]
* Added Title::getLinksFrom() and Title::getTemplateLinksFrom() for consistency with Title::getLinksTo() and Title::getTemplateLinksTo()
* Deprecated WikiPage::getUsedTemplates() in favour of Title::getTemplateLinksFrom() and updated to it in core

12 years ago* Group related functions
Alexandre Emsenhuber [Thu, 29 Dec 2011 14:21:15 +0000 (14:21 +0000)]
* Group related functions
* Put deprecated functions at the bottom

12 years agoRevert r107556 based on the discussion.
Santhosh Thottingal [Thu, 29 Dec 2011 14:06:12 +0000 (14:06 +0000)]
Revert r107556 based on the discussion.

12 years agoNon oldrc change lists were not displaying the names of new log types properly. While...
Niklas Laxström [Thu, 29 Dec 2011 12:58:43 +0000 (12:58 +0000)]
Non oldrc change lists were not displaying the names of new log types properly. While at it, drop support for displaying very old style log entries

12 years agoGender aliases for user and user talk pages.
Amir E. Aharoni [Thu, 29 Dec 2011 11:03:16 +0000 (11:03 +0000)]
Gender aliases for user and user talk pages.

12 years agoUse jqueryMsg wikitext parser to parse interface messages at client side. Support...
Santhosh Thottingal [Thu, 29 Dec 2011 09:29:07 +0000 (09:29 +0000)]
Use jqueryMsg wikitext parser to parse interface messages at client side. Support for PLURAL in javascript.

12 years agoLocalisation updates for core and extension messages from translatewiki.net
Raimond Spekking [Wed, 28 Dec 2011 22:31:07 +0000 (22:31 +0000)]
Localisation updates for core and extension messages from translatewiki.net

12 years agoRemoving wgLegacyJavaScriptGlobals from JavaScript output
Krinkle [Wed, 28 Dec 2011 22:29:07 +0000 (22:29 +0000)]
Removing wgLegacyJavaScriptGlobals from JavaScript output
* PHP config variable itself is still needed for sure, but not needed in JavaScript output. Did get into 1.18 (accidentally added to js output as part of r87856) but undocumented and unannounced.

12 years agoMove embedded ResourceLoader modules to the <head>
Krinkle [Wed, 28 Dec 2011 22:20:29 +0000 (22:20 +0000)]
Move embedded ResourceLoader modules to the <head>
* Embed "private" ResourceLoader modules in the <head> before the first loader link, instead of in the <body> after the last loader link
* Wow, was in the opposite place where it should've been :D
* Fixes bug 30914

12 years ago* Use User::newFromName() instead of calling setName() on an existing object
Alexandre Emsenhuber [Wed, 28 Dec 2011 19:49:44 +0000 (19:49 +0000)]
* Use User::newFromName() instead of calling setName() on an existing object
* Some code cleanup

12 years ago* Use WikiPage instead of Article to call doDeleteArticle()
Alexandre Emsenhuber [Wed, 28 Dec 2011 19:35:31 +0000 (19:35 +0000)]
* Use WikiPage instead of Article to call doDeleteArticle()
* Don't call DatabaseBase::commit() twice per deletion
* Some code refactoring

12 years agoUse local context to get messages
Alexandre Emsenhuber [Wed, 28 Dec 2011 19:15:10 +0000 (19:15 +0000)]
Use local context to get messages

12 years ago* Use Linker::getRevDeleteLink() where possible to remove code duplication
Alexandre Emsenhuber [Wed, 28 Dec 2011 18:41:36 +0000 (18:41 +0000)]
* Use Linker::getRevDeleteLink() where possible to remove code duplication
* Pass the User object to Revision::userCan() in Linker::getRevDeleteLink()
* Return the result Linker::revDeleteLinkDisabled() in Linker::getRevDeleteLink() instead of storing it in a variable that will not be used

12 years agoReverting r107496, r107497
Sam Reed [Wed, 28 Dec 2011 15:42:06 +0000 (15:42 +0000)]
Reverting r107496, r107497

Seems there is reasonable reason for it to be in core, and it will be becoming more used in the near future

12 years agoMove mediawiki.feedback.js to "Feedback" extension
Sam Reed [Wed, 28 Dec 2011 14:49:32 +0000 (14:49 +0000)]
Move mediawiki.feedback.js to "Feedback" extension

12 years ago* (bug 33398) Wrong escape in online documentation for usercontribs
Sam Reed [Wed, 28 Dec 2011 13:36:32 +0000 (13:36 +0000)]
* (bug 33398) Wrong escape in online documentation for usercontribs

12 years agoRevert the fix for bug 32858 (r105664, r105161, r103476): no consensus, backwards...
Tim Starling [Tue, 27 Dec 2011 22:50:10 +0000 (22:50 +0000)]
Revert the fix for bug 32858 (r105664, r105161, r103476): no consensus, backwards compatibility issues not addressed (e.g. {{selfsubst/now string}})

12 years ago* Follow-up r107447: removed dead code
Aaron Schulz [Tue, 27 Dec 2011 22:49:37 +0000 (22:49 +0000)]
* Follow-up r107447: removed dead code
* Broke some long lines

12 years agore Aaron's comment on r107351: remove double extension from temporary file
Mark A. Hershberger [Tue, 27 Dec 2011 22:39:10 +0000 (22:39 +0000)]
re Aaron's comment on r107351: remove double extension from temporary file

12 years agoComment and whitespace fixes
Tim Starling [Tue, 27 Dec 2011 22:38:44 +0000 (22:38 +0000)]
Comment and whitespace fixes

12 years agoUpdated comment and a call from Article to WikiPage
Alexandre Emsenhuber [Tue, 27 Dec 2011 21:22:47 +0000 (21:22 +0000)]
Updated comment and a call from Article to WikiPage

12 years agoPer Reedy, fix for r107386: fix usage of undefined variable
Alexandre Emsenhuber [Tue, 27 Dec 2011 21:16:20 +0000 (21:16 +0000)]
Per Reedy, fix for r107386: fix usage of undefined variable

12 years agoNeed to set mDataLoaded so that this works without a db
Platonides [Tue, 27 Dec 2011 20:48:06 +0000 (20:48 +0000)]
Need to set mDataLoaded so that this works without a db

12 years agoLocalisation updates for core and extension messages from translatewiki.net
Raimond Spekking [Tue, 27 Dec 2011 20:23:52 +0000 (20:23 +0000)]
Localisation updates for core and extension messages from translatewiki.net

12 years ago[mediawiki.js] function order
Krinkle [Tue, 27 Dec 2011 18:51:50 +0000 (18:51 +0000)]
[mediawiki.js] function order
* define before call
* Follows-up r107402, r107405

12 years ago[mediawiki.js] use simple IIFE closure with object literal
Krinkle [Tue, 27 Dec 2011 18:48:40 +0000 (18:48 +0000)]
[mediawiki.js] use simple IIFE closure with object literal
* Remove weird new () syntax. Simply use a IIFE and return an object literal
* Some blocks had to be moved
-- $(document).ready in mw.loader to between vars and functions (couldn't be after the return)
-- mw.legacy to near other place holders
* Follows-up r107402

(view diff with whitespace ignored: $ svn diff -x -wu)

12 years ago[mediawiki.js] code quality and clean up
Krinkle [Tue, 27 Dec 2011 18:25:20 +0000 (18:25 +0000)]
[mediawiki.js] code quality and clean up
* using local mw variable in file instead of reaching to global scope
* exposing to global object after initialization
* moving var statements to the top of the function, this uncovered a few risky re-use of variables. Fixed by using different names (in nested for-loops and unconnected if/else statements). This also made several awkward indentions go away (where the first definition would be indented for 'var', and later ones not).
* remove unused "messageQueue" variable
* enable strict mode in modern browsers (loose string ignored in other browsers)
* where looking to check for array, use $.isArray() (directly pointed to native code) instead of a typeof operation with string comparison for "object" (slightly faster and also semantically more correct)
* other best practices as popularized by JSLint/JSHint
* removed 'delete' operator for startUp, didn't' do anything in most modern browsers, only for object members.

@note: mw.loader.work really is big, now it's more obvious:
<code>
+var reqBase, splits, maxQueryLength, q, b, bSource, bGroup, bSourceGroup,
+ source, group, g, i, modules, maxVersion, sourceLoadScript,
+ currReqBase, currReqBaseLength, moduleMap, l,
+ lastDotIndex, prefix, suffix, bytesAdded;
</code>

12 years ago* Use local context to get messages
Alexandre Emsenhuber [Tue, 27 Dec 2011 16:35:40 +0000 (16:35 +0000)]
* Use local context to get messages
* Also set the reason for the block in content language

12 years agoFollow-up r107341: remove now-useless parameter
Alexandre Emsenhuber [Tue, 27 Dec 2011 16:26:47 +0000 (16:26 +0000)]
Follow-up r107341: remove now-useless parameter

12 years agoRe-instate most of the revisions for bug 33147 "API examples should explain what...
Sam Reed [Tue, 27 Dec 2011 16:22:35 +0000 (16:22 +0000)]
Re-instate most of the revisions for bug 33147 "API examples should explain what they do"

Using this to sync up my working copies

Should have the little niggles tidied up though

12 years agoAnd while I'm at it: don't call DatabaseBase::commit() twice per deletion
Alexandre Emsenhuber [Tue, 27 Dec 2011 16:01:23 +0000 (16:01 +0000)]
And while I'm at it: don't call DatabaseBase::commit() twice per deletion

12 years ago* Use WikiPage instead of Article (or ImagePage) to call doDeleteArticle()
Alexandre Emsenhuber [Tue, 27 Dec 2011 15:56:35 +0000 (15:56 +0000)]
* Use WikiPage instead of Article (or ImagePage) to call doDeleteArticle()
* Rename some variable for consistency
* Check for valid user before opening the file containing pages to delete, there's no point doing the latter if the former fails
* Don't ouput "FAILED to delete associated file" if the file is from a foreign repository

12 years ago* Integrate $wgDeleteRevisionsLimit in Title::getUserPermissionsErrors() (only if...
Alexandre Emsenhuber [Tue, 27 Dec 2011 15:29:44 +0000 (15:29 +0000)]
* Integrate $wgDeleteRevisionsLimit in Title::getUserPermissionsErrors() (only if doing expensive checks)
* Moved WikiPage::estimateRevisionCount() and WikiPage::isBigDeletion() to Title and marked those WikiPage methods as deprecated (only call in extensions removed in r107385)
* Show an error message when deleting a page to move another one in Special:MovePage and the deletion fails due to permissions errors (previously the form would simply show again)
* Cache the result of Title::estimateRevisionCount() since it's called two times when showing the deletion form and the user doesn't have 'bigdelete' right (one for the permissions check and the other when showing the number of revisions)

12 years agoPass the user doing the upload to WikiPage::doEdit()
Alexandre Emsenhuber [Tue, 27 Dec 2011 15:15:38 +0000 (15:15 +0000)]
Pass the user doing the upload to WikiPage::doEdit()

12 years agoalphabetize includes/media autoloaders + some whitespace
Mark A. Hershberger [Tue, 27 Dec 2011 13:34:28 +0000 (13:34 +0000)]
alphabetize includes/media autoloaders + some whitespace

12 years agoAdded support for stored procedures/functions to MySQL:
Max Semenik [Tue, 27 Dec 2011 12:29:36 +0000 (12:29 +0000)]
Added support for stored procedures/functions to MySQL:
* Refactored DatabaseBase::sourceStream(), made it possible for descendant classes to alter its behaviour w/o having to redo it completely like Oracle does.
* MySQL class now supports specifying DELIMITER.
* Thrown away the mess of catering for double semicolon. If it's a problem, fix your .sql files!
* Haven't actually touched Oracle.
* Tests!

12 years agoPostgres updater didn't output a message for some updates it ran
Max Semenik [Tue, 27 Dec 2011 11:26:24 +0000 (11:26 +0000)]
Postgres updater didn't output a message for some updates it ran

12 years agoAdd phpunit tests for chunk upload api.
Jan Gerber [Tue, 27 Dec 2011 05:06:41 +0000 (05:06 +0000)]
Add phpunit tests for chunk upload api.
Follow up r104687

12 years agoupdate mLocalFile in concatenateChunks to make chunk upload
Jan Gerber [Tue, 27 Dec 2011 04:49:08 +0000 (04:49 +0000)]
update mLocalFile in concatenateChunks to make chunk upload
work with recent filerepo changes
Follow up r104687

12 years ago(bug 31719) Apply Derk-Jan Hartman's patch to make '&ns_svg;' considered a namespace...
Brian Wolff [Tue, 27 Dec 2011 02:57:25 +0000 (02:57 +0000)]
(bug 31719) Apply Derk-Jan Hartman's patch to make '&ns_svg;' considered a namespace for svg files. Work around issue where entities not expanded by our SVGMetadataReader.

I'm leaving the bug open, since I'm not sure if this is a proper fix, but I think its significantly better than the current situation.

12 years ago[mediawiki.js] Always pass error info to error callbacks in mw.loader
Krinkle [Tue, 27 Dec 2011 02:44:02 +0000 (02:44 +0000)]
[mediawiki.js] Always pass error info to error callbacks in mw.loader
* Fix for handlePending() provided by Michael Dale
* Fixes (bug 30709) Always pass error info to error callbacks in mw.loader

12 years agoAdded/tweaked some FileBackend function comments
Aaron Schulz [Tue, 27 Dec 2011 02:24:27 +0000 (02:24 +0000)]
Added/tweaked some FileBackend function comments

12 years agor107351: forgot to commit the changes to AutoLoader ... also update a comment
Mark A. Hershberger [Tue, 27 Dec 2011 02:05:24 +0000 (02:05 +0000)]
r107351: forgot to commit the changes to AutoLoader ... also update a comment

12 years ago[mediawiki.action.watch.ajax.js] Rewrite using mw.Api and fixes bug 27146
Krinkle [Tue, 27 Dec 2011 01:21:56 +0000 (01:21 +0000)]
[mediawiki.action.watch.ajax.js] Rewrite using mw.Api and fixes bug 27146
* Use mw.Api and new it's new .watch() as of r107350
* No longer get title from url, use wgPageName instead
* No longer simple queryParam check for action in url,
  now supports wgActionPaths as well.
* Simplification and speed up (less back and forth between
functions and jQuery-ism). Previously it had $(..) with several
.add() calls. Now doing one call.
* Uses mw.util.tooltipAccessKeyRegexp instead of local regex
* Uses jQuery.fn.text instead of jQuery.fn.html for link text message

* Should fix bug 27146 (previously a failed attempt in r82498)
* Previousy worked on in r88527, r88511, r78150, r78147

* minor whitespace/comment fix in mediawiki.util.js/mediawiki.page.startup.js

12 years ago@since for r107350
Krinkle [Tue, 27 Dec 2011 01:03:38 +0000 (01:03 +0000)]
@since for r107350

12 years ago* First simple XCF thumbnailing. Convert from ImageMagick has buggy
Mark A. Hershberger [Tue, 27 Dec 2011 00:46:44 +0000 (00:46 +0000)]
* First simple XCF thumbnailing.  Convert from ImageMagick has buggy
  support for XCF, though, so one of the solutions at
  http://stackoverflow.com/questions/5794640/how-to-convert-xcf-to-png-using-gimp-from-the-command-line
  is probably better.

* File::maybeDoTransform() since (at least) r106752 neglects what
  BitmapHandler::getThumbType() returns, so add support for that.

* Add $wgImageMagickIdentifyCommand to avoid writing a parser for XCF
  metadata.

12 years ago[mediawiki.api] write mediawiki.api.watch module
Krinkle [Tue, 27 Dec 2011 00:44:49 +0000 (00:44 +0000)]
[mediawiki.api] write mediawiki.api.watch module
* add mediawiki.api.watch module
* mediawiki.api.parse.js: remove 'data && ' check to match the other modules. If data is not good, then the internal error handler will have already handled it and never call the ok-callback in the first place.
* mw.Api.errors: adding error codes by ApiWatch.php

12 years agow/s
Mark A. Hershberger [Tue, 27 Dec 2011 00:28:23 +0000 (00:28 +0000)]
w/s

12 years agoIn LocalFile:
Aaron Schulz [Mon, 26 Dec 2011 23:35:40 +0000 (23:35 +0000)]
In LocalFile:
* Removed bogus rmdir() call.
* Added lock() calls to upgradeRow()/getSha1().
* Use FileRepo getFileSha1() in getSha1() rather than via FSFile.
* Made purgeThumbList()/migrateThumbFile() use FileRepo::cleanupBatch().
* A few other minor cleanups.
* w/s cleanup in recordUpload2().
In FSRepo:
* Removed deleted zone config code from constructor; useless since r107028.
In FileBackend:
* Make sure 'latest' param gets passed through via $params for some functions.
* Cleaned up doMoveInternal() to use *_Internal() functions.

12 years agoLocalisation updates for core and extension messages from translatewiki.net
Raimond Spekking [Mon, 26 Dec 2011 21:21:55 +0000 (21:21 +0000)]
Localisation updates for core and extension messages from translatewiki.net

12 years agoFix fixme on r107328, attempting to use $this in a static method
Sam Reed [Mon, 26 Dec 2011 21:03:06 +0000 (21:03 +0000)]
Fix fixme on r107328, attempting to use $this in a static method

Made said method non static, and updated caller

12 years agoFollowup r106554
Sam Reed [Mon, 26 Dec 2011 17:06:27 +0000 (17:06 +0000)]
Followup r106554

Make init function static

12 years agoUse WikiPage instead of Article to call updateRevisionOn()
Alexandre Emsenhuber [Mon, 26 Dec 2011 16:28:56 +0000 (16:28 +0000)]
Use WikiPage instead of Article to call updateRevisionOn()

12 years ago[Core JS] Remove long deprecated globals 'ta' and 'akeytt'
Krinkle [Mon, 26 Dec 2011 16:24:45 +0000 (16:24 +0000)]
[Core JS] Remove long deprecated globals 'ta' and 'akeytt'
* Not used anywhere in ./phase3/
* Not used anywhere in ./extensions/
* Deprecated in MediaWiki 1.16 according to HISTORY

12 years ago* Use local context to get messages
Alexandre Emsenhuber [Mon, 26 Dec 2011 16:20:30 +0000 (16:20 +0000)]
* Use local context to get messages
* Pass the context to ContribsPager

12 years ago[Core JS] wikibits.js / IEFixes clean up
Krinkle [Mon, 26 Dec 2011 16:12:07 +0000 (16:12 +0000)]
[Core JS] wikibits.js / IEFixes clean up
* fix on-the-loose fixalpha() call
-- Calls should not be dangling loose like that
-- Removed local calls from skins and installer
-- instead calling from the IEFixes script (which is loaded raw by wikibits which is loaded from the bottom, as are all legacy scripts)
* Removing usage of 'skinpath' and 'skin' globals in wikibits.js, those aren't globals per se since introduction of mw.config and $wgLegacyJavaScriptGlobals
* Wrapping wikibits.js in closure to avoid leakage of "local" variables. This shouldn't break anything as it is loaded through resource loader which, in production mode, wraps it in a closure anyway.
* adding explicit posision=>bottom for wikibits. 'bottom' is default but repeating here since it must not change for legacy reasons.