[ticket/286] Use get_ methods for dbal properties

B3P-286
This commit is contained in:
Marc Alexander
2014-07-06 19:14:15 +02:00
parent ed8d2e2412
commit 3ce983c7b6
2 changed files with 4 additions and 4 deletions

View File

@@ -86,12 +86,12 @@ class birthday_list extends module_base
while ($cache_days > 0) while ($cache_days > 0)
{ {
$day = phpbb_gmgetdate($time->getTimestamp() + 86400 * $cache_days + $time->getOffset()); $day = phpbb_gmgetdate($time->getTimestamp() + 86400 * $cache_days + $time->getOffset());
$like_expression = $this->db->sql_like_expression($this->db->any_char . (sprintf('%2d-%2d-', $day['mday'], $day['mon'])) . $this->db->any_char); $like_expression = $this->db->sql_like_expression($this->db->get_any_char() . (sprintf('%2d-%2d-', $day['mday'], $day['mon'])) . $this->db->get_any_char());
$sql_days .= " OR u.user_birthday " . $like_expression . ""; $sql_days .= " OR u.user_birthday " . $like_expression . "";
$cache_days--; $cache_days--;
} }
switch ($this->db->sql_layer) switch ($this->db->get_sql_layer())
{ {
case 'mssql': case 'mssql':
case 'mssql_odbc': case 'mssql_odbc':
@@ -114,7 +114,7 @@ class birthday_list extends module_base
), ),
'WHERE' => "(b.ban_id IS NULL 'WHERE' => "(b.ban_id IS NULL
OR b.ban_exclude = 1) OR b.ban_exclude = 1)
AND (u.user_birthday " . $this->db->sql_like_expression($this->db->any_char . sprintf('%2d-%2d-', $now['mday'], $now['mon']) . $this->db->any_char) . " {$sql_days}) AND (u.user_birthday " . $this->db->sql_like_expression($this->db->get_any_char() . sprintf('%2d-%2d-', $now['mday'], $now['mon']) . $this->db->get_any_char()) . " {$sql_days})
AND " . $this->db->sql_in_set('u.user_type', array(USER_NORMAL , USER_FOUNDER)), AND " . $this->db->sql_in_set('u.user_type', array(USER_NORMAL , USER_FOUNDER)),
'ORDER BY' => $order_by, 'ORDER BY' => $order_by,
); );

View File

@@ -75,7 +75,7 @@ class random_member extends module_base
*/ */
public function get_template_side($module_id) public function get_template_side($module_id)
{ {
switch ($this->db->sql_layer) switch ($this->db->get_sql_layer())
{ {
case 'postgres': case 'postgres':
$sql = 'SELECT * $sql = 'SELECT *