* @package MediaWiki
*/
-/**
- *
- */
-require_once 'Feed.php';
-
/**
* List of query page classes and their associated special pages, for periodic update purposes
*/
array( 'ShortPagesPage', 'Shortpages' ),
array( 'UncategorizedCategoriesPage', 'Uncategorizedcategories' ),
array( 'UncategorizedPagesPage', 'Uncategorizedpages' ),
+ array( 'UncategorizedImagesPage', 'Uncategorizedimages' ),
array( 'UnusedCategoriesPage', 'Unusedcategories' ),
array( 'UnusedimagesPage', 'Unusedimages' ),
array( 'WantedCategoriesPage', 'Wantedcategories' ),
*
* @package MediaWiki
*/
-abstract class QueryPage {
+class QueryPage {
/**
* Whether or not we want plain listoutput rather than an ordered list
*
* @var bool
*/
- private $listoutput = false;
+ var $listoutput = false;
/**
* The offset and limit in use, as passed to the query() function
*
* @var integer
*/
- protected $offset = 0;
- protected $limit = 0;
+ var $offset = 0;
+ var $limit = 0;
/**
* A mutator for $this->listoutput;
* @return Title
*/
function getTitle() {
- return Title::makeTitle( NS_SPECIAL, $this->getName() );
+ return SpecialPage::getTitleFor( $this->getName() );
}
/**
}
/**
- * Formats the results of the query for display. The skin is the current
- * skin; you can use it for making links. The result is a single row of
- * result data. You should be able to grab SQL results off of it.
+ * Formats the results of the query for display. The result is a single
+ * row of result data. You should be able to grab SQL results off of it.
* If the function return "false", the line output will be skipped.
*/
- function formatResult( $skin, $result ) {
+ function formatResult( $result ) {
return '';
}
* @param $shownavigation show navigation like "next 200"?
*/
function doQuery( $offset, $limit, $shownavigation=true ) {
- global $wgUser, $wgOut, $wgLang, $wgContLang;
+ global $wgOut, $wgLang, $wgContLang;
$this->offset = $offset;
$this->limit = $limit;
$this->preprocessResults( $dbr, $res );
- $sk = $wgUser->getSkin( );
-
if($shownavigation) {
$wgOut->addHTML( $this->getPageHeader() );
$top = wfShowingResults( $offset, $num);
# Only read at most $num rows, because $res may contain the whole 1000
for ( $i = 0; $i < $num && $obj = $dbr->fetchObject( $res ); $i++ ) {
- $format = $this->formatResult( $sk, $obj );
+ $format = $this->formatResult( $obj );
if ( $format ) {
$attr = ( isset ( $obj->usepatrol ) && $obj->usepatrol &&
$obj->patrolled == 0 ) ? ' class="not-patrolled"' : '';
if($this->tryLastResult()) {
// flush the very last result
$obj = null;
- $format = $this->formatResult( $sk, $obj );
+ $format = $this->formatResult( $obj );
if( $format ) {
$attr = ( isset ( $obj->usepatrol ) && $obj->usepatrol &&
$obj->patrolled == 0 ) ? ' class="not-patrolled"' : '';
}
function feedTitle() {
- global $wgLanguageCode, $wgSitename;
+ global $wgContLanguageCode, $wgSitename;
$page = SpecialPage::getPage( $this->getName() );
$desc = $page->getDescription();
- return "$wgSitename - $desc [$wgLanguageCode]";
+ return "$wgSitename - $desc [$wgContLanguageCode]";
}
function feedDesc() {
}
function feedUrl() {
- $title = Title::MakeTitle( NS_SPECIAL, $this->getName() );
+ $title = SpecialPage::getTitleFor( $this->getName() );
return $title->getFullURL();
}
}
*/
class PageQueryPage extends QueryPage {
- function formatResult( $skin, $result ) {
+ function formatResult( $result ) {
global $wgContLang;
$nt = Title::makeTitle( $result->namespace, $result->title );
- return $skin->makeKnownLinkObj( $nt, htmlspecialchars( $wgContLang->convert( $nt->getPrefixedText() ) ) );
+ return Linker::makeKnownLinkObj( $nt, htmlspecialchars( $wgContLang->convert( $nt->getPrefixedText() ) ) );
}
}