Merge branch 'dev' of ../p3 into dev

This commit is contained in:
nobody 2021-02-22 18:37:39 -08:00
commit da0e82c2a9
3 changed files with 8 additions and 6 deletions

View file

@ -1930,11 +1930,11 @@ function is_site_admin() {
if(! session_id())
return false;
if($_SESSION['delegate'])
if(isset($_SESSION['delegate']))
return false;
if((intval($_SESSION['authenticated']))
&& (is_array(App::$account))
if(isset($_SESSION['authenticated']) && intval($_SESSION['authenticated'])
&& is_array(App::$account)
&& (App::$account['account_roles'] & ACCOUNT_ROLE_ADMIN))
return true;
@ -1953,7 +1953,8 @@ function is_developer() {
if(! session_id())
return false;
if((intval($_SESSION['authenticated']))
if(isset($_SESSION['authenticated'])
&& (intval($_SESSION['authenticated']))
&& (is_array(App::$account))
&& (App::$account['account_roles'] & ACCOUNT_ROLE_DEVELOPER))
return true;

View file

@ -2002,7 +2002,7 @@ function bbcode($Text, $options = []) {
else {
$Text = preg_replace("/\<(.*?)(src|href)=\"[^zhgfmt#](.*?)\>/ism", '<$1$2="">', $Text);
}
$Text = bb_replace_images($Text, $saved_images);
$args = [ 'text' => $Text, 'options' => $options ];

View file

@ -59,7 +59,8 @@ function zid($s, $address = '') {
$mine_parsed = parse_url($mine);
$s_parsed = parse_url($s);
if($mine_parsed['host'] === $s_parsed['host'])
if(isset($mine_parsed['host']) && isset($s_parsed['host'])
&& $mine_parsed['host'] === $s_parsed['host'])
$url_match = true;
if ($mine && $myaddr && (! $url_match))