No need to set $a->theme_info = array() everywhere if you can define it in App
authorRoland Haeder <roland@mxchange.org>
Tue, 1 Mar 2016 13:27:38 +0000 (14:27 +0100)
committerRoland Haeder <roland@mxchange.org>
Tue, 1 Mar 2016 13:27:38 +0000 (14:27 +0100)
itself.

Signed-off-by: Roland Haeder <roland@mxchange.org>
boot.php
view/theme/decaf-mobile/theme.php
view/theme/duepuntozero/theme.php
view/theme/facepark/theme.php
view/theme/frost-mobile/theme.php
view/theme/frost/theme.php
view/theme/quattro/theme.php
view/theme/smoothly/theme.php
view/theme/vier/theme.php

index d82669f..4b2e83f 100644 (file)
--- a/boot.php
+++ b/boot.php
@@ -465,11 +465,12 @@ class App {
        public  $plugins;
        public  $apps = array();
        public  $identities;
-       public  $is_mobile;
-       public  $is_tablet;
+       public  $is_mobile = false;
+       public  $is_tablet = false;
        public  $is_friendica_app;
        public  $performance = array();
        public  $callstack = array();
+       public  $theme_info = array();
 
        public $nav_sel;
 
index 1a32fb7..9b1c1da 100644 (file)
@@ -10,7 +10,6 @@
  */
 
 function decaf_mobile_init(&$a) {
-       $a->theme_info = array();
        $a->sourcename = 'Friendica mobile web';
        $a->videowidth = 250;
        $a->videoheight = 200;
index ba3f25d..50d57f9 100644 (file)
@@ -2,7 +2,6 @@
 
 function duepuntozero_init(&$a) {
 
-$a->theme_info = array();
 set_template_engine($a, 'smarty3');
 
     $colorset = get_pconfig( local_user(), 'duepuntozero','colorset');
index e7203c6..e6255f1 100644 (file)
@@ -1,7 +1,6 @@
 <?php
 
 function facepark_init(&$a) {
-$a->theme_info = array();
 set_template_engine($a, 'smarty3');
 
 $a->page['htmlhead'] .= <<< EOT
index beec924..29a990f 100644 (file)
@@ -10,7 +10,6 @@
  */
 
 function frost_mobile_init(&$a) {
-       $a->theme_info = array();
        $a->sourcename = 'Friendica mobile web';
        $a->videowidth = 250;
        $a->videoheight = 200;
index 868a840..1093a04 100644 (file)
@@ -10,7 +10,6 @@
  */
 
 function frost_init(&$a) {
-       $a->theme_info = array();
        $a->videowidth = 400;
        $a->videoheight = 330;
        $a->theme_thread_allow = false;
index a1cd29e..0b67c6b 100644 (file)
@@ -8,8 +8,6 @@
  */
 
 function quattro_init(&$a) {
-       $a->theme_info = array();
-
        $a->page['htmlhead'] .= '<script src="'.$a->get_baseurl().'/view/theme/quattro/tinycon.min.js"></script>';
        $a->page['htmlhead'] .= '<script src="'.$a->get_baseurl().'/view/theme/quattro/js/quattro.js"></script>';;
 }
index d3ebbc1..0dae3a6 100644 (file)
@@ -11,7 +11,6 @@
  */
 
 function smoothly_init(&$a) {
-       $a->theme_info = array();
        set_template_engine($a, 'smarty3');
 
        $cssFile = null;
index 7f6ead0..925ac76 100644 (file)
@@ -19,8 +19,6 @@ function vier_init(&$a) {
 
        set_template_engine($a, 'smarty3');
 
-       $a->theme_info = array();
-
        if ($a->argv[0].$a->argv[1] === "profile".$a->user['nickname'] or $a->argv[0] === "network" && local_user()) {
                vier_community_info();