validate poco chatrooms before storing
This commit is contained in:
parent
ec4d3a2349
commit
9bedb38621
@ -72,6 +72,9 @@ function poco_load($xchan = '',$url = null) {
|
|||||||
if($xchan) {
|
if($xchan) {
|
||||||
if(array_key_exists('chatrooms',$j) && is_array($j['chatrooms'])) {
|
if(array_key_exists('chatrooms',$j) && is_array($j['chatrooms'])) {
|
||||||
foreach($j['chatrooms'] as $room) {
|
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",
|
$r = q("select * from xchat where xchat_url = '%s' and xchat_xchan = '%s' limit 1",
|
||||||
dbesc($room['url']),
|
dbesc($room['url']),
|
||||||
dbesc($xchan)
|
dbesc($xchan)
|
||||||
|
Reference in New Issue
Block a user