Commit graph

849 commits

Author SHA1 Message Date
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
Raimond Spekking
9fbeca5552 Follow-up r81604: Prefix new classes with 'mw-' per [[Manual:Coding conventions]] 2011-02-09 17:06:41 +00:00
Ilmari Karonen
6eb0ed9207 (bug 23315) Add new body classes to allow easier styling of special pages.
Also eliminate some duplicate code introduced into SpecialPage::headElement() in r61071 by calling Skin::getPageClasses() instead, and use $sk parameter instead of $wgUser->getSkin() to get skin name.
2011-02-06 21:08:48 +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
Daniel Friesen
8c9a20833e Commit some fixes for comments on r77741 2011-02-03 00:00:58 +00:00
Chad Horohoe
90fdb46ae5 Last $wgArticle junk in Skin(Template). Just pass the article on hand to lastModified(). Nothing outside of here calls it anyway 2011-01-26 17:06:18 +00:00
Chad Horohoe
8ac435b072 Followup r81034, remove the global statements 2011-01-26 16:56:46 +00:00
Chad Horohoe
c1a29795b4 First round of $wgArticle removals 2011-01-26 16:54:58 +00:00
Derk-Jan Hartman
e5bb119085 Port the remaining Skin.php skins standard(classic), Cologneblue and Nostalgia
* Converted Nostalgia's use of inline table alignment to CSS
* common_rtl.css is not in use now

Refs bug 26649
2011-01-23 01:41:13 +00:00
Niklas Laxström
0e181e122a Use same wording as in skintemplate 2011-01-11 14:27:15 +00:00
Alexandre Emsenhuber
28cdedf7c2 Seems there was a logic error in r80001 :) 2011-01-11 13:08:28 +00:00
Alexandre Emsenhuber
83a2f95f8b Simplify a bit:
* replaced calls to Article::getLatest() by Title::getLatestRevID()
* introduced Skin::isRevisionCurrent()
* made checks on Skin::pageStats() more coherent
2011-01-11 13:04:55 +00:00
Platonides
a52488c925 Remove unused global $wgRestrictionTypes, changed into Title::getRestrictionTypes() in r79655 2011-01-06 18:15:50 +00:00
Bryan Tong Minh
718ff89310 (bug 26574) Added 'upload' to $wgRestrictionTypes, allowing upload protected pages to be queried via the API and Special:ProtectedPages, and allowing disabling upload protection by removing it from $wgRestrictionTypes. 2011-01-05 19:17:36 +00:00
Alexandre Emsenhuber
bcb833d939 Use $this->mTitle instead of $wgArticle->getTitle() 2011-01-04 15:02:54 +00:00
Tim Starling
ccfe5ad97b Fix for bug 26561: clickjacking attacks. See the bug report for full documentation. 2011-01-04 06:12:33 +00:00
Daniel Friesen
5de2e40379 Implement "relevant" title and user in the skin system and update undelete, log, contributions, blockip, and movepage to use it.
A "Relevant" is used by the skin to determine what title to display tabs for. This setting allows pages like Special:MovePage (which is linked to from the tabs themselves) to retain the tabs specific to the page relevant to it when switching to the special page.
Similaly a "Relevant" user is used by the skin to display things in the toolbox which would usually only be displayed on the user's userpage and talkpage, pages like Special:Contributions which are linked to by the toolbox can use this to retain the toolbox links when switching between the user pages and these special pages.
2011-01-01 01:03:02 +00:00
Platonides
ed74c1549c When running phpunit with globals backup, $skinsInitialised will be kept to true, but $wgValidSkinNames reset to an empty array. Workarounding. 2010-12-26 22:24:55 +00:00
Daniel Friesen
442359e489 Changing the skin loader to load classes using the pattern "Skin{$skinName}" instead of "Skin" . ucfirst($key) as the current behavior has been causing bugs with extension based skins attempting to use the autoloader to load their skins.
Under current behavior for "MonoBook" the skin loader will load "SkinMonobook" instead of "SkinMonoBook". Because the skin system loads from skins/ when it can't find a skin and php's class system is case insensitive by a fluke MonoBook has been fine despite the skin loader trying to load SkinMonobook despite the class being named SkinMonoBook.
However our autoloader is case-sensitive, and as a result if you try to name your extension based skin class something like SkinStereoBook the skin will break with a cryptic error message because the skin loader attempts to load SkinStereobook, doesn't find it in the autoloader, then throws a php error when it tries to load skins/StereoBook.php and can't find the file.
We have also been using the $skinName to generate the name of the file to load from skins/ so this value is already expected to be safe for use in this way.
2010-12-26 14:15:27 +00:00
Happy-melon
8e57be2831 Follow-up r77762 per CR, and an unrelated one-character whitespace fix which doesn't deserve its own revision id... :D 2010-12-16 18:30:15 +00:00
Daniel Friesen
898a0780a0 Make footerLink a public method, this method is useful for hooks now that r77732 allows a hook to add new footer links in this style. 2010-12-05 11:01:34 +00:00
Daniel Friesen
f3710b35e5 Folowup r77763, add documentation for $wgFooterIcons. 2010-12-05 10:58:13 +00:00
Niklas Laxström
2ef6a1a46e Follow-up r77763, get rid of boolean param and whitespace fixes 2010-12-05 10:41:58 +00:00
Daniel Friesen
5a8c63847f Take the footer icon html building common to all 3 skins using r77741 $wgFooterIcons and turn it into a common makeFooterIcon method they can share.
Also fix the location of the noprint class meant to be on footer-icons in vector.
2010-12-05 04:44:28 +00:00
Daniel Friesen
7c143e5fb0 Add method documentation for getCommonStylePath and getSkinStylePath. 2010-12-05 04:22:29 +00:00
Daniel Friesen
c4ff8e7a60 Fixme fixme... typo typo... fix r77726's broken fix. 2010-12-04 17:10:48 +00:00
Daniel Friesen
e6ac8d5a47 Follow up r77718, fix broken inconsistent use of $fname/$name in getCommonStylePath and getSkinStylePath. 2010-12-04 17:00:34 +00:00
Daniel Friesen
838ed7b6e2 Implement getSkinStylePath and getCommonStylePath for image paths used directly in a skin, use it for vector's search icon. 2010-12-04 14:45:14 +00:00
Raimond Spekking
ac7fbc3bed Follow-up r76434, r76570,r76668: Pass skin object per CR 2010-11-14 19:45:55 +00:00
Raimond Spekking
49a678e29e Follow-up r76434, r76570: Add skinname per CR 2010-11-14 19:28:32 +00:00
Raimond Spekking
47bf2bd024 * (bug 22463) Add hook 'SkinGetPoweredBy' to make 'powered by' icon customizable
Patch by Yaron
2010-11-10 08:18:21 +00:00
Sam Reed
c40d38a5be Remove a few more unused variables
Add a couple of braces to unobvious if
2010-10-31 23:19:40 +00:00
Philip Tzou
346a0afa83 Followup r75719. Typo. 2010-10-31 15:12:34 +00:00
Philip Tzou
5b5705bbb8 Followup r75617. Fix spelling mistake. 2010-10-31 15:09:27 +00:00
Bryan Tong Minh
85eec5b399 Follow-up r75621: Check for $wgEnableAPI before adding the RSD link to the head 2010-10-29 16:19:35 +00:00
Bryan Tong Minh
e9fd126b9a (bug 25648) API discovery information has been added as RSD link in page <head> and by providing an API module action=rsd. Added hook ApiRsdServiceApis for extensions to add their own service to the services list.
Patch by Brion Vibber and Bryan Tong Minh.
2010-10-28 19:20:21 +00:00
Philip Tzou
e6c51a4143 1. Revert the complicated redirection I made in r59754;
2. Add more Accept-Language XVO cache name for IE;
3. Use hreflang to specify canonical and alternate links, it's search engine friendly
   when a wiki has multiple variant languages.
2010-10-28 16:58:39 +00:00
Platonides
df51be8360 Create a new ParserOptions() 2010-10-15 23:16:11 +00:00
Sam Reed
6b3b915353 Big attack on unused variables... 2010-10-14 20:53:04 +00:00
Daniel Friesen
001df82cad Clean up names of my bodyAttr hooks on Brion's recomendation. 2010-10-04 05:38:48 +00:00
Daniel Friesen
1839a15957 Add to OutputPage::headElement a OutputPageBodyAttrs hook for extensions and a bodyAttrs callback to Skin so that Extensions and Skins are able to add attributes and classes to the <body> tag without neeing to do insane things. 2010-10-03 14:12:41 +00:00
Trevor Parscal
dc723fc710 * Improved on r73567, this makes WebRequest::getFuzzyBool case insensitive, making 'false', 'FALSE', 'FaLsE', etc to be boolean false
* Fixed syntax error in Skin.php
2010-09-27 15:59:58 +00:00
Chad Horohoe
e4189f5920 Fix a bunch of '? true : false' instances 2010-09-27 14:24:13 +00:00
Alexandre Emsenhuber
aac9dd2e56 * (bug 25292) SkinSubPageSubtitle hook now passes the Skin object as second parameter 2010-09-26 16:37:00 +00:00
Trevor Parscal
2d8b027219 * Fixed bug #25281 by adding special treatment for modules in the "private" group
* Added $wgResourceLoaderInlinePrivateModules to allow private modules to be either embedded in the HTML output or accessed through ResourceLoader (which will bypass squid cache and check the user paramter against $wgUser)
* Moved more generated javascript functionality to ResourceLoader
* Fixed comment typo made in r73673
* Added documentation for ResoruceLoaderRegisterModules hook
2010-09-24 22:10:25 +00:00
Chad Horohoe
30237d805b Fix a bunch of notices. Error was "Notice: Found alias defined for (some uppercased special page) when searching forspecial page aliases for (some lowercased special page). Case mismatch?" 2010-09-16 23:26:20 +00:00
Trevor Parscal
1329158215 * Added exporting of user preferences
* Renamed user.preferences to user.options
* Fixed bug that caused anonomous usernames (such as IP addresses) to be used in user style and script requests
* Fixed user options styles not loading for anon users
2010-09-14 21:47:59 +00:00
Niklas Laxström
3a53e4d26e Set caller for LinkBatch 2010-09-14 07:26:48 +00:00
Platonides
52e275003a Code cleanup: unused globals, empty statements, typos... 2010-09-11 21:55:21 +00:00
Trevor Parscal
27fc041226 Moved a config back to Skin::makeGlobalVaiablesScript because it depends on the user object. 2010-09-11 08:06:38 +00:00