Commit graph

960 commits

Author SHA1 Message Date
Santhosh Thottingal
c56cca551e (bug 32748) unicode URL for articles print version
Printer friendly version of article must encode URL in unicode.

- Patch originally written by Brion Vibber
  https://bugzilla.wikimedia.org/attachment.cgi?id=9593
- introduces wfExpandIRI() global function, uses wfExpandIRI_callback.
- phpunit test.

Change-Id: I348b9f1d2ce65cb14f20d4a5751ac9359c8b8316
2012-04-02 18:14:41 +02:00
Sam Reed
2d25a902e3 More of r113580 2012-03-11 22:05:54 +00:00
Alexandre Emsenhuber
f1bee1219c * (bug 34528) Don't parse section name in edit section tooltips 2012-02-25 15:23:45 +00:00
Daniel Friesen
522d92761a Add &useskin=default handling to always display the wiki's default skin. 2012-02-15 19:44:54 +00:00
Sam Reed
09a78c1368 More return documentation 2012-02-09 21:36:14 +00:00
Sam Reed
0a626db6e1 Fixing some of the "@return true" or "@return false", need to be "@return bool" and then the metadata can say true if foo, false if bar
Other documentation improvements
2012-02-09 19:29:36 +00:00
Sam Reed
85bbb0b080 Fixing some of the "@return true" or "@return false", need to be "@return bool" and then the metadata can say true if foo, false if bar
Other documentation improvements
2012-02-09 18:01:10 +00:00
Sam Reed
fa3ccef8b2 Merge r97508 changes to MessageCache.php and Skin.php into trunk 2012-02-07 16:49:34 +00:00
Brian Wolff
ed394c764b (follow-up r108145) Mark test as needing a database, and fix bug number in comment. 2012-01-07 15:43:21 +00:00
Brian Wolff
3cc7feefd1 (bug 33321. Sort of) Adding a line to MediaWiki:Sidebar that contains a pipe, but doesn't
have any pipes after being transformed by MessageCache, causes exception on
all pages.

This can happen with lines like:
**{{#if:yes|Something}}

Thank you to liangent for figuring out how to escape a | without {{!}} existing and | not working.
2012-01-05 15:34:26 +00:00
Antoine Musso
c447423593 merge JSTesting branch into trunk
Changed written by Timo and reviewed by Hashar. This should be harmless.

To enable the feature:
  $wgEnableJavaScriptTest = true;

Then head to:
  [[Special:JavaScriptTest/qunit]]
2012-01-03 18:33:26 +00:00
Alexandre Emsenhuber
b89bffd783 * (bug 32702) Fix for r82273: readded Skin::makeGlobalVariablesScript() for backward compatibility and marked it as deprecated 2011-12-29 20:39:29 +00:00
John Du Hart
f12c373d1e Followup r105122 & r105123, fixes and improvements per CR
Using Language::getSize per Nikerabbit
Cleanup HTML generation per brion (yay)
2011-12-15 02:26:14 +00:00
Jeroen De Dauw
fd5d82f845 fix deprecated method usage 2011-12-13 04:04:52 +00:00
Daniel Friesen
c5337f8522 Introduce a Language::getHtmlLang method which returns the Bcp47 formatted language code and update code around core to output lang tags using this method instead of getCode so that we properly output things like lang="en-CA" instead of lang="en-ca" 2011-12-11 18:46:18 +00:00
Alexandre Emsenhuber
2629c3649f * Added revision's timestamp to OutputPage along with revision ID; avoid a DB hit in Skin::lastModified() when showing parser cache's content. This changed with the removal of $wgArticle in Skin since now it's a different WikiPage object and thus WikiPage::setTimetstamp() call is useless (but still kept).
* Added ParserOutput::(get|set)Timestamp() and the $mTimestamp member; avoid messing with isset()
2011-12-10 16:30:40 +00:00
Sam Reed
5bfce03820 More documentation of parameters following up r104591 2011-12-05 16:50:58 +00:00
John Du Hart
0de3082ca4 Adding new debugging toolbar
Needs a UI cleanup still, but for the most part is working.
2011-12-04 18:29:57 +00:00
Sam Reed
39356de1a4 Moar documentations 2011-11-29 21:04:20 +00:00
Alexandre Emsenhuber
c0a70e15ba Make Skin::formatDebugHTML()'s formatting work when memory usage is greather that 10M 2011-11-27 16:20:13 +00:00
Alexandre Emsenhuber
d1d31c75fb * Use WikiPage instead of Article in Skin and SkinTemplate
* Added $context parameter to Action::factory() to allow callers passing a WikiPage object in addition to Article (otherwise this would throw a fatal error in getContext() since WikiPage::getContext() does not exist)
2011-11-27 09:39:24 +00:00
John Du Hart
216d661d3b Bug 29524 - Rename RequestContext::getLang to getLanguage
I'll be amazed if this doens't break any tests.
2011-11-21 16:13:21 +00:00
Roan Kattouw
792c38f424 (bug 26854) Invalid user names go unchecked. Applied most of the patch submitted by Søren Løvborg, checking for null return values from User::newFromName() 2011-11-20 10:55:58 +00:00
Roan Kattouw
6ff2162ffe (bug 32380) Make get powered by link target protocol-relative 2011-11-14 08:06:41 +00:00
Aaron Schulz
6c4360c951 Make use of Title::isSpecialPage() in various places 2011-11-02 20:55:08 +00:00
Alexandre Emsenhuber
347636fa0a * Create all items in $nav_urls at the beginning so that we don't need to bother if they are set or not after that
* Don't show 'whatlinkshere', 'recentchangeslinked' and 'trackbacklink' items if OutputPage::isArticleRelated() is false
* Simplify the code to check if we show show user related items since the actual code is just to check if we have an User object
* Moved the showEmailUser() check to the same location as other related user checks
* Made Skin::showEmailUser() accept an User object instead of doing object -> int -> object conversion
* Check if the items are present in BaseTemplate::getToolbox() instead of 'notspecialpage' and removed some empty() or isset() checks since all of these items are now set
2011-11-01 16:09:27 +00:00
Alexandre Emsenhuber
3bea2c77fa Use local context to get messages 2011-10-21 20:09:27 +00:00
Alexandre Emsenhuber
e1280017e0 * Changed action=raw to use an Action subclass
* Left RawPage with back compat code for extensions that use it
* Removed calls to Skin for gen=(css|js). Calling action=raw&gen=(css|js) will now unconditionally return empty content
* Removed Skin::generateUserJs() and Skin::generateUserStylesheet() since they were only used in RawPage
2011-10-20 08:10:25 +00:00
Krinkle
db8f977526 CSS clean up
* Apply code conventions (mostly whitespace and missing semi-colons)
* Minor other nitpicks
-- '! important' -> '!important'
-- Ucfirst -> lc; for color names and keywords
-- Remove uses of system color keywords (they are deprecated) [1] Most had fixed fallbacks already. Using those now.
-- Remove version query string (foo.png?2), last modified in r66151. Now obsolete with ResourceLoader
-- 0px to 0 where possible
-- Remove commented out css rules and declarations without any comment (debug stuff like /*div{ border:1px solid Red !important;}*/)
-- Remove empty blocks ( .foo { } )

[1] https://developer.mozilla.org/en/CSS/color_value#System_Colors
2011-10-15 23:33:47 +00:00
Alexandre Emsenhuber
486e48a201 Make Skin::formatDebugHTML() work again since there is now usage memory 2011-10-11 15:50:01 +00:00
Max Semenik
95ec650786 Revert r93246: besides the problems pointed out at CR, it also causes bug 31403, wreaking havoc on large wikis 2011-10-07 13:58:16 +00:00
Sam Reed
eacecf4ed2 Merge r97670, r98206 2011-10-03 13:41:50 +00:00
Alexandre Emsenhuber
52dc9c56d3 Wrap the copyright when its language is not the user's language; avoids problem when direction of the two languages is different 2011-09-21 09:03:53 +00:00
Sam Reed
a3d2755660 Revert r91561 2011-09-16 16:55:39 +00:00
Daniel Friesen
39ed02fc9e Add a class to the normal and hidden categories blocks. If non-positioning styles are going to be applied then they should be applied on classes, not ids. It's bad enough that we include a catlinks id in catlinks and make the process to attempt to have two catlinks blocks rediculous. 2011-09-09 15:37:20 +00:00
Raimond Spekking
92f3126cad Fix r95655 per Formfix's CR:
* use getCanonicalURL() - this part should be deployed to 1.17wmf1
* Do not show &oldid= in case of nonexisting pages, incl. file description pages from InstantCommons files
2011-09-07 12:56:06 +00:00
Daniel Friesen
d755aab302 Pass the key for the skin being created to the constructor of a skin. This is just something that's been bothering me for awhile, without this it's hard to create extensions that dynamically load skins and implement the skin conversion functionality in a central class. 2011-09-05 15:30:01 +00:00
Chad Horohoe
06a61eea97 A d d s p a c e s 2011-09-01 14:33:57 +00:00
Daniel Friesen
200560eff3 Followup r95957, add =null to Skin::outputPage too 2011-09-01 10:35:12 +00:00
Raimond Spekking
a40a3c65b1 * (bug 16428) Include permalink in printable version 2011-08-29 10:47:44 +00:00
Daniel Friesen
251bef7543 Use getLinkURL instead of getLocalURL for titles from MediaWiki:Sidebar so that #Fragments are not discarded when the user uses them. 2011-08-25 07:03:25 +00:00
Daniel Friesen
7e448d8261 Remove the * {{msg}} syntax introduced to MediaWiki:Sidebar in r66974. This syntax is in the way of projects attempting to use a more flexible sidebar-like message parser, or fixing the dependence on MediaWiki:Sidebar for sidebar config. Eliminating it before people end up using it in production (from my tests it never actually worked in 1.17). 2011-08-21 18:23:59 +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
Aaron Schulz
67609c85ce Reverted r91871 per CR: http://www.mediawiki.org/wiki/Special:Code/MediaWiki/91871#c19474
Also, the related getAction() changes were already reverted.
2011-08-09 18:36:20 +00:00
Max Semenik
437c059be4 Fixed sidebar tests on Windows. Can't use PHP_EOL here because \r\n is used only in SVN checkouts and not in tarballs 2011-08-07 08:08:36 +00:00
Alexandre Emsenhuber
be4e2e8260 Removed useless $out variable from Skin::getCopyright() 2011-07-28 20:42:56 +00:00
Alexandre Emsenhuber
ba84011526 * Changed OutputPage::$mIsArticle flag to be false by default. A lot of actions don't change that flag when they should, since about only action=view should have it to true.
* Put OutputPage::$mIsArticleRelated declaration just below $mIsArticle's one since they are related
* Made DifferenceEngine consistent with action=view, i.e. setting that flag to true when displaying any version of the page, current or not
* Made Skin::getCopyright() always use history_copyright when displaying an old version, regardless to the diff parameter
* Changed some checks from namespace != NS_SPECIAL && action=view to isArticle() so that they don't get executed when e.g. throwing an Exception (or similar things)
2011-07-27 13:14:28 +00:00
Happy-melon
c3e096c6e5 (bug 15641) prevent blocked administrators from accessing deleted revisions. 2011-07-26 20:54:41 +00:00
Alexandre Emsenhuber
43c707f15f Fix for r92984: correct method name, thanks Jack Phoenix (oops!) 2011-07-24 17:37:00 +00:00