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:
parent
bd759557ce
commit
cd89a58eae
@ -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();
|
||||
}
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user