* @ingroup Maintenance
*/
-require_once( __DIR__ . '/Maintenance.php' );
+require_once __DIR__ . '/Maintenance.php';
class Undelete extends Maintenance {
public function __construct() {
if ( !$wgUser ) {
$this->error( "Invalid username", true );
}
- $archive = new PageArchive( $title );
+ $archive = new PageArchive( $title, RequestContext::getMain()->getConfig() );
$this->output( "Undeleting " . $title->getPrefixedDBkey() . '...' );
$archive->undelete( array(), $reason );
$this->output( "done\n" );