From bc259cdc441717cce9b52fcd1c554925b843a25d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roland=20H=C3=A4der?= Date: Thu, 26 Jan 2017 16:01:56 +0100 Subject: [PATCH 01/81] added spaces + some curly braces MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Roland Häder --- include/security.php | 3 ++- include/text.php | 23 ++++++++++++++--------- 2 files changed, 16 insertions(+), 10 deletions(-) diff --git a/include/security.php b/include/security.php index b13a507cf..70896992d 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 4c9a8864d..b59ecdbc0 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