}
public function execute( $par ) {
- # Check for database lock
- if ( wfReadOnly() ) {
- throw new ReadOnlyError;
- }
+ $this->checkReadOnly();
$this->setHeaders();
$this->outputHeader();
$out->addWikiMsg( 'movepagetalktext' );
}
- $token = htmlspecialchars( $user->editToken() );
+ $token = htmlspecialchars( $user->getEditToken() );
if ( !empty($err) ) {
$out->addSubtitle( $this->msg( 'formerror' ) );
$reason = wfMessage( 'delete_and_move_reason', $ot )->inContentLanguage()->text();
// Delete an associated image if there is
- $file = wfLocalFile( $nt );
- if( $file->exists() ) {
- $file->delete( $reason, false );
+ if ( $nt->getNamespace() == NS_FILE ) {
+ $file = wfLocalFile( $nt );
+ if ( $file->exists() ) {
+ $file->delete( $reason, false );
+ }
}
$error = ''; // passed by ref