From cb0f88c7e54a7dfe03130e5cf1bfac29d8083367 Mon Sep 17 00:00:00 2001 From: Michael M Slusarz Date: Wed, 12 May 2010 21:29:53 -0600 Subject: [PATCH] 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. --- imp/lib/Ajax/Application.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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); -- 2.11.0