mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-28 08:14:38 +02:00
Fixed special days in oracle. Ticket#2904
This commit is contained in:
parent
0b1099e4c3
commit
7aed427a7a
@ -64,8 +64,15 @@ if ($create_special_day) {
|
||||
$result = '';
|
||||
}
|
||||
else {
|
||||
$date_check = db_get_value ('date', 'talert_special_days', 'date
|
||||
', $date);
|
||||
$date_check = '';
|
||||
switch ($config['dbtype']) {
|
||||
case "mysql":
|
||||
$date_check = db_get_value ('date', 'talert_special_days', 'date', $date);
|
||||
break;
|
||||
case "oracle":
|
||||
$date_check = db_get_value ('"date"', 'talert_special_days', '"date"', $date);
|
||||
break;
|
||||
}
|
||||
if ($date_check == $date) {
|
||||
$result = '';
|
||||
}
|
||||
|
@ -1777,7 +1777,20 @@ function alerts_create_alert_special_day ($date, $same_day, $values = false) {
|
||||
|
||||
if (! is_array ($values))
|
||||
$values = array ();
|
||||
$values['date'] = $date;
|
||||
|
||||
global $config;
|
||||
$date_db = '';
|
||||
|
||||
switch ($config['dbtype']) {
|
||||
case "mysql":
|
||||
$date_db = 'date';
|
||||
break;
|
||||
case "oracle":
|
||||
$date_db = '"date"';
|
||||
break;
|
||||
}
|
||||
|
||||
$values[$date_db] = $date;
|
||||
$values['same_day'] = $same_day;
|
||||
|
||||
return @db_process_sql_insert ('talert_special_days', $values);
|
||||
|
Loading…
x
Reference in New Issue
Block a user