diff options
Diffstat (limited to 'boot.php')
-rw-r--r-- | boot.php | 33 |
1 files changed, 21 insertions, 12 deletions
@@ -29,6 +29,8 @@ // composer autoloader for all namespaced Classes use Zotlabs\Lib\Crypto; +use Zotlabs\Lib\Libzot; +use Zotlabs\Lib\Config; require_once('vendor/autoload.php'); @@ -53,10 +55,10 @@ require_once('include/bbcode.php'); require_once('include/items.php'); define ( 'PLATFORM_NAME', 'hubzilla' ); -define ( 'STD_VERSION', '6.3.6' ); +define ( 'STD_VERSION', '7.0RC' ); define ( 'ZOT_REVISION', '6.0' ); -define ( 'DB_UPDATE_VERSION', 1248 ); +define ( 'DB_UPDATE_VERSION', 1250 ); define ( 'PROJECT_BASE', __DIR__ ); @@ -482,7 +484,7 @@ define ( 'NAMESPACE_YMEDIA', 'http://search.yahoo.com/mrss/' ); define ( 'ACTIVITYSTREAMS_JSONLD_REV', 'https://www.w3.org/ns/activitystreams' ); -define ( 'ZOT_APSCHEMA_REV', '/apschema/v1.9' ); +define ( 'ZOT_APSCHEMA_REV', '/apschema/v1.10' ); /** * activity stream defines */ @@ -858,7 +860,7 @@ class App { private static $baseurl; - private static $meta; + public static $meta; /** * App constructor. @@ -1184,6 +1186,11 @@ class App { if($interval < 10000) $interval = 80000; + $theme_color = ((local_channel()) ? get_pconfig(local_channel(), 'redbasic', 'nav_bg') : App::$theme_info['theme_color']); + if (!$theme_color) { + $theme_color = App::$theme_info['theme_color']; + } + if(! isset(self::$page['title']) && isset(self::$config['system']['sitename'])) self::$page['title'] = self::$config['system']['sitename']; @@ -1198,13 +1205,17 @@ class App { } } + // webmanifest head_add_link(['rel' => 'manifest', 'href' => '/manifest.json']); self::$meta->set('application-name', Zotlabs\Lib\System::get_platform_name()); self::$meta->set('generator', Zotlabs\Lib\System::get_platform_name()); + self::$meta->set('theme-color', $theme_color); head_add_link(['rel' => 'shortcut icon', 'href' => head_get_icon()]); + head_add_link(['rel' => 'apple-touch-icon', 'href' => '/images/app/hz-192.png']); + $x = [ 'header' => '' ]; /** @@ -1527,8 +1538,6 @@ function check_config() { function fix_system_urls($oldurl, $newurl) { - require_once('include/crypto.php'); - logger('fix_system_urls: renaming ' . $oldurl . ' to ' . $newurl); // Basically a site rename, but this can happen if you change from http to https for instance - even if the site name didn't change @@ -1538,7 +1547,7 @@ function fix_system_urls($oldurl, $newurl) { // that they can clean up their hubloc tables (this includes directories). // It's a very expensive operation so you don't want to have to do it often or after your site gets to be large. - $r = q("select xchan.*, hubloc.* from xchan left join hubloc on xchan_hash = hubloc_hash where hubloc_url like '%s'", + $r = q("select xchan.*, hubloc.* from xchan left join hubloc on xchan_hash = hubloc_hash where hubloc_url like '%s' and hubloc_network = 'zot6'", dbesc($oldurl . '%') ); @@ -1586,13 +1595,14 @@ function fix_system_urls($oldurl, $newurl) { dbesc($rv['xchan_hash']) ); - $y = q("update hubloc set hubloc_addr = '%s', hubloc_url = '%s', hubloc_id_url = '%s', hubloc_url_sig = '%s', hubloc_host = '%s', hubloc_callback = '%s' where hubloc_hash = '%s' and hubloc_url = '%s'", + $y = q("update hubloc set hubloc_addr = '%s', hubloc_url = '%s', hubloc_id_url = '%s', hubloc_url_sig = '%s', hubloc_site_id = '%s', hubloc_host = '%s', hubloc_callback = '%s' where hubloc_hash = '%s' and hubloc_url = '%s'", dbesc($channel_address . '@' . $rhs), dbesc($newurl), - dbesc(str_replace($oldurl,$newurl,$rv['hubloc_id_url'])), - dbesc(($rv['hubloc_network'] === 'zot6') ? \Zotlabs\Lib\Libzot::sign($newurl,$c[0]['channel_prvkey']) : base64url_encode(Crypto::sign($newurl,$c[0]['channel_prvkey']))), + dbesc(str_replace($oldurl, $newurl,$rv['hubloc_id_url'])), + dbesc(Libzot::sign($newurl, $c[0]['channel_prvkey'])), + dbesc(Libzot::make_xchan_hash($newurl, Config::Get('system','pubkey'))), dbesc($newhost), - dbesc(($rv['hubloc_network'] === 'zot6') ? $newurl . '/zot' : $newurl . '/post'), + dbesc($newurl . '/zot'), dbesc($rv['xchan_hash']), dbesc($oldurl) ); @@ -2341,7 +2351,6 @@ function construct_page() { $current_theme = Zotlabs\Render\Theme::current(); - // logger('current_theme: ' . print_r($current_theme,true)); // Zotlabs\Render\Theme::debug(); |