From: Victor Vasiliev Date: Mon, 29 Dec 2008 19:19:49 +0000 (+0000) Subject: * Image moving over an existing file no longer throws a database error X-Git-Tag: 1.31.0-rc.0~43708 X-Git-Url: http://git.cyclocoop.org/%22%2C%20generer_url_ecrire%28?a=commitdiff_plain;h=4eb71deed7c3b5d622d1383e114e0c56466c5292;p=lhc%2Fweb%2Fwiklou.git * Image moving over an existing file no longer throws a database error --- diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 8f3d1301c8..7d6d2f127d 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -458,6 +458,7 @@ The following extensions are migrated into MediaWiki 1.14: * (bug 16772) Special:Upload now correctly rejects files with spaces in the file extension (e.g. Foo. jpg). * Ensure that all HTML id's begin with a letter as required by XHTML standard +* Image moving over an existing file no longer throws a database error === API changes in 1.14 === diff --git a/includes/specials/SpecialMovepage.php b/includes/specials/SpecialMovepage.php index 4fc8b2ed3b..ba7e808bb1 100644 --- a/includes/specials/SpecialMovepage.php +++ b/includes/specials/SpecialMovepage.php @@ -305,6 +305,12 @@ class MovePageForm { return; } + // Delete an associated image if there is + $file = wfLocalFile( $nt ); + if( $file->exists() ) { + $file->delete( wfMsgForContent( 'delete_and_move_reason' ), false ); + } + // This may output an error message and exit $article->doDelete( wfMsgForContent( 'delete_and_move_reason' ) ); }