diff --git a/include/security.php b/include/security.php index b13a507cf4..70896992d9 100644 --- a/include/security.php +++ b/include/security.php @@ -299,8 +299,9 @@ function permissions_sql($owner_id, $remote_verified = false, $groups = null) $gs = '<<>>'; // should be impossible to match if (is_array($groups) && count($groups)) { - foreach ($groups as $g) + foreach ($groups as $g) { $gs .= '|<' . intval($g) . '>'; + } } $sql = sprintf( diff --git a/include/text.php b/include/text.php index 4c9a8864d5..b59ecdbc0d 100644 --- a/include/text.php +++ b/include/text.php @@ -1660,10 +1660,11 @@ function bb_translate_video($s) { $r = preg_match_all("/\[video\](.*?)\[\/video\]/ism",$s,$matches,PREG_SET_ORDER); if ($r) { foreach ($matches as $mtch) { - if ((stristr($mtch[1],'youtube')) || (stristr($mtch[1],'youtu.be'))) - $s = str_replace($mtch[0],'[youtube]' . $mtch[1] . '[/youtube]',$s); - elseif (stristr($mtch[1],'vimeo')) - $s = str_replace($mtch[0],'[vimeo]' . $mtch[1] . '[/vimeo]',$s); + if ((stristr($mtch[1], 'youtube')) || (stristr($mtch[1], 'youtu.be'))) { + $s = str_replace($mtch[0], '[youtube]' . $mtch[1] . '[/youtube]', $s); + } elseif (stristr($mtch[1], 'vimeo')) { + $s = str_replace($mtch[0], '[vimeo]' . $mtch[1] . '[/vimeo]', $s); + } } } return $s; @@ -1781,7 +1782,7 @@ function file_tag_file_query($table,$s,$type = 'file') { } // ex. given music,video return