From 4805473bd077579bbc5abed4e01a8c3200e16208 Mon Sep 17 00:00:00 2001 From: nobody Date: Thu, 1 Apr 2021 14:39:18 -0700 Subject: [PATCH 1/2] error parsing coordinates --- include/text.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/include/text.php b/include/text.php index 7c90430b1..c7a0c8e17 100644 --- a/include/text.php +++ b/include/text.php @@ -1588,10 +1588,16 @@ function format_filer(&$item) { function generate_map($coord) { $coord = str_replace(array(',','/',' '),array(' ',' ',' '),trim($coord)); - $zoom = substr($coord,strpos($coord,'?z=')+3); + + + $zoom = ((strpos($coord,'?z=') !== false) ? substr($coord,strpos($coord,'?z=')+3) : 0); + if ($zoom) { $coord = substr($coord,0,strpos($coord,'?')); } + else { + $zoom = 16; + } $arr = [ 'lat' => trim(substr($coord, 0, strpos($coord, ' '))), From eb8db87fe6aa7a375cb6e008f6fa04273d6720b4 Mon Sep 17 00:00:00 2001 From: nobody Date: Thu, 1 Apr 2021 14:46:50 -0700 Subject: [PATCH 2/2] issue with siteinfo --- Zotlabs/Lib/System.php | 4 ++-- Zotlabs/Module/Sites.php | 2 +- boot.php | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Zotlabs/Lib/System.php b/Zotlabs/Lib/System.php index 2e25f76f6..9ca70c3c5 100644 --- a/Zotlabs/Lib/System.php +++ b/Zotlabs/Lib/System.php @@ -42,7 +42,7 @@ class System { static public function get_project_version() { - if((! array_path_exists('system/hide_version', App::$config)) || App::$config['system']['hide_version']) + if(array_path_exists('system/hide_version', App::$config) && intval(App::$config['system']['hide_version'])) return ''; if(is_array(App::$config) && is_array(App::$config['system']) && array_key_exists('std_version',App::$config['system'])) return App::$config['system']['std_version']; @@ -112,7 +112,7 @@ class System { static public function compatible_project($p) { - if (in_array(strtolower($p),['hubzilla','zap','red','misty','mistpark','redmatrix','osada'])) { + if (in_array(strtolower($p),['hubzilla','zap','red','misty','mistpark','redmatrix','osada', 'roadhouse'])) { return true; } return false; diff --git a/Zotlabs/Module/Sites.php b/Zotlabs/Module/Sites.php index fa23a4b51..40131dbd3 100644 --- a/Zotlabs/Module/Sites.php +++ b/Zotlabs/Module/Sites.php @@ -7,7 +7,7 @@ class Sites extends \Zotlabs\Web\Controller { function get() { - $sql_extra = (($_REQUEST['project']) ? " and site_project = '" . escape_tags(protect_sprintf(escape_tags($_REQUEST['project']))) . "' " : ""); + $sql_extra = (($_REQUEST['project']) ? " and site_project = '" . escape_tags(protect_sprintf(dbesc($_REQUEST['project']))) . "' " : ""); $desc = t('This page provides information about related projects and websites that are currently known to this system. These are a small fraction of the thousands of websites and dozens of projects and providers which make up the fediverse.'); diff --git a/boot.php b/boot.php index 7da10e9e0..9d064b164 100755 --- a/boot.php +++ b/boot.php @@ -16,7 +16,7 @@ use Zotlabs\Daemon\Run; * @brief This file defines some global constants and includes the central App class. */ -define ( 'STD_VERSION', '21.03.31' ); +define ( 'STD_VERSION', '21.04.02' ); define ( 'ZOT_REVISION', '10.0' ); define ( 'DB_UPDATE_VERSION', 1247 );