From fe40c4ede9a402dcd2204810a51e6736f954f6c8 Mon Sep 17 00:00:00 2001 From: Nate Jones Date: Sun, 17 Aug 2014 04:33:57 +0000 Subject: [PATCH] Enhanced Theme: Added Default Settings to control footer colors and opacity. Other minor code enhancements. --- app/provision/app_defaults.php | 9 ++---- app/xml_cdr/app_defaults.php | 6 ++-- .../default_settings/default_setting_edit.php | 4 ++- themes/enhanced/app_defaults.php | 30 +++++++++++++------ themes/enhanced/template.php | 19 +++++------- 5 files changed, 38 insertions(+), 30 deletions(-) diff --git a/app/provision/app_defaults.php b/app/provision/app_defaults.php index ac223a0bfc..66b2ee6cf2 100644 --- a/app/provision/app_defaults.php +++ b/app/provision/app_defaults.php @@ -113,12 +113,9 @@ $x++; $orm = new orm; $orm->name('default_settings'); - $orm->save($array[0]); - $orm->save($array[1]); - $orm->save($array[2]); - $orm->save($array[3]); - $orm->save($array[4]); - $orm->save($array[5]); + foreach ($array as $index => $null) { + $orm->save($array[$index]); + } $message = $orm->message; //print_r($message); } diff --git a/app/xml_cdr/app_defaults.php b/app/xml_cdr/app_defaults.php index 4959a04115..ea9ed50a8a 100644 --- a/app/xml_cdr/app_defaults.php +++ b/app/xml_cdr/app_defaults.php @@ -75,9 +75,9 @@ $x++; $orm = new orm; $orm->name('default_settings'); - $orm->save($array[0]); - $orm->save($array[1]); - $orm->save($array[2]); + foreach ($array as $index => $null) { + $orm->save($array[$index]); + } $message = $orm->message; //print_r($message); } diff --git a/core/default_settings/default_setting_edit.php b/core/default_settings/default_setting_edit.php index af2cf34bf7..590ab61583 100644 --- a/core/default_settings/default_setting_edit.php +++ b/core/default_settings/default_setting_edit.php @@ -415,7 +415,9 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) { } elseif ( $category == "theme" && $subcategory == "background_color" && $name == "array" || - $category == "theme" && $subcategory == "login_color" && $name == "text" + $category == "theme" && $subcategory == "login_background_color" && $name == "text" || + $category == "theme" && $subcategory == "footer_color" && $name == "text" || + $category == "theme" && $subcategory == "footer_background_color" && $name == "text" ) { echo "