tbrehm
2012-01-04 71ea2a179a8ef82f990ed08d689d878bdf024e2b
- Fixed: FS#1936 - date(): It is not safe to rely on the system's timezone settings.
- Added a timezone setting in config.inc.ohp file
9 files modified
21 ■■■■■ changed files
install/dist/lib/fedora.lib.php 2 ●●●●● patch | view | raw | blame | history
install/dist/lib/gentoo.lib.php 1 ●●●● patch | view | raw | blame | history
install/dist/lib/opensuse.lib.php 2 ●●●●● patch | view | raw | blame | history
install/install.php 3 ●●●● patch | view | raw | blame | history
install/lib/installer_base.lib.php 2 ●●●●● patch | view | raw | blame | history
install/tpl/config.inc.php.master 3 ●●●● patch | view | raw | blame | history
install/update.php 2 ●●●●● patch | view | raw | blame | history
interface/lib/app.inc.php 3 ●●●●● patch | view | raw | blame | history
server/lib/app.inc.php 3 ●●●●● patch | view | raw | blame | history
install/dist/lib/fedora.lib.php
@@ -718,6 +718,7 @@
        $content = str_replace('{server_id}', $conf['server_id'], $content);
        $content = str_replace('{ispconfig_log_priority}', $conf['ispconfig_log_priority'], $content);
        $content = str_replace('{language}', $conf['language'], $content);
        $content = str_replace('{timezone}', $conf['timezone'], $content);
        
        wf("$install_dir/interface/lib/$configfile", $content);
        
@@ -740,6 +741,7 @@
        $content = str_replace('{server_id}', $conf['server_id'], $content);
        $content = str_replace('{ispconfig_log_priority}', $conf['ispconfig_log_priority'], $content);
        $content = str_replace('{language}', $conf['language'], $content);
        $content = str_replace('{timezone}', $conf['timezone'], $content);
        wf("$install_dir/server/lib/$configfile", $content);
        
install/dist/lib/gentoo.lib.php
@@ -733,6 +733,7 @@
        $content = str_replace('{server_id}', $conf['server_id'], $content);
        $content = str_replace('{ispconfig_log_priority}', $conf['ispconfig_log_priority'], $content);
        $content = str_replace('{language}', $conf['language'], $content);
        $content = str_replace('{timezone}', $conf['timezone'], $content);
        
        $this->write_config_file("$install_dir/interface/lib/$configfile", $content);
        
install/dist/lib/opensuse.lib.php
@@ -756,6 +756,7 @@
        $content = str_replace('{server_id}', $conf['server_id'], $content);
        $content = str_replace('{ispconfig_log_priority}', $conf['ispconfig_log_priority'], $content);
        $content = str_replace('{language}', $conf['language'], $content);
        $content = str_replace('{timezone}', $conf['timezone'], $content);
        
        wf("$install_dir/interface/lib/$configfile", $content);
        
@@ -778,6 +779,7 @@
        $content = str_replace('{server_id}', $conf['server_id'], $content);
        $content = str_replace('{ispconfig_log_priority}', $conf['ispconfig_log_priority'], $content);
        $content = str_replace('{language}', $conf['language'], $content);
        $content = str_replace('{timezone}', $conf['timezone'], $content);
        
        wf("$install_dir/server/lib/$configfile", $content);
        
install/install.php
@@ -102,8 +102,9 @@
//** Detect the installed applications
$inst->find_installed_apps();
//** Select the language
//** Select the language and set default timezone
$conf['language'] = $inst->simple_query('Select language', array('en','de'), 'en');
$conf['timezone'] = 'UTC';
//** Select installation mode
$install_mode = $inst->simple_query('Installation mode', array('standard','expert'), 'standard');
install/lib/installer_base.lib.php
@@ -1593,6 +1593,7 @@
        $content = str_replace('{server_id}', $conf['server_id'], $content);
        $content = str_replace('{ispconfig_log_priority}', $conf['ispconfig_log_priority'], $content);
        $content = str_replace('{language}', $conf['language'], $content);
        $content = str_replace('{timezone}', $conf['timezone'], $content);
        wf($install_dir.'/interface/lib/'.$configfile, $content);
@@ -1615,6 +1616,7 @@
        $content = str_replace('{server_id}', $conf['server_id'], $content);
        $content = str_replace('{ispconfig_log_priority}', $conf['ispconfig_log_priority'], $content);
        $content = str_replace('{language}', $conf['language'], $content);
        $content = str_replace('{timezone}', $conf['timezone'], $content);
        wf($install_dir.'/server/lib/'.$configfile, $content);
install/tpl/config.inc.php.master
@@ -148,9 +148,10 @@
$conf['html_content_encoding'] = 'utf-8'; // example: utf-8, iso-8859-1, ...
$conf['logo'] = 'themes/default/images/ispc_logo.png';
//** Default Language
//** Default Language and Timezone
$conf['language'] = '{language}';
$conf['debug_language'] = false;
$conf['timezone'] = '{timezone}';
//** Misc.
install/update.php
@@ -96,6 +96,8 @@
$conf["mysql"]["ispconfig_password"] = $conf_old["db_password"];
$conf['language'] = $conf_old['language'];
if($conf['language'] == '{language}') $conf['language'] = 'en';
$conf['timezone'] = $conf_old['timezone'];
if($conf['timezone'] == '{timezone}') $conf['timezone'] = 'UTC';
if(isset($conf_old["dbmaster_host"])) $conf["mysql"]["master_host"] = $conf_old["dbmaster_host"];
if(isset($conf_old["dbmaster_database"])) $conf["mysql"]["master_database"] = $conf_old["dbmaster_database"];
interface/lib/app.inc.php
@@ -31,6 +31,9 @@
//* Enable gzip compression for the interface
ob_start('ob_gzhandler');
//* Set timezone
if(isset($conf['timezone'])) date_default_timezone_set($conf['timezone']);
//* Set error reporting level when we are not on a developer system
if(DEVSYSTEM == 0) {
    @ini_set('error_reporting', E_ALL & ~E_NOTICE & ~E_DEPRECATED);
server/lib/app.inc.php
@@ -28,6 +28,9 @@
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
//* Set timezone
if(isset($conf['timezone'])) date_default_timezone_set($conf['timezone']);
class app {
        
    var $loaded_modules = array();