Skip to content

Commit 29acfd9

Browse files
committed
More quoteName
1 parent dd9326f commit 29acfd9

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

modules/mod_related_items/Helper/RelatedItemsHelper.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,8 @@ public static function getList(&$params)
7171
if ($id)
7272
{
7373
// Select the meta keywords from the item
74-
$query->select('metakey')
75-
->from('#__content')
74+
$query->select($db->quoteName('metakey'))
75+
->from($db->quoteName('#__content'))
7676
->where($db->quoteName('id') . ' = :id')
7777
->bind(':id', $id, ParameterType::INTEGER);
7878
$db->setQuery($query);
@@ -133,8 +133,8 @@ public static function getList(&$params)
133133
}
134134

135135
$query->where('(' . implode(' OR ', $wheres) . ')')
136-
->where('(a.publish_up = :nullDate1 OR a.publish_up <= :nowDate1)')
137-
->where('(a.publish_down = :nullDate2 OR a.publish_down >= :nowDate2)')
136+
->where('('. $db->quoteName('a.publish_up') . ' = :nullDate1 OR ' . $db->quoteName('a.publish_up') . ' <= :nowDate1)')
137+
->where('('. $db->quoteName('a.publish_down') . ' = :nullDate2 OR ' . $db->quoteName('a.publish_down') . ' >= :nowDate2)')
138138
->bind(':nullDate1', $nullDate)
139139
->bind(':nullDate2', $nullDate)
140140
->bind(':nowDate1', $now)

0 commit comments

Comments
 (0)