Commit graph

870 commits

Author SHA1 Message Date
Sam Reed
202f4d7443 Fixup error message
Remove {} (documentation tweaks)

Remove whitespace
2011-06-05 23:44:37 +00:00
Chad Horohoe
5cca2119e3 rvv: r89398. Tim wants me to wait 2011-06-03 05:44:28 +00:00
Chad Horohoe
3465e3f083 Kill off action=raw from index.php
* One less entry point to worry about
* Completely obsolete by load.php and api.php
* Left $wgDebugRawPage in place, also affects load.php requests (docs already reflect)
* Affects dumpHTML (probably broken anyway, has anyone RL-ified this?), and two abandoned/obsolete extensions
2011-06-03 05:39:32 +00:00
Tim Starling
c00d63dda3 Make $wgDebugRawPage=false also ignore load.php, so that debug logs can be readable again. 2011-05-31 05:55:06 +00:00
Sam Reed
4065e65d03 Even more documentation in various files 2011-05-29 14:24:27 +00:00
Sam Reed
296f3d3f4f And even more documentation 2011-05-28 18:59:42 +00:00
Alexandre Emsenhuber
6494121882 Now that Hooks.php contains a class, moved wfRunHooks() definition to GlobalFunctions.php and removed its inclusion from Setup.php 2011-05-28 16:11:40 +00:00
Brion Vibber
87b966a789 * (bug 29140) FirePHP debugging assist extension
FirePHP is an extension to Firebug, an awesome debugging extension to Firefox.
It allows pulling debug log data in from your PHP script via HTTP headers, which then get displayed in Firebug's console along with errors, warnings, and AJAX hits from the web page.

Added 'Debug' hook which gets called from wfDebug() and wfDebugLog() to take this; note that a few lines of output won't make it to FirePHP as they are output either before we've done all plugin initialization, or after we've flushed output and can no longer add HTTP headers.

BSD-licensed FirePHPCore library from firephp-libs commit aff25803a3ff460b2797:
https://github.com/cadorn/firephp-libs/blob/aff25803a3ff460b2797/packages/core/lib/FirePHPCore/FirePHP.class.php

There's not a lot of fancy integration; everything's just output as a 'log' line.
You can use $wgFirePHP global (or call FirePHP::getInstance() yourself) to get direct access to FirePHP's fancier features in test code.
2011-05-25 22:01:08 +00:00
Alexandre Emsenhuber
8ad6638af8 Moved wfGetCaller(), wfGetAllCallers() and wfFormatStackFrame() near other related functions 2011-05-25 18:32:04 +00:00
Max Semenik
c79a16167a Introduced Maintenance::getDB() and corresponding setDB() to control externally what database object should be used by maintenance script. Currently used by updater to avoid DatabaseSqliteTest from running stuff like Populate* on the live database instead of the one used for testing. 2011-05-24 17:48:22 +00:00
Alexandre Emsenhuber
7ba005d503 Moved wfEmptyMsg() near other message functions 2011-05-23 19:42:00 +00:00
Chad Horohoe
7b03a38d4d wfDeprecated() plus doc update 2011-05-21 17:20:12 +00:00
Alexandre Emsenhuber
cf8a8cd575 Groupped array manipulation functions at the top of GlobalFunctions.php 2011-05-20 10:55:34 +00:00
Sam Reed
33ad682ab0 Add/remove/tweak method documentation 2011-05-19 00:03:31 +00:00
Siebrand Mazeland
75c6696aa8 Use consistent notation for "@todo FIXME". Should update http://svn.wikimedia.org/doc/todo.html nicely. 2011-05-17 22:03:20 +00:00
Krinkle
167325a56a Fixing typo from r55396 + code styl/whitespace 2011-05-17 21:54:12 +00:00
Siebrand Mazeland
e065a453f8 Make @deprecated documentation more consistent (see: http://svn.wikimedia.org/doc/deprecated.html). 2011-05-17 08:46:29 +00:00
Tim Starling
69f2c2edee Fix for HipHop breakage in r87748 etc. Please do not use require_once(dirname(__FILE__)...) to fetch class, function or define() dependencies anymore. You do not need to have HipHop to know that doing so will break it. 2011-05-15 13:36:59 +00:00
Tim Starling
6fec4e3fde Revert r87635, r87637, r87639, r87643 (MW_MIN_PHP_VERSION etc.): breaks HipHop support. 2011-05-15 13:21:16 +00:00
Alexandre Emsenhuber
fe22bc1543 $wgOut can no longer be a stub since r85278, so there's no need to check this with StubObject::isRealObject() 2011-05-08 08:50:11 +00:00
Happy-melon
fd34d0354b * Implement MW_VERSION constant in Defines.php and use it in preference to $wgVersion. Defines.php will have been loaded anywhere that DefaultSettings.php has been loaded.
* Move the declaration of $wgFeedClasses from Defines.php to WebStart.php
2011-05-07 14:53:08 +00:00
Sam Reed
f985524076 More versions added to @deprecated tags
Couple of inbound calls fixed up

Some ancient code removed as it's been marked deprecated
2011-05-06 21:50:18 +00:00
Sam Reed
5203c8dabc Couple more deprecated things removed 2011-05-06 20:50:16 +00:00
Sam Reed
3999f73a1f More __ for r87572 2011-05-06 20:46:13 +00:00
Sam Reed
f16b028b11 Add wfDeprecated( __METHOD ); to one method marked for 1.19 2011-05-06 20:43:32 +00:00
Alexandre Emsenhuber
b2a2494fa3 Remove functions marked for removal in 1.19 2011-05-06 18:10:53 +00:00
Alexandre Emsenhuber
8109f7bbf0 Moved wfTimestampNow() near other wfTimestamp() functions 2011-05-05 17:42:14 +00:00
Chad Horohoe
4f8dca8044 (bug 28641) Doc fix for wfEmptyMsg() 2011-05-05 05:26:27 +00:00
Alexandre Emsenhuber
ca7bcb1fac Recommit r87129 and follow-ups but with a fix for the bug Brion found (sorry) 2011-04-30 14:08:12 +00:00
Brion Vibber
85d99c4c52 Revert r87129 "(bug 21196) Article::getContributors() no longer fail on PostgreSQL" -- breaks stuff under MySQL like this:
SkinTemplate::makeTalkUrlDetails given invalid pagename User:

Backtrace:

#0 /var/www/trunk/includes/SkinTemplate.php(691): SkinTemplate->makeTalkUrlDetails('User:')
#1 /var/www/trunk/includes/SkinTemplate.php(495): SkinTemplate->buildPersonalUrls(Object(OutputPage))
#2 /var/www/trunk/includes/OutputPage.php(1906): SkinTemplate->outputPage(Object(OutputPage))
#3 /var/www/trunk/includes/Wiki.php(402): OutputPage->output()
#4 /var/www/trunk/index.php(146): MediaWiki->finalCleanup()
#5 {main}


Seen trivially by going to login page while not logged in; some user check is failing and ending up with an improperly initialized object.
2011-04-29 23:57:28 +00:00
Alexandre Emsenhuber
4fdddc9292 * (bug 21196) Article::getContributors() no longer fail on PostgreSQL
Changed User::loadFromRow() to allow partial row (user_id, user_name, user_real_name can be set independently from other fields) userand removed User::$mDataLoaded, replaced by User::$mLoadedItems (marked as private) that can be an array with already loaded items or true when all data has been loaded. Changed GlobalFunctions.php and Database.php accordingly, no use of User::$mDataLoaded in extensions.
2011-04-29 18:27:44 +00:00
Sam Reed
392cf33b57 Followup r86905, after saving GlobalFunctions.php 2011-04-25 21:41:02 +00:00
Brion Vibber
6fff535d08 * (bug 28627) External link normalization now handles file: URL cases without throwing notice warnings.
Added some test cases for wfMakeUrlIndex() to GlobalTests (tweaks $wgUrlProtocols to toss in file:// support so it can test them).
Needs more cases for other URL styles probably; some of the more pathological file: URL cases still won't normalize really cleanly but will go through the function without exploding. The most-needed variants will be the Windows/IE-compatible ones I think -- so file:///c:/foo or file://server/foo.
2011-04-25 21:00:49 +00:00
Alexandre Emsenhuber
b30f230809 Fix comment, language is handled correctly with parse and parseinline since r79642 2011-04-24 18:47:36 +00:00
Happy-melon
545d854a39 Documentation and type hinting. 2011-04-23 13:55:27 +00:00
Sam Reed
42b9b27823 Followup to r86312
<ialex> Reedy: that rev is breaking usage of {{PAGENAME}} in messages, such as in MediaWiki:Noarticles

Allowing optional passing in of a Title object (like it may be set in Message), but if it's not set, or not a title object, fall back and use $wgTitle (I'm sorry!)
2011-04-22 20:17:21 +00:00
Alexandre Emsenhuber
6922017164 Follow-up r86732: really mark it as deprecated ;) 2011-04-22 19:54:01 +00:00
Niklas Laxström
64163f0506 Add docs 2011-04-22 11:20:28 +00:00
Alexandre Emsenhuber
f495fe8639 Removed false comment introduced in r86633 2011-04-21 16:33:10 +00:00
Alexandre Emsenhuber
21e53d3590 * Added Profiler::isStub() to check if we are using a stub profiler, instead of checking whether $wgProfiler is set
* Replaced wfProfileClose() and wfGetProfilingOutput() by direct calls to the Profiler instance and removed them, no uses in extensions
* Also removed useless params from Profiler::getOutput() call in wfLogProfilingData()
* Only generate profiling output if it'll be used; introduced Profiler::logData() that saves profiling data (database, udp, ...) to separate it from output generation
* Removed unused Profiler::getCaller(), not used at all, and we have wfGetCaller() that does the same thing
2011-04-21 16:31:02 +00:00
Chad Horohoe
d748f8b7f1 Tweak wfDl() so it actually works properly in 5.3.x
Also add $fileName parameter in case the extension doesn't match the filename
Minor tweak for windows, its files begin php_
2011-04-20 23:33:28 +00:00
Platonides
1d4e17a91c Follow up r86447. Support the $wiki parameter 2011-04-20 15:32:10 +00:00
Platonides
62053ac8fd Merge r86398 into the old wfWaitForSlaves. Update core calls.
maintenance/waitForSlave.php still calls the old prototype.
Most instances were replaced with 
sed -i 's/wfWaitForSlaves( [0-9]* );/wfWaitForSlaves();/' ./maintenance/initEditCount.php ./maintenance/updateRestrictions.php ./maintenance/updateSpecialPages.php ./maintenance/importDump.php ./maintenance/moveBatch.php ./maintenance/storage/resolveStubs.php ./maintenance/storage/trackBlobs.php ./maintenance/storage/fixBug20757.php ./maintenance/storage/moveToExternal.php ./maintenance/storage/compressOld.inc ./maintenance/populateSha1.php ./maintenance/deleteDefaultMessages.php ./maintenance/migrateUserGroup.php ./maintenance/importImages.php ./maintenance/runJobs.php ./maintenance/archives/upgradeLogging.php ./maintenance/deleteBatch.php ./maintenance/populateLogSearch.php ./maintenance/populateLogUsertext.php ./maintenance/gearman/gearmanWorker.php ./maintenance/populateRevisionLength.php ./maintenance/refreshLinks.php ./maintenance/deleteSelfExternals.php ./maintenance/upgrade1_5.php ./maintenance/rebuildFileCache.php ./includes/job/RefreshLinksJob.php ./includes/installer/MysqlUpdater.php ./maintenance/convertUserOptions.php ./maintenance/populateParentId.php ./maintenance/runBatchedQuery.php ./maintenance/upgrade1_5.php ./maintenance/waitForSlave.php ./maintenance/populateCategory.php ./maintenance/importImages.php
2011-04-20 00:12:06 +00:00
Roan Kattouw
cdaa91bd27 Put the code for waiting for slave lag the new-and-improved way (using master position) in wfWaitForSlaves_masterPos(). I guess I should deprecate or re-do wfWaitForSlaves() and update callers, but I'm lazy 2011-04-19 14:52:11 +00:00
Alexandre Emsenhuber
e7660a8654 * Changed wfMsgNoDBForContent() call to wfMessage(); also switched to user's language, I don't see any reason to not display this in user's language
* Marked wfMsgNoDBForContent() as deprecated and added wfDeprecated() call; the call in LoadBalancer was the only one in core and extensions
* Also added call to wfDeprecated() in wfMsgWeirdKey(); no call in core or extensions
2011-04-19 06:21:06 +00:00
Happy-melon
b0a8402560 Follow-up r86113: define E_DEPRECATED for PHP 5.2 2011-04-18 23:36:47 +00:00
Sam Reed
5622567290 Followup rr86304
We need a title object for parsing, do one against the message key

Doesn't seem to be the best way, but it's the most applicable. If I abused $wgTitle, Chad would come and beat me too ;)
2011-04-18 14:02:13 +00:00
Sam Reed
9c19cb6e38 Followup r86304
Things won't just happily accept a ParserOutput object when they were getting strings before

Add missing calling parameter
2011-04-18 13:53:24 +00:00
Sam Reed
ca01d07fdd Replace $wgMessageCache with MessageCache::singleton()
Fix some tab/space issues

Follows up r86304
2011-04-18 12:59:50 +00:00
Sam Reed
3a0ed7a044 * (bug 28532) wfMsgExt() and wfMsgWikiHtml() use $wgOut->parse()
* (bug 16129) Transcluded special pages expose strip markers when they output parsed messages

Also adding some related documentation during my travels around the code
2011-04-18 12:43:53 +00:00