aboutsummaryrefslogtreecommitdiffstats
path: root/view/theme/quattro/config.php
diff options
context:
space:
mode:
authorMichael <icarus@dabo.de>2012-04-14 13:03:40 +0200
committerMichael <icarus@dabo.de>2012-04-14 13:03:40 +0200
commit188829ed46be6d3c7a91380226e26e8292c327be (patch)
tree2fb4148bc2222cf198309f4025862080c89fe36b /view/theme/quattro/config.php
parent7384786d4417ddd051b7daa71c019d3c551efc68 (diff)
parent0d869ceb65badbd4d80dd0d5cf2d631bca7f5b9e (diff)
downloadvolse-hubzilla-188829ed46be6d3c7a91380226e26e8292c327be.tar.gz
volse-hubzilla-188829ed46be6d3c7a91380226e26e8292c327be.tar.bz2
volse-hubzilla-188829ed46be6d3c7a91380226e26e8292c327be.zip
Merge remote branch 'upstream/master'
Diffstat (limited to 'view/theme/quattro/config.php')
-rw-r--r--view/theme/quattro/config.php42
1 files changed, 31 insertions, 11 deletions
diff --git a/view/theme/quattro/config.php b/view/theme/quattro/config.php
index c9ab3a4a1..c261a78ec 100644
--- a/view/theme/quattro/config.php
+++ b/view/theme/quattro/config.php
@@ -11,6 +11,37 @@ function theme_content(&$a){
$align = get_pconfig(local_user(), 'quattro', 'align' );
$color = get_pconfig(local_user(), 'quattro', 'color' );
+
+ return quattro_form($a,$align, $color);
+}
+
+function theme_post(&$a){
+ if(! local_user())
+ return;
+
+ if (isset($_POST['quattro-settings-submit'])){
+ set_pconfig(local_user(), 'quattro', 'align', $_POST['quattro_align']);
+ set_pconfig(local_user(), 'quattro', 'color', $_POST['quattro_color']);
+ }
+}
+
+
+function theme_admin(&$a){
+ $align = get_config('quattro', 'align' );
+ $color = get_config('quattro', 'color' );
+
+ return quattro_form($a,$align, $color);
+}
+
+function theme_admin_post(&$a){
+ if (isset($_POST['quattro-settings-submit'])){
+ set_config('quattro', 'align', $_POST['quattro_align']);
+ set_config('quattro', 'color', $_POST['quattro_color']);
+ }
+}
+
+
+function quattro_form(&$a, $align, $color){
$colors = array(
"dark"=>"Quattro",
"green"=>"Green"
@@ -26,14 +57,3 @@ function theme_content(&$a){
));
return $o;
}
-
-function theme_post(&$a){
- if(! local_user())
- return;
-
- if (isset($_POST['quattro-settings-submit'])){
- set_pconfig(local_user(), 'quattro', 'align', $_POST['quattro_align']);
- set_pconfig(local_user(), 'quattro', 'color', $_POST['quattro_color']);
- }
-}
-