Skip to content

Commit

Permalink
Fix small code style issues
Browse files Browse the repository at this point in the history
  • Loading branch information
wilsonge committed Dec 3, 2017
1 parent 6e1c893 commit d3726fb
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions plugins/search/content/content.php
Expand Up @@ -48,12 +48,12 @@ public function onContentSearchAreas()
*/
public function onContentSearch($text, $phrase = '', $ordering = '', $areas = null)
{
$db = JFactory::getDbo();
$serverType = $db->serverType;
$app = JFactory::getApplication();
$user = JFactory::getUser();
$groups = implode(',', $user->getAuthorisedViewLevels());
$tag = JFactory::getLanguage()->getTag();
$db = JFactory::getDbo();
$serverType = $db->serverType;
$app = JFactory::getApplication();
$user = JFactory::getUser();
$groups = implode(',', $user->getAuthorisedViewLevels());
$tag = JFactory::getLanguage()->getTag();

JLoader::register('ContentHelperRoute', JPATH_SITE . '/components/com_content/helpers/route.php');
JLoader::register('SearchHelper', JPATH_ADMINISTRATOR . '/components/com_search/helpers/search.php');
Expand Down Expand Up @@ -115,6 +115,7 @@ public function onContentSearch($text, $phrase = '', $ordering = '', $areas = nu

$db->setQuery($subQuery);
$fieldids = $db->loadColumn();

if (count($fieldids))
{
$wheres2[] = 'a.id IN(' . implode(",", $fieldids) . ')';
Expand Down Expand Up @@ -167,6 +168,7 @@ public function onContentSearch($text, $phrase = '', $ordering = '', $areas = nu
{
$db->setQuery($subQuery);
$fieldids = $db->loadColumn();

if (count($fieldids))
{
$wheres2[] = 'a.id IN(' . implode(",", $fieldids) . ')';
Expand Down Expand Up @@ -206,6 +208,7 @@ public function onContentSearch($text, $phrase = '', $ordering = '', $areas = nu
{
$db->setQuery($subQuery);
$fieldids = $db->loadColumn();

if (count($fieldids))
{
$wheres[] = 'a.id IN(' . implode(",", $fieldids) . ')';
Expand Down

0 comments on commit d3726fb

Please sign in to comment.