Commit graph

47 commits

Author SHA1 Message Date
Alexandre Emsenhuber
0ad00b7dd7 Convert width HTML attribute in tables into inline CSS
Change-Id: If992be00e55fdbdc9521f773a5db4eef97e7f3ed
2012-09-21 22:38:58 +02:00
Alex Monk
48fac18524 (bug 40213) border=0 is pointless, 0 is the default.
Change-Id: I6212915d098466e1317b0c21e7be12d40d467a7d
2012-09-13 23:01:37 +01:00
Alex Monk
65150ca53e (bug 39680) Convert valign to CSS vertical-align
Also convert align to CSS text-align/float

Change-Id: Ia7da2b51b7fdeee443def8cb06c63a422d89f6f1
2012-08-27 21:36:01 +01:00
Siebrand Mazeland
e4321e3e66 Replace deprecated wfMsg* calls with Message class calls.
Doing this in steps of roughly 100 changes per commit, so that it remains
reviewable.

Change-Id: Ie349afa5c809c887c787c7c04c49c9dd3478ccac
2012-08-22 21:04:12 +02:00
Alexandre Emsenhuber
66b10010e2 Update SkinLegacy to use newer methods to create the file link.
Linker::getInternalLinkAttributes() is an horrible old thing that I
would like to deprecate, and that's the last usage of it I could find.

Change-Id: Icbda801bf8240cf2e4e23d6b99406e3a909e9d0b
2012-07-24 14:41:09 +02:00
Antoine Musso
aab43dd495 escape tags and entity in doxygen comments
When inserting XML elements inline <such as this one>, doxygen chokes
about it not being known. Simply enclosing the tag in double quotes
prevents doxygen from emitting a warning.

Also enclosed a few invalid functions calls such as \. and double quoted
the HTML entities such as &foobar;

Change-Id: I4019637145e683c2bec3d17b2fd98b0c50a932f1
2012-07-10 17:08:32 +02:00
Alexandre Emsenhuber
58852d8827 Deprecated Title::userIsWatching(); use User::isWatched() instead.
* The problem is that Title::userIsWatching() relies on $wgUser,
  which is not suitable on every case. Instead User::isWatched()
  requires both an User and a Title object.
* Replaced all core calls from the former to the latter
* Added a cache in User for the WatchedItem instances so we do not
  need to do a database request every time something want to know
  whether a page is watched or not, which can happen several times
  per request.

Change-Id: Ifa9c55b7ffb487ce6893c74df233eedc7654dc5e
2012-06-29 23:22:35 +02:00
Alexandre Emsenhuber
aad9d5fd6b Removed checks for the "MEDIAWIKI" constant on files that only define classes.
This checks are not needed in that case.

Change-Id: Ia83447427de8b7ea32aced8ff43c7a252b8d504c
2012-05-23 21:20:42 +02:00
Alexandre Emsenhuber
d1f8640a3b Added missing GPLv2 headers in some places.
Also made file/class documentation more consistent.

Change-Id: Ia45d0756cd84138da267bf1cbd1a58be7f28c6d1
2012-05-11 10:34:29 +02:00
Sam Reed
2d25a902e3 More of r113580 2012-03-11 22:05:54 +00:00
Robin Pepermans
9184dc83d6 Update core usage of getLanguageName[s]. 2012-03-08 20:56:26 +00:00
Siebrand Mazeland
fe9cd7ef73 (bug 34702) More localised parentheses. 2012-02-28 12:41:26 +00:00
Derk-Jan Hartman
60f1f969b4 Add lang and hreflang tags to the variants in the variant menu's. This fixes bug 24742.
I have not added the rel 'alternate' links, because they are also present in the <head>
2012-02-26 16:52:37 +00:00
Sam Reed
09a78c1368 More return documentation 2012-02-09 21:36:14 +00:00
Jeroen De Dauw
0b105ebf1d added missing deprecation notices 2011-12-13 19:51:03 +00:00
Jeroen De Dauw
4544a78316 rem use of escapeLocalURL 2011-12-13 04:58:48 +00:00
Robin Pepermans
39fed0d525 fix r105935, wgContLang still used in the function 2011-12-12 22:08:17 +00:00
Robin Pepermans
9c4ae11b75 not sure if this span is really needed, but in any case it depends on user language, not content language 2011-12-12 22:05:40 +00:00
Robin Pepermans
8431de6dee Follow-up to r105870: dir="auto" on page title also for legacy skins (cologneblue etc) 2011-12-12 16:23:28 +00:00
Chad Horohoe
7914b2ee68 (bug 29475) Remove "trackback" feature entirely from core. This has been disabled-by-default since its inception and nobody uses it.
If someone really really wants this, they can write an extension.

Language files need rebuilding, but I took care of En and messages.inc.
2011-11-23 17:14:03 +00:00
Aaron Schulz
6c4360c951 Make use of Title::isSpecialPage() in various places 2011-11-02 20:55:08 +00:00
Alexandre Emsenhuber
a8538c7d58 Don't reinvent the wheel in LegacyTemplate::pageStats(), just use them items from SkinTemplate 2011-10-19 14:52:26 +00:00
Alexandre Emsenhuber
47bd06bb45 * Factorise calls to getTitle() and getSkin()
* Use Linker::linkKnown() instead of link() where possible
* Escape some messages that are escaped in other usages
* Use Title::isSpecial() instead of checking that getPrefixedDBkey() is equals to $wgContLang->specialPage()
2011-10-10 18:05:59 +00:00
Alexandre Emsenhuber
6f31ae468c Fixes for SkinLegacy::specialPagesList():
* Use XmlSelect, Html::rawElement() and Xml::submitButton() to make sure things are correctly escaped
* Get a Title object instead of using $wgContLang->specialPage()
* Redirect to index.php and changed the name of the <select> to title to use the common way instead of linking to redirect.php?wpDropDown=...
2011-10-10 15:21:56 +00:00
Sam Reed
a809a14ae8 Fix undefined $title 2011-10-05 00:49:53 +00:00
Sam Reed
7a5c95416b Call to undefined method CologneBlueTemplate::getInternalLinkAttributes() in /usr/local/apache/common-local/php-1.18/includes/SkinLegacy.php on line 487 2011-10-05 00:45:34 +00:00
Robin Pepermans
07dc087494 Re-do r96798 ("LanguageConverter now depends on the page content language"), without the change in WikiPage which caused an infinite loop (see bug 31098) 2011-09-22 20:31:23 +00:00
Robin Pepermans
73f0366e23 Fix support of legacy skins Standard & CologneBlue for user language direction: the topbar and footer used a "quickbar compensator" which relied on the topbar and footer following the content language direction.
Therefore it's easier to do it via CSS (which simplifies PHP code).
See also bug 31031.
2011-09-20 19:47:57 +00:00
Niklas Laxström
c48b41201a Revert r96798 - makes parser go infinite loop somewhere 2011-09-14 11:23:58 +00:00
Robin Pepermans
9a6efcc3e4 (Bug 30364) LanguageConverter should depend on the page content language instead of the wiki content language. Remains largely the same, except for extensions using the PageContentLanguage hook like Translate and WikimediaIncubator.
* Made variant tabs hidden on special pages (has no or sometimes wrong/inconsistent effect there; plus it's mainly in the user language)
* Made redirects be in content language again (remove from Title->getPageLanguage())
2011-09-11 17:56:27 +00:00
Daniel Friesen
bd756e6684 Followup r87340: Post-hook swap bodytext into a new bodycontent key and append printfooter and debughtml to bodytext so that we get the same behaviour as before for skins, the advantage of letting extensions modify them separately, and let skins opt-in to the ability to display these separately. 2011-09-04 12:38:04 +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
Robin Pepermans
3ac5f41d3a SkinLegacy:
* fix Fatal error: Call to undefined method CologneBlueTemplate::makeExternalLink()
* Use static Linker functions for all other link functions
CologneBlue: check if browseLinks is an array (in a rare case it isn't, which returns a Warning, see e.g. r91432#c19211)
2011-07-27 17:20:53 +00:00
Robin Pepermans
81446abcdc (see bug 29712) Removing the defaultUserOptionOverrides in MessagesXx.php because it is broken (and has been for a long time) and secondly, it is only used for things that can be done otherwise:
* 'editfont' => 'sans-serif'; -> trivial (can be set in CSS)
* 'underline' => 0; by languages written in scripts that are hard to read with underlines -> now set in shared.css, which makes it work also when they are used as interface language (note that [lang="xx"] is not yet present on wikitext content by default but will be soon as part of my work on RTL improvements)
* 'quickbar' => 2; by RTL languages. For this, I introduced a new option (5) that sets left/right according to the directionality of your interface language (and automatic is better than setting it in MessagesXx files!). Note that the broken feature was in this case "corrected" by CSS flipping, causing preferences to say "left" while it was actually "right". This commit fixes that bug as well.
Third, it actually would have made more sense to have it them load for wgLang instead of wgContLang, but that's not possible because wgLang is itself dependent on preferences
2011-07-05 01:26:49 +00:00
Krinkle
2d03eedf8a WatchAction requires token (BREAKING CHANGE)
* (bug 27655) Require token for watching/unwatching pages
* Previously done for API (bug 29070) in r88522
* As with markpatrolled, the tokens are not compatible and made that way on purpose. The API requires the POST method and uses a universal token per-session. Since the front-end is all GET based (also per convention like in markpatrolled and rollback) they are stronger salted (title / action specific)
* ajax.watch used the API already and was switched in r88554.
* The actual watching/unwatching code was moved from WatchAction->onView to WatchAction::doWatch. This was done to allow the API to do the action without needing to generate a token like the front-end needs (or having to duplicate code). It is now similar to RecentChange::markPatrolled (in that it  also a "central" function that does not care about tokens, it's called after the token-handling)
* JavaScript / Gadgets that utilize action=watch in their scripts:
** Effects should be minimal as they should be using the API (see r88522 and wikitech-l)
** If they use index.php and scrap the link from the page, they can continue to do so.

* There are links to the watch action all over the place. I've tried to catch most of them, but there may be some I miss. Migration in most cases is just a matter of adding an array item to the $query for:
 'token' => WatchAction::getWatchToken( $title, $user [, $action] )
or changing:
 Action::factory( 'watch', $article )->execute();
to:
 WatchAction::doWatch( $title, $user );

While replacing the usages in some cases an instance of Article() no longer had to be created, in others $wgUser had to be retrieved from global (which was implied before but needs to be given directly now)

Other notes:
* Article->unwatch() and Article->watch(), which were deprecated as of 1.18 and are no longer used in core, may be broken in scenarios where the Request does not have a 'token' but is making a call to $article->watch()
* Some extensions need to be fixed, I'm currently running a grep search and will fix them a.s.a.p 


[1] http://www.mediawiki.org/wiki/ResourceLoader/Default_modules?mw.user#tokens
2011-06-06 00:09:03 +00:00
Krinkle
f59941c476 Fix fixme: r87340: Remove slashes from double quote escape in single quote string. 2011-05-09 17:51:17 +00:00
Alexandre Emsenhuber
52fe58784a Moved "printfooter" and debug HTML away from "bodytext" so that they can be easily modified by extensions with the SkinTemplateOutputPageBeforeExec hook; always moved generation of debug HTML just before executing the hook so that it includes more items 2011-05-03 17:23:17 +00:00
Alexandre Emsenhuber
04d2417f8f Moved Skin::$mWatchLinkNum to SkinLegacy since it's only used there and made it protected per documentation (nothing else apart SkinLegacy uses it) 2011-05-02 15:32:20 +00:00
Happy-melon
2c9cfd7cce Refactor the factory/i18n/list/etc static methods from SpecialPage into their own class; there's no reason we need to be parsing them in every single SpecialPage subclass. Leave all the methods as stubs in SpecialPage.php; if we required PHP 5.3 they could be replaced by a a __callStatic() magic method, but that doesn't work on PHP 5.2.
Also make a few changes to the functions available.  SpecialPageFactory::resolveAlias() now takes an optional subpage and returns array(<name>,<subpage>).  Similarly merge getPage() and getPageByAlias().  There were many examples of (extensions particularly) making dubious assumptions about the presence or absence of subpages or canonical-ness.

I didn't deprecate SpecialPage::getTitleFor() as it's got over six hundred calls.  I'm rather undecided on the best position of getPage()/executePath().  Although the latter needs cleanup anyway.
2011-04-17 11:31:11 +00:00
Happy-melon
4853c8a0d2 Tidy up some more uses of SpecialPage static methods 2011-04-17 10:44:44 +00:00
Happy-melon
08d460d384 Follow-up r 86041 per CR and IRC:
* Article constructor needs to be called with zero as second parameter
* Run stylize.php over new files
* Add Action::getLang() for consistency with other context accessors
* Fix declaration of FormAction::alterForm(), doesn't need to be passed by reference
* Fix inline use of Credits::getCredits() in SkinTemplate and SkinLegacy
2011-04-14 12:17:24 +00:00
Alexandre Emsenhuber
6421160ec0 * Use OutputPage::getSyndicationLinks() to build feed links
* Ported r82395 to legacy skins (possible double "printable" parameter in URL and hidden dependency of $wgTitle)
2011-02-19 14:40:56 +00:00
Alexandre Emsenhuber
b2a0cc74d5 Moved wfGetSiteNotice(), wfGetNamespaceNotice() and wfGetCachedNotice() to Skin call to allow passing the Skin object to the SiteNoticeBefore and SiteNoticeAfter hooks.
I didn't left compatibility functions since there's no other call to these functions in core or extensions.
2011-02-12 21:24:05 +00:00
Daniel Friesen
910b407dc9 Fix a small bug in SkinLegacy. 2011-02-11 06:42:40 +00:00
Platonides
24fa8b42c2 Unused globals 2011-02-08 22:10:34 +00:00
Daniel Friesen
1455b81f0c Kill off Linker::getExternalLinkAttributes. 2011-02-05 23:06:36 +00:00
Daniel Friesen
3d220be8d6 Completely remove support for legacy style skins. All legacy skinning options are now part of a SkinLegacy/LegacySkinTemplate pair that inherits from the normal SkinTemplate setup. Also ported our three built in skins to use the new legacy classes. ( ;) if you want to kill legacy skins now, you only have to svn rm 4 files) 2011-02-04 04:18:05 +00:00