From b103e5cb6ea2a5d505d094c5d3312234b8d59a14 Mon Sep 17 00:00:00 2001
From: tbrehm <t.brehm@ispconfig.org>
Date: Sun, 21 Mar 2010 06:37:48 -0400
Subject: [PATCH] Fixed: FS#1121 - Theme selector in client settings does not work.

---
 interface/web/client/form/client.tform.php |   13 ++++++++++++-
 1 files changed, 12 insertions(+), 1 deletions(-)

diff --git a/interface/web/client/form/client.tform.php b/interface/web/client/form/client.tform.php
index 99b1cab..a229262 100644
--- a/interface/web/client/form/client.tform.php
+++ b/interface/web/client/form/client.tform.php
@@ -62,6 +62,17 @@
 	}
 }
 
+//* 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;
+        }
+	}
+}
+
 $form["tabs"]['address'] = array (
 	'title' 	=> "Address",
 	'width' 	=> 100,
@@ -143,7 +154,7 @@
 			'datatype'	=> 'VARCHAR',
 			'formtype'	=> 'SELECT',
 			'default'	=> 'default',
-			'value'		=> array('default' => 'default'),
+			'value'		=> $themes_list,
 			'separator'	=> '',
 			'width'		=> '30',
 			'maxlength'	=> '255',

--
Gitblit v1.9.1