sforkowany z mirror/friendica
added spaces + some curly braces
Signed-off-by: Roland Häder <roland@mxchange.org>2022.09-rc
rodzic
3228bb614c
commit
bc259cdc44
|
@ -299,9 +299,10 @@ 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(
|
||||
" AND ( NOT (deny_cid REGEXP '<%d>' OR deny_gid REGEXP '%s')
|
||||
|
|
|
@ -1660,12 +1660,13 @@ 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')))
|
||||
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'))
|
||||
} elseif (stristr($mtch[1], 'vimeo')) {
|
||||
$s = str_replace($mtch[0], '[vimeo]' . $mtch[1] . '[/vimeo]', $s);
|
||||
}
|
||||
}
|
||||
}
|
||||
return $s;
|
||||
}
|
||||
|
||||
|
@ -1853,9 +1854,10 @@ function file_tag_update_pconfig($uid, $file_old, $file_new, $type = 'file') {
|
|||
$check_new_tags = explode(",",file_tag_file_to_list($file_new,$type));
|
||||
|
||||
foreach ($check_new_tags as $tag) {
|
||||
if (! stristr($saved,$lbracket . file_tag_encode($tag) . $rbracket))
|
||||
if (! stristr($saved,$lbracket . file_tag_encode($tag) . $rbracket)) {
|
||||
$new_tags[] = $tag;
|
||||
}
|
||||
}
|
||||
|
||||
$filetags_updated .= file_tag_list_to_file(implode(",",$new_tags),$type);
|
||||
|
||||
|
@ -1864,9 +1866,10 @@ function file_tag_update_pconfig($uid, $file_old, $file_new, $type = 'file') {
|
|||
$check_deleted_tags = explode(",",file_tag_file_to_list($file_old,$type));
|
||||
|
||||
foreach ($check_deleted_tags as $tag) {
|
||||
if (! stristr($file_new,$lbracket . file_tag_encode($tag) . $rbracket))
|
||||
if (! stristr($file_new,$lbracket . file_tag_encode($tag) . $rbracket)) {
|
||||
$deleted_tags[] = $tag;
|
||||
}
|
||||
}
|
||||
|
||||
foreach ($deleted_tags as $key => $tag) {
|
||||
$r = q("SELECT `oid` FROM `term` WHERE `term` = '%s' AND `otype` = %d AND `type` = %d AND `uid` = %d",
|
||||
|
@ -1986,6 +1989,7 @@ function is_a_date_arg($s) {
|
|||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -2003,6 +2007,7 @@ function deindent($text, $chr = "[\t ]", $count = NULL) {
|
|||
preg_match("|^" . $chr . "*|", $lines[$k], $m);
|
||||
$count = strlen($m[0]);
|
||||
}
|
||||
|
||||
for ($k = 0; $k < count($lines); $k++) {
|
||||
$lines[$k] = preg_replace("|^" . $chr . "{" . $count . "}|", "", $lines[$k]);
|
||||
}
|
||||
|
|
Ładowanie…
Reference in New Issue