Follow-up to I17ac68014840daa47bfd4768e978e9ff2edb00db.
Replaces some ==/!= with ===/!== and other code style
changes mentioned in Gerrit comments on previous patchset.
Change-Id: I50da16bc62241491ac5c4948e0d3059b21f113dc
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
* 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
- 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
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>
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
* 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
* 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
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
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
Also made file/class documentation more consistent and removed a duplicate comment from SpecialPageFactory.php in SpecialPage.php.
Change-Id: I99dd2de7fe461f2fad4e0bd315ebc2899958a90f
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
It was prompted by an IRC discussion with SrikanthLogic,
who found the comment hard to understand.
Change-Id: Idd686257bc4d44f93e06b5645bdc1531bb2b4a2e
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, ...).
* 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
* 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
* 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