check_webbie (webbie validator) returning bad webbies

This commit is contained in:
friendica 2014-04-06 19:59:00 -07:00
parent 81ce5f14d2
commit 28b7eedc45

View File

@ -1763,6 +1763,7 @@ function check_webbie($arr) {
$str .= "'" . dbesc($y) . "'"; $str .= "'" . dbesc($y) . "'";
} }
} }
if(strlen($str)) { if(strlen($str)) {
$r = q("select channel_address from channel where channel_address in ( $str ) "); $r = q("select channel_address from channel where channel_address in ( $str ) ");
if(count($r)) { if(count($r)) {
@ -1771,8 +1772,9 @@ function check_webbie($arr) {
} }
} }
foreach($arr as $x) { foreach($arr as $x) {
if(! in_array($x,$taken)) { $y = legal_webbie($x);
return $x; if(! in_array($y,$taken)) {
return $y;
} }
} }
} }