* (bug 16626) action=delete now correctly handles empty "reason" param
authorAlex Z <mrzman@users.mediawiki.org>
Sat, 13 Dec 2008 21:07:18 +0000 (21:07 +0000)
committerAlex Z <mrzman@users.mediawiki.org>
Sat, 13 Dec 2008 21:07:18 +0000 (21:07 +0000)
RELEASE-NOTES
includes/api/ApiDelete.php

index 8a1115c..ede8c74 100644 (file)
@@ -505,6 +505,7 @@ The following extensions are migrated into MediaWiki 1.14:
 * (bug 16541) Added block expiry timestamp to list=logevents output
 * (bug 16613) action=protect doesn't tell when &cascade was set but cascading
   protection wasn't allowed 
+* (bug 16626) action=delete now correctly handles empty "reason" param
 
 === Languages updated in 1.14 ===
 
index 16cae5b..575a259 100644 (file)
@@ -161,7 +161,8 @@ class ApiDelete extends ApiBase {
                        
                if( !FileDeleteForm::haveDeletableFile($file, $oldfile, $oldimage) )
                        return array(array('nofile'));
-
+               if (is_null($reason)) # Log and RC don't like null reasons
+                       $reason = '';
                $status = FileDeleteForm::doDelete( $title, $file, $oldimage, $reason, $suppress );
                                
                if( !$status->isGood() )