lhc/web/wiklou.git
12 years agoFixes Bug #6793 — “New Variable __NEWSECTIONS__ like __TOC__” by
Mark A. Hershberger [Thu, 27 Oct 2011 23:55:29 +0000 (23:55 +0000)]
Fixes Bug #6793 — “New Variable __NEWSECTIONS__ like __TOC__” by
adding Nx.devnull's patch that adds a hook needed by
Extension:PlaceNewSection.

12 years agoBug 32004 - [regression?] style class .mw-specialpagecached for Special:SpecialPages...
Sam Reed [Thu, 27 Oct 2011 23:43:39 +0000 (23:43 +0000)]
Bug 32004 - [regression?] style class .mw-specialpagecached for Special:SpecialPages is not defined

Patch by MrBlueSky

12 years agoReverted r84395,r98710: thumbnails must be purged on file deletion
Aaron Schulz [Thu, 27 Oct 2011 23:34:54 +0000 (23:34 +0000)]
Reverted r84395,r98710: thumbnails must be purged on file deletion

12 years agoAdd dropTable method
Sam Reed [Thu, 27 Oct 2011 23:07:04 +0000 (23:07 +0000)]
Add dropTable method

12 years agoFU r100535: renamed thumb-handler.php to match the other files here
Aaron Schulz [Thu, 27 Oct 2011 22:42:53 +0000 (22:42 +0000)]
FU r100535: renamed thumb-handler.php to match the other files here

12 years agoAdded pfunc profiling to braceSubstitution()
Aaron Schulz [Thu, 27 Oct 2011 21:53:37 +0000 (21:53 +0000)]
Added pfunc profiling to braceSubstitution()

12 years agoConvert the string to single quoted and manually escape it.
Platonides [Thu, 27 Oct 2011 21:18:01 +0000 (21:18 +0000)]
Convert the string to single quoted and manually escape it.
http://us.php.net/manual/en/language.types.string.php

addslashes() is convenient, but this way we have no legitimate
usage, and it's easier to have it banned everywhere.

12 years agoFollowup r100905, disabling testGetRollbackToken because it reports as failed on...
John Du Hart [Thu, 27 Oct 2011 21:01:28 +0000 (21:01 +0000)]
Followup r100905, disabling testGetRollbackToken because it reports as failed on Jenkins but no one can reproduce it.

12 years agoFU r100915: split out GlobalWithDBTest (tests which need the DB)
Aaron Schulz [Thu, 27 Oct 2011 20:54:27 +0000 (20:54 +0000)]
FU r100915: split out GlobalWithDBTest (tests which need the DB)

12 years agoThe early return added in r98698 was skipping the closing wfProfileOut().
Platonides [Thu, 27 Oct 2011 20:50:07 +0000 (20:50 +0000)]
The early return added in r98698 was skipping the closing wfProfileOut().

12 years agoRemoval of unused globals
Platonides [Thu, 27 Oct 2011 20:48:09 +0000 (20:48 +0000)]
Removal of unused globals

12 years agoPer Nikerabbit's comment on r100621:
Alexandre Emsenhuber [Thu, 27 Oct 2011 20:23:16 +0000 (20:23 +0000)]
Per Nikerabbit's comment on r100621:
* Removed OutputPage::setPageTitleMsg() and OutputPage::setHTMLTitleMsg() and make OutputPage::setPageTitle() and OutputPage::setHTMLTitle() accept a Message object
* Updated core calls (including some that I missed last time because of non-matching case)
* Added Message::setContext() and use it in RequestContext so that I don't need to duplicate the call in OutputPage
* Yes, I'm calling $this->msg() on places and then setting the context one more time in OutputPage::setPageTitle() or OutputPage::setHTMLTitle(), but at least I won't be confused about which objects $

12 years agoLocalisation updates for core and extension messages from translatewiki.net
Raimond Spekking [Thu, 27 Oct 2011 20:00:32 +0000 (20:00 +0000)]
Localisation updates for core and extension messages from translatewiki.net

12 years ago* Added pageJoinCond() and userJoinCond() to Revision and exposed them publicly
Aaron Schulz [Thu, 27 Oct 2011 19:55:00 +0000 (19:55 +0000)]
* Added pageJoinCond() and userJoinCond() to Revision and exposed them publicly
* Removed commented-out code

12 years agoFix for r100905:
Alexandre Emsenhuber [Thu, 27 Oct 2011 18:46:40 +0000 (18:46 +0000)]
Fix for r100905:
* Make tests work again
* Added ApiTestCase::doApiRequest() and related to pass it to the context and removed override of $wgUser where possible
* Fix ApiLogin to get the correct User object (i.e. the logged in one)
* Fix ApiBase to feed a RequestContext to setContext() so that ApiLogin can call setUser()

12 years agoReinstated r94289 et all - rev_sha1/ar_sha1 field for bug 21860
Aaron Schulz [Thu, 27 Oct 2011 18:44:10 +0000 (18:44 +0000)]
Reinstated r94289 et all - rev_sha1/ar_sha1 field for bug 21860

12 years agoAdded default updateSkippedMessage() message
Aaron Schulz [Thu, 27 Oct 2011 18:37:11 +0000 (18:37 +0000)]
Added default updateSkippedMessage() message

12 years agoSet batch size in PopulateRevisionLength
Aaron Schulz [Thu, 27 Oct 2011 18:32:52 +0000 (18:32 +0000)]
Set batch size in PopulateRevisionLength

12 years ago* Pass in $user to Revision::getText()
Aaron Schulz [Thu, 27 Oct 2011 18:24:49 +0000 (18:24 +0000)]
* Pass in $user to Revision::getText()
* Minor style cleanups

12 years agoFixes Bug #28277 by allowing redirects on the stream reader. Fixes a
Mark A. Hershberger [Thu, 27 Oct 2011 17:58:30 +0000 (17:58 +0000)]
Fixes Bug #28277 by allowing redirects on the stream reader.  Fixes a
regression where pages specifying a w:en:Sprint would result in a url
like http://pt.wikipedia.org/wiki/en:Special:Export/Sprint which, at
least in 1.16, would mean the reader follow the redirect to
http://en.wikipedia.org/wiki/Special:Export/Sprint.

12 years agoparsertest now destroy virtual table under SQLite
Antoine Musso [Thu, 27 Oct 2011 17:12:53 +0000 (17:12 +0000)]
parsertest now destroy virtual table under SQLite

Fix:
Bug 29912 - Unit tests break if parsertest tables are still present

The parserTest suite duplicate available tables. When using temporary table
it assumed every table are temporary. Under SQLite searchindex is a virtual
table and thus remained after a run of parserTests.php
As a side effect, when running the PHPUnit with that remaining table, it
caused a nice error:

The last attempted database query was:
"DELETE FROM unittest_parsertest_searchindex"
from within function "MediaWikiTestCase::resetDB".
Database returned error "1: SQL logic error or missing database"

This patch is not needed for REL1_18 continuous integration since we
never run the parserTests.php script.

12 years agoRemove todo, it's public now
John Du Hart [Thu, 27 Oct 2011 16:12:22 +0000 (16:12 +0000)]
Remove todo, it's public now

12 years agoUse canonical case
Platonides [Thu, 27 Oct 2011 15:54:49 +0000 (15:54 +0000)]
Use canonical case

12 years agoChange the name back to dumpHook (r96336). That makes obvious that the use of var_dum...
Platonides [Thu, 27 Oct 2011 15:25:02 +0000 (15:25 +0000)]
Change the name back to dumpHook (r96336). That makes obvious that the use of var_dump is intended.

12 years agoFollowup r99354, adding release notes entry
John Du Hart [Thu, 27 Oct 2011 11:43:54 +0000 (11:43 +0000)]
Followup r99354, adding release notes entry

12 years agowe must have a session when testing Api upload.
Antoine Musso [Thu, 27 Oct 2011 10:28:25 +0000 (10:28 +0000)]
we must have a session when testing Api upload.

For some reason, the ApiUploadTest::testLogin method no more returns a valid
session. Since most, if not all, of the ApiUploadTest tests depends on it
we want that testLogin method to fail so we can skip the rest of the tests.

Test command:
  ./phpunit.php --filter ApiUpload --tap

BEFORE:
=======

TAP version 13
array(0) {
}
ok 1 - ApiUploadTest::testLogin
ok 2 - ApiUploadTest::testUploadRequiresToken
not ok 3 - Error: ApiUploadTest::testUploadMissingParams
not ok 4 - Error: ApiUploadTest::testUpload
^C

AFTER:
======

TAP version 13
not ok 1 - Failure: ApiUploadTest::testLogin
  ---
  message: 'API Login must return a session'
  severity: fail
  ...
ok 1 - # SKIP This test depends on "ApiUploadTest::testLogin" to pass.
ok 1 - # SKIP This test depends on "ApiUploadTest::testLogin" to pass.
^C ... more skips

12 years agoFollowup to r86053 - fix special page cases
Niklas Laxström [Thu, 27 Oct 2011 05:57:14 +0000 (05:57 +0000)]
Followup to r86053 - fix special page cases

[27-Oct-2011 05:51:24] PHP Notice:  Found alias defined for Listadmins when searching for special page aliases for ListAdmins. Case mismatch? [Called from SpecialPage::getLocalName in /www/sandwiki/includes/SpecialPage.php at line 464] in /www/sandwiki/includes/GlobalFunctions.php on line 3378
[27-Oct-2011 05:51:24] PHP Notice:  Found alias defined for Listadmins when searching for special page aliases for ListAdmins. Case mismatch? [Called from SpecialPage::getTitleFor in /www/sandwiki/includes/SpecialPage.php at line 261] in /www/sandwiki/includes/GlobalFunctions.php on line 3378
[27-Oct-2011 05:51:24] PHP Notice:  Found alias defined for Listusers when searching for special page aliases for ListUsers. Case mismatch? [Called from SpecialPage::getTitleFor in /www/sandwiki/includes/SpecialPage.php at line 261] in /www/sandwiki/includes/GlobalFunctions.php on line 3378

12 years agoQuick and ugly fix to stop installs with CACHE_DB from immediately failing with DB...
Aaron Schulz [Thu, 27 Oct 2011 01:44:58 +0000 (01:44 +0000)]
Quick and ugly fix to stop installs with CACHE_DB from immediately failing with DB errors. Something is wonked with the order of temp table creation.

12 years agoDisabled "bad image" tests which made totally broken assumptions about how/when the...
Aaron Schulz [Thu, 27 Oct 2011 01:36:57 +0000 (01:36 +0000)]
Disabled "bad image" tests which made totally broken assumptions about how/when the bad_image_list message is loaded. This caused failures with r100883. More direct tests were added in r100915.

12 years agoMinor code style cleanups
Aaron Schulz [Thu, 27 Oct 2011 01:35:04 +0000 (01:35 +0000)]
Minor code style cleanups

12 years agoFixed braceSubstitution() to only profile templates rather than all kinds of possibly...
Aaron Schulz [Thu, 27 Oct 2011 01:19:34 +0000 (01:19 +0000)]
Fixed braceSubstitution() to only profile templates rather than all kinds of possibly long strings of text to parse. It was dumping the whole text as the name of the profiling entry.

12 years agoFollowup r100905, cleanup per CR and fixes the overriding of the main RequestContext
John Du Hart [Thu, 27 Oct 2011 01:13:19 +0000 (01:13 +0000)]
Followup r100905, cleanup per CR and fixes the overriding of the main RequestContext

12 years agoFollowup r100905, fixed the ApiTests
John Du Hart [Thu, 27 Oct 2011 01:06:50 +0000 (01:06 +0000)]
Followup r100905, fixed the ApiTests

12 years agoDocumentation
Sam Reed [Thu, 27 Oct 2011 00:46:17 +0000 (00:46 +0000)]
Documentation

Deprecated code updates

12 years ago* Allow passing in a blacklist into wfIsBadImage()
Aaron Schulz [Thu, 27 Oct 2011 00:23:23 +0000 (00:23 +0000)]
* Allow passing in a blacklist into wfIsBadImage()
* Added wfIsBadImage() unit tests

12 years agoFollowup 100905, fixing usages of getContext()
John Du Hart [Wed, 26 Oct 2011 23:34:31 +0000 (23:34 +0000)]
Followup 100905, fixing usages of getContext()

12 years agoAdding context to the API
John Du Hart [Wed, 26 Oct 2011 23:27:01 +0000 (23:27 +0000)]
Adding context to the API

This will probably break something somewhere so when it does please yell at me on IRC and I'll fix it.

12 years agoFixed process cache for bad images when the list is empty
Aaron Schulz [Wed, 26 Oct 2011 21:48:04 +0000 (21:48 +0000)]
Fixed process cache for bad images when the list is empty

12 years agoMake indentation consistent in HTMLForm doc comment
Roan Kattouw [Wed, 26 Oct 2011 20:58:29 +0000 (20:58 +0000)]
Make indentation consistent in HTMLForm doc comment

12 years agoPatch from Erwin Dokter Bug #31547 — “Category links need less spacing and better...
Mark A. Hershberger [Wed, 26 Oct 2011 20:50:16 +0000 (20:50 +0000)]
Patch from Erwin Dokter Bug #31547 — “Category links need less spacing and better wrapping”

Applying since the this was already tried at enwiki. http://en.wikipedia.org/w/index.php?&diff=prev&oldid=454764019

12 years agoFollowup r100847, ApiMain now respects $wgShowHostnames
John Du Hart [Wed, 26 Oct 2011 19:39:56 +0000 (19:39 +0000)]
Followup r100847, ApiMain now respects $wgShowHostnames

12 years agoLocalisation updates for core and extension messages from translatewiki.net
Raimond Spekking [Wed, 26 Oct 2011 19:30:37 +0000 (19:30 +0000)]
Localisation updates for core and extension messages from translatewiki.net

12 years agoSmall todo note about ApiMain
John Du Hart [Wed, 26 Oct 2011 19:04:46 +0000 (19:04 +0000)]
Small todo note about ApiMain

12 years agoReleasenotes for wgQueryPageDefaultLimit - followup for r100761.
Sean Colombo [Wed, 26 Oct 2011 19:04:12 +0000 (19:04 +0000)]
Releasenotes for wgQueryPageDefaultLimit - followup for r100761.

12 years agoscript to parse wikitext from CLI
Antoine Musso [Wed, 26 Oct 2011 13:39:43 +0000 (13:39 +0000)]
script to parse wikitext from CLI

Wikitext can be given by stdin or using a file. The wikitext will be parsed
using 'CLIParser' as a title. This can be overriden with --title option.

Example1:

$ php parse.php --title foo
''[[foo]]''^D
<p><i><strong class="selflink">foo</strong></i>
</p>

Example2:

$ echo "'''bold'''" > /tmp/foo
$ php parse.php --file /tmp/foo
<p><b>bold</b>
</p>$

Example3:
$ cat /tmp/foo | php parse.php
<p><b>bold</b>
</p>$

12 years agoSplit out checkExecutePermissions() function from userCanExecute() in FormSpecialPage...
Aaron Schulz [Wed, 26 Oct 2011 06:22:25 +0000 (06:22 +0000)]
Split out checkExecutePermissions() function from userCanExecute() in FormSpecialPage. The former handles actual execute() calls and throws exceptions, the later inherits its purpose from SpecialPage. It just checks the page restriction to see if a user generally *could* execute. This avoids the breakage that came up in r100723 where Special:SpecialPages was throwing permission errors due to the getUsablePages() call.

12 years agoFixed 'Fatal error: Cannot access protected property Revision::$mDeleted in C:\wamp...
Aaron Schulz [Wed, 26 Oct 2011 05:12:07 +0000 (05:12 +0000)]
Fixed 'Fatal error: Cannot access protected property Revision::$mDeleted in C:\wamp\www\MW_trunk\includes\revisiondelete\RevisionDelete.php on line 146'

12 years agoMove DjVuImage to media/DjVuImage.php
Sam Reed [Wed, 26 Oct 2011 04:22:10 +0000 (04:22 +0000)]
Move DjVuImage to media/DjVuImage.php

12 years agoLeave a fixme comment on context stuff
Sam Reed [Wed, 26 Oct 2011 04:15:54 +0000 (04:15 +0000)]
Leave a fixme comment on context stuff

12 years agoMore documentation!
Sam Reed [Wed, 26 Oct 2011 04:15:09 +0000 (04:15 +0000)]
More documentation!

12 years agoFU r100535:
Aaron Schulz [Wed, 26 Oct 2011 04:13:05 +0000 (04:13 +0000)]
FU r100535:
* Added thumb-handler.php5 file
* Moved 404.php to thumb-handler.php as wfDisplay404Error()
* Removed excess short-circuiting error cases in thumb-handler.php
* Moved cURL extension check to the top of the file
* Improved sample $thgThumbHashFragment regex value
* Cleaned up wfStreamThumbViaCurl() error handling code a bit

12 years agoAdd, update, tweak documentation
Sam Reed [Wed, 26 Oct 2011 03:45:13 +0000 (03:45 +0000)]
Add, update, tweak documentation

Fix document comment blocks

Tweak some returns

12 years agoAdd, update, tweak documentation
Sam Reed [Wed, 26 Oct 2011 03:44:47 +0000 (03:44 +0000)]
Add, update, tweak documentation

Fix document comment blocks

Tweak some returns

12 years agosome eol w/s
Mark A. Hershberger [Wed, 26 Oct 2011 02:56:27 +0000 (02:56 +0000)]
some eol w/s

12 years agoBug 31948 - Special:Contributions doesn't remember tagfilter in
Mark A. Hershberger [Wed, 26 Oct 2011 02:56:04 +0000 (02:56 +0000)]
Bug 31948 - Special:Contributions doesn't remember tagfilter in
options form

Patch from MrBlueSky.

12 years agoFollowup to r97033 - removed wgWhatlinksherelimit and started the conversion to wgQue...
Sean Colombo [Tue, 25 Oct 2011 23:18:00 +0000 (23:18 +0000)]
Followup to r97033 - removed wgWhatlinksherelimit and started the conversion to wgQueryPageDefaultLimit, but didn't see too many places using a default of 50.

12 years agoIf the page contains __NOEDITSECTION__, it will never have edit sections, so don...
Platonides [Tue, 25 Oct 2011 22:18:33 +0000 (22:18 +0000)]
If the page contains __NOEDITSECTION__, it will never have edit sections, so don't create markers. Follow-up r99250.
Fix for bug 31647: Regression: __NOEDITSECTION__ is ignored when the page is read from the parser cache

12 years agoPort Special:Lockdb and Special:Unlockdb to HTMLForm using FormSpecialPage
Alexandre Emsenhuber [Tue, 25 Oct 2011 18:20:44 +0000 (18:20 +0000)]
Port Special:Lockdb and Special:Unlockdb to HTMLForm using FormSpecialPage

12 years ago* Removed $wgRCShowChangedSize check in sp:Contributions for size diffs since this...
Aaron Schulz [Tue, 25 Oct 2011 18:19:26 +0000 (18:19 +0000)]
* Removed $wgRCShowChangedSize check in sp:Contributions for size diffs since this isn't RC
* Replaced revision size information on history pages with size diff to be consistent with other places

12 years agoUnstub $wgLang if still stubbed before storing it; avoid storing a StubUserLang insta...
Alexandre Emsenhuber [Tue, 25 Oct 2011 18:14:30 +0000 (18:14 +0000)]
Unstub $wgLang if still stubbed before storing it; avoid storing a StubUserLang instance in ParserOptions and errors when getting the object (per report of Lockal on IRC)

12 years agoAdded temporary LocalFilePurgeThumbnails hook for bug 27641
Aaron Schulz [Tue, 25 Oct 2011 17:19:28 +0000 (17:19 +0000)]
Added temporary LocalFilePurgeThumbnails hook for bug 27641

12 years ago(bug 31514) Followup r99031: allow clicking of links in table headers in a different...
Roan Kattouw [Tue, 25 Oct 2011 14:41:58 +0000 (14:41 +0000)]
(bug 31514) Followup r99031: allow clicking of links in table headers in a different way that doesn't break expand/collapse links.

12 years agoMarked purgeThumbList() protected
Aaron Schulz [Tue, 25 Oct 2011 05:20:01 +0000 (05:20 +0000)]
Marked purgeThumbList() protected

12 years agoFollowup r100391: fix caret position test case on Opera, Firefox 3.5/3.6/4.0/5.0
Brion Vibber [Mon, 24 Oct 2011 22:28:09 +0000 (22:28 +0000)]
Followup r100391: fix caret position test case on Opera, Firefox 3.5/3.6/4.0/5.0

Opera (through 11.52 at least) & Firefox prior to 6.0 set the caret initially to the end of the textarea, which gave a mismatch. All we really need is to know we got a sane value, so checking for both (start == 0; end == text.length) gets the job done.
Under ideal circumstances, we'd check after a user clicks in the textarea on the first line, but no good way to trigger that. :)

12 years agoFU r100645: don't pass unused param
Aaron Schulz [Mon, 24 Oct 2011 22:19:02 +0000 (22:19 +0000)]
FU r100645: don't pass unused param

12 years ago* Remove $abort parameter from MediaWiki::checkMaxLag(); unused and it's a private...
Alexandre Emsenhuber [Mon, 24 Oct 2011 20:37:54 +0000 (20:37 +0000)]
* Remove $abort parameter from MediaWiki::checkMaxLag(); unused and it's a private function.
* Restore wfGetLB()->getMaxLag() call since we are no more in index.php

12 years agoLocalisation updates for core and extension messages from translatewiki.net
Raimond Spekking [Mon, 24 Oct 2011 20:02:53 +0000 (20:02 +0000)]
Localisation updates for core and extension messages from translatewiki.net

12 years agoAdd user_former_groups table to PG updater
OverlordQ [Mon, 24 Oct 2011 19:55:01 +0000 (19:55 +0000)]
Add user_former_groups table to PG updater

12 years agoUpdate Postgres with missing uploadstash tables
OverlordQ [Mon, 24 Oct 2011 19:43:16 +0000 (19:43 +0000)]
Update Postgres with missing uploadstash tables

12 years agoBasic support for Postgres phpunit testing, currently throws 5 errors, 1 inc, 5 skipped
OverlordQ [Mon, 24 Oct 2011 19:28:31 +0000 (19:28 +0000)]
Basic support for Postgres phpunit testing, currently throws 5 errors, 1 inc, 5 skipped

12 years agoTests for r96188 features
Antoine Musso [Mon, 24 Oct 2011 17:45:45 +0000 (17:45 +0000)]
Tests for r96188 features

That revision let us pass an array of values to 'class', 'rel'
and 'accesskey'. The revision requested some tests :)

12 years agoAdded OutputPage::setPageTitleMsg() and OutputPage::setHTMLTitleMsg() as modified...
Alexandre Emsenhuber [Mon, 24 Oct 2011 17:24:38 +0000 (17:24 +0000)]
Added OutputPage::setPageTitleMsg() and OutputPage::setHTMLTitleMsg() as modified versions of OutputPage::setPageTitle() and OutputPage::setHTMLTitle() that take an message name and its parameters; updated all calls in core that can use the two new functions

12 years agoRemoved unused and deprecated global declaration of $wgDeferredUpdateList
Alexandre Emsenhuber [Mon, 24 Oct 2011 16:17:46 +0000 (16:17 +0000)]
Removed unused and deprecated global declaration of $wgDeferredUpdateList

12 years ago* (bug 31921) Fix for r78201: magic words REVISIONDAY, REVISIONMONTH and REVISIONYEAR...
Alexandre Emsenhuber [Mon, 24 Oct 2011 16:14:49 +0000 (16:14 +0000)]
* (bug 31921) Fix for r78201: magic words REVISIONDAY, REVISIONMONTH and REVISIONYEAR now give current values on preview

12 years agoUpdate formatting. Update "<space><tab>" and "<tab><space>" where needed.
Siebrand Mazeland [Mon, 24 Oct 2011 16:10:04 +0000 (16:10 +0000)]
Update formatting. Update "<space><tab>" and "<tab><space>" where needed.

12 years agomakes HTML5 five only attributes a global property
Antoine Musso [Mon, 24 Oct 2011 13:58:03 +0000 (13:58 +0000)]
makes HTML5 five only attributes a global property

This patch move an array hidden in Html::expandAttributes() to the top of
the class definition as self::$HTMLFiveOnlyAttribs.
That also make the Html::expandAttributes() method a bit more concise.

12 years agotest that preloaded text is unstripped
Antoine Musso [Mon, 24 Oct 2011 10:51:46 +0000 (10:51 +0000)]
test that preloaded text is unstripped

bug 27467 reported our preloaded system did not unstrip <nowiki>
or <pre> enclosed text. The fix was applied by r82473.

12 years agotest {{SERVERNAME}} with relative URLS
Antoine Musso [Mon, 24 Oct 2011 09:32:33 +0000 (09:32 +0000)]
test {{SERVERNAME}} with relative URLS

bug 31176 mentionned an issue with {{SERVERNAME}} returning the full
URL instead of servername when using relative URLs (//localhost).
The fix was made by r98193.

This patch test three different URL protocols (http, https & relative)
and check we return the expected 'localhost'.

12 years agousing real identity for hashar
Antoine Musso [Mon, 24 Oct 2011 09:08:13 +0000 (09:08 +0000)]
using real identity for hashar

Converting my pseudonym to use my real identity instead:
Ashar Voultoiz -> Antoine Musso

12 years agoTest handling of escaped CSS comments
Antoine Musso [Mon, 24 Oct 2011 08:39:58 +0000 (08:39 +0000)]
Test handling of escaped CSS comments

r85856 fixed a CSS injection issue but lacked testing. This
test verify we properly strip out CSS comments even when the
token delimiter '/*' is backslash-escaped : \2f\2a

12 years agoUpdated documentation of $wgMaxImageArea for r99911 etc.
Tim Starling [Mon, 24 Oct 2011 04:45:26 +0000 (04:45 +0000)]
Updated documentation of $wgMaxImageArea for r99911 etc.

12 years agoFU r100535:
Aaron Schulz [Mon, 24 Oct 2011 03:08:45 +0000 (03:08 +0000)]
FU r100535:
* Changed custom functions to work via a $thgThumbCallbacks variable
* Added 'checkCache' and 'fillCache' hooks to $thgThumbCallbacks
* Minor regex cleanup to wfExtractThumbParams()
* Re-organized a bit of the wfStreamThumbViaCurl() code

12 years ago(follow-up r100575 / r99477) unit-tests for jpegMetadataExtractor dealing with paddin...
Brian Wolff [Mon, 24 Oct 2011 02:47:22 +0000 (02:47 +0000)]
(follow-up r100575 / r99477) unit-tests for jpegMetadataExtractor dealing with padding bytes.

12 years ago(follow up r99477) not sure what I was doing on r99477, but its not right (doesn...
Brian Wolff [Mon, 24 Oct 2011 02:41:34 +0000 (02:41 +0000)]
(follow up r99477) not sure what I was doing on r99477, but its not right (doesn't work for odd number padding bytes)

Will commit unittests in follow up.

12 years ago(bug 31740) JpegMetadataExtractor and friends weren't checking for unexpected end...
Brian Wolff [Mon, 24 Oct 2011 02:19:11 +0000 (02:19 +0000)]
(bug 31740) JpegMetadataExtractor and friends weren't checking for unexpected end of input properly

I created a new wrapper around unpack - wfUnpack which throws an exception if it runs out of input
(but i didn't use that on GIFMetadataExtractor/PNGMetadataExtractor because those files have a header saying that they weren't external dependencies minimized for potential re-users. I don't think anyone actually re-uses those files, but I didn't want to add a dependency on wfUnpack just in case).

I also changed fopen( blah, "r" ) -> fopen( blah, "rb" ) since these are binary formats, so we don't want newlines converted on windows.

12 years agoUpdate green buttons to a color that doesn't clash with Vector.
Brandon Harris [Sun, 23 Oct 2011 22:49:03 +0000 (22:49 +0000)]
Update green buttons to a color that doesn't clash with Vector.

12 years agoLocalisation updates for core and extension messages from translatewiki.net
Raimond Spekking [Sun, 23 Oct 2011 19:48:36 +0000 (19:48 +0000)]
Localisation updates for core and extension messages from translatewiki.net

12 years agoAdding functions to HTMLForm for explicitly setting the content of the header and...
John Du Hart [Sun, 23 Oct 2011 18:38:22 +0000 (18:38 +0000)]
Adding functions to HTMLForm for explicitly setting the content of the header and footer.
Also adds a function for setting the intro, as a counterpart to addPreText

12 years agoHTMLForm is now a context source.
John Du Hart [Sun, 23 Oct 2011 18:09:44 +0000 (18:09 +0000)]
HTMLForm is now a context source.
Replace wfMessage() calls with $this->msg()

12 years agoAdding flatlists to HTMLRadioField, sort of like HTMLMultiSelect
John Du Hart [Sun, 23 Oct 2011 16:57:53 +0000 (16:57 +0000)]
Adding flatlists to HTMLRadioField, sort of like HTMLMultiSelect

12 years agoAdd check to see if the user has permission to view the log. Right now the page title...
John Du Hart [Sun, 23 Oct 2011 16:45:08 +0000 (16:45 +0000)]
Add check to see if the user has permission to view the log. Right now the page title and description are still set.

12 years agoRemoved wrong comment in doBatchLookups()
Aaron Schulz [Sun, 23 Oct 2011 10:15:51 +0000 (10:15 +0000)]
Removed wrong comment in doBatchLookups()

12 years agoReverted r99195 quick-fix per r99897
Aaron Schulz [Sun, 23 Oct 2011 09:51:13 +0000 (09:51 +0000)]
Reverted r99195 quick-fix per r99897

12 years agoUse getId() accessors for Revision object (fixes fatal)
Aaron Schulz [Sun, 23 Oct 2011 09:38:52 +0000 (09:38 +0000)]
Use getId() accessors for Revision object (fixes fatal)

12 years agoAdded a basic thumb-handler.php file, configured via thumb.config.php. The code is...
Aaron Schulz [Sun, 23 Oct 2011 09:36:35 +0000 (09:36 +0000)]
Added a basic thumb-handler.php file, configured via thumb.config.php. The code is based on the wmf thumb handler, but simplified. It is disabled by default.
* The thumb.php parameter extraction can also be overridden by the config to handle more complex setups and things like OggHandler and PagedTiffHandler.
* A simple 404 error page is also included. It can be overridden by the config.
* Additional HTTP headers can be passed through cURL via the config.

12 years ago* Changed action=history to use an Action subclass
Alexandre Emsenhuber [Sun, 23 Oct 2011 09:21:02 +0000 (09:21 +0000)]
* Changed action=history to use an Action subclass
* Use local context instead of global variables
* Removed obsolete aliases PageHistory and PageHistoryPager; no longer used
* Made Action::getContext() and related methods public for the call in HistoryPager's constructor and also for consistency with other classes

12 years agoGroup shell-related functions
Alexandre Emsenhuber [Sun, 23 Oct 2011 08:54:48 +0000 (08:54 +0000)]
Group shell-related functions

12 years agoUse attr() instead of this.href, to make sure that we don't absolutify the URI.
Derk-Jan Hartman [Sun, 23 Oct 2011 08:17:19 +0000 (08:17 +0000)]
Use attr() instead of this.href, to make sure that we don't absolutify the URI.

Fixes bug 31899

12 years ago* Use local context to get messages
Alexandre Emsenhuber [Sun, 23 Oct 2011 08:13:52 +0000 (08:13 +0000)]
* Use local context to get messages
* Simply use getLang() instead of getContext()->getLang() now that this method exists
* Also changed addWikiMsgArray() to use a Message object with addWikiText() for the parse operation; removed its $options parameter, no caller was using it

12 years agoCheck first that $wgDisableLangConversion is false and we are not in a special page...
Alexandre Emsenhuber [Sun, 23 Oct 2011 07:55:45 +0000 (07:55 +0000)]
Check first that $wgDisableLangConversion is false and we are not in a special page before doing the language variant check