Browse Source

Merge branch '1.9.x' of github.com:chamilo/chamilo-lms into julio6666

Julio Montoya 11 years ago
parent
commit
3d730ace32
1 changed files with 18 additions and 0 deletions
  1. 18 0
      main/install/install.lib.php

+ 18 - 0
main/install/install.lib.php

@@ -93,6 +93,18 @@ function check_php_setting($php_setting, $recommended_value, $return_success = f
     }
 }
 
+
+/**
+ *  This function return the value of a php.ini setting if not "" or if exists, otherwise return false
+ */
+function check_php_setting_exists($php_setting) {
+    if (ini_get($php_setting) != "") {
+        return ini_get($php_setting);
+    }
+    return false;
+} 
+
+
 /**
  * Returns a textual value ('ON' or 'OFF') based on a requester 2-state ini- configuration setting.
  *
@@ -1056,6 +1068,12 @@ function display_requirements($installType, $badUpdatePath, $updatePath = '', $u
 
     //  SERVER REQUIREMENTS
     echo '<div class="RequirementHeading"><h2>'.get_lang('ServerRequirements').'</h2>';
+    
+    $timezone = check_php_setting_exists("date.timezone");
+    if (!$timezone) {
+        echo "<div class='warning-message'>".Display::return_icon('warning.png',get_lang('Warning'),'',ICON_SIZE_MEDIUM).get_lang("DateTimezoneSettingNotSet")."</div>";
+    }
+    
     echo '<div class="RequirementText">'.get_lang('ServerRequirementsInfo').'</div>';
     echo '<div class="RequirementContent">';
     echo '<table class="table">