Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix queries on PostgreSQL #259

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion plugins/system/helixultimate/helixultimate.php
Original file line number Diff line number Diff line change
Expand Up @@ -670,7 +670,7 @@ private function getTemplateName($id = 0)

if (empty($id))
{
$query->where($db->quoteName('home') . ' = 1');
$query->where($db->quoteName('home') . ' = ' . $db->quote('1', false));
}
else
{
Expand Down
2 changes: 1 addition & 1 deletion plugins/system/helixultimate/layout/settings/settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,7 @@ static public function getTemplateName()
$query->select($db->quoteName(array('template')));
$query->from($db->quoteName('#__template_styles'));
$query->where($db->quoteName('client_id') . ' = 0');
$query->where($db->quoteName('home') . ' = 1');
$query->where($db->quoteName('home') . ' = ' . $db->quote('1', false));
$db->setQuery($query);

return $db->loadObject()->template;
Expand Down
4 changes: 2 additions & 2 deletions plugins/system/helixultimate/src/Platform/Blog.php
Original file line number Diff line number Diff line change
Expand Up @@ -258,8 +258,8 @@ private static function getTemplate()

$query->select($db->quoteName(array('template', 'params')));
$query->from($db->quoteName('#__template_styles'));
$query->where($db->quoteName('client_id') . ' = ' . $db->quote(0));
$query->where($db->quoteName('home') . ' = ' . $db->quote(1));
$query->where($db->quoteName('client_id') . ' = 0');
$query->where($db->quoteName('home') . ' = ' . $db->quote('1', false));

$db->setQuery($query);

Expand Down
2 changes: 1 addition & 1 deletion plugins/system/helixultimate/src/Platform/Helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ public static function getTemplateId($template) : int

if (Multilanguage::isEnabled())
{
$query->where($db->quoteName('home') . ' IN(' . $db->quote(Factory::getLanguage()->getTag()) . ', 1)');
$query->where($db->quoteName('home') . ' IN(' . $db->quote(Factory::getLanguage()->getTag()) . ', ' . $db->quote('1', false) . ')');
}

$db->setQuery($query);
Expand Down