From 20ec8b4958dc2d6a4a08f9b0dcae27c90f0155ef Mon Sep 17 00:00:00 2001 From: cweiske Date: Wed, 29 Sep 2010 20:50:38 +0000 Subject: test for api/posts/update git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@771 b3834d28-1941-0410-a4f8-b48e95affb8f --- www/api/posts_delete.php | 1 + www/api/posts_update.php | 46 +++++++++++++++++++++++++++++++++------------- 2 files changed, 34 insertions(+), 13 deletions(-) (limited to 'www/api') diff --git a/www/api/posts_delete.php b/www/api/posts_delete.php index 03cc968..69b2429 100644 --- a/www/api/posts_delete.php +++ b/www/api/posts_delete.php @@ -19,6 +19,7 @@ * @author Eric Dane * @license GPL http://www.gnu.org/licenses/gpl.html * @link http://sourceforge.net/projects/semanticscuttle + * @link http://www.delicious.com/help/api */ // Force HTTP authentication first! diff --git a/www/api/posts_update.php b/www/api/posts_update.php index 4aeedc3..4b080e2 100644 --- a/www/api/posts_update.php +++ b/www/api/posts_update.php @@ -1,24 +1,44 @@ + * @author Christian Weiske + * @author Eric Dane + * @license GPL http://www.gnu.org/licenses/gpl.html + * @link http://sourceforge.net/projects/semanticscuttle + * @link http://www.delicious.com/help/api + */ // Force HTTP authentication first! $httpContentType = 'text/xml'; require_once 'httpauth.inc.php'; -/* Service creation: only useful services are created */ -$bookmarkservice =SemanticScuttle_Service_Factory::get('Bookmark'); - - -// Get the posts relevant to the passed-in variables. -$bookmarks =& $bookmarkservice->getBookmarks(0, 1, $userservice->getCurrentUserId()); +$bs = SemanticScuttle_Service_Factory::get('Bookmark'); +$bookmarks = $bs->getBookmarks(0, 1, $userservice->getCurrentUserId()); // Set up the XML file and output all the tags. -echo '\r\n"; -foreach($bookmarks['bookmarks'] as $row) { - echo ''; +echo '\r\n"; +//foreach is used in case there are no bookmarks +foreach ($bookmarks['bookmarks'] as $row) { + echo ''; } ?> \ No newline at end of file -- cgit v1.2.3