X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=view%2Ftheme%2Ffrio%2Fphp%2Ffrio_boot.php;h=3f8ed1ed0b0e87a857aff5e56c84781768d8bbff;hb=e88781164a2e60c439c755d96a639ef2093a7305;hp=0e221f5337db55a38c6f9623128824b332a9e13d;hpb=20e71d21a6206c03f2137eb82edf8f8b3bc644f2;p=friendica.git diff --git a/view/theme/frio/php/frio_boot.php b/view/theme/frio/php/frio_boot.php index 0e221f5337..3f8ed1ed0b 100644 --- a/view/theme/frio/php/frio_boot.php +++ b/view/theme/frio/php/frio_boot.php @@ -2,41 +2,41 @@ /** * @file view/theme/frio/php/frio_boot.php - * - * @brief This file contains functions for page contstruction - * + * + * @brief This file contains functions for page construction + * */ +use Friendica\App; /** * @brief Load page template in dependence of the template mode - * + * * @todo Check if this is really needed. */ -function load_page(App &$a) { - if(isset($_GET["mode"]) AND ($_GET["mode"] == "minimal")) { - require "view/theme/frio/minimal.php"; - } elseif((isset($_GET["mode"]) AND ($_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() . '/' + . ((x($a->page, 'template')) ? $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 - * + * * This function checks if $_REQUEST['pagename'] is * a defined in a $modalpages - * + * * @return bool */ function is_modal() { @@ -48,53 +48,53 @@ function is_modal() { $is_modal = true; } } - + return $is_modal; } /** * @brief Array with modalpages - * + * * The array contains the page names of the pages * which should displayed as modals - * + * * @return array Pagenames as path */ 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; } /** * @brief Array with standard pages - * + * * The array contains the page names of the pages * which should displayed as standard-page - * + * * @return array Pagenames as path */ function get_standard_page_list() { //Arry of pages wich getting the standard page template - $standardpages = array(//'profile', + $standardpages = [//'profile', // 'fbrowser/image/' - ); + ]; return $standardpages; } /** * @brief Check if page is standard page - * + * * This function checks if $_REQUEST['pagename'] is * a defined $standardpages - * + * * @param string $pagetitle Title of the actual page * @return bool */ @@ -107,12 +107,12 @@ function is_standard_page($pagetitle) { $is_standard_page = true; } } - + return $is_standard_page; } /** * @brief Get the typ of the page - * + * * @param type $pagetitle * @return string */