Applying improvements selected from IcehrmPro for release v21.0.0
This commit is contained in:
@@ -1407,7 +1407,7 @@ class BaseService
|
||||
{
|
||||
$noJSONRequests = SettingsManager::getInstance()->getSetting("System: Do not pass JSON in request");
|
||||
if ($noJSONRequests."" == "1") {
|
||||
$json = str_replace("|", '"', $json);
|
||||
$json = base64_decode($json);
|
||||
}
|
||||
return $json;
|
||||
}
|
||||
|
||||
@@ -49,11 +49,19 @@ class CalendarTools
|
||||
return $days;
|
||||
}
|
||||
|
||||
public static function addMinutesToDateTime($datetime, $minutes)
|
||||
public static function addMinutesToDateTime($datetime, $minutes, $format = 'Y-m-d H:i:s')
|
||||
{
|
||||
$time = new \DateTime($datetime);
|
||||
$time->add(new \DateInterval('PT' . $minutes . 'M'));
|
||||
$time = $time->add(new \DateInterval('PT' . $minutes . 'M'));
|
||||
|
||||
return $time->format('Y-m-d H:i:s');
|
||||
return $time->format($format);
|
||||
}
|
||||
|
||||
public static function addMonthsToDateTime($datetime, $months, $format = 'Y-m-d H:i:s')
|
||||
{
|
||||
$time = new \DateTime($datetime);
|
||||
$time = $time->add(new \DateInterval('P' . $months . 'M'));
|
||||
|
||||
return $time->format($format);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@ class SessionUtils
|
||||
session_write_close();
|
||||
}
|
||||
|
||||
public function unsetClientSession()
|
||||
public static function unsetClientSession()
|
||||
{
|
||||
$names = [
|
||||
"user",
|
||||
|
||||
Reference in New Issue
Block a user