<?
-global $IP;
-include_once ( "$IP/LogPage.php" ) ;
+
+include_once ( "LogPage.php" ) ;
function wfSpecialWantedpages()
{
global $wgUser, $wgOut, $wgLang, $wgTitle;
- global $limit, $offset; # From query string
$fname = "wfSpecialWantedpages";
# Cache
$vsp = $wgLang->getValidSpecialPages() ;
- $mw = $vsp["Wantedpages"] ;
- $mw = str_replace ( " " , "_" , $mw ) ; # DBKEY
- $log = new LogPage ( $mw ) ;
- $log->mUpdateRecentChanges = false ;
+ $log = new LogPage( $vsp["Wantedpages"] );
+ $log->mUpdateRecentChanges = false;
$wgOut->setRobotpolicy( "noindex,nofollow" );
global $wgMiserMode;
if ( $wgMiserMode ) {
- $s = "=== " . wfMsg( "perfdisabled" ) . " ===\n" ;
- $s .= $log->getContent() ;
- $wgOut->addWikiText ( $s ) ;
+ $log->showAsDisabledPage();
return;
}
- if ( ! $limit ) {
- $limit = $wgUser->getOption( "rclimit" );
- if ( ! $limit ) { $limit = 50; }
- }
- if ( ! $offset ) { $offset = 0; }
+ list( $limit, $offset ) = wfCheckLimits();
$cache = "" ; # To be saved, eventually
# Saving cache
if ( $offset > 0 OR $limit < 50 ) return ; #Not suitable
- $log->mContent = $cache ;
- $log->mContentLoaded = true ;
- $log->saveContent() ;
+ $log->replaceContent( $s );
}
?>