* (bug 14258, 14368) Fix for subpage renames in replication environments
[lhc/web/wiklou.git] / includes / SpecialUnusedtemplates.php
index 033066d..89acd09 100644 (file)
@@ -1,10 +1,15 @@
 <?php
+/**
+ * @file
+ * @ingroup SpecialPage
+ */
 
 /**
+ * implements Special:Unusedtemplates
  * @author Rob Church <robchur@gmail.com>
  * @copyright © 2006 Rob Church
  * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 2.0 or later
- * @addtogroup SpecialPage
+ * @ingroup SpecialPage
  */
 class UnusedtemplatesPage extends QueryPage {
 
@@ -21,7 +26,8 @@ class UnusedtemplatesPage extends QueryPage {
                        FROM $page
                        LEFT JOIN $templatelinks
                        ON page_namespace = tl_namespace AND page_title = tl_title
-                       WHERE page_namespace = 10 AND tl_from IS NULL";
+                       WHERE page_namespace = 10 AND tl_from IS NULL
+                       AND page_is_redirect = 0";
                return $sql;
        }
 
@@ -36,8 +42,7 @@ class UnusedtemplatesPage extends QueryPage {
        }
 
        function getPageHeader() {
-               global $wgOut;
-               return $wgOut->parse( wfMsg( 'unusedtemplatestext' ) );
+               return wfMsgExt( 'unusedtemplatestext', array( 'parse' ) );
        }
 
 }
@@ -47,5 +52,3 @@ function wfSpecialUnusedtemplates() {
        $utp = new UnusedtemplatesPage();
        $utp->doQuery( $offset, $limit );
 }
-
-?>