From 74dc9ea6a4e553f38a97928617074fd76793c783 Mon Sep 17 00:00:00 2001 From: cweiske Date: Sun, 28 Mar 2010 18:08:38 +0000 Subject: make export_csv support filtering to multiple tags git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@702 b3834d28-1941-0410-a4f8-b48e95affb8f --- www/api/export_csv.php | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'www') diff --git a/www/api/export_csv.php b/www/api/export_csv.php index b9cf497..43951ec 100644 --- a/www/api/export_csv.php +++ b/www/api/export_csv.php @@ -10,13 +10,18 @@ header("Content-disposition: filename=exportBookmarks.csv"); $bookmarkservice =SemanticScuttle_Service_Factory::get('Bookmark'); // Check to see if a tag was specified. -if (isset($_REQUEST['tag']) && (trim($_REQUEST['tag']) != '')) - $tag = trim($_REQUEST['tag']); -else - $tag = NULL; +if (isset($_REQUEST['tag']) && (trim($_REQUEST['tag']) != '')) { + //$_GET vars have + replaced to " " automatically + $tag = str_replace(' ', '+', trim($_REQUEST['tag'])); +} else { + $tag = null; +} // Get the posts relevant to the passed-in variables. -$bookmarks =& $bookmarkservice->getBookmarks(0, NULL, $userservice->getCurrentUserId(), $tag, NULL, getSortOrder()); +$bookmarks = $bookmarkservice->getBookmarks( + 0, null, $userservice->getCurrentUserId(), + $tag, null, getSortOrder() +); //columns titles echo 'url;title;tags;description'; -- cgit v1.2.3