http://www.mediawiki.org/wiki/Special:Code/MediaWiki/73369

Revision: 73369
Author:   thomasv
Date:     2010-09-20 09:36:10 +0000 (Mon, 20 Sep 2010)

Log Message:
-----------
renaming special page, follow-up to r73338

Modified Paths:
--------------
    trunk/extensions/ProofreadPage/ProofreadPage.php

Added Paths:
-----------
    trunk/extensions/ProofreadPage/SpecialPagesWithoutScans.php

Removed Paths:
-------------
    trunk/extensions/ProofreadPage/SpecialNakedPages.php

Modified: trunk/extensions/ProofreadPage/ProofreadPage.php
===================================================================
--- trunk/extensions/ProofreadPage/ProofreadPage.php    2010-09-20 09:34:45 UTC 
(rev 73368)
+++ trunk/extensions/ProofreadPage/ProofreadPage.php    2010-09-20 09:36:10 UTC 
(rev 73369)
@@ -44,7 +44,7 @@
 $wgSpecialPageGroups['IndexPages'] = 'pages';
 
 # special page
-$wgAutoloadClasses['PagesWithoutScans'] = dirname( __FILE__ ) . 
'/SpecialNakedPages.php';
+$wgAutoloadClasses['PagesWithoutScans'] = dirname( __FILE__ ) . 
'/SpecialPagesWithoutScans.php';
 $wgSpecialPages['PagesWithoutScans'] = 'PagesWithoutScans';
 $wgSpecialPageGroups['PagesWithoutScans'] = 'maintenance';
 

Deleted: trunk/extensions/ProofreadPage/SpecialNakedPages.php
===================================================================
--- trunk/extensions/ProofreadPage/SpecialNakedPages.php        2010-09-20 
09:34:45 UTC (rev 73368)
+++ trunk/extensions/ProofreadPage/SpecialNakedPages.php        2010-09-20 
09:36:10 UTC (rev 73369)
@@ -1,110 +0,0 @@
-<?php
-/**
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- * http://www.gnu.org/copyleft/gpl.html
- */
-
-  /*
-   * Special page that lists the texts that have no transclusions
-   * Pages in MediaWiki:Proofreadpage_notnaked_category are excluded.
-   * 
-   */
-
-class PagesWithoutScans extends SpecialPage {
-
-       function __construct() {
-               parent::__construct( 'PagesWithoutScans' );
-       }
-
-       function execute( $parameters ) {
-               global $wgOut, $wgRequest, $wgDisableTextSearch;
-               $this->setHeaders();
-               list( $limit, $offset ) = wfCheckLimits();
-               $cnl = new PagesWithoutScansQuery( );
-               $cnl->doQuery( $offset, $limit );
-       }
-}
-
-
-class PagesWithoutScansQuery extends QueryPage {
-
-       function __construct( ) {
-               wfLoadExtensionMessages( 'ProofreadPage' );
-               $this->page_namespace = preg_quote( wfMsgForContent( 
'proofreadpage_namespace' ), '/' );
-               $this->cat = wfMsgForContent( 'proofreadpage_notnaked_category' 
);
-       }
-
-       function getName() {
-               return 'PagesWithoutScans';
-       }
-
-       function isExpensive() {
-               return true;
-       }
-
-       function isSyndicated() {
-               return false;
-       }
-
-       function getSQL() {
-               global $wgContentNamespaces;
-
-               $dbr = wfGetDB( DB_SLAVE );
-               $page = $dbr->tableName( 'page' );
-               $templatelinks = $dbr->tableName( 'templatelinks' );
-               $categorylinks = $dbr->tableName( 'categorylinks' );
-               $forceindex = $dbr->useIndexClause("page_len");
-               $page_ns_index = MWNamespace::getCanonicalIndex( strtolower( 
$this->page_namespace ) );
-               $cat = $dbr->strencode( str_replace( ' ' , '_' , $this->cat ) );
-               $clause = "page_namespace=" . NS_MAIN . " AND 
page_is_redirect=0 AND page_id NOT IN ( SELECT DISTINCT tl_from FROM 
$templatelinks LEFT JOIN $page ON page_id=tl_from WHERE 
tl_namespace=$page_ns_index AND page_namespace=" . NS_MAIN . " ) AND page_id 
NOT IN ( SELECT DISTINCT cl_from FROM $categorylinks WHERE cl_to='$cat' )";
-
-               return
-                       "SELECT page_namespace as namespace,
-                               page_title as title,
-                               page_len AS value
-                       FROM $page $forceindex
-                       WHERE $clause";
-       }
-
-       function sortDescending() {
-               return true;
-       }
-
-       function formatResult( $skin, $result ) {
-               global $wgLang, $wgContLang;
-               $dm = $wgContLang->getDirMark();
-
-               $title = Title::makeTitleSafe( $result->namespace, 
$result->title );
-               if ( !$title ) {
-                       return '<!-- Invalid title ' .  htmlspecialchars( 
"{$result->namespace}:{$result->title}" ). '-->';
-               }
-               $hlink = $skin->linkKnown(
-                       $title,
-                       wfMsgHtml( 'hist' ),
-                       array(),
-                       array( 'action' => 'history' )
-               );
-               $plink = $this->isCached()
-                                       ? $skin->link( $title )
-                                       : $skin->linkKnown( $title );
-               $size = wfMsgExt( 'nbytes', array( 'parsemag', 'escape' ), 
$wgLang->formatNum( htmlspecialchars( $result->value ) ) );
-
-               return $title->exists()
-                               ? "({$hlink}) {$dm}{$plink} {$dm}[{$size}]"
-                               : "<s>({$hlink}) {$dm}{$plink} 
{$dm}[{$size}]</s>";
-       }
-}
-

Copied: trunk/extensions/ProofreadPage/SpecialPagesWithoutScans.php (from rev 
73368, trunk/extensions/ProofreadPage/SpecialNakedPages.php)
===================================================================
--- trunk/extensions/ProofreadPage/SpecialPagesWithoutScans.php                 
        (rev 0)
+++ trunk/extensions/ProofreadPage/SpecialPagesWithoutScans.php 2010-09-20 
09:36:10 UTC (rev 73369)
@@ -0,0 +1,110 @@
+<?php
+/**
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ */
+
+  /*
+   * Special page that lists the texts that have no transclusions
+   * Pages in MediaWiki:Proofreadpage_notnaked_category are excluded.
+   * 
+   */
+
+class PagesWithoutScans extends SpecialPage {
+
+       function __construct() {
+               parent::__construct( 'PagesWithoutScans' );
+       }
+
+       function execute( $parameters ) {
+               global $wgOut, $wgRequest, $wgDisableTextSearch;
+               $this->setHeaders();
+               list( $limit, $offset ) = wfCheckLimits();
+               $cnl = new PagesWithoutScansQuery( );
+               $cnl->doQuery( $offset, $limit );
+       }
+}
+
+
+class PagesWithoutScansQuery extends QueryPage {
+
+       function __construct( ) {
+               wfLoadExtensionMessages( 'ProofreadPage' );
+               $this->page_namespace = preg_quote( wfMsgForContent( 
'proofreadpage_namespace' ), '/' );
+               $this->cat = wfMsgForContent( 'proofreadpage_notnaked_category' 
);
+       }
+
+       function getName() {
+               return 'PagesWithoutScans';
+       }
+
+       function isExpensive() {
+               return true;
+       }
+
+       function isSyndicated() {
+               return false;
+       }
+
+       function getSQL() {
+               global $wgContentNamespaces;
+
+               $dbr = wfGetDB( DB_SLAVE );
+               $page = $dbr->tableName( 'page' );
+               $templatelinks = $dbr->tableName( 'templatelinks' );
+               $categorylinks = $dbr->tableName( 'categorylinks' );
+               $forceindex = $dbr->useIndexClause("page_len");
+               $page_ns_index = MWNamespace::getCanonicalIndex( strtolower( 
$this->page_namespace ) );
+               $cat = $dbr->strencode( str_replace( ' ' , '_' , $this->cat ) );
+               $clause = "page_namespace=" . NS_MAIN . " AND 
page_is_redirect=0 AND page_id NOT IN ( SELECT DISTINCT tl_from FROM 
$templatelinks LEFT JOIN $page ON page_id=tl_from WHERE 
tl_namespace=$page_ns_index AND page_namespace=" . NS_MAIN . " ) AND page_id 
NOT IN ( SELECT DISTINCT cl_from FROM $categorylinks WHERE cl_to='$cat' )";
+
+               return
+                       "SELECT page_namespace as namespace,
+                               page_title as title,
+                               page_len AS value
+                       FROM $page $forceindex
+                       WHERE $clause";
+       }
+
+       function sortDescending() {
+               return true;
+       }
+
+       function formatResult( $skin, $result ) {
+               global $wgLang, $wgContLang;
+               $dm = $wgContLang->getDirMark();
+
+               $title = Title::makeTitleSafe( $result->namespace, 
$result->title );
+               if ( !$title ) {
+                       return '<!-- Invalid title ' .  htmlspecialchars( 
"{$result->namespace}:{$result->title}" ). '-->';
+               }
+               $hlink = $skin->linkKnown(
+                       $title,
+                       wfMsgHtml( 'hist' ),
+                       array(),
+                       array( 'action' => 'history' )
+               );
+               $plink = $this->isCached()
+                                       ? $skin->link( $title )
+                                       : $skin->linkKnown( $title );
+               $size = wfMsgExt( 'nbytes', array( 'parsemag', 'escape' ), 
$wgLang->formatNum( htmlspecialchars( $result->value ) ) );
+
+               return $title->exists()
+                               ? "({$hlink}) {$dm}{$plink} {$dm}[{$size}]"
+                               : "<s>({$hlink}) {$dm}{$plink} 
{$dm}[{$size}]</s>";
+       }
+}
+



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

Reply via email to