reportSpam() should always indicate success.
authorMichael M Slusarz <slusarz@curecanti.org>
Thu, 13 May 2010 03:29:53 +0000 (21:29 -0600)
committerMichael M Slusarz <slusarz@curecanti.org>
Thu, 13 May 2010 03:29:53 +0000 (21:29 -0600)
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

index ae4457a..b51a8d6 100644 (file)
@@ -732,14 +732,14 @@ class IMP_Ajax_Application extends Horde_Ajax_Application_Base
      *         string).
      * </pre>
      *
-     * @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);