Fix DateFormat/TimeFormat requiring config.ini global section.

This commit is contained in:
Michael Friedrich 2014-03-06 18:41:48 +01:00
parent c36b1d7d84
commit 3a623b248e
1 changed files with 2 additions and 2 deletions

View File

@ -133,7 +133,7 @@ class Zend_View_Helper_DateFormat extends Zend_View_Helper_Abstract
public function getDateFormat()
{
return $this->request->getUser()->getPreferences()->get(
'app.dateFormat', Config::app()->global->get('dateFormat', 'd/m/Y')
'app.dateFormat', Config::app()->global !== null ? Config::app()->global->get('dateFormat', 'd/m/Y') : 'd/m/Y'
);
}
@ -145,7 +145,7 @@ class Zend_View_Helper_DateFormat extends Zend_View_Helper_Abstract
public function getTimeFormat()
{
return $this->request->getUser()->getPreferences()->get(
'app.timeFormat', Config::app()->global->get('timeFormat', 'g:i A')
'app.timeFormat', Config::app()->global !== null ? Config::app()->global->get('timeFormat', 'g:i A') : 'g:i A'
);
}