operation snakebite, cont.

This commit is contained in:
friendica
2015-03-22 20:30:23 -07:00
parent ccef9e5636
commit 62b2fa6ac7
3 changed files with 32 additions and 9 deletions

View File

@@ -727,6 +727,16 @@ require_once('include/items.php');
else
$_REQUEST['parent_mid'] = $parent;
if($_REQUEST['namespace'] && $parent) {
$x = q("select iid from item_id where service = '%s' and sid = '%s' limit 1",
dbesc($_REQUEST['namespace']),
dbesc($parent)
);
if($x) {
$_REQUEST['parent'] = $x[0]['iid'];
}
}
if(requestdata('lat') && requestdata('long'))
$_REQUEST['coord'] = sprintf("%s %s",requestdata('lat'),requestdata('long'));

View File

@@ -256,12 +256,12 @@ function xchan_fetch($arr) {
if(! $key)
return false;
$r = q("select * from xchan where $key = '$v'");
$r = q("select * from xchan where $key = '$v' limit 1");
if(! $r)
return false;
$ret = array();
foreach($r as $k => $v) {
foreach($r[0] as $k => $v) {
if($k === 'xchan_addr')
$ret['address'] = $v;
else