mirror of
https://codeberg.org/streams/streams.git
synced 2024-09-20 00:55:19 +00:00
Merge branch 'dev' of ../p3 into dev
This commit is contained in:
commit
da0e82c2a9
3 changed files with 8 additions and 6 deletions
9
boot.php
9
boot.php
|
@ -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;
|
||||
|
|
|
@ -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 ];
|
||||
|
|
|
@ -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))
|
||||
|
|
Loading…
Reference in a new issue