diff --git a/core/default_settings/default_setting_edit.php b/core/default_settings/default_setting_edit.php index 1cc94f6a60..bd6ea34adf 100644 --- a/core/default_settings/default_setting_edit.php +++ b/core/default_settings/default_setting_edit.php @@ -169,7 +169,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) { if ($action == "update") { $page["title"] = $text['title-default_setting-edit']; } - else if ($action == "add") { + elseif ($action == "add") { $page["title"] = $text['title-default_setting-add']; } diff --git a/core/domain_settings/domain_settings_edit.php b/core/domain_settings/domain_settings_edit.php index 18904b8d18..874f640a18 100644 --- a/core/domain_settings/domain_settings_edit.php +++ b/core/domain_settings/domain_settings_edit.php @@ -177,7 +177,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) { if ($action == "update") { $page["title"] = $text['title-domain_setting-edit']; } - if ($action == "add") { + elseif ($action == "add") { $page["title"] = $text['title-domain_setting-add']; } @@ -295,33 +295,46 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) { closedir($handle); } echo " \n"; - } elseif ($category == "domain" && $subcategory == "time" && $name == "zone" ) { - echo " \n"; + echo " \n"; + //$list = DateTimeZone::listAbbreviations(); + $time_zone_identifiers = DateTimeZone::listIdentifiers(); + $previous_category = ''; + $x = 0; + foreach ($time_zone_identifiers as $key => $val) { + $time_zone = explode("/", $val); + $category = $time_zone[0]; + if ($category != $previous_category) { + if ($x > 0) { + echo " \n"; } - if ($val == $row['domain_setting_value']) { - echo " \n"; + echo " \n"; + } + if (strlen($val) > 0) { + $time_zone_offset = get_time_zone_offset($val)/3600; + $time_zone_offset_hours = floor($time_zone_offset); + $time_zone_offset_minutes = ($time_zone_offset - $time_zone_offset_hours) * 60; + $time_zone_offset_minutes = number_pad($time_zone_offset_minutes, 2); + if ($time_zone_offset > 0) { + $time_zone_offset_hours = number_pad($time_zone_offset_hours, 2); + $time_zone_offset_hours = "+".$time_zone_offset_hours; } else { - echo " \n"; + $time_zone_offset_hours = str_replace("-", "", $time_zone_offset_hours); + $time_zone_offset_hours = "-".number_pad($time_zone_offset_hours, 2); } - $previous_category = $category; - $x++; } - echo " \n"; - break; + if ($val == $row['default_setting_value']) { + echo " \n"; + } + else { + echo " \n"; + } + $previous_category = $category; + $x++; + } + echo " \n"; } elseif ($category == "email" && $subcategory == "smtp_password" && $name == "var" ) { echo " \n"; @@ -329,7 +342,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) { elseif ($category == "provision" && $subcategory == "password" && $name == "var" ) { echo " \n"; } else { - echo " \n"; + echo " \n"; } echo "
\n"; echo $text['description-value']."\n";