Skip to content
This repository was archived by the owner on Oct 11, 2024. It is now read-only.

Commit a90cfa7

Browse files
committed
Merge pull request #1 from tobiasvl/search_arbitrary_tags
Allow searching for arbitrary tags on documents
2 parents b4f02e3 + 351a404 commit a90cfa7

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

inside/Documents.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,10 +90,11 @@ function displayListTag($tag = NULL){
9090
if ($tag == NULL){
9191
return false;
9292
}
93+
$tags = implode("%' AND tags LIKE '%", explode(" ", $tag));
9394
$sql = "SELECT d.*, dc.title AS category
9495
FROM din_document d, din_documentcategory dc
9596
WHERE d.documentcategory_id = dc.id " .
96-
"AND tags LIKE '%$tag%' " .
97+
"AND tags LIKE '%$tags%' " .
9798
"ORDER BY name ASC";
9899
$result =& $this->conn->query($sql);
99100

0 commit comments

Comments
 (0)