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

Commit

Permalink
Merge pull request #1 from tobiasvl/search_arbitrary_tags
Browse files Browse the repository at this point in the history
Allow searching for arbitrary tags on documents
  • Loading branch information
nikolaik committed Mar 13, 2014
2 parents b4f02e3 + 351a404 commit a90cfa7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion inside/Documents.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,11 @@ function displayListTag($tag = NULL){
if ($tag == NULL){
return false;
}
$tags = implode("%' AND tags LIKE '%", explode(" ", $tag));
$sql = "SELECT d.*, dc.title AS category
FROM din_document d, din_documentcategory dc
WHERE d.documentcategory_id = dc.id " .
"AND tags LIKE '%$tag%' " .
"AND tags LIKE '%$tags%' " .
"ORDER BY name ASC";
$result =& $this->conn->query($sql);

Expand Down

0 comments on commit a90cfa7

Please sign in to comment.