]> git.mxchange.org Git - friendica.git/blobdiff - view/theme/frio/config.php
Merge remote-tracking branch 'upstream/develop' into develop
[friendica.git] / view / theme / frio / config.php
index cb4610e5905f1d0e7939ca33c2c8ab8fdabe8797..000ef26092fa43330d1dcdda24489ade8980f3f6 100644 (file)
@@ -1,8 +1,10 @@
 <?php
 require_once('view/theme/frio/php/Image.php');
 
-function theme_content(&$a) {
-       if(!local_user()) { return;}
+function theme_content(App &$a) {
+       if (!local_user()) {
+               return;
+       }
        $arr = array();
 
        $arr["schema"]          = get_pconfig(local_user(),'frio', 'schema');
@@ -17,8 +19,11 @@ function theme_content(&$a) {
        return frio_form($a, $arr);
 }
 
-function theme_post(&$a) {
-       if(!local_user()) { return;}
+function theme_post(App &$a) {
+       if (!local_user()) {
+               return;
+       }
+
        if (isset($_POST['frio-settings-submit'])) {
                set_pconfig(local_user(), 'frio', 'schema',             $_POST["frio_schema"]);
                set_pconfig(local_user(), 'frio', 'nav_bg',             $_POST["frio_nav_bg"]);
@@ -36,6 +41,7 @@ function frio_form(&$a, $arr) {
        
        $scheme_info = get_schema_info($arr["schema"]);
        $disable = $scheme_info["overwrites"];
+       if (!is_array($disable)) $disable = array();
 
        $scheme_choices = array();
        $scheme_choices["---"] = t("Default");
@@ -56,7 +62,7 @@ function frio_form(&$a, $arr) {
        $t = get_markup_template('theme_settings.tpl');
        $o .= replace_macros($t, array(
                '$submit'               => t('Submit'),
-               '$baseurl'              => $a->get_baseurl(),
+               '$baseurl'              => App::get_baseurl(),
                '$title'                => t("Theme settings"),
                '$schema'               => array('frio_schema',         t("Select scheme"),                     $arr["schema"], '', $scheme_choices),
                '$nav_bg'               => array_key_exists("nav_bg", $disable) ? "" : array('frio_nav_bg',             t('Navigation bar background color'),   $arr['nav_bg']),