1
0
Fork 0

Replace deprecated $a->page with DI::page()

This commit is contained in:
Philipp Holzer 2019-12-30 20:02:09 +01:00
commit 6d7362da41
No known key found for this signature in database
GPG key ID: D8365C3D36B77D90
48 changed files with 197 additions and 198 deletions

View file

@ -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 {

View file

@ -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>