lhc/web/wiklou.git
13 years agoFollow-up r85724: update messages.inc and rebuild all language files.
Siebrand Mazeland [Sat, 9 Apr 2011 17:21:31 +0000 (17:21 +0000)]
Follow-up r85724: update messages.inc and rebuild all language files.

13 years ago...and remove the math-related messages from MessagesEn.php; follow-up to r85723
Jack Phoenix [Sat, 9 Apr 2011 15:18:15 +0000 (15:18 +0000)]
...and remove the math-related messages from MessagesEn.php; follow-up to r85723

13 years agoRevert r85644. Multipart sucks because it is hard to parse and because you need to...
Bryan Tong Minh [Sat, 9 Apr 2011 14:43:12 +0000 (14:43 +0000)]
Revert r85644. Multipart sucks because it is hard to parse and because you need to seek into the stream. I'll follow up with a solution that allows embeding data in the stream.

13 years agoInitial stab at breaking math/texvc out to Math extension.
Brion Vibber [Sat, 9 Apr 2011 00:39:40 +0000 (00:39 +0000)]
Initial stab at breaking math/texvc out to Math extension.

* (bug 14202) $wgUseTeX has been superseded by the Math extension. To re-enable
  math conversion after upgrading, obtain the Math extension from SVN or from
  http://www.mediawiki.org/wiki/Extension:Math and add to LocalSettings.php:
  require_once "$IP/extensions/Math/Math.php";

This is an initial stab, and a few things remain to be cleaned up:
* messages need to be moved from core to extension
* MW_MATH_* constants should be moved to the extension from core
* old back-compat math names interfaces using those constants should be removed from message files
* classic edit toolbar's math button should be added from the extension (or else dropped) -- currently there's not a clean hook, but could do it by JS
* couple of things like the 'armourMath' function on Language & LanguageConverter may want to be redone just as an unconditional, if that's simpler.

Setting $wgUseTeX alone will no longer have any affect. The var's still there for the moment as a few bits still need to be fully moved out from core.

13 years agoCleaning up my w/c again. Add documentation
Sam Reed [Fri, 8 Apr 2011 23:53:59 +0000 (23:53 +0000)]
Cleaning up my w/c again. Add documentation

13 years agoQuick fix for bug 15892: intermittent SQL-based cache failures during parser test...
Brion Vibber [Fri, 8 Apr 2011 23:06:56 +0000 (23:06 +0000)]
Quick fix for bug 15892: intermittent SQL-based cache failures during parser test runs.

13 years agoMFB (or MTT?) 1.17wmf1 r85698, r85700
Sam Reed [Fri, 8 Apr 2011 22:07:19 +0000 (22:07 +0000)]
MFB (or MTT?) 1.17wmf1 r85698, r85700

13 years agoMove api RELEASE-NOTES to api section
Sam Reed [Fri, 8 Apr 2011 21:59:47 +0000 (21:59 +0000)]
Move api RELEASE-NOTES to api section

13 years agoLocalisation updates for core and extension messages from translatewiki.net (2011...
Raimond Spekking [Fri, 8 Apr 2011 19:53:47 +0000 (19:53 +0000)]
Localisation updates for core and extension messages from translatewiki.net (2011-04-08 19:35:00 UTC)

13 years agoFollowup to r85464, correct parser test
OverlordQ [Fri, 8 Apr 2011 16:17:54 +0000 (16:17 +0000)]
Followup to r85464, correct parser test

13 years ago* r81084 added prefix to index name and as this index gets synced directly it has...
Jure Kajzer [Fri, 8 Apr 2011 12:45:19 +0000 (12:45 +0000)]
* r81084 added prefix to index name and as this index gets synced directly it has to use the same prefix

13 years agoNo need to force inclusion of Namespace.php since r85327
Alexandre Emsenhuber [Fri, 8 Apr 2011 07:19:26 +0000 (07:19 +0000)]
No need to force inclusion of Namespace.php since r85327

13 years agoUse MWNamespace::getCanonicalNamespaces() instead of $wgCanonicalNamespaceNames
Alexandre Emsenhuber [Fri, 8 Apr 2011 07:14:42 +0000 (07:14 +0000)]
Use MWNamespace::getCanonicalNamespaces() instead of $wgCanonicalNamespaceNames

13 years agoDont allow $procs to be 0
Chad Horohoe [Fri, 8 Apr 2011 05:50:05 +0000 (05:50 +0000)]
Dont allow $procs to be 0

13 years agoAdd quick sanity check before before trying to use the $outDir
Chad Horohoe [Fri, 8 Apr 2011 05:28:44 +0000 (05:28 +0000)]
Add quick sanity check before before trying to use the $outDir

13 years agoalso generate random SVG files
Neil Kandalgaonkar [Thu, 7 Apr 2011 23:32:36 +0000 (23:32 +0000)]
also generate random SVG files

13 years agoSecond part of bug bug 22881: Allow exporting files along with the XML as mimepart...
Bryan Tong Minh [Thu, 7 Apr 2011 21:44:44 +0000 (21:44 +0000)]
Second part of bug bug 22881: Allow exporting files along with the XML as mimepart/related file. The patch attached to that bug was unfortunately not up to coding standards, so I rewrote this part myself.

13 years agoStylize Export.php
Bryan Tong Minh [Thu, 7 Apr 2011 21:04:16 +0000 (21:04 +0000)]
Stylize Export.php

13 years agoFirst part of bug 22881: Allow uploading directly into the archive to support importi...
Bryan Tong Minh [Thu, 7 Apr 2011 20:19:44 +0000 (20:19 +0000)]
First part of bug 22881: Allow uploading directly into the archive to support importing files. Based on a patch by Vitaliy Filippov with some major rewrites by me.
* LocalFile::publish() supports an extra parameter to support publishing into the archive
* Added OldLocalFile::uploadOld(), which is the OldImage equivalent to LocalFile::upload(), but does not override it because it has an entirely different function signature.

13 years agoLocalisation updates for core and extension messages from translatewiki.net (2011...
Raimond Spekking [Thu, 7 Apr 2011 20:18:13 +0000 (20:18 +0000)]
Localisation updates for core and extension messages from translatewiki.net (2011-04-07 19:58:00 UTC)

13 years agoMoved rateLimited() and showLagWarning() near other similar functions
Alexandre Emsenhuber [Thu, 7 Apr 2011 16:04:08 +0000 (16:04 +0000)]
Moved rateLimited() and showLagWarning() near other similar functions

13 years agoVarious fixes for PHPUnit tests:
Paul Copperman [Thu, 7 Apr 2011 14:54:38 +0000 (14:54 +0000)]
Various fixes for PHPUnit tests:

* Block.php: Set mExpiry to the value we store in the database, so that Block::equals() returns true. Fixes BlockTest::testInitializerFunctionsReturnCorrectBlock.
* In Title::checkUserBlock(): Convert message parameters to plain strings to make strict comparisons work. Fixes TitlePermissionTest::testUserBlock().
* ApiBlock.php: Follow-Up r85166, add 'Confirm' parameter to data array. Fixes ApiBlockTest::testMakeNormalBlock().
* ApiQueryTest.php: Use $wgMetaNamespace instead of $wgSitename to account for customizations.
* RandomImageGenerator.php: Use default value for constructor param to prevent fatals.
* ApiTestCaseUpload.php:
** Fix undefined variable $fileName.
** Remove stray ini_set statements, they don't belong there. Especially ini_set( 'error_reporting', 1 ) will effectively disable all reporting, which makes errors hard to track.
* ArticleTablesTest.php: Put testbug14404() in group Broken, as the fix for the bug has been reverted in r83868.

13 years agoFix copypaste fail in r85616
Roan Kattouw [Thu, 7 Apr 2011 13:14:33 +0000 (13:14 +0000)]
Fix copypaste fail in r85616

13 years agoFor bug 27488: move the startup script, jquery+mediawiki and the mw.config.set()...
Roan Kattouw [Thu, 7 Apr 2011 12:07:25 +0000 (12:07 +0000)]
For bug 27488: move the startup script, jquery+mediawiki and the mw.config.set() call for configuration variables back to the <head> . Let modules control whether they're loaded in the <head> ('top') or at the bottom of the <body> ('bottom') through the position parameter/property

Also rearranges the loading order a little bit such that only=messages comes before only=scripts, and config comes before everything except startup and jquery+mediawiki

13 years agojoin() appears to be inadequate for some production errors
Neil Kandalgaonkar [Thu, 7 Apr 2011 08:58:16 +0000 (08:58 +0000)]
join() appears to be inadequate for some production errors

13 years ago* (bug 28368) add hint for multipart/form-data to api information of action=import...
Brion Vibber [Wed, 6 Apr 2011 22:16:38 +0000 (22:16 +0000)]
* (bug 28368) add hint for multipart/form-data to api information of action=import&xml=

13 years agoFollow-up r85302: new MediaWiki() constructor format in phpunit test declaration.
Happy-melon [Wed, 6 Apr 2011 21:59:49 +0000 (21:59 +0000)]
Follow-up r85302: new MediaWiki() constructor format in phpunit test declaration.

13 years ago* (bug 28444) Fix regression: edit-on-doubleclick retains revision id again
Brion Vibber [Wed, 6 Apr 2011 21:58:10 +0000 (21:58 +0000)]
* (bug 28444) Fix regression: edit-on-doubleclick retains revision id again

Regression in 61071 caused by dropping $title->getLocalUrl($skin->getEditUrlOptions())
for the less informational $title->getEditUrl(), thus losing oldid view information.
Switching back nicely resolves it.

13 years agoRevert unintended change to this parserTest in r85481
Platonides [Wed, 6 Apr 2011 21:46:47 +0000 (21:46 +0000)]
Revert unintended change to this parserTest in r85481

13 years agor85553 fixup. When there are variants involved, the line
Platonides [Wed, 6 Apr 2011 21:36:07 +0000 (21:36 +0000)]
r85553 fixup. When there are variants involved, the line
$GLOBALS['wgContLang'] = $context->lang;
is not assigning $wgContLang the same $langObj instantiated a couple of lines above, but a different object obtained from the user code, breaking variant parsertestsw..

13 years ago* (bug 27473) Fix regression: bold, italic no longer interfere with linktrail for...
Brion Vibber [Wed, 6 Apr 2011 21:11:49 +0000 (21:11 +0000)]
* (bug 27473) Fix regression: bold, italic no longer interfere with linktrail for ca, kaa

Patch to ca, kaa linktrails to exclude multiple apostrophes by Platonides: https://bugzilla.wikimedia.org/attachment.cgi?id=8337

Added parser test cases to confirm that the linktrail apostrophe works on those languages, and to confirm that the bug where a link is surrounded by bold or italics is resolved.

Tweaked Linker::splitTrail() to keep it from permanently caching $wgContLang's linktrail; when we change content languages during a script run as we do with parser tests, that was leaving us stuck forever on English's linktrail.
This may slightly slow down that path, since it'll have to make a couple brief function calls into the Language object and its data cache.

13 years agoApply modification of mdale's patch from Bug #28420: “Re-factor upload tests to suppo...
Mark A. Hershberger [Wed, 6 Apr 2011 19:50:54 +0000 (19:50 +0000)]
Apply modification of mdale's patch from Bug #28420: “Re-factor upload tests to support extensions extending upload test case”

13 years agoLocalisation updates for core and extension messages from translatewiki.net (2011...
Raimond Spekking [Wed, 6 Apr 2011 19:50:00 +0000 (19:50 +0000)]
Localisation updates for core and extension messages from translatewiki.net (2011-04-06 19:28:00 UTC)

13 years ago* (bug 28372) Fix bogus link to suppressed file versions in ForeignDBRepo
Brion Vibber [Wed, 6 Apr 2011 18:45:27 +0000 (18:45 +0000)]
* (bug 28372) Fix bogus link to suppressed file versions in ForeignDBRepo

Based on patch by Umherirrender: https://bugzilla.wikimedia.org/attachment.cgi?id=8361&action=edit
If file is not local, we can't make a link so don't.

13 years agoAnd I forgot to commit this file in r85557
Alexandre Emsenhuber [Wed, 6 Apr 2011 18:38:48 +0000 (18:38 +0000)]
And I forgot to commit this file in r85557

13 years ago* Added possibility to set short options aliases to long long options, added -h alias...
Alexandre Emsenhuber [Wed, 6 Apr 2011 18:37:09 +0000 (18:37 +0000)]
* Added possibility to set short options aliases to long long options, added -h alias to --help and -q to --quiet for all scripts
* Converted edit.php, people using short option version (with only one dash) won't have to change anything, but the ones using long options that were only one character (--u, --s, --m, --b and --a) will either need to change to short options or use full name

13 years agoFix regression from r81558: fatal error in ForeignFileRepo thumb fetching when thumb...
Brion Vibber [Wed, 6 Apr 2011 18:27:20 +0000 (18:27 +0000)]
Fix regression from r81558: fatal error in ForeignFileRepo thumb fetching when thumb caching is disabled.

Addition of optional parameters lead to passing default 'null' straight through on a reference parameter, which PHP 5.3 really disapproves of. Sticking in a temp variable resolves this easily.

13 years ago* (bug 28306) Fix exposure of suppressed usernames in ForeignDBRepo
Brion Vibber [Wed, 6 Apr 2011 18:23:07 +0000 (18:23 +0000)]
* (bug 28306) Fix exposure of suppressed usernames in ForeignDBRepo

Patch by Umherirrender: https://bugzilla.wikimedia.org/attachment.cgi?id=8360&action=diff

13 years agoFollow-up r85403: fix fatal in parser tests.
Happy-melon [Wed, 6 Apr 2011 17:39:18 +0000 (17:39 +0000)]
Follow-up r85403: fix fatal in parser tests.

13 years agoMade Special:ListFiles transcludable
Max Semenik [Wed, 6 Apr 2011 16:45:46 +0000 (16:45 +0000)]
Made Special:ListFiles transcludable

13 years agonotes for r85546
Krinkle [Wed, 6 Apr 2011 16:34:03 +0000 (16:34 +0000)]
notes for r85546

13 years agoRemove color:black from table {} in skins (bug 28422) + small fixes
Krinkle [Wed, 6 Apr 2011 16:31:46 +0000 (16:31 +0000)]
Remove color:black from table {} in skins (bug 28422) + small fixes
* Remove color:black from table {} in skins (bug 28422)
* Add color:black to .wikitable (since it has a background-color)
* Update comment about CSS3 'word-wrap:break-word' support in Gecko
* Remove line-break in mediawiki.js (it's ~ 90 chars, acceptable)

13 years agoMerge from 1.17wmf1: r84259
Chad Horohoe [Wed, 6 Apr 2011 13:50:45 +0000 (13:50 +0000)]
Merge from 1.17wmf1: r84259

13 years agoPatch from Bug #28406:
Mark A. Hershberger [Wed, 6 Apr 2011 00:56:22 +0000 (00:56 +0000)]
Patch from Bug #28406:
    # the digitClass join versions were inverted: for a maxLength > 1 it should be
      (|||), not []
    # the regexp escape for digits in the ts_number_transform_table was a bit, er,
      strange. Although it worked, I think my version is more common.
    # most important: As recommended in http://en.wikipedia.org/wiki/Percent_sign,
      there may be some whitespaces between the number and the
      "%". See also Bug #15422 for that, I'm not sure wheter it's
      included there.

I didn't include the “non-breaking space is part of \s” bit since I didn't want to mess up browser bug work-arounds

13 years agoFollow up r85467: changed some countRevisionsBetween/countAuthorsBetween callers...
Aaron Schulz [Tue, 5 Apr 2011 23:28:39 +0000 (23:28 +0000)]
Follow up r85467: changed some countRevisionsBetween/countAuthorsBetween callers to pass in objects, which avoids queries

13 years agoRevert r68358. Causes bug 27474.
Platonides [Tue, 5 Apr 2011 22:38:37 +0000 (22:38 +0000)]
Revert r68358. Causes bug 27474.
Added parser test. Added another parser test for what it seems to try to account for
but that in fact doesn't change when trying to achieve, since ids don't seem to be
affected when flipping $wgHtml5 and $wgExperimentalHtmlIds (so r68358 seems useless).

13 years agoLocalisation updates for core and extension messages from translatewiki.net (2011...
Raimond Spekking [Tue, 5 Apr 2011 20:55:44 +0000 (20:55 +0000)]
Localisation updates for core and extension messages from translatewiki.net (2011-04-05 20:23:00 UTC)

13 years ago* Cleanups to getFirstRevision and getEarliestTime
Aaron Schulz [Tue, 5 Apr 2011 20:42:45 +0000 (20:42 +0000)]
* Cleanups to getFirstRevision and getEarliestTime
* Rewrote countRevisionsBetween/countAuthorsBetween to avoid assuming rev_id is in chronological order
* Made countAuthorsBetween use $limit+1 automatically for convenience; updated callers

13 years ago(bug 28430) Make HTML and TeX output of <math> tags be LTR always
Brian Wolff [Tue, 5 Apr 2011 19:51:22 +0000 (19:51 +0000)]
(bug 28430) Make HTML and TeX output of <math> tags be LTR always

The PNG output of <math> is always LTR regardless of content language,
and since we switch back and forth between PNG/html depending on
how complicated the formula is, we should be consistent. Also according to
the bug always doing LTR even on RTL langs is appearently correct behaviour.

Also change for plain TeX output to be LTR, as otherwise the TeX commands
don't really make sense if $ ^{355} $ gets turned into $ {355}^ $

13 years agoSeems I forgot this file in r85442
Alexandre Emsenhuber [Tue, 5 Apr 2011 16:28:38 +0000 (16:28 +0000)]
Seems I forgot this file in r85442

13 years ago* (bug 28365) Added description for uiprop=preferencestoken in meta=userinfo
Alexandre Emsenhuber [Tue, 5 Apr 2011 16:17:39 +0000 (16:17 +0000)]
* (bug 28365) Added description for uiprop=preferencestoken in meta=userinfo

13 years agoFollow-up r85403: rm debugging code and a defunct method call.
Happy-melon [Tue, 5 Apr 2011 10:44:07 +0000 (10:44 +0000)]
Follow-up r85403: rm debugging code and a defunct method call.

13 years agoHipHop fixes:
Tim Starling [Tue, 5 Apr 2011 04:43:54 +0000 (04:43 +0000)]
HipHop fixes:
* Fixed preg_replace /e usage in Sanitizer and UserMailer. This was already against policy.
* Removed the __get()-based lazy initialisation of $this->xpath in PPNode_DOM. This caused a notice in HipHop, and is also inefficient due to the need for dynamic properties.
* Fixed the assertion in PPNode_DOM::splitHeading(), flagged by Inez Korczynski. It was obviously completely broken, converting a non-existent property to boolean, and it only appeared to work in Zend by accident.

13 years agoIn the HipHop server:
Tim Starling [Tue, 5 Apr 2011 04:25:10 +0000 (04:25 +0000)]
In the HipHop server:
* Serve static content.
* Less verbose logging, we don't really need a notice for every SQL query.

13 years ago* (bug 24755) AuthPlugin auto-creation of local accounts can now be aborted by
Brion Vibber [Tue, 5 Apr 2011 01:18:40 +0000 (01:18 +0000)]
* (bug 24755) AuthPlugin auto-creation of local accounts can now be aborted by
  other extensions by handling the 'AbortAutoAccount' hook, similar to the
  'AbortNewAccount' triggered by explicit account creations. (They are separate
  to avoid loops and confusion; auth plugins like CentralAuth need to handle
  AbortNewAccount separately.

13 years agoFollow-up r85302: update OutputPage constructors in core.
Happy-melon [Tue, 5 Apr 2011 00:06:47 +0000 (00:06 +0000)]
Follow-up r85302: update OutputPage constructors in core.

13 years agoFix for catchable fatals thrown on invalid titles, follow-up to miscellaneous Context...
Happy-melon [Mon, 4 Apr 2011 23:09:21 +0000 (23:09 +0000)]
Fix for catchable fatals thrown on invalid titles, follow-up to miscellaneous Context commit pulled out of a hat (let's go for r85252).  We must always have a Title object, even on invalid titles, for the purposes of not melting the Skin.  The previous method was to make that a barely-existent half-title from SpecialPage::getTitleFor( 'Badtitle' ), where that is a special page which is not actually defined, but exists in the localisation alias lists.  Instead, subclass Title as an explicit BadTitle which we can test for.  The badtitle error page, which has empty string for its name in all forms, would probably be quite a good test of our JavaScript error checking.

13 years agoFix $$ from r85379
Sam Reed [Mon, 4 Apr 2011 22:34:32 +0000 (22:34 +0000)]
Fix $$ from r85379

13 years agoDocumentation, fix indenting
Sam Reed [Mon, 4 Apr 2011 21:23:22 +0000 (21:23 +0000)]
Documentation, fix indenting

13 years agoFixup a few undefined variables and alike while checking REL1_17
Sam Reed [Mon, 4 Apr 2011 21:13:34 +0000 (21:13 +0000)]
Fixup a few undefined variables and alike while checking REL1_17

13 years agoWorkaround for bug 28146: running out of memory during Unicode validation/normalizati...
Brion Vibber [Mon, 4 Apr 2011 20:59:04 +0000 (20:59 +0000)]
Workaround for bug 28146: running out of memory during Unicode validation/normalization when uploading DjVu file with lots of embedded page text

This provisional workaround runs a page at a time through UtfNormal::cleanUp() instead of running the entire file's dumped text at once. This avoids exploding memory too much during the preg_match_all() used to divide up ASCII and non-ASCII runs for validation, which is very wasteful for long texts in Latin languages with many mixed-in non-ASCII characters (like French and German text).
Won't fix legit cases of huge texts, such as realllllllllly long page text, which would still be subject to getting run through at web input time in a giant chunk.

13 years agoSet forgotten api parameters types
Krinkle [Mon, 4 Apr 2011 20:51:41 +0000 (20:51 +0000)]
Set forgotten api parameters types
* (bug 28394) Set forgotten parameters types in ApiUnblock
* (bug 28395) Set forgotten parameters types in ApiParse

13 years ago* (bug 28417) Fix PHP notice when importing revision without a listed id
Brion Vibber [Mon, 4 Apr 2011 19:06:01 +0000 (19:06 +0000)]
* (bug 28417) Fix PHP notice when importing revision without a listed id

13 years agorevert r85177 since a lot of people don't set their $wgLocaltimezone
Mark A. Hershberger [Mon, 4 Apr 2011 18:47:28 +0000 (18:47 +0000)]
revert r85177 since a lot of people don't set their $wgLocaltimezone

13 years agominor w/s cleanup
Mark A. Hershberger [Mon, 4 Apr 2011 18:45:03 +0000 (18:45 +0000)]
minor w/s cleanup

13 years agoAdded missing file from r85327.
Tim Starling [Mon, 4 Apr 2011 14:40:36 +0000 (14:40 +0000)]
Added missing file from r85327.

13 years agoLocalisation updates for core and extension messages from translatewiki.net (2011...
Raimond Spekking [Mon, 4 Apr 2011 13:21:39 +0000 (13:21 +0000)]
Localisation updates for core and extension messages from translatewiki.net (2011-04-04 12:51:00 UTC)

13 years agoThe beginnings of HipHop compiled mode support. It works now for parser cache hits.
Tim Starling [Mon, 4 Apr 2011 12:59:55 +0000 (12:59 +0000)]
The beginnings of HipHop compiled mode support. It works now for parser cache hits.

* Work around HipHop issue 314 (volatile broken) and issue 308 (no compilation detection) by adding some large and ugly compilation detection code to WebStart.php and doMaintenance.php.
* Provide an MW_COMPILED constant which can be used to detect compiled mode throughout the codebase.
* Introduced wfIsHipHop(), which detects either compiled or interpreted mode. Used this to work around unusual eval() return value in eval.php.
* Work around lack of ini_get() in Maintenance.php, by duplicating wfIsHipHop().
* In Maintenance::shouldExecute(), accept "include" as an inclusion function name, since all kinds of inclusion give this string in HipHop.
* Introduced new class MWInit, which provides some static functions in the pre-autoloader environment.
* Introduced MWInit::compiledPath(), which provides a relative path for invoking a compiled file, and MWInit::interpretedPath(), which provides an absolute path for interpreting a PHP file. Used these new functions in the appropriate places.
* When we are running compiled code, don't include files which would generate duplicate class, function or constant definitions. Documented the new requirements on the contents of Defines.php and UtfNormalDefines.php.
* In HipHop compiled mode, it's not possible to have executable code in the same file as a class definition.
  ** Moved MimeMagic initialisation to the constructor.
  ** Moved Namespace.php global variable initialisation to Setup.php.
  ** Moved MemcachedSessions.php initialisation to the caller in GlobalFunctions.php.
  ** Moved Sanitizer.php constants and global variables to static class members. Introduced an accessor function for the attribs regex, as a new place to put code formerly at file level.
  ** Moved Language.php initialisation of $wgLanguageNames to Language::getLanguageNames(). Removed the global variable, marked "private" since forever.

* In two places: don't use error_log() with type=3 to append to a file, HipHop doesn't support it. Use file_put_contents() with FILE_APPEND instead.
* Work around the terrible breakage of class_exists() by using MWInit::classExists() instead in various places. In WebInstaller::getPageByName(), the class_exists() was marked with a fixme comment already, so I replaced it with an autoloader solution.

13 years ago* Change --config to -c, the long form is broken in HEAD
Tim Starling [Mon, 4 Apr 2011 12:27:52 +0000 (12:27 +0000)]
* Change --config to -c, the long form is broken in HEAD
* "hphp --version" gives two lines when run on a git tree, make it into one.
* Use make -j

13 years agoStyling for revdel'd revision links for oversighters/admins: make the links still...
Happy-melon [Mon, 4 Apr 2011 11:51:06 +0000 (11:51 +0000)]
Styling for revdel'd revision links for oversighters/admins: make the links still be greyed out, but still active and with underline-on-hover.

13 years agoType hints to substring used in integer addition
Sam Reed [Mon, 4 Apr 2011 11:48:38 +0000 (11:48 +0000)]
Type hints to substring used in integer addition

13 years agoAdd the revision-info and revision-info-current messages directly to the page, don...
Happy-melon [Mon, 4 Apr 2011 11:46:18 +0000 (11:46 +0000)]
Add the revision-info and revision-info-current messages directly to the page, don't stick them in the content sub; this adds unwanted extra CSS styling which screws with the margin and font size.

13 years agoFollow-up r85302: whitespace fix
Niklas Laxström [Mon, 4 Apr 2011 07:24:14 +0000 (07:24 +0000)]
Follow-up r85302: whitespace fix

13 years agoHipHop build support files.
Tim Starling [Mon, 4 Apr 2011 06:17:46 +0000 (06:17 +0000)]
HipHop build support files.
* Added a script called "make" which works around some of the inadequacies in the hphp build system:
** Allow incremental rebuilds. CMake is very smart and can do this with very little prompting, including header dependencies. This cuts down the build time for certain types of small change in the PHP source.
** Use ccache if it is present.
** Use debug mode, don't strip symbols.

* Added a script which runs the compiled program in server mode
* Added a PHP file list which is greatly cut down to reduce build time. Suitable only for initial testing. Current MediaWiki build time is about 36 minutes on my laptop.

13 years agoFix for r85244: HipHop does not support the static form of method_exists().
Tim Starling [Mon, 4 Apr 2011 03:42:34 +0000 (03:42 +0000)]
Fix for r85244: HipHop does not support the static form of method_exists().

13 years agoUpdate special pages which use $wgUser->getSkin(); inside their constructor:
Daniel Friesen [Mon, 4 Apr 2011 02:00:47 +0000 (02:00 +0000)]
Update special pages which use $wgUser->getSkin(); inside their constructor:
- Use the Linker:: properly
- Don't use $wgOut, $wgUser, $wgRequest
- Don't fetch the skin early

13 years agoFollow-up changes to r84610:
Aaron Schulz [Mon, 4 Apr 2011 01:22:08 +0000 (01:22 +0000)]
Follow-up changes to r84610:
* Cleaned up mImageTimeKeys format
* ImageMap: Removed redundant addImage call (makeImage handes this)
* ParserFunctions: added time/sha1 to addImage() call
* Removed excess ampersands in hooks
* Added some function doc comments

13 years agoPartial revert of r85236: __autoload() is needed for HipHop interpreted mode support.
Tim Starling [Mon, 4 Apr 2011 01:12:22 +0000 (01:12 +0000)]
Partial revert of r85236: __autoload() is needed for HipHop interpreted mode support.

13 years agoRemove a dead patch of Skin code that was migrated completely into SkinLegacy and...
Daniel Friesen [Mon, 4 Apr 2011 00:42:52 +0000 (00:42 +0000)]
Remove a dead patch of Skin code that was migrated completely into SkinLegacy and SkinTemplate already.

13 years agoInstead of creating an OutputPage and then setting a context start initializing Outpu...
Daniel Friesen [Mon, 4 Apr 2011 00:37:42 +0000 (00:37 +0000)]
Instead of creating an OutputPage and then setting a context start initializing OutputPages 'with' a context and send depreciated calls to extensions directly creating OutputPage instances.
Now that we've taken care of the mess of mTitle inside OutputPage and Skin and made RequestContext track Skin instead of $wgUser we don't need the hack in SpecialPage anymore.

13 years agoUpdate index.php and Wiki.php to make better use of the context.
Daniel Friesen [Mon, 4 Apr 2011 00:18:33 +0000 (00:18 +0000)]
Update index.php and Wiki.php to make better use of the context.

13 years agoFollowup r85278, remove duplication of userlang code.
Daniel Friesen [Sun, 3 Apr 2011 23:56:15 +0000 (23:56 +0000)]
Followup r85278, remove duplication of userlang code.

13 years agoRemove $this->context->output->setTitle( $this->context->title ); calls from Wiki...
Daniel Friesen [Sun, 3 Apr 2011 23:47:50 +0000 (23:47 +0000)]
Remove $this->context->output->setTitle( $this->context->title ); calls from Wiki.php, this are unnecessary, OutputPage no longer keeps track of it's own desynchronized mTitle.

13 years agoFix use of mUser noted by c15657 on r85250.
Daniel Friesen [Sun, 3 Apr 2011 23:38:44 +0000 (23:38 +0000)]
Fix use of mUser noted by c15657 on r85250.

13 years agoAdd a getSkin that returns a dummy linker for BC with extensions still abusing it...
Daniel Friesen [Sun, 3 Apr 2011 23:32:52 +0000 (23:32 +0000)]
Add a getSkin that returns a dummy linker for BC with extensions still abusing it to access the linker.

13 years agoClean out some globals from SpecialPage.php
Happy-melon [Sun, 3 Apr 2011 23:08:16 +0000 (23:08 +0000)]
Clean out some globals from SpecialPage.php

13 years agoImplement magic accessors for RequestContext variables: you can now just call $contex...
Happy-melon [Sun, 3 Apr 2011 22:09:35 +0000 (22:09 +0000)]
Implement magic accessors for RequestContext variables: you can now just call $context->request->stuff(), and that is internally mapped to the get accessor.  Rename the private variables to the old $mName syntax: I know that that's "discouraged in new code", but in this case it stops over-clever IDEs highlighting the magic accesses as potential visibility errors and sticking big error tags on them.

13 years agoFollow-up r85278, r85240:
Happy-melon [Sun, 3 Apr 2011 21:32:50 +0000 (21:32 +0000)]
Follow-up r85278, r85240:

* Internalise $title in MediaWiki base class
* Fix access fatal in SpecialPage by getting the context from the MediaWiki base class rather than the OutputPage
* Fix a couple of typos in RequestContext which would have thrown errors/fatals if anyone had ever called them.

13 years agoExpand wfShowMaxLagError() into index.php. It was only being called from here and...
Happy-melon [Sun, 3 Apr 2011 20:43:50 +0000 (20:43 +0000)]
Expand wfShowMaxLagError() into index.php.  It was only being called from here and it's pretty non-portable.  Doing so reveals that it's safe to move the declaration of $mediaWiki below the maxlag test, which will fractionally improve performance in that instance (partly compensating for having to parse OutputPage as introduced in r85278).

13 years agoFollow-up to r85240:
Happy-melon [Sun, 3 Apr 2011 20:40:27 +0000 (20:40 +0000)]
Follow-up to r85240:

* Don't stub RequestContext.  The chances of us getting away without needing to access *any* of the six major globals is nil, and in the meantime it's screwing up strong function typing and throwing catchable fatals everywhere.

* Stop stubbing $wgOut.  The only path where we can avoid unstubbing it is if we immediately die due to maxlag overflow, and that's a) a pretty uncommon code path, and b) a DB issue which won't be affected by a tiny bit of extra apache load.  That allows us to do strong typing on function parameters with it, which is a Good Thing (TM).

Also make OutputPage::getContext() private; I'm not convinced that a context belongs here (it's *part of* the context, not a consumer of it), let's work through it a it more before we advertise its existence.

13 years agoRemoved useless definition of $wgOut
Alexandre Emsenhuber [Sun, 3 Apr 2011 19:49:50 +0000 (19:49 +0000)]
Removed useless definition of $wgOut

13 years agoStore the WebRequest and OutputPage in the MediaWiki class, don't pass the global...
Happy-melon [Sun, 3 Apr 2011 19:39:39 +0000 (19:39 +0000)]
Store the WebRequest and OutputPage in the MediaWiki class, don't pass the global variables in to each function separately.

13 years agoCleanup in Wiki.php and index.php:
Happy-melon [Sun, 3 Apr 2011 15:56:29 +0000 (15:56 +0000)]
Cleanup in Wiki.php and index.php:
* Add visibility to MediaWiki::*() methods.
* Refactor out MediaWiki::preliminaryChecks(), was actually just one preliminary check :D
* maxlag is a property of the database, not the wiki, so MediaWiki::checkMaxLag() doesn't belong.  Since it was only called in index.php I just expanded it there, it's only a trivial wrapper anyway.
* Run stylize.php over code.

13 years agoAutoLoader entry for r85247.
Happy-melon [Sun, 3 Apr 2011 14:59:58 +0000 (14:59 +0000)]
AutoLoader entry for r85247.

13 years agoFollowup r85250; Revert a static method back to use of $wgRequest... :/ damnit resour...
Daniel Friesen [Sun, 3 Apr 2011 12:55:48 +0000 (12:55 +0000)]
Followup r85250; Revert a static method back to use of $wgRequest... :/ damnit resourceloader...

13 years agoContinue with r85240; Move getSkin from User to RequestContext, do it without globals...
Daniel Friesen [Sun, 3 Apr 2011 12:46:36 +0000 (12:46 +0000)]
Continue with r85240; Move getSkin from User to RequestContext, do it without globals, strip out the non-functional $title related stuff, and update Skin to use a RequestContext.

13 years agoFollowup r85244; Fix a small issue with the case of a variable name.
Daniel Friesen [Sun, 3 Apr 2011 12:37:07 +0000 (12:37 +0000)]
Followup r85244; Fix a small issue with the case of a variable name.

13 years agoFollowup r85244; Define all methods as static, implement a DummyLinker to forward...
Daniel Friesen [Sun, 3 Apr 2011 12:04:04 +0000 (12:04 +0000)]
Followup r85244; Define all methods as static, implement a DummyLinker to forward calls for passing to hooks and finish off anything in the way.

13 years agoDrop connetion between Skin and Linker and turn Linker into a staticly usable class.
Daniel Friesen [Sun, 3 Apr 2011 11:44:11 +0000 (11:44 +0000)]
Drop connetion between Skin and Linker and turn Linker into a staticly usable class.

13 years agoFollowup r85229; Drop this unnecessary reference on the user from ChangesList::newFro...
Daniel Friesen [Sun, 3 Apr 2011 11:33:10 +0000 (11:33 +0000)]
Followup r85229; Drop this unnecessary reference on the user from ChangesList::newFromUser.