Commit graph

37662 commits

Author SHA1 Message Date
Raimond Spekking
d88f2a0443 Localisation updates for core and extension messages from translatewiki.net 2011-08-20 20:54:50 +00:00
Alexandre Emsenhuber
87f9a5b82e Use local context instead of global variables 2011-08-20 20:12:46 +00:00
Raimond Spekking
d3857667d5 Self revert r95041 per CR. I will commit a cleaner patch. 2011-08-20 18:07:48 +00:00
Roan Kattouw
80633b7759 Fix typo 2011-08-20 12:47:17 +00:00
Roan Kattouw
2aa5f42df7 Followup r95072: add tests for wfMatchesDomainList 2011-08-20 10:41:44 +00:00
Roan Kattouw
e2e14cd74b Fix serious bug in r90849 that didn't show up in the tests until I restructured the code a bit and the tests started to actually hit it: $url is undefined, use $href 2011-08-20 10:25:38 +00:00
Roan Kattouw
b4ae56dea1 Per r90849, factor out most of the code that's duplicated between Parser::getExternalLinkAttribs() and Skin::addToSidebarPlain() into wfMatchesDomainList(). Change a loose comparison to a strict one, and add a FIXME comment about how whitelisting nl.wikipedia.org also whitelists nds-nl.wikipedia.org due to the function's simplistic substring approach. 2011-08-20 10:18:09 +00:00
Roan Kattouw
6a8cb49f82 Per CR on r90915, fix the description of one of the assertions 2011-08-20 09:59:00 +00:00
Roan Kattouw
f809f1ed7c Revert r95058 (make letype multivalue): has been applied before in r88722 and reverted in r89348. 2011-08-20 07:19:10 +00:00
Sam Reed
ead951a4ad Couple more pieces of wikia upstreaming 2011-08-19 23:30:12 +00:00
Sam Reed
b1968df5f9 Upstream wikia change
Make type multi
2011-08-19 23:21:34 +00:00
Sam Reed
5a2afad3b0 Upstream wikia changes 2011-08-19 23:19:26 +00:00
Sam Reed
3a9e3012e7 Swap from NS_MAIN to use MWNamespace::getContentNamespaces() 2011-08-19 23:12:46 +00:00
Sam Reed
a3dd8faa28 Use MWNamespace::getContentNamespaces() (instead of $wgContentNamespaces) like the rest of the Special pages seem to 2011-08-19 23:11:12 +00:00
Sam Reed
aee2f8f3ba Incorporate Wikia diff, don't duplicate debugging though, add the info to the debug call that already exists 2011-08-19 23:06:54 +00:00
Raimond Spekking
83a0837904 Fix a typo 2011-08-19 20:58:32 +00:00
Raimond Spekking
cda98b8976 New hook point to change $wgAccountCreationThrottle
Needed for a new extension to make (mass) account creation easier for schools/colleges etc
2011-08-19 20:57:41 +00:00
Raimond Spekking
9e726ccf47 Localisation updates for core and extension messages from translatewiki.net 2011-08-19 20:01:08 +00:00
Max Semenik
beb802a8cf Don't check for each database's availability twice. This halves the number of ugly message boxes seen during CLI installation on Windows if Oracle is not installed, but its bindings for PHP are. 2011-08-19 18:27:35 +00:00
Sam Reed
a17f96e85d Remove duplicate patch contributors section from CREDITS added in r92528 2011-08-19 17:54:42 +00:00
Roan Kattouw
24f6e5f721 Use canonical URLs in sitemaps, diff stuff and external edit stuff 2011-08-19 17:33:41 +00:00
Roan Kattouw
75681bc57a Expand some more URLs: for feeds, referers and the proxy script 2011-08-19 17:31:40 +00:00
Roan Kattouw
39e2d66b62 Use getInternalUrl() instead of getFullUrl() in purgeList.php . This was potentially a serious bug if $wgServer differed from $wgInternalServer in command-line mode (this is not the case on WMF, but might be the case on 3rd-party installs) 2011-08-19 17:20:35 +00:00
Roan Kattouw
92ff782a99 Use wfParseUrl() instead of parse_url() in interwiki search code: the latter can throw PHP warnings and is totally broken for protocol-relative URLs. Also remove the last usage in core of key_exists(), a deprecated alias for array_key_exists() 2011-08-19 15:56:59 +00:00
Roan Kattouw
d8a2733757 Make the PROTO_ parameter to wfExpandUrl() explicit in all calls. There are now no calls to wfExpandUrl() in core that rely on PROTO_CURRENT being the default. Also switch to using getCanonicalUrl() for.... rel="canonical" :D (I picked the right name, I KNEW IT) 2011-08-19 15:46:08 +00:00
Roan Kattouw
16e540e5c3 * Introduce File::getCanonicalUrl()
* Make File::getFullUrl() use PROTO_RELATIVE for consistency with other methods named getFullUrl() and to prevent cache pollution
* Use canonical URLs in Export.php
2011-08-19 15:27:49 +00:00
Roan Kattouw
39f8bf86cd Add a PROTO_CANONICAL mode to wfExpandUrl(), which uses $wgCanonicalServer 2011-08-19 15:25:50 +00:00
Roan Kattouw
8fc36a535a Use canonical URLs (introduced in r94995) for all URLs in e-mails 2011-08-19 14:46:03 +00:00
Roan Kattouw
b154959876 Make $wgVaryOnXFPForAPI apply to RSS/Atom feeds too, because they too use PROT_CURRENT. Make PROT_CURRENT usage explicit there too 2011-08-19 14:41:35 +00:00
Roan Kattouw
1c92b1463e Use canonical URLs (introduced in r94995) in the OpenSearch discovery thingy 2011-08-19 14:39:37 +00:00
Roan Kattouw
04e002d582 Followup r94995: add hooks.txt entries for the new hooks 2011-08-19 14:05:00 +00:00
Roan Kattouw
f174bb0ad0 Reverse a bad decision in r93820, which added a comment to WebRequest::getFullRequestURL() saying it would return protocol-relative URLs if $wgServer is protocol-relative. This behavior makes no sense, though, and most callers expect fully qualified URLs. So make it return a fully qualified URL and update the one caller that expected the return value would be compatible with getFullURL() 2011-08-19 13:25:43 +00:00
Roan Kattouw
fbc65f8972 Per CR on r44412 and my promise in the commit summary of r94990, stop abusing $wgInternalServer (intended for Squid URLs) for IRC/e-mail URLs and introduce $wgCanonicalServer for these purposes instead. This revision introduces two new hooks for WMF hacks, in exchange for making the core code saner.
* Introduce $wgCanonicalServer, which should typically be a fully qualified version of $wgServer but in practice can be anything that you'd like to be used in IRC/e-mail notifs
** Default value is $wgServer, expanded to http:// if protocol-relative
** This means you can easily set HTTPS as the 'default' protocol to use in IRC and e-mail notifs by setting $wgCanonicalServer to https://example.com
* Introduce Title::getCanonicalURL(). Similar to getInternalURL(), including a hook for WMF usage (which will be needed as long as secure.wikimedia.org is used)
** Also add escapeCanonicalURL(). Due to some ridiculous accident of history, the other escapeFooURL() functions don't have a $variant parameter; I decided not to follow that bad example
* Reinstate the spirit of r44406 and r44412: instead of calling getInternalURL() (or getCanonicalURL()) and regexing the title parameter out, obtain the path to index.php using $wgCanonicalServer . $wgScript and append params to that. Sadly, we need to add a hook here to support the secure server hack for WMF, but that's the price of saner code in this case
* Introduce the {{canonicalurl:}} and {{canonicalurle:}} parser functions, which work just like {{fullurl:}} and {{fullurle:}} except that they use getCanonicalURL() instead of getFullURL()
* Use {{canonicalurl:}} in the enotif_body message, fixing bug 29993 (protocol-relative URLs appear in e-mail notifications)
2011-08-19 11:23:17 +00:00
Niklas Laxström
cd47443fcf Fu r94907 - also update localisation cache, which accesses the fallback variable directly
Fixes bug 30456
2011-08-19 09:02:35 +00:00
Roan Kattouw
3b35a3d2ec Followup r94754: move protocol expansion from getIRCLine() to inside getInternalUrl(); these internal URLs should always be fully qualified. Effectively this means that if $wgServer is protocol-relative and $wgInternalServer either isn't set or is also protocol relative (but it really shouldn't be the latter!), we'll add http:// to URLs used for Squid purging and in IRC lines. If people want those to be https:// instead, they can set $wgInternalServer accordingly.
We should really, really break the connection between internal URLs used for Squid purges and URLs used for IRC, and use the latter in e-mails as well. This was briefly discussed in the CR comments on r44412 and I'll be working on that today.
2011-08-19 08:56:39 +00:00
Sam Reed
afa82f68b2 * (bug 30450) Clear page_props table on page deletion
Also clear them on a move over redirect

Modified delete() calls in doDeleteArticle to pass __METHOD__ for the function name
2011-08-18 23:37:04 +00:00
Ian Baker
000080990d Two bugs:
1. When the user isn't passed to UploadFromStash::__construct(), it would break when it shouldn't.
2. When stashing files, sometimes an instance of UnregisteredLocalFile would be returned instead of UploadStashFile
2011-08-18 23:36:24 +00:00
Sam Reed
00d361886a * (bug 30451) Add page_props to RefreshLinks::deleteLinksFromNonexistent 2011-08-18 23:16:11 +00:00
Alexandre Emsenhuber
4ae4dea93e Removed mention of AOL, no longer true since r39892 2011-08-18 21:04:29 +00:00
Sam Reed
2b42e98dc8 Fix getRequet to getRequest 2011-08-18 20:56:57 +00:00
Raimond Spekking
80d5084db8 Localisation updates for core and extension messages from translatewiki.net 2011-08-18 20:35:31 +00:00
Alexandre Emsenhuber
327b04c44d Removed debugging code from r94932 2011-08-18 20:05:09 +00:00
Alexandre Emsenhuber
77a3987052 Moved wfGetIP() to WebRequest::getIP():
* Changed all calls in core to the latter
* Also marked wfGetForwardedFor() as deprecated
* Moved wfGetIP() tests to WebRequestTest
2011-08-18 20:03:30 +00:00
Niklas Laxström
0cd40f71fa * (bug 30217) Make pt-br a fallback of pt
Depends on r94907.
2011-08-18 16:43:24 +00:00
Niklas Laxström
b56b84c5b8 Attempt to fix Bug 30216 - Improve language fallback loop detection.
Made fallbacks a list per language, instead of scanning them recursively through the languages.
2011-08-18 16:41:07 +00:00
Marooned
0102df8489 Relative values of the "Location" header are incorrect as stated in RFC, however they do happen and modern browsers support them.
This function loops backwards through all locations in order to build the proper absolute URI - Marooned at wikia-inc.com
2011-08-18 10:33:39 +00:00
Raimond Spekking
4b67a02c09 fu r94541: Delete empty files 2011-08-18 07:49:10 +00:00
Brian Wolff
697487da5e Make testBug26425BlockTimestampDefaultsToTime be tolerrant of up to 2 seconds
difference.

Otherwise if the test happens to be run on a second barrier, it could
falsely fail (like it did just now when codur said some hurtful things
about my code failing unit-tests where it really didn't ;)

Some of the other block tests seem to itermitantly fail for no appearent
reason (null comes back instead of the block)... I don't know why.
2011-08-18 06:23:44 +00:00
Brian Wolff
c0e419ce5e follow-up r86169: unit tests for extraction of JPEG comment (COM) segments. 2011-08-18 05:45:04 +00:00
Brian Wolff
23b034e265 follow-up r91885 rename testTiffFile since its not about tiff files
This is probably what was referred to in CR, not what I changed in r94825
2011-08-18 03:53:53 +00:00