projects
/
fa-stable.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Rerun of connect_db_mysqli.inc.
[fa-stable.git]
/
includes
/
date_functions.inc
diff --git
a/includes/date_functions.inc
b/includes/date_functions.inc
index e90e2e781e6b37fdc5c819d666d7f7127a948e5f..2538f79d65f3edc24c031ae23f176a5359e10592 100644
(file)
--- a/
includes/date_functions.inc
+++ b/
includes/date_functions.inc
@@
-350,7
+350,8
@@
function sql2date($date_)
global $SysPrefs;
//for MySQL dates are in the format YYYY-mm-dd
global $SysPrefs;
//for MySQL dates are in the format YYYY-mm-dd
-
+ if ($date_ == null)
+ return "";
if (strpos($date_, "/"))
{ // In MySQL it could be either / or -
list($year, $month, $day) = explode("/", $date_);
if (strpos($date_, "/"))
{ // In MySQL it could be either / or -
list($year, $month, $day) = explode("/", $date_);
@@
-396,12
+397,12
@@
and converts to a yyyy/mm/dd format */
else // $how == 2 || $how == 5, YYYYMMDD or YYYYMmmDD
list($year, $month, $day) = explode($sep, $date_);
else // $how == 2 || $how == 5, YYYYMMDD or YYYYMmmDD
list($year, $month, $day) = explode($sep, $date_);
+ if ($how > 2)
+ {
+ global $tmonths;
+ $month = array_search($month, $tmonths);
+ }
if ($year+$day+$month) {
if ($year+$day+$month) {
- if ($how > 2)
- {
- global $tmonths;
- $month = array_search($month, $tmonths);
- }
//to modify assumption in 2030
if ($SysPrefs->date_system == 0 || $SysPrefs->date_system == 3)
{
//to modify assumption in 2030
if ($SysPrefs->date_system == 0 || $SysPrefs->date_system == 3)
{