Skip to content

Commit

Permalink
switched to like
Browse files Browse the repository at this point in the history
  • Loading branch information
alikon committed Feb 26, 2015
1 parent 2ced4c4 commit 861025f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 11 deletions.
7 changes: 3 additions & 4 deletions administrator/components/com_modules/models/modules.php
Original file line number Diff line number Diff line change
Expand Up @@ -328,10 +328,9 @@ protected function getListQuery()
$query->where('a.id = ' . (int) substr($search, 3));
}
else
{
$escapedSearchString = $this->refineSearchStringToRegex($search, '/');
$search = $db->quote($escapedSearchString);
$query->where('(' . 'a.title ' . $query->regexp($search) . ' OR a.note ' . $query->regexp($search) . ')');
{
$search = $db->quote('%'.strtolower($search).'%');
$query->where('(' . 'LOWER(a.title) LIKE ' . $search . ' OR LOWER(a.note) LIKE ' . $search . ')');
}
}

Expand Down
7 changes: 3 additions & 4 deletions administrator/components/com_templates/models/styles.php
Original file line number Diff line number Diff line change
Expand Up @@ -151,10 +151,9 @@ protected function getListQuery()
$query->where('a.id = ' . (int) substr($search, 3));
}
else
{
$escapedSearchString = $this->refineSearchStringToRegex($search, '/');
$search = $db->quote($escapedSearchString);
$query->where('(' . 'a.template ' . $query->regexp($search) . ' OR a.title ' . $query->regexp($search) . ')');
{
$search = $db->quote('%'.strtolower($search).'%');
$query->where('(' . 'LOWER(a.template) LIKE ' . $search . ' OR LOWER(a.title) LIKE ' . $search . ')');
}
}

Expand Down
5 changes: 2 additions & 3 deletions administrator/components/com_templates/models/templates.php
Original file line number Diff line number Diff line change
Expand Up @@ -110,9 +110,8 @@ protected function getListQuery()
}
else
{
$escapedSearchString = $this->refineSearchStringToRegex($search, '/');
$search = $db->quote($escapedSearchString);
$query->where('(' . 'a.element ' . $query->regexp($search) . ' OR a.name ' . $query->regexp($search) . ')');
$search = $db->quote('%'.strtolower($search).'%');
$query->where('(' . 'LOWER(a.element) LIKE ' . $search . ' OR LOWER(a.name) LIKE ' . $search . ')');
}
}

Expand Down

0 comments on commit 861025f

Please sign in to comment.