+--------------------------------------------------------------------+
| CiviCRM version 4.7 |
+--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2015 |
+ | Copyright CiviCRM LLC (c) 2004-2016 |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
* Serves as a wrapper between the UserFrameWork and Core CRM
*
* @package CRM
- * @copyright CiviCRM LLC (c) 2004-2015
+ * @copyright CiviCRM LLC (c) 2004-2016
* $Id$
*
*/
}
/**
- * Show status in the footer
+ * Show status in the footer (admin only)
*
* @param CRM_Core_Smarty $template
*/
public static function statusCheck($template) {
- if (CRM_Core_Config::isUpgradeMode()) {
+ if (CRM_Core_Config::isUpgradeMode() || !CRM_Core_Permission::check('administer CiviCRM')) {
return;
}
- $statusSeverity = 0;
- $statusMessage = ts('System status OK');
- // TODO: get status from CRM_Utils_Check, if cached
- $template->assign('footer_status_severity', $statusSeverity);
- $template->assign('footer_status_message', $statusMessage);
+ // always use cached results - they will be refreshed by the session timer
+ $status = Civi::settings()->get('systemStatusCheckResult');
+ $template->assign('footer_status_severity', $status);
+ $template->assign('footer_status_message', CRM_Utils_Check::toStatusLabel($status));
}
/**