Skip to content

Commit 5715f5f

Browse files
author
mcramer
committed
- Implemented check for theme compatibility
- Implemented session message system (template modifications pending) - Updated ISPC SVN version number to 3.0.5
1 parent 2cb656c commit 5715f5f

File tree

20 files changed

+84
-9
lines changed

20 files changed

+84
-9
lines changed

install/sql/ispconfig3.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2130,6 +2130,6 @@ INSERT INTO `sys_user` (`userid`, `sys_userid`, `sys_groupid`, `sys_perm_user`,
21302130
-- Dumping data for table `sys_config`
21312131
--
21322132

2133-
INSERT INTO sys_config VALUES ('1','db','db_version','3.0.4.5');
2133+
INSERT INTO sys_config VALUES ('1','db','db_version','3.0.5');
21342134

21352135
SET FOREIGN_KEY_CHECKS = 1;

install/tpl/config.inc.php.master

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ $revision = str_replace(array('Revision:','$',' '), '', $svn_revision);
5656

5757
//** Application
5858
define('ISPC_APP_TITLE', 'ISPConfig');
59-
define('ISPC_APP_VERSION', '3.0.4.5');
59+
define('ISPC_APP_VERSION', '3.0.5');
6060
define('DEVSYSTEM', 0);
6161

6262

interface/lib/classes/listform_actions.inc.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -278,6 +278,15 @@ public function onShow()
278278
$app->tpl->setVar($app->listform->wordbook);
279279
$app->tpl->setVar('form_action', $app->listform->listDef['file']);
280280

281+
if(isset($_SESSION['show_info_msg'])) {
282+
$app->tpl->setVar('show_info_msg', $_SESSION['show_info_msg']);
283+
unset($_SESSION['show_info_msg']);
284+
}
285+
if(isset($_SESSION['show_error_msg'])) {
286+
$app->tpl->setVar('show_error_msg', $_SESSION['show_error_msg']);
287+
unset($_SESSION['show_error_msg']);
288+
}
289+
281290
//* Parse the templates and send output to the browser
282291
$this->onShowEnd();
283292
}

interface/lib/classes/tform_actions.inc.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -491,6 +491,14 @@ function onShow() {
491491
$app->tpl->setVar('form_navibar',$navibar);
492492
}
493493

494+
if(isset($_SESSION['show_info_msg'])) {
495+
$app->tpl->setVar('show_info_msg', $_SESSION['show_info_msg']);
496+
unset($_SESSION['show_info_msg']);
497+
}
498+
if(isset($_SESSION['show_error_msg'])) {
499+
$app->tpl->setVar('show_error_msg', $_SESSION['show_error_msg']);
500+
unset($_SESSION['show_error_msg']);
501+
}
494502

495503
// loading plugins
496504
$this->loadPlugins($this->active_tab);

interface/web/admin/form/users.tform.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,9 @@
100100
while ($file = @readdir ($handle)) {
101101
if (substr($file, 0, 1) != '.') {
102102
if(@is_dir(ISPC_THEMES_PATH."/$file")) {
103-
$themes_list[$file] = $file;
103+
if($file == 'default' || (@file_exists(ISPC_THEMES_PATH."/$file/ISPC_VERSION") && trim(@file_get_contents(ISPC_THEMES_PATH."/$file/ISPC_VERSION")) == ISPC_APP_VERSION)) {
104+
$themes_list[$file] = $file;
105+
}
104106
}
105107
}
106108
}

interface/web/client/form/client.tform.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,9 @@
7373
while ($file = @readdir ($handle)) {
7474
if (substr($file, 0, 1) != '.') {
7575
if(@is_dir(ISPC_THEMES_PATH."/$file")) {
76-
$themes_list[$file] = $file;
76+
if($file == 'default' || (@file_exists(ISPC_THEMES_PATH."/$file/ISPC_VERSION") && trim(@file_get_contents(ISPC_THEMES_PATH."/$file/ISPC_VERSION")) == ISPC_APP_VERSION)) {
77+
$themes_list[$file] = $file;
78+
}
7779
}
7880
}
7981
}

interface/web/client/form/client_circle.tform.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,9 @@
7373
while ($file = @readdir ($handle)) {
7474
if (substr($file, 0, 1) != '.') {
7575
if(@is_dir(ISPC_THEMES_PATH."/$file")) {
76-
$themes_list[$file] = $file;
76+
if($file == 'default' || (@file_exists(ISPC_THEMES_PATH."/$file/ISPC_VERSION") && trim(@file_get_contents(ISPC_THEMES_PATH."/$file/ISPC_VERSION")) == ISPC_APP_VERSION)) {
77+
$themes_list[$file] = $file;
78+
}
7779
}
7880
}
7981
}

interface/web/client/form/reseller.tform.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,9 @@
6161
while ($file = @readdir ($handle)) {
6262
if (substr($file, 0, 1) != '.') {
6363
if(@is_dir(ISPC_THEMES_PATH."/$file")) {
64-
$themes_list[$file] = $file;
64+
if($file == 'default' || (@file_exists(ISPC_THEMES_PATH."/$file/ISPC_VERSION") && trim(@file_get_contents(ISPC_THEMES_PATH."/$file/ISPC_VERSION")) == ISPC_APP_VERSION)) {
65+
$themes_list[$file] = $file;
66+
}
6567
}
6668
}
6769
}

interface/web/dashboard/dashboard.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,16 @@
9393
*/
9494
$info = array();
9595

96+
if(isset($_SESSION['show_info_msg'])) {
97+
$info[] = array('info_msg' => $_SESSION['show_info_msg']);
98+
unset($_SESSION['show_info_msg']);
99+
}
100+
if(isset($_SESSION['show_error_msg'])) {
101+
$app->tpl->setloop('error', array(array('error_msg' => $_SESSION['show_error_msg'])));
102+
unset($_SESSION['show_error_msg']);
103+
}
104+
105+
96106
/*
97107
* Check the ISPConfig-Version (only for the admin)
98108
*/

interface/web/index.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,16 @@
5151
$app->tpl->setVar('global_tabchange_discard_txt', $app->lng('global_tabchange_discard_txt'));
5252
}
5353

54+
if(isset($_SESSION['show_info_msg'])) {
55+
$app->tpl->setVar('show_info_msg', $_SESSION['show_info_msg']);
56+
unset($_SESSION['show_info_msg']);
57+
}
58+
if(isset($_SESSION['show_error_msg'])) {
59+
$app->tpl->setVar('show_error_msg', $_SESSION['show_error_msg']);
60+
unset($_SESSION['show_error_msg']);
61+
}
62+
63+
5464
$app->tpl_defaults();
5565
$app->tpl->pparse();
5666
?>

0 commit comments

Comments
 (0)