diff options
author | Max Kostikov <max@kostikov.co> | 2021-03-03 20:05:37 +0000 |
---|---|---|
committer | Max Kostikov <max@kostikov.co> | 2021-03-03 20:05:37 +0000 |
commit | cf7f380568b195a01d909b2735d89e7ad8173ec0 (patch) | |
tree | cfef778de2d1464eb212d5e28e4720bd3ad9f49b /boot.php | |
parent | 7e36727ce62318315698930d5209650d323a78a9 (diff) | |
parent | c2dc3e8dec7acf1f1750f7379e641ae8c7a2ed81 (diff) | |
download | volse-hubzilla-cf7f380568b195a01d909b2735d89e7ad8173ec0.tar.gz volse-hubzilla-cf7f380568b195a01d909b2735d89e7ad8173ec0.tar.bz2 volse-hubzilla-cf7f380568b195a01d909b2735d89e7ad8173ec0.zip |
Merge branch 'dev' into 'dev'
# Conflicts:
# boot.php
Diffstat (limited to 'boot.php')
-rw-r--r-- | boot.php | 24 |
1 files changed, 14 insertions, 10 deletions
@@ -1183,14 +1183,18 @@ class App { if($interval < 10000) $interval = 80000; - if(! x(self::$page,'title')) + if(! isset(self::$page['title']) && isset(self::$config['system']['sitename'])) self::$page['title'] = self::$config['system']['sitename']; - $pagemeta = [ 'og:title' => self::$page['title'] ]; + if(isset(self::$page['title'])) + $pagemeta = [ 'og:title' => self::$page['title'] ]; call_hooks('page_meta',$pagemeta); - foreach ($pagemeta as $metaproperty => $metavalue) { - self::$meta->set($metaproperty,$metavalue); + + if($pagemeta) { + foreach ($pagemeta as $metaproperty => $metavalue) { + self::$meta->set($metaproperty,$metavalue); + } } self::$meta->set('generator', Zotlabs\Lib\System::get_platform_name()); @@ -1226,10 +1230,10 @@ class App { '$linkrel' => head_get_links(), '$js_strings' => js_strings(), '$zid' => get_my_address(), - '$channel_id' => self::$profile['uid'], - '$auto_save_draft' => ((feature_enabled(self::$profile['uid'], 'auto_save_draft')) ? "true" : "false") + '$channel_id' => self::$profile['uid'] ?? 0, + '$auto_save_draft' => ((isset(self::$profile['uid']) && feature_enabled(self::$profile['uid'], 'auto_save_draft')) ? "true" : "false") ] - ) . self::$page['htmlhead']; + ) . ((isset(self::$page['htmlhead'])) ? self::$page['htmlhead'] : ''); // always put main.js at the end self::$page['htmlhead'] .= head_get_main_js(); @@ -2351,7 +2355,7 @@ function construct_page() { App::build_pagehead(); - if(App::$page['pdl_content']) { + if(isset(App::$page['pdl_content'])) { App::$page['content'] = App::$comanche->region(App::$page['content']); } @@ -2449,13 +2453,13 @@ function construct_page() { header($cspheader); } - if(App::$config['system']['x_security_headers']) { + if(isset(App::$config['system']['x_security_headers'])) { header("X-Frame-Options: SAMEORIGIN"); header("X-Xss-Protection: 1; mode=block;"); header("X-Content-Type-Options: nosniff"); } - if(App::$config['system']['public_key_pins']) { + if(isset(App::$config['system']['public_key_pins'])) { header("Public-Key-Pins: " . App::$config['system']['public_key_pins']); } |