summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorArthur Schiwon <blizzz@arthur-schiwon.de>2011-08-23 11:57:56 +0200
committerArthur Schiwon <blizzz@arthur-schiwon.de>2011-08-23 11:57:56 +0200
commit72a4703d82da28fd08ae60a62bbfff253bff998f (patch)
treee91f0c5b9e1cc6afe8471722f893237b08a985b1 /apps
parent53f0381f0f5dc2187a904fe7c32b94bceda1a53d (diff)
downloadnextcloud-server-72a4703d82da28fd08ae60a62bbfff253bff998f.tar.gz
nextcloud-server-72a4703d82da28fd08ae60a62bbfff253bff998f.zip
simplify bookmarks tag filter sql
Diffstat (limited to 'apps')
-rw-r--r--apps/bookmarks/ajax/updateList.php8
1 files changed, 2 insertions, 6 deletions
diff --git a/apps/bookmarks/ajax/updateList.php b/apps/bookmarks/ajax/updateList.php
index 7be14b9609b..1eb40c0fbc2 100644
--- a/apps/bookmarks/ajax/updateList.php
+++ b/apps/bookmarks/ajax/updateList.php
@@ -39,13 +39,9 @@ $params=array(OC_User::getUser());
$CONFIG_DBTYPE = OC_Config::getValue( "dbtype", "sqlite" );
//Filter for tag?
-$filterTag = isset($_GET["tag"]) ? urldecode($_GET["tag"]) : false;
+$filterTag = isset($_GET["tag"]) ? '%' . urldecode($_GET["tag"]) . '%' : false;
if($filterTag){
- if( $CONFIG_DBTYPE == 'sqlite' or $CONFIG_DBTYPE == 'sqlite3' ){
- $sqlFilterTag = "HAVING tags LIKE '%' || ? || '%'";
- } else {
- $sqlFilterTag = "HAVING INSTR (tags, ?) > 0";
- }
+ $sqlFilterTag = 'HAVING tags LIKE ?';
$params[] = $filterTag;
} else {
$sqlFilterTag = '';