[dev] [PATCH] trean: return status in addBookmark
Robert Trace
maillist-sender-94b1d4 at farcaster.org
Thu May 13 22:53:09 PDT 2004
Trean doesn't appear to return any status when trying to add a bookmark.
If the backend fails to add the bookmark, the status is silently
dropped and it appears to the calling routine as though the add
succeeded when it most obviously didn't. (Most obvious because my huge
import of bookmarks missed several when the category filled up.)
The attached patch corrects this by returning the status from the
backend add operation.
-- Robert Trace
-------------- next part --------------
Index: lib/Bookmarks.php
===================================================================
--- lib/Bookmarks.php (.../vendor/horde/trean) (revision 26)
+++ lib/Bookmarks.php (.../trunk/horde/trean) (revision 26)
@@ -293,12 +293,14 @@
*/
function addBookmark(&$bookmark)
{
+ $ret = false;
$name = $bookmark->getName();
$this->data['bookmarks'][$name] = $bookmark;
if ($this->_bookmarksOb->_bookmarks->exists($this->getName())) {
- $this->_bookmarksOb->updateCategory($this);
+ $ret = $this->_bookmarksOb->updateCategory($this);
}
+ return $ret;
}
/**
More information about the dev
mailing list