diff options
author | zottel <github@zottel.net> | 2012-04-15 14:11:11 +0200 |
---|---|---|
committer | zottel <github@zottel.net> | 2012-04-15 14:11:11 +0200 |
commit | a2c4ce74871dbe9e640cdeafc1574bda5b7fe144 (patch) | |
tree | fce1c1b2d497adae72d77e09c6bf005c8900256b /view/theme/quattro/config.php | |
parent | 0bad8de0562a50fa93b0af5fd4cf8d7123a11b46 (diff) | |
parent | f299749758112361ee6384cd75d11b2c3a57352a (diff) | |
download | volse-hubzilla-a2c4ce74871dbe9e640cdeafc1574bda5b7fe144.tar.gz volse-hubzilla-a2c4ce74871dbe9e640cdeafc1574bda5b7fe144.tar.bz2 volse-hubzilla-a2c4ce74871dbe9e640cdeafc1574bda5b7fe144.zip |
Merge remote branch 'upstream/master'
Diffstat (limited to 'view/theme/quattro/config.php')
-rw-r--r-- | view/theme/quattro/config.php | 42 |
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']); - } -} - |