Horde_Registry::appInit('kronolith');
/* Load traditional interface? */
-if (!$prefs->getValue('dynamic_view') || !$browser->hasFeature('xmlhttpreq') ||
- ($browser->isBrowser('msie') && $browser->getMajor() < 7) ||
- ($browser->hasFeature('issafari') && $browser->getMajor() < 2)) {
+if (!Kronolith::showAjaxView()) {
if ($prefs->getValue('dynamic_view')) {
$notification->push(_("Your browser is too old to display the dynamic mode. Using traditional mode instead."), 'horde.warning');
}
}
/**
+ * Returns whether to display the ajax view.
+ *
+ * return boolean True if the ajax view should be displayed.
+ */
+ public static function showAjaxView()
+ {
+ return $GLOBALS['prefs']->getValue('dynamic_view') &&
+ $GLOBALS['browser']->hasFeature('xmlhttpreq') &&
+ (!$GLOBALS['browser']->isBrowser('msie') ||
+ $GLOBALS['browser']->getMajor() >= 7) &&
+ (!$GLOBALS['browser']->hasFeature('issafari') ||
+ $GLOBALS['browser']->getMajor() >= 2);
+ }
+
+ /**
* Used with usort() to sort events based on their start times.
*/
public static function _sortEventStartTime($a, $b)