<?php
/**
- * API for MediaWiki 1.8+
+ *
*
* Created on Jul 3, 2007
*
- * Copyright © 2007 Roan Kattouw <Firstname>.<Lastname>@home.nl
+ * Copyright © 2007 Roan Kattouw <Firstname>.<Lastname>@gmail.com
*
* 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
global $wgUser;
$params = $this->extractRequestParams();
- $titleObj = null;
-
if ( !$wgUser->isAllowed( 'undelete' ) ) {
$this->dieUsageMsg( array( 'permdenied-undelete' ) );
}
}
$pa = new PageArchive( $titleObj );
- $dbw = wfGetDB( DB_MASTER );
- $dbw->begin();
$retval = $pa->undelete( ( isset( $params['timestamps'] ) ? $params['timestamps'] : array() ), $params['reason'] );
if ( !is_array( $retval ) ) {
$this->dieUsageMsg( array( 'cannotundelete' ) );
) );
}
+ public function needsToken() {
+ return true;
+ }
+
public function getTokenSalt() {
return '';
}