Commit graph

92 commits

Author SHA1 Message Date
Sam Reed
fdc70c6a3d More spurious code r98467 2011-09-29 22:17:20 +00:00
Sam Reed
937fc3bcfd Back out r95396 and friends 2011-09-29 22:08:00 +00:00
Aaron Schulz
6559b8bfcc FU r98405: various document cleanup 2011-09-29 21:17:43 +00:00
Aaron Schulz
6014f0db91 HTMLFileCache refactoring:
* Rewrote class and split into three classes: a base class, and html cache and a more generic cache to be used later.
* The new classes now use RequestContext.
* Renamed fetchPageText() -> fetchText().
* Split out new saveText() function from saveToFileCache().
* Various other cleanups and fixes.
Also fixed backwards setting of $wgDisableCounters in rebuildFileCache.php.
2011-09-29 08:18:20 +00:00
Brion Vibber
ea44989fe4 Debug logging and possible fix for bug 31177: mystery sidebar message failures
This may be related to things failing on load from External Storage; however we have not yet been able to verify this.

Tweaks MessageCache::loadFromDB() and MessageCache::getMsgFromNamespace() to avoid storing empty cache entries when loading text fails.
When building initial cache if we get a failure we'll log and store a '!TOO BIG' message which requests on-demand load later.
If an on-demand load failures, we'll log and return the false through but won't update the cache with the bad value.

To enable the logging in production, set up a $wgDebugLogFiles entry for 'MessageCache'.

Note that MessageCache::loadFromDB() bypasses Revision's text entry memcaching and may cause a lot of ES fetches at once.
However any ES failures *should* already be logged in the 'ExternalStoreDB' log file.
2011-09-27 00:41:24 +00:00
Aaron Schulz
23c430f64a Added filecache support for history pages 2011-09-24 01:17:04 +00:00
Aaron Schulz
7fa47e0c8f Removed action=raw support from HTMLFileCache. Obsolete due to RL. 2011-09-24 00:37:11 +00:00
Niklas Laxström
efb7b817a7 I broke few parser tests in r97633 by overlooking the return value. This fixes them. 2011-09-20 16:26:39 +00:00
Niklas Laxström
c49610741d Added LinkCache::addGoodLinkObjFromRow, since addGoodLinkObj is not going to work much longer when new parameters are added 2011-09-20 15:19:18 +00:00
Niklas Laxström
95a2c1b398 No need to check isset before unset, shortens the code a bit, and added some whitespace 2011-09-20 13:52:47 +00:00
Sam Reed
40fa861e62 Simplify array( 'page_id IN (' . $dbw->makeList( $batch ) . ')' ), to array( 'page_id' => $batch ), 2011-09-19 18:46:57 +00:00
Roan Kattouw
0b9b787acf Merge r82361 from 1.17wmf1 to trunk. This shuts up "Non-string key given" exceptions in cases where a numeric key manages to become an integer somehow. This could probably be fixed in a better way but I wouldn't know how. 2011-09-15 11:12:19 +00:00
Roan Kattouw
ae46d7fcfd Introduce MessageCache::getAllMessageKeys(), which returns all message keys stored in the MessageCache, and use this to power the amincludelocal parameter in meta=allmessages which adds messages that don't exist in PHP but exist as MediaWiki: pages only. 2011-09-14 19:59:50 +00:00
Sam Reed
fb32210aee Whitespace/documentation 2011-09-14 15:07:20 +00:00
Sam Reed
b70eeefc94 Followup r86304, guard against $title AND $wgTitle being null
Add profiling too
2011-09-14 12:32:22 +00:00
Chad Horohoe
22b599e06c Refactor deferrable updates into classes & interfaces, also add helper method for the most common use case:
$wgDeferredUpdateList[] = new HTMLCacheUpdate( $title, "sometable" );

I kept b/c with $wgDeferredUpdateList for now, but seeing as only 3 exts in svn use it (FileSearch, FlaggedRevs and WikiScripts), I'd like to deprecate it pretty soon :)
2011-09-10 06:50:30 +00:00
Roan Kattouw
ee24d7b289 Actually fix bug 30792, despite my earlier claims. SquidUpdate::purge('//upload.wikimedia.org/foo') would return 'http://commons.wikimedia.org//upload.wikimedia.org/foo'
Introduce PROTO_INTERNAL much like PROTO_CANONICAL, and use it in SquidUpdate::purge()
2011-09-07 14:15:03 +00:00
Platonides
061f4f07a6 Unused variables.
$wgContLang in CategoryPage was probably removed with the better directionality improvements.
$wgServer, $wgRequest in getFullUrl() unused since r94375
Other variables added in r95396 iwtransclusion merge.
2011-08-27 18:28:04 +00:00
Sam Reed
44020e254c Merge the iwtransclusion branch back into trunk
Hexmode fixed broken unit tests in revisions after last time
2011-08-24 13:03:03 +00:00
Sam Reed
183d2dab37 Back out r93533, r93531, r93530
Breaks unit tests as below, not going to be able to fix them before I disappear for the evening, so might aswell leave trunk clean

ArticleTablesTest testbug14404

Error:
ArticleTablesTest::testbug14404
Undefined offset: 0

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

ParserTests testParserTest #552 - testParserTest with data set #551

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

/home/ci/cruisecontrol-bin-2.8.3/projects/mw/source/tests/phpunit/includes/parser/NewParserTest.php:545
/home/ci/cruisecontrol-bin-2.8.3/projects/mw/source/tests/phpunit/MediaWikiTestCase.php:60
/home/ci/cruisecontrol-bin-2.8.3/projects/mw/source/tests/phpunit/MediaWikiPHPUnitCommand.php:20
/home/ci/cruisecontrol-bin-2.8.3/projects/mw/source/tests/phpunit/phpunit.php:60
2011-07-30 15:56:54 +00:00
Sam Reed
dc9d39887e Merge iwtransclusion branch into trunk 2011-07-30 15:30:01 +00:00
Sam Reed
66e01d1bb7 Adding __METHOD__ to parameters passed to wfMkdirParents() 2011-07-25 22:01:19 +00:00
Sam Reed
2a4c94f90e Documentation 2011-07-12 19:59:35 +00:00
Aaron Schulz
3ca3494e62 Removed ampersand in HTMLFileCache constructor 2011-07-01 22:01:48 +00:00
Aaron Schulz
16eb5f6e41 * Follow-up r90749
** Tweaked addAutopromoteOnceGroups() calls for performance
** Some doc tweaks and fixes
* Added NS_SPECIAL short-circuit on $wgTitle for file cache and removed unnecessary "is null" check
* Pushed "$action != 'raw'" check into HTMLFileCache
* Removed useless return value from performRequest()
* Added type hint to performAction()
2011-06-25 17:59:42 +00:00
Sam Reed
bdf84cb20e Swap else if for elseif
Trimming trailing whitespace also

Doing in 3 commits, so hopefully reviewable in CR...
2011-06-17 16:03:52 +00:00
Alexandre Emsenhuber
c9bad93715 Removed usage of error suppression operator 2011-06-03 10:20:45 +00:00
Sam Reed
4065e65d03 Even more documentation in various files 2011-05-29 14:24:27 +00:00
Sam Reed
2b676156ba And even more documentation 2011-05-28 18:58:51 +00:00
Sam Reed
50d5b074d0 And some more parameter documentation!! 2011-05-28 16:31:00 +00:00
Sam Reed
ba0cbdeeff More parameter documentation!! 2011-05-28 15:59:57 +00:00
Sam Reed
c73746981c Param documentation updates/added 2011-05-26 19:21:50 +00:00
Mark A. Hershberger
0a49fd69b0 Misc EOL w/s and spaces-instead-of-tabs fixes. One day I'll get around to nagging people for this stuff, but for now, I'll JFDI myself. 2011-05-25 15:39:47 +00:00
Platonides
b8bac4dec6 /* to /** 2011-05-22 22:10:08 +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
Niklas Laxström
7fe4a8e1bb Fixed a bug in transformation where previous language could leak into later transformations in UI language. Not sure what do with userlang. 2011-05-15 07:16:25 +00:00
Sam Reed
c444d03a0e HTMLCacheUpdate->invalidate() deprecated since 1.16, unused 2011-05-06 23:15:01 +00:00
Sam Reed
15df9a9d5c Kill off the long deprecated $wgInputEncoding and $wgOutputEncoding globals 2011-05-06 22:09:47 +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
bc1c6d2a6b More parameter and return type hints 2011-04-25 22:41:54 +00:00
Sam Reed
93df2f1ac8 Move 5 more classes into cache/ 2011-04-25 21:38:48 +00:00
Sam Reed
8e0ac8db63 Move 3 files into cache directory
Move in AutoLoader to cache section also
2011-04-25 21:33:38 +00:00