1
0
mirror of https://github.com/owncloud/bookmarks.git synced 2025-01-31 01:52:11 +01:00

Replace space to , as the tag separator

This commit is contained in:
Brice Maron 2012-06-27 11:35:02 +02:00
parent bd759557ce
commit cd89a58eae
2 changed files with 2 additions and 2 deletions

View File

@ -40,7 +40,7 @@ if(!isset($_GET['url']) || trim($_GET['url']) == '') {
}elseif(isset($_POST['url'])) {
$tags = isset($_POST['item']['tags']) ? $_POST['item']['tags'] : array();
$pub = isset($_POST['is_public']) ? true : false;
$bm = addBookmark($_POST['url'], $_POST['title'], implode(' ',$tags),$_POST['desc'], $pub);
$bm = addBookmark($_POST['url'], $_POST['title'], implode(',',$tags),$_POST['desc'], $pub);
OCP\JSON::success(array('id'=>$bm));
exit();
}

View File

@ -106,7 +106,7 @@ function addBookmark($url, $title, $tags='', $description='', $is_public=false)
VALUES (?, ?)
");
$tags = explode(' ', urldecode($tags));
$tags = explode(',', urldecode($tags));
foreach ($tags as $tag) {
if(empty($tag)) {
//avoid saving blankspaces