diff options
author | cweiske <cweiske@b3834d28-1941-0410-a4f8-b48e95affb8f> | 2010-03-28 18:08:38 +0000 |
---|---|---|
committer | cweiske <cweiske@b3834d28-1941-0410-a4f8-b48e95affb8f> | 2010-03-28 18:08:38 +0000 |
commit | 74dc9ea6a4e553f38a97928617074fd76793c783 (patch) | |
tree | e50ec7dce1f4855f9447bb8f23ea21381aad0390 /www/api/export_csv.php | |
parent | 90f7d528d3f34a57d517cca268766bdbae161585 (diff) | |
download | semanticscuttle-74dc9ea6a4e553f38a97928617074fd76793c783.tar.gz semanticscuttle-74dc9ea6a4e553f38a97928617074fd76793c783.tar.bz2 |
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
Diffstat (limited to 'www/api/export_csv.php')
-rw-r--r-- | www/api/export_csv.php | 15 |
1 files changed, 10 insertions, 5 deletions
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'; |