Skip to content

Commit

Permalink
Merge pull request #6082 from alikon/patch-2
Browse files Browse the repository at this point in the history
[#6054] - SQL Errors in search tag with MSSQL.
  • Loading branch information
rdeutz committed Oct 20, 2015
2 parents ec81f95 + e55cf16 commit 16cb493
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 3 deletions.
1 change: 0 additions & 1 deletion plugins/search/contacts/contacts.php
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,6 @@ public function onContentSearch($text, $phrase = '', $ordering = '', $areas = nu
. ' OR a.fax LIKE ' . $text . ') AND a.published IN (' . implode(',', $state) . ') AND c.published=1 '
. ' AND a.access IN (' . $groups . ') AND c.access IN (' . $groups . ')'
)
->group('a.id, a.con_position, a.misc, c.alias, c.id')
->order($order);

// Filter by language.
Expand Down
2 changes: 1 addition & 1 deletion plugins/search/content/content.php
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ public function onContentSearch($text, $phrase = '', $ordering = '', $areas = nu
. 'AND (a.publish_up = ' . $db->quote($nullDate) . ' OR a.publish_up <= ' . $db->quote($now) . ') '
. 'AND (a.publish_down = ' . $db->quote($nullDate) . ' OR a.publish_down >= ' . $db->quote($now) . ')'
)
->group('a.id, a.title, a.metadesc, a.metakey, a.created, a.introtext, a.fulltext, c.title, a.alias, c.alias, c.id')
->group('a.id, a.title, a.metadesc, a.metakey, a.created, a.language, a.catid, a.introtext, a.fulltext, c.title, a.alias, c.alias, c.id')
->order($order);

// Filter by language.
Expand Down
2 changes: 1 addition & 1 deletion plugins/search/tags/tags.php
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ public function onContentSearch($text, $phrase = '', $ordering = '', $areas = nu
$query->select('a.id, a.title, a.alias, a.note, a.published, a.access' .
', a.checked_out, a.checked_out_time, a.created_user_id' .
', a.path, a.parent_id, a.level, a.lft, a.rgt' .
', a.language, a.created_time AS created, a.note, a.description');
', a.language, a.created_time AS created, a.description');

$case_when_item_alias = ' CASE WHEN ';
$case_when_item_alias .= $query->charLength('a.alias', '!=', '0');
Expand Down

0 comments on commit 16cb493

Please sign in to comment.