]> git.mxchange.org Git - friendica.git/blobdiff - view/theme/frio/php/frio_boot.php
mv URL path uexport -> userexport
[friendica.git] / view / theme / frio / php / frio_boot.php
index 91e0f6ff357afb686d1f315da654cda2d279e471..dcb87b6d27f160687dfd5f268f9a8c69ab0ee8f6 100644 (file)
@@ -14,24 +14,23 @@ use Friendica\App;
  *
  * @todo Check if this is really needed.
  */
-function load_page(App $a) {
-       if(isset($_GET["mode"]) && ($_GET["mode"] == "minimal")) {
-               require "view/theme/frio/minimal.php";
-       } elseif((isset($_GET["mode"]) && ($_GET["mode"] == "none"))) {
-               require "view/theme/frio/none.php";
+function load_page(App $a)
+{
+       if (isset($_GET['mode']) && ($_GET['mode'] == 'minimal')) {
+               require 'view/theme/frio/minimal.php';
+       } elseif ((isset($_GET['mode']) && ($_GET['mode'] == 'none'))) {
+               require 'view/theme/frio/none.php';
        } else {
-               $template = 'view/theme/' . current_theme() . '/'
-                       . ((x($a->page,'template')) ? $a->page['template'] : 'default' ) . '.php';
-               if(file_exists($template))
-                       require_once($template);
-               else
-                       require_once(str_replace('theme/' . current_theme() . '/', '', $template));
+               $template = 'view/theme/' . $a->getCurrentTheme() . '/'
+                       . defaults($a->page, 'template', 'default' ) . '.php';
+               if (file_exists($template)) {
+                       require_once $template;
+               } else {
+                       require_once str_replace('theme/' . $a->getCurrentTheme() . '/', '', $template);
+               }
        }
-
-
 }
 
-
 /**
  * @brief Check if page is a modal page
  *
@@ -63,12 +62,12 @@ function is_modal() {
  */
 function get_modalpage_list() {
        //Arry of pages wich getting bootstrap modal dialogs
-       $modalpages = array('poke/',
+       $modalpages = ['poke/',
                        'message/new',
                        'settings/oauth/add',
                        'events/new',
 //                     'fbrowser/image/'
-       );
+       ];
 
        return $modalpages;
 }
@@ -83,9 +82,9 @@ function get_modalpage_list() {
  */
 function get_standard_page_list() {
        //Arry of pages wich getting the standard page template
-       $standardpages = array(//'profile',
+       $standardpages = [//'profile',
 //                     'fbrowser/image/'
-       );
+       ];
 
        return $standardpages;
 }