From 00edba1d0dba12413ef6a78290015cf02ff96b7b Mon Sep 17 00:00:00 2001 From: "Florian Aders (EleRas)" Date: Tue, 1 Mar 2011 20:38:09 +0100 Subject: [PATCH] Fixing dynamic selection of themes in settings, fixes #628 Signed-off-by: Florian Aders (EleRas) --- actions/admin/settings/100.panel.php | 3 +-- lib/functions/froxlor/function.getThemes.php | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/actions/admin/settings/100.panel.php b/actions/admin/settings/100.panel.php index 9bb4a0a5..3c09fa75 100644 --- a/actions/admin/settings/100.panel.php +++ b/actions/admin/settings/100.panel.php @@ -39,8 +39,7 @@ return array( 'type' => 'option', 'default' => 'Froxlor', 'option_mode' => 'one', - 'option_options' => array('Classic' => 'Classic', 'Froxlor' => 'Froxlor'), - /* 'option_options_method' => 'getThemes', // iterate through templates/ and dynamically display all folders found */ + 'option_options_method' => 'getThemes', 'save_method' => 'storeSettingField', ), 'panel_natsorting' => array( diff --git a/lib/functions/froxlor/function.getThemes.php b/lib/functions/froxlor/function.getThemes.php index d15e92a6..3f3cdd4c 100644 --- a/lib/functions/froxlor/function.getThemes.php +++ b/lib/functions/froxlor/function.getThemes.php @@ -37,7 +37,7 @@ function getThemes() && $it->getFilename() != '.svn' && $it->getFilename() != 'misc' ) { - $themes_available[] = $it->getFilename(); + $themes_available[$it->getFilename()] = $it->getFilename(); } } }