Commit graph

578 commits

Author SHA1 Message Date
Tyler Anthony Romeo
af68ecea64 (bug 40541) Fixed minor code style problems.
Follow-up to I17ac68014840daa47bfd4768e978e9ff2edb00db.
Replaces some ==/!= with ===/!== and other code style
changes mentioned in Gerrit comments on previous patchset.

Change-Id: I50da16bc62241491ac5c4948e0d3059b21f113dc
2012-09-30 21:23:05 -04:00
Nikerabbit
c5f732bcbe Merge "(bug 40384) Move width/height from button to img" 2012-09-30 16:11:08 +00:00
Catrope
ab8f2c37d5 Merge "(bug 40541) Fixed $wgSecureLogin functionality." 2012-09-28 20:30:15 +00:00
Kevin Israel
6529547f93 (bug 40384) Move width/height from button to img
The fix for bug 34768 (r112710, regarding the lack of width and height
attributes for the Vector skin's search button) failed to include the
corresponding changes to SkinTemplate.php.

Because BaseTemplate::makeSearchButton() only special cased the src and
alt attributes, the width and height incorrectly went on the button
element, causing HTML validation errors (and also having no effect).
This patch moves the width and height attributes to the img element
in a similar fashion to src and alt.

Change-Id: I3561fc79364ce43521823bad691c9b61f87ba375
2012-09-27 22:53:06 -04:00
Tyler Anthony Romeo
565014a8cb (bug 40541) Fixed $wgSecureLogin functionality.
* Added parameter to login link so that wpStickHTTPS
  is set to true by default when the user is coming
  from HTTPS.
* Added redirect in Special:Userlogin so that when
  $wgSecureLogin is enabled it automatically redirects
  to HTTPS.
* Adjusted User::setCookies() to add a parameter for
  forcing secure/insecure cookies, and then added the
  appropriate argument to Special:Userlogin so that
  cookies are set appropriately.

Change-Id: I17ac68014840daa47bfd4768e978e9ff2edb00db
2012-09-27 14:34:11 -04:00
Siebrand Mazeland
04986cf60f Use standard function name for constructor.
Also remove a redundant constant check.

Change-Id: I55d929e6bc8f8a851bedf5eaa476601af4458e6e
2012-09-25 21:12:45 -07:00
Alexandre Emsenhuber
f9963e91e8 Use $this to get the Title object in SkinTemplate::buildNavUrls()
No need to call OutputPage::getTitle().

Change-Id: I7ecd497b38044a05a953659780ac127bfb6597e5
2012-09-05 22:21:20 +02:00
IAlex
aa3295418a Merge "Make Special:Log link pretty in navigation toolbox" 2012-09-05 19:39:41 +00:00
Hashar
89a055491c Merge "'lang' attrib in #mw-content-text should be set to variant code." 2012-09-04 15:04:52 +00:00
Liangent
da43314022 'lang' attrib in #mw-content-text should be set to variant code.
Change-Id: I15cd8c102991c5007b43e06939a0c1a7593d0933
2012-09-04 17:00:27 +02:00
raymond
5b11c67ff2 Make Special:Log link pretty in navigation toolbox
Change-Id: Ie1ee210dd99a8ae8225dab3040e06d422a122f22
Special:Log/Username works since a few MediaWiki releases
2012-09-02 23:29:36 +02:00
Alexandre Emsenhuber
61dd1d037b Use the MWDebug class to display debug log back in the request.
- This removes the duplication of MWDebug::$debug and
  OutputPage::$mDebugtext, so there's no need to store two times
  the same text
- Removed OutputPage::debug() since it's no longer used
- Had to keep OutputPage::$mDebugtext because it's still
  referenced by SemanticPageMaker extension
- Moved Skin::formatDebugHTML() to MWDebug::GetHTMLDebugLog()
  and replaced the call in Skin::generateDebugHTML() to use it
- Also check $logonly before sending entries to the debug
  toolbar in wfDebug(), for consistency
- Changed MWDebug::getDebugHTML() to also return the debug log
  in an HTML comment if $wgDebugComments is set to true and
  changed the location of this call to BaseTemplate::printTrail()
  so that its result is the latest possible. This also includes
  the debug toolbar.
- Removed MockOutputPage and related test cases since they are
  no longer accurate

Change-Id: Ie0f389f8566457b1c938c627ed930040741ac9d9
2012-08-27 23:47:19 +02:00
Demon
504fb18cac Merge "Fix separated login link so that create account and login are always next to each other." 2012-08-23 20:34:35 +00: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
aude
85a6b407eb use dir=auto for pt-userpage
Change-Id: I24874a3cf7f9f9fe250dc1e5796cf780e436f66b
2012-08-21 13:56:43 +00:00
Daniel Friesen
61ad0b02e3 Fix separated login link so that create account and login are always next to each other.
Change-Id: Iea0b325f66987a3a2de2c0935998e75f834d5786
2012-08-15 13:58:41 -07:00
Catrope
879e32df7c Merge "(bug 31040) Fixed $wgSecureLogin effect on returnto." 2012-08-15 00:12:47 +00:00
Tyler Romeo
4893afd833 (bug 31040) Fixed $wgSecureLogin effect on returnto.
Added parameter to Title::getFullURL to allow specification
of a protocol rather than assuming PROTO_RELATIVE. Also
added an accompanying parameter to Skin::makeSpecialUrl
to make a link for a specific protocol.

Cleaned up the creation of personal URLs in SkinTemplate.php
so that when $wgSecureLogin is enabled, the returnto
query is not lost in the process.

Note: This will only work if $wgServer is set to a
protocol relative URL.

Change-Id: Iba48eb3620fb3a721220364185f7abfd902412d0
Signed-off-by: Tyler Romeo <tylerromeo@gmail.com>
2012-08-13 08:53:43 -04:00
Daniel Friesen
340a258a81 (bug 34264) Add id="t-print" to the print toolbox link.
Change-Id: I62c2d6e4c194c4905ae1942f723a41fd20df3a98
2012-08-11 17:47:19 +02:00
Antoine Musso
ef9534313e prevents some doxygen warnings
This patch fix misc issues reported by doxygen. Nothing fancy.

Change-Id: I98edc8c877019f1dc4a82a37bca518df2eb904fc
2012-07-15 22:32:48 +02:00
Antoine Musso
9aa825f225 prettify SkinTemplate:makeLink documentation
Change-Id: Ib70e00460c8e01ec810a4123b7eec52c3632b99d
2012-07-10 17:08:51 +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
Siebrand
70594aae02 Merge "Bug 37705 - ucfirst for sidebar interlanguage links" 2012-06-21 12:22:20 +00:00
robin
eb5bee436e Bug 37705 - ucfirst for sidebar interlanguage links
Change-Id: I623cf070fdc62c9394a06d4830dc4faccfebcfbe
2012-06-21 11:32:06 +00:00
Timo Tijhof
c55cdd6444 SkinTemplate: Minor clean up
* Better variable names ($wgContLang is object, $userLang was a string
  and $lang the object. Made $userLang the object and $userLangCode
  the string.

* Removed trailing whitespace.

* Spacing (not all just where it fit better in the context, some
  isset($) to isset( $ ). and a few `if()` to `if ()` since most
  in this file are like that.

* Some redundant magic quote usage to single quotes.

* Weird structure in getPersonalTools():
  Instead of accessing the same deep array property over and over
  again to add something to the newly create array (e.g.
  $foo[] = array(); and then $foo[0] = $bar;) simply creating it
  as a literal at once.

Change-Id: I861ae1d558f324f61c79089dcd3bff52dd27e0aa
2012-06-19 01:26:40 +02:00
Catrope
37048169d8 Merge "(bug 36938) XSS in uselang parameter" 2012-06-13 17:43:19 +00:00
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
Catrope
44f9adbdf0 (bug 36938) XSS in uselang parameter
This was caused by the value of getHtmlCode() being injected directly
into HTML without escaping. Despite its name, the return value of
getHtmlCode() is not actually HTML-safe.

Fixed by escaping the language code, wrapping it in double quotes
instead of single quotes, and explicitly documenting that getHtmlCode()
and getCode() do not return HTML-safe values.

Change-Id: I3a908484ba3d4999d7a61ac162617144ca7e703a
2012-05-18 12:00:57 -07: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