From 6d77b107cf5a69d2a2887def58769f5e93090183 Mon Sep 17 00:00:00 2001 From: Grisha Pomadchin Date: Mon, 2 Sep 2013 16:29:54 +0400 Subject: [PATCH] added timezone check before install --- intaro.intarocrm/install/index.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/intaro.intarocrm/install/index.php b/intaro.intarocrm/install/index.php index 9a4288ca..57f8633f 100755 --- a/intaro.intarocrm/install/index.php +++ b/intaro.intarocrm/install/index.php @@ -61,13 +61,15 @@ class intaro_intarocrm extends CModule global $APPLICATION, $step, $arResult; if (!in_array('curl', get_loaded_extensions())) { - $APPLICATION->ThrowException( GetMessage("INTAROCRM_CURL_ERR") ); + $APPLICATION->ThrowException(GetMessage("INTAROCRM_CURL_ERR")); return false; } - if (!ini_get('date.timezone')) { - $APPLICATION->ThrowException( GetMessage("DATE_TIMEZONE_ERR") ); - return false; + if (!date_default_timezone_get()) { + if (!ini_get('date.timezone')) { + $APPLICATION->ThrowException(GetMessage("DATE_TIMEZONE_ERR")); + return false; + } } include($this->INSTALL_PATH . '/../classes/general/RestApi.php');