Chad has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/97564


Change subject: Don't use $wgTitle, QuickTemplate has had getSkin() for well 
over 2 years
......................................................................

Don't use $wgTitle, QuickTemplate has had getSkin() for well over 2 years

Change-Id: Ife8aa166e56c6329090759afbf79dd9baee96120
---
M CreateRedirect.php
1 file changed, 1 insertion(+), 6 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CreateRedirect 
refs/changes/64/97564/1

diff --git a/CreateRedirect.php b/CreateRedirect.php
index 93d7ef8..b0bf8af 100644
--- a/CreateRedirect.php
+++ b/CreateRedirect.php
@@ -69,12 +69,7 @@
        // where it's inappropriate for the link to appear.
        // 2. Check the title. Is it a "Special:" page? Don't display the link.
        $action = $wgRequest->getText( 'action', 'view' );
-       if ( method_exists( $tpl, 'getSkin' ) ) {
-               $title = $tpl->getSkin()->getTitle();
-       } else {
-               global $wgTitle;
-               $title = $wgTitle;
-       }
+       $title = $tpl->getSkin()->getTitle();
 
        if( $action != 'view' && $action != 'purge' && !$title->isSpecialPage() 
) {
                return true;

-- 
To view, visit https://gerrit.wikimedia.org/r/97564
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ife8aa166e56c6329090759afbf79dd9baee96120
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CreateRedirect
Gerrit-Branch: master
Gerrit-Owner: Chad <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to