validate poco chatrooms before storing

This commit is contained in:
friendica 2015-01-15 20:59:26 -08:00
parent ec4d3a2349
commit 9bedb38621

View file

@ -72,6 +72,9 @@ function poco_load($xchan = '',$url = null) {
if($xchan) {
if(array_key_exists('chatrooms',$j) && is_array($j['chatrooms'])) {
foreach($j['chatrooms'] as $room) {
if((! $room['url']) || (! $room['desc']))
continue;
$r = q("select * from xchat where xchat_url = '%s' and xchat_xchan = '%s' limit 1",
dbesc($room['url']),
dbesc($xchan)