From 87c1a07e443018e155c86bed1f810c3ad31e13c4 Mon Sep 17 00:00:00 2001
From: latham <latham@ispconfig3>
Date: Mon, 23 May 2011 16:50:14 -0400
Subject: [PATCH] Use the theme and common settings from config.inc.php or config.inc.local.php
---
interface/web/client/form/client.tform.php | 2 +-
interface/web/client/form/reseller.tform.php | 15 +++++++++++++--
2 files changed, 14 insertions(+), 3 deletions(-)
diff --git a/interface/web/client/form/client.tform.php b/interface/web/client/form/client.tform.php
index 43d824b..eb61dc9 100644
--- a/interface/web/client/form/client.tform.php
+++ b/interface/web/client/form/client.tform.php
@@ -164,7 +164,7 @@
'usertheme' => array (
'datatype' => 'VARCHAR',
'formtype' => 'SELECT',
- 'default' => 'default',
+ 'default' => $conf["theme"],
'value' => $themes_list,
'separator' => '',
'width' => '30',
diff --git a/interface/web/client/form/reseller.tform.php b/interface/web/client/form/reseller.tform.php
index 86ccd4a..715a892 100644
--- a/interface/web/client/form/reseller.tform.php
+++ b/interface/web/client/form/reseller.tform.php
@@ -50,6 +50,17 @@
$form["auth_preset"]["perm_group"] = 'riud'; //r = read, i = insert, u = update, d = delete
$form["auth_preset"]["perm_other"] = ''; //r = read, i = insert, u = update, d = delete
+//* Load themes
+$themes_list = array();
+$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;
+ }
+ }
+}
+
//* Languages
$language_list = array();
$handle = @opendir(ISPC_ROOT_PATH.'/lib/lang');
@@ -153,8 +164,8 @@
'usertheme' => array (
'datatype' => 'VARCHAR',
'formtype' => 'SELECT',
- 'default' => 'default',
- 'value' => array('default' => 'default'),
+ 'default' => $conf["theme"],
+ 'value' => $themes_list,
'separator' => '',
'width' => '30',
'maxlength' => '255',
--
Gitblit v1.9.1