Commit graph

550 commits

Author SHA1 Message Date
umherirrender
54a4a82f4c Change order of login/create account
With this the position of the login link in the right corner is not
changed with $wgUseCombindedLoginLink = false;
Gerrit has also first "register" and than "log in" in the corner.

Change-Id: I8d1000cf53ab792b3f69438004e5ae181acba645
2012-06-06 19:49:36 +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
bc9d9f1f9c Added missing GPLv2 headers in some places.
Also made file/class documentation more consistent and removed a duplicate comment from SpecialPageFactory.php in SpecialPage.php.

Change-Id: I99dd2de7fe461f2fad4e0bd315ebc2899958a90f
2012-05-10 17:51:44 +02:00
Alex Monk
00c4f2255f Show Log toolbox link for anon users, fix toolbox on DeletedContribs
This will show the 'Log' toolbox link on pages relevant to anonymous users.
It also sets the relevant user on Special:DeletedContributions, which fixes the missing toolbox links (e.g. 'User contributions', 'Logs', 'Block user').

Change-Id: Ib51c59acb3656d9c209aeea22c1e00dc21a778db
2012-04-04 01:07:09 +01:00
Amir E. Aharoni
5644334e23 Improved the comment about Special:Contributions.
It was prompted by an IRC discussion with SrikanthLogic,
who found the comment hard to understand.

Change-Id: Idd686257bc4d44f93e06b5645bdc1531bb2b4a2e
2012-03-27 14:10:31 +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
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
Roan Kattouw
1afbfbfaa9 (bug 34600) Older skins using useHeadElement=false were broken in 1.18 . Modified patch by Vitaliy Flippov 2012-02-22 21:43:59 +00:00
Robin Pepermans
3b32851a94 (Bug 31417) Content-holding div needs an ID.
Since the introduction of the class mw-content-ltr/rtl, it has been used to get the page text which is very bad because there are two class names and it is not always on the same place (if at all). This ID will always hold the bodytext (excluding categories, ArticleFeedback, ...).
2012-02-16 16:05:43 +00:00
Sam Reed
09a78c1368 More return documentation 2012-02-09 21:36:14 +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
Alexandre Emsenhuber
2c2f340e36 Fix comment, this doesn't use $wgTitle anymore 2012-01-14 13:15:19 +00:00
Chad Horohoe
f3a6fc1576 Revert r102624, r104262 (user display name stuff). Per CR there isn't consensus on this yet. 2012-01-11 00:53:08 +00:00
Alexandre Emsenhuber
99fde665ed Revert r105790 and move back view counter back to WikiPage with two modifications:
* WikiPage::$mCounter is now marked as protected
* Call WikiPage::loadPageData() from WikiPage::getCount() if the count is not set intead of loading the page_counter field only
2012-01-06 20:26:53 +00:00
Alexandre Emsenhuber
22f0f724bb * Always set 'userjs' and 'userjsprev' items to false since they are now incorporated in 'bottomscript' (only affects skins not using OutputPage::headElement())
* Removed SkinTemplate::setupUserJs() since it's no longer used and marked OutputPage::isUserJsAllowed() for removal in 1.20 since its last call is now gone
2012-01-02 12:19:24 +00:00
Alexandre Emsenhuber
90796eaef7 * Moved wfReportTime() call just before executing 'SkinTemplateOutputPageBeforeExec' hook to take into account remaining calls
* Group similar stuff
* Factorise calls to $this->getLanguage()
* Facrorise calls to $user->is(Anon|LoggedIn)()
* Changed the code that wraps 'subtitle' and 'undelete' items to be more readable
2012-01-02 12:04:51 +00:00
Alexandre Emsenhuber
a019d9fa83 Always set 'jsvarurl' to false (only affect skins not using OutputPage::headElement()) since action=raw&gen=js always return an empty page, so it's pointless to link to it 2012-01-01 15:44:42 +00:00
Sam Reed
d5e52d1a43 Add a TODO with regards to existing mysql4 schemas.. 2011-12-15 14:56:09 +00:00
Daniel Friesen
42e8b0a8e7 Replace get{Local,Full,Link,Canonical}URL's $variant argument with a secondary $query argument and treat variant paths like we do action paths. 2011-12-12 19:19:23 +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
87ebe89bed Moved view count from WikiPage to Title; avoids an extra DB query when showing the view count in SkinTemplate::outputPage() (since it's not the same WikiPage object) 2011-12-11 11:30:11 +00:00
Alexandre Emsenhuber
641ca7bff0 Factorise calls to $this->getTitle() in SkinTemplate::outputPage() 2011-12-10 17:01:22 +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
Brion Vibber
704a4ffd90 * (bug 4901) lang, hreflang attributes added to sidebar interlanguage links
The lang attribute assists screen readers in reading out the language name correctly; see sample recordings from iOS's VoiceOver reader mode attached on <https://bugzilla.wikimedia.org/show_bug.cgi?id=4901>
hreflang attribute is less clearly useful, but may assist some tools in indicating the language of the destination site.

Inline interwiki links have not been changed.

Release notes will be added on 1.18 channel, this is an old bug fix and easy to backport.
2011-11-30 23:17:19 +00:00
Sam Reed
7141742914 * (bug 32276) Skins were generating output using the internal page title which would allow anonymous users to determine wheter a page exists, potentially leaking private data. In fact, the curid and oldid request parameters would
allow page titles to be enumerated even when they are not guessable.
* (bug 32616) action=ajax requests were dispatched to the relevant internal functions without any read permission checks being done. This could lead to data leakage on private wikis.
2011-11-28 23:18:55 +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
Sam Reed
2b4068af52 Followup r102624
Change $wgRealNameInInterface default to false

<mumble>change</mumble>
2011-11-26 00:32:30 +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
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
Antoine Musso
40a079166a skip Media: links in addition to Special: links
That one triggered an exception stack trace when using Media:foo as
a target on Special:WhatLinksHere.

Example:
Special:WhatLinksHere/Media:file.png

That is a rare occurence that "should not happen". I am not sure it is
worth backporting to 1.18 although it impacts live site:

http://en.wikipedia.org/wiki/Special:WhatLinksHere/Media:BSicon_uBS2lf.svg
2011-11-17 10:10:40 +00:00
Daniel Friesen
8ae1847dc8 Add isset tests to stuff inside BaseTemplate::getToolbox. 2011-11-14 21:57:36 +00:00
Daniel Friesen
44ab4a9448 Add a new User::getDisplayName() to return the name that should be displayed in the interface.
Add a UserDisplayName hook to allow extensions to give custom display names for users.
Add a $wgRealNameInInterface to use the real name of a user as the display name.
To start of the first use of the display name functionality tweak SkinTemplate to declare the userdisplayname and use it inside of personal_urls.
2011-11-10 06:55:21 +00:00
Alexandre Emsenhuber
6314435567 * Fix checks to show whether "edit" and "addsection" tabs should be marked as active so there's one, and only one active tab
* Follow-up r102192: simply call isProtect() to see if the page is protected, it also handles creation protection
2011-11-07 13:42:35 +00:00
Alexandre Emsenhuber
d9582bff04 * Only show "view" tabs when the user hasn't the permission to read the page and put the whole stuff in a $userCanRead check instead of doing that for each check
* Factorise duplicate code (for the "protect" tab generation)
* Use Title::quickUserCan() check for delete and protect actions instead of User::isAllowed()
* Pass the User object to Title::quickUserCan()
2011-11-06 20:30:08 +00:00
Alexandre Emsenhuber
1d2f37376a * Moved the language variant check inside the "not a special page" check instead of doing it again after
* Moved the definition of the $session variable near where it's used
2011-11-06 05:51:38 +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
1968b4711d * Use local context to get messages
* Also override QuickTemplate::msg(), QuickTemplate::msgHtml() and QuickTemplate::msgWiki() in BaseTemplate to use the context
2011-10-28 12:39:20 +00:00
Platonides
d581e9dd5a Removal of unused globals 2011-10-27 20:48:09 +00:00
Alexandre Emsenhuber
a9432cfd8b Check first that $wgDisableLangConversion is false and we are not in a special page before doing the language variant check 2011-10-23 07:55:45 +00:00
Daniel Friesen
c974d9e149 Fix up makeLinkItem and makeLink:
- Don't explicitly name attributes to use (fixes bug on language_links in 1.18)
- Allow makeLink to accept options specifying how to wrap links and text
2011-10-09 19:39:54 +00:00
Daniel Friesen
fb8c0479ce Followup r98210; Add an ugly hack to support old extensions using the SkinTemplateToolboxEnd hook, erm... 'thanks' Tim.
((Also fix an extra htmlspecialchars that shouldn't have been there))
2011-09-27 07:58:23 +00:00
Daniel Friesen
19ade0cc7e Add getSidebar method to BaseTemplate to simplify the sidebar boilerplate. 2011-09-27 05:31:57 +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
Sam Reed
a3d2755660 Revert r91561 2011-09-16 16:55:39 +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
Alexandre Emsenhuber
e068493dd0 Call Linker::titleAttrib() statically 2011-09-10 21:14:28 +00:00
Daniel Friesen
101e09f56e Followup r96217, slight regression use rawElement not element, accidentally caused the <a> to be htmlescaped. 2011-09-07 01:12:00 +00:00