From: Michael M Slusarz Date: Thu, 13 May 2010 03:29:53 +0000 (-0600) Subject: reportSpam() should always indicate success. X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=cb0f88c7e54a7dfe03130e5cf1bfac29d8083367;p=horde.git reportSpam() should always indicate success. 0 indicates no messages were moved, not an error. Error messages will be transmitted to the user via notifications, if necessary. --- diff --git a/imp/lib/Ajax/Application.php b/imp/lib/Ajax/Application.php index ae4457afd..b51a8d624 100644 --- a/imp/lib/Ajax/Application.php +++ b/imp/lib/Ajax/Application.php @@ -732,14 +732,14 @@ class IMP_Ajax_Application extends Horde_Ajax_Application_Base * string). * * - * @return mixed False on failure, or an object (see - * _generateDeleteResult() for format). + * @return mixed If messages were deleted, data as returned by + * _generateDeleteResult(). Else, true. */ public function reportSpam() { $change = $this->_changed(false); $indices = new IMP_Indices($this->_vars->uid); - $result = false; + $result = true; if (IMP_Spam::reportSpam($indices, $this->_vars->spam ? 'spam' : 'notspam')) { $result = $this->_generateDeleteResult($indices, $change);