Replace deprecated $a->page with DI::page()
This commit is contained in:
parent
6c2d13403e
commit
6d7362da41
48 changed files with 197 additions and 198 deletions
|
|
@ -8,6 +8,7 @@
|
|||
*/
|
||||
|
||||
use Friendica\App;
|
||||
use Friendica\DI;
|
||||
|
||||
/**
|
||||
* @brief Load page template in dependence of the template mode
|
||||
|
|
@ -22,7 +23,7 @@ function load_page(App $a)
|
|||
require 'view/theme/frio/none.php';
|
||||
} else {
|
||||
$template = 'view/theme/' . $a->getCurrentTheme() . '/'
|
||||
. (($a->page['template'] ?? '') ?: 'default' ) . '.php';
|
||||
. ((DI::page()['template'] ?? '') ?: 'default' ) . '.php';
|
||||
if (file_exists($template)) {
|
||||
require_once $template;
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ function frio_init(App $a)
|
|||
// if the device is a mobile device set js is_mobile
|
||||
// variable so the js scripts can use this information
|
||||
if (DI::mode()->isMobile() || DI::mode()->isMobile()) {
|
||||
$a->page['htmlhead'] .= <<< EOT
|
||||
DI::page()['htmlhead'] .= <<< EOT
|
||||
<script type="text/javascript">
|
||||
var is_mobile = 1;
|
||||
</script>
|
||||
|
|
@ -45,7 +45,7 @@ EOT;
|
|||
|
||||
$enable_compose = \Friendica\Core\PConfig::get(local_user(), 'frio', 'enable_compose');
|
||||
$compose = $enable_compose === '1' || $enable_compose === null && Config::get('frio', 'enable_compose') ? 1 : 0;
|
||||
$a->page['htmlhead'] .= <<< HTML
|
||||
DI::page()['htmlhead'] .= <<< HTML
|
||||
<script type="text/javascript">
|
||||
var compose = $compose;
|
||||
</script>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue