summaryrefslogtreecommitdiff
path: root/app/Models/EntryDAO.php
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2013-12-16 22:03:16 +0100
committerGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2013-12-16 22:03:16 +0100
commitba71d7747a8b0847ad59ff56870378b341c5171d (patch)
tree72b0dfd3dbac1aefaca4d13dd0f6a6d0dc48e895 /app/Models/EntryDAO.php
parenta1f8bade6176f03a6e2399d5de24975bb47d09d6 (diff)
SQL : permet recherche du caractère dièse
Diffstat (limited to 'app/Models/EntryDAO.php')
-rw-r--r--app/Models/EntryDAO.php8
1 files changed, 3 insertions, 5 deletions
diff --git a/app/Models/EntryDAO.php b/app/Models/EntryDAO.php
index 2af511527..d1f595d42 100644
--- a/app/Models/EntryDAO.php
+++ b/app/Models/EntryDAO.php
@@ -318,11 +318,9 @@ class FreshRSS_EntryDAO extends Minz_ModelPdo {
foreach ($terms as $word) {
$word = trim($word);
if (strlen($word) > 0) {
- if ($word[0] === '#') {
- if (isset($word[1])) {
- $search .= 'AND e1.tags LIKE ? ';
- $values[] = '%' . $word .'%';
- }
+ if ($word[0] === '#' && isset($word[1])) {
+ $search .= 'AND e1.tags LIKE ? ';
+ $values[] = '%' . $word .'%';
} else {
$search .= 'AND CONCAT(e1.title, UNCOMPRESS(e1.content_bin)) LIKE ? ';
$values[] = '%' . $word .'%';