diff --git a/install/sql/ispconfig3.sql b/install/sql/ispconfig3.sql index 5777459ce8fa45308b46e36ea1e1b17d7ea2b136..205840800f88aca4a0ab6dcf030340e57ab2d760 100644 --- a/install/sql/ispconfig3.sql +++ b/install/sql/ispconfig3.sql @@ -2130,6 +2130,6 @@ INSERT INTO `sys_user` (`userid`, `sys_userid`, `sys_groupid`, `sys_perm_user`, -- Dumping data for table `sys_config` -- -INSERT INTO sys_config VALUES ('1','db','db_version','3.0.4.5'); +INSERT INTO sys_config VALUES ('1','db','db_version','3.0.5'); SET FOREIGN_KEY_CHECKS = 1; \ No newline at end of file diff --git a/install/tpl/config.inc.php.master b/install/tpl/config.inc.php.master index ff6e6a49a566ebd37d40cf0101fe0b64ef46beb9..de512a4a0cdd1a04573f784ad7f36784ac75b33b 100644 --- a/install/tpl/config.inc.php.master +++ b/install/tpl/config.inc.php.master @@ -56,7 +56,7 @@ $revision = str_replace(array('Revision:','$',' '), '', $svn_revision); //** Application define('ISPC_APP_TITLE', 'ISPConfig'); -define('ISPC_APP_VERSION', '3.0.4.5'); +define('ISPC_APP_VERSION', '3.0.5'); define('DEVSYSTEM', 0); diff --git a/interface/lib/classes/listform_actions.inc.php b/interface/lib/classes/listform_actions.inc.php index c8956580b9008bb1781c2a2bf0f94796593d1d6a..66a9f2c33cf6f7228ed5b069b0d4fa1affe1fd9d 100644 --- a/interface/lib/classes/listform_actions.inc.php +++ b/interface/lib/classes/listform_actions.inc.php @@ -278,6 +278,15 @@ class listform_actions { $app->tpl->setVar($app->listform->wordbook); $app->tpl->setVar('form_action', $app->listform->listDef['file']); + if(isset($_SESSION['show_info_msg'])) { + $app->tpl->setVar('show_info_msg', $_SESSION['show_info_msg']); + unset($_SESSION['show_info_msg']); + } + if(isset($_SESSION['show_error_msg'])) { + $app->tpl->setVar('show_error_msg', $_SESSION['show_error_msg']); + unset($_SESSION['show_error_msg']); + } + //* Parse the templates and send output to the browser $this->onShowEnd(); } diff --git a/interface/lib/classes/tform_actions.inc.php b/interface/lib/classes/tform_actions.inc.php index d536f4b364d48c1041ba85ac6c9973d26ac753ad..52ebe162f15d34923944ecf616ccdc232e64d8c7 100644 --- a/interface/lib/classes/tform_actions.inc.php +++ b/interface/lib/classes/tform_actions.inc.php @@ -491,6 +491,14 @@ class tform_actions { $app->tpl->setVar('form_navibar',$navibar); } + if(isset($_SESSION['show_info_msg'])) { + $app->tpl->setVar('show_info_msg', $_SESSION['show_info_msg']); + unset($_SESSION['show_info_msg']); + } + if(isset($_SESSION['show_error_msg'])) { + $app->tpl->setVar('show_error_msg', $_SESSION['show_error_msg']); + unset($_SESSION['show_error_msg']); + } // loading plugins $this->loadPlugins($this->active_tab); diff --git a/interface/web/admin/form/users.tform.php b/interface/web/admin/form/users.tform.php index 9bc255b671d2c88e97554c25ff170e5ff5ece676..96ed417d091e9874852b9c72ea34f19e2a1cbf5f 100644 --- a/interface/web/admin/form/users.tform.php +++ b/interface/web/admin/form/users.tform.php @@ -100,7 +100,9 @@ $handle = @opendir(ISPC_THEMES_PATH); while ($file = @readdir ($handle)) { if (substr($file, 0, 1) != '.') { if(@is_dir(ISPC_THEMES_PATH."/$file")) { - $themes_list[$file] = $file; + if($file == 'default' || (@file_exists(ISPC_THEMES_PATH."/$file/ISPC_VERSION") && trim(@file_get_contents(ISPC_THEMES_PATH."/$file/ISPC_VERSION")) == ISPC_APP_VERSION)) { + $themes_list[$file] = $file; + } } } } diff --git a/interface/web/client/form/client.tform.php b/interface/web/client/form/client.tform.php index a8462194b1aefb071f2edd958fda91dbec7b06b7..32a31fb762557b73ec3c011d330b70dd26578b13 100644 --- a/interface/web/client/form/client.tform.php +++ b/interface/web/client/form/client.tform.php @@ -73,7 +73,9 @@ $handle = @opendir(ISPC_THEMES_PATH); while ($file = @readdir ($handle)) { if (substr($file, 0, 1) != '.') { if(@is_dir(ISPC_THEMES_PATH."/$file")) { - $themes_list[$file] = $file; + if($file == 'default' || (@file_exists(ISPC_THEMES_PATH."/$file/ISPC_VERSION") && trim(@file_get_contents(ISPC_THEMES_PATH."/$file/ISPC_VERSION")) == ISPC_APP_VERSION)) { + $themes_list[$file] = $file; + } } } } diff --git a/interface/web/client/form/client_circle.tform.php b/interface/web/client/form/client_circle.tform.php index 96cb0da5a7d6c247d6a518980520ac4e8549e10b..bb5a140f36a6e56600bbba6a8e62dc2775a4a4c7 100644 --- a/interface/web/client/form/client_circle.tform.php +++ b/interface/web/client/form/client_circle.tform.php @@ -73,7 +73,9 @@ $handle = @opendir(ISPC_THEMES_PATH); while ($file = @readdir ($handle)) { if (substr($file, 0, 1) != '.') { if(@is_dir(ISPC_THEMES_PATH."/$file")) { - $themes_list[$file] = $file; + if($file == 'default' || (@file_exists(ISPC_THEMES_PATH."/$file/ISPC_VERSION") && trim(@file_get_contents(ISPC_THEMES_PATH."/$file/ISPC_VERSION")) == ISPC_APP_VERSION)) { + $themes_list[$file] = $file; + } } } } diff --git a/interface/web/client/form/reseller.tform.php b/interface/web/client/form/reseller.tform.php index 0c669ece41b85ef084b073952419d3529c5c29f4..f437b2e92b19599459614dbdd50fa529e4b2611a 100644 --- a/interface/web/client/form/reseller.tform.php +++ b/interface/web/client/form/reseller.tform.php @@ -61,7 +61,9 @@ $handle = @opendir(ISPC_THEMES_PATH); while ($file = @readdir ($handle)) { if (substr($file, 0, 1) != '.') { if(@is_dir(ISPC_THEMES_PATH."/$file")) { - $themes_list[$file] = $file; + if($file == 'default' || (@file_exists(ISPC_THEMES_PATH."/$file/ISPC_VERSION") && trim(@file_get_contents(ISPC_THEMES_PATH."/$file/ISPC_VERSION")) == ISPC_APP_VERSION)) { + $themes_list[$file] = $file; + } } } } diff --git a/interface/web/dashboard/dashboard.php b/interface/web/dashboard/dashboard.php index 7c0ea7bca2e377d1f1e95fe09b7bd9b3ebdbe68f..f744f8d269bd4bca670356b082b37f9e84f614d9 100644 --- a/interface/web/dashboard/dashboard.php +++ b/interface/web/dashboard/dashboard.php @@ -93,6 +93,16 @@ $app->tpl->setVar('welcome_user', $welcome); */ $info = array(); +if(isset($_SESSION['show_info_msg'])) { + $info[] = array('info_msg' => $_SESSION['show_info_msg']); + unset($_SESSION['show_info_msg']); +} +if(isset($_SESSION['show_error_msg'])) { + $app->tpl->setloop('error', array(array('error_msg' => $_SESSION['show_error_msg']))); + unset($_SESSION['show_error_msg']); +} + + /* * Check the ISPConfig-Version (only for the admin) */ diff --git a/interface/web/index.php b/interface/web/index.php index f0a9635eafdb07bc207512c7dfb5b3038a0deaa8..a7d2965e13049d2e58a319ed8d2459e376055dfb 100644 --- a/interface/web/index.php +++ b/interface/web/index.php @@ -51,6 +51,16 @@ if($sys_config['tab_change_discard'] == 'y') { $app->tpl->setVar('global_tabchange_discard_txt', $app->lng('global_tabchange_discard_txt')); } +if(isset($_SESSION['show_info_msg'])) { + $app->tpl->setVar('show_info_msg', $_SESSION['show_info_msg']); + unset($_SESSION['show_info_msg']); +} +if(isset($_SESSION['show_error_msg'])) { + $app->tpl->setVar('show_error_msg', $_SESSION['show_error_msg']); + unset($_SESSION['show_error_msg']); +} + + $app->tpl_defaults(); $app->tpl->pparse(); ?> \ No newline at end of file diff --git a/interface/web/login/index.php b/interface/web/login/index.php index 726411bfdf002c0a53b795f68a4c9acd92d2c29e..a99a77546edac1679d6934cb7e514e1026c5810a 100644 --- a/interface/web/login/index.php +++ b/interface/web/login/index.php @@ -65,7 +65,7 @@ class login_index { $maintenance_mode_error = $app->lng('error_maintenance_mode'); } - //* Login Form was send + //* Login Form was sent if(count($_POST) > 0) { //** Check variables @@ -197,6 +197,17 @@ class login_index { include_once($_SESSION['s']['user']['startmodule'].'/lib/module.conf.php'); $_SESSION['s']['module'] = $module; } + + // check if the user theme is valid + if($_SESSION['s']['user']['theme'] != 'default') { + $tmp_path = ISPC_THEMES_PATH."/".$_SESSION['s']['user']['theme']; + if(!@is_dir($tmp_path) || !@file_exists($tmp_path."/ISPC_VERSION") || trim(file_get_contents($tmp_path."/ISPC_VERSION")) != ISPC_APP_VERSION) { + // fall back to default theme if this one is not compatible with current ispc version + $_SESSION['s']['user']['theme'] = 'default'; + $_SESSION['s']['theme'] = 'default'; + $_SESSION['show_error_msg'] = $app->lng('theme_not_compatible'); + } + } $app->plugin->raiseEvent('login',$this); diff --git a/interface/web/login/lib/lang/de.lng b/interface/web/login/lib/lang/de.lng index 57024e981c2b94e865d1e7f9b305da45d7aa131e..e969bf01f03b590f2e6701bf159fc2c511ef83dc 100644 --- a/interface/web/login/lib/lang/de.lng +++ b/interface/web/login/lib/lang/de.lng @@ -20,4 +20,5 @@ $wb['pw_reset_txt'] = 'Passwort zurücksetzen'; $wb['pw_button_txt'] = 'Passwort zusenden'; $wb['email_txt'] = 'E-Mail'; $wb['error_maintenance_mode'] = 'Diese ISPConfig-Installation wird gerade gewartet. Wir sind in Kürze wieder für Sie da. Vielen Dank für Ihre Geduld.'; +$wb['theme_not_compatible'] = 'Das gewählte Theme ist mit dieser ISPConfig Version nicht kompatibel. Bitte prüfen Sie, ob ein Update des Themes verfügbar ist.
Es wurde nun automatisch das Standard-Theme aktiviert.'; ?> diff --git a/interface/web/login/lib/lang/en.lng b/interface/web/login/lib/lang/en.lng index be171463a07f1cb3c53a04ce9cb582166a244059..37b4a19d4d69b1bbc969ee4fe6dfe1ed8101ddd6 100644 --- a/interface/web/login/lib/lang/en.lng +++ b/interface/web/login/lib/lang/en.lng @@ -24,4 +24,6 @@ $wb['pw_button_txt'] = "Resend password"; $wb['email_txt'] = "Email"; $wb['error_maintenance_mode'] = 'This ISPConfig installation is currently under maintenance. We should be back shortly. Thank you for your patience.'; + +$wb['theme_not_compatible'] = 'The chosen theme is not compatible with the current ISPConfig version. Please check for a new version of the theme.
The default theme as been activated automatically.'; ?> \ No newline at end of file diff --git a/interface/web/mailuser/index.php b/interface/web/mailuser/index.php index aba8eaa09d8856fbf7165d9392a20ef84c75ecfb..a67fb74aee2c6e9b646bdc129a99dd727878b070 100644 --- a/interface/web/mailuser/index.php +++ b/interface/web/mailuser/index.php @@ -38,6 +38,14 @@ $app->tpl->setVar($rec2); $app->tpl->setVar('msg',$msg); $app->tpl->setVar('error',$error); +if(isset($_SESSION['show_info_msg'])) { + $app->tpl->setVar('show_info_msg', $_SESSION['show_info_msg']); + unset($_SESSION['show_info_msg']); +} +if(isset($_SESSION['show_error_msg'])) { + $app->tpl->setVar('show_error_msg', $_SESSION['show_error_msg']); + unset($_SESSION['show_error_msg']); +} diff --git a/interface/web/themes/default-304/ISPC_VERSION b/interface/web/themes/default-304/ISPC_VERSION new file mode 100644 index 0000000000000000000000000000000000000000..bb19ac367e61ef69398f09154456075f734e0d46 --- /dev/null +++ b/interface/web/themes/default-304/ISPC_VERSION @@ -0,0 +1 @@ +3.0.4.6 \ No newline at end of file diff --git a/interface/web/themes/default_64_navimg/ISPC_VERSION b/interface/web/themes/default_64_navimg/ISPC_VERSION new file mode 100644 index 0000000000000000000000000000000000000000..7da3c16870e856cce1a539d478294b4030dac60d --- /dev/null +++ b/interface/web/themes/default_64_navimg/ISPC_VERSION @@ -0,0 +1 @@ +3.0.5 \ No newline at end of file diff --git a/interface/web/themes/default_combobox/ISPC_VERSION b/interface/web/themes/default_combobox/ISPC_VERSION new file mode 100644 index 0000000000000000000000000000000000000000..7da3c16870e856cce1a539d478294b4030dac60d --- /dev/null +++ b/interface/web/themes/default_combobox/ISPC_VERSION @@ -0,0 +1 @@ +3.0.5 \ No newline at end of file diff --git a/interface/web/themes/default_no_navimg/ISPC_VERSION b/interface/web/themes/default_no_navimg/ISPC_VERSION new file mode 100644 index 0000000000000000000000000000000000000000..7da3c16870e856cce1a539d478294b4030dac60d --- /dev/null +++ b/interface/web/themes/default_no_navimg/ISPC_VERSION @@ -0,0 +1 @@ +3.0.5 \ No newline at end of file diff --git a/interface/web/tools/form/interface_settings.tform.php b/interface/web/tools/form/interface_settings.tform.php index 47292f9dadac3c8d4e62547804b4fb94125517d7..e992c33217348e5c610156b095cbbaf990de66e8 100644 --- a/interface/web/tools/form/interface_settings.tform.php +++ b/interface/web/tools/form/interface_settings.tform.php @@ -113,7 +113,9 @@ $handle = @opendir(ISPC_THEMES_PATH); while ($file = @readdir ($handle)) { if (substr($file, 0, 1) != '.') { if(@is_dir(ISPC_THEMES_PATH."/$file")) { - $themes_list[$file] = $file; + if($file == 'default' || (@file_exists(ISPC_THEMES_PATH."/$file/ISPC_VERSION") && trim(@file_get_contents(ISPC_THEMES_PATH."/$file/ISPC_VERSION")) == ISPC_APP_VERSION)) { + $themes_list[$file] = $file; + } } } } diff --git a/interface/web/tools/form/tpl_default.tform.php b/interface/web/tools/form/tpl_default.tform.php index 8a16bed3e607da6f710648c6988430d0cfa76ad4..e4d1b6273bd9cd9baded0d69ae05a36fd8327531 100644 --- a/interface/web/tools/form/tpl_default.tform.php +++ b/interface/web/tools/form/tpl_default.tform.php @@ -113,7 +113,9 @@ $handle = @opendir(ISPC_THEMES_PATH); while ($file = @readdir ($handle)) { if (substr($file, 0, 1) != '.') { if(@is_dir(ISPC_THEMES_PATH."/$file")) { - $themes_list[$file] = $file; + if($file == 'default' || (@file_exists(ISPC_THEMES_PATH."/$file/ISPC_VERSION") && trim(@file_get_contents(ISPC_THEMES_PATH."/$file/ISPC_VERSION")) == ISPC_APP_VERSION)) { + $themes_list[$file] = $file; + } } } }