aboutsummaryrefslogtreecommitdiffstats
path: root/include/network.php
diff options
context:
space:
mode:
authorfabrixxm <fabrix.xm@gmail.com>2011-08-22 13:56:08 +0200
committerfabrixxm <fabrix.xm@gmail.com>2011-08-22 13:56:08 +0200
commitd8bd4fbb3e38bf0ff9c7b61dba58e20c0d097d75 (patch)
treedbdc1dbffe5c56dcff18669e957f679b5ae37bb3 /include/network.php
parentafdc639f17f0f5e12f291b512ccc12b3df6b2acf (diff)
parent564ade0685470158ac487d9a9f18a21079c729bb (diff)
downloadvolse-hubzilla-d8bd4fbb3e38bf0ff9c7b61dba58e20c0d097d75.tar.gz
volse-hubzilla-d8bd4fbb3e38bf0ff9c7b61dba58e20c0d097d75.tar.bz2
volse-hubzilla-d8bd4fbb3e38bf0ff9c7b61dba58e20c0d097d75.zip
Merge branch 'master' into newui
Diffstat (limited to 'include/network.php')
-rw-r--r--include/network.php24
1 files changed, 23 insertions, 1 deletions
diff --git a/include/network.php b/include/network.php
index bbf1d6a63..d4f0d8aa7 100644
--- a/include/network.php
+++ b/include/network.php
@@ -536,7 +536,7 @@ function fetch_xrd_links($url) {
$aliases = array($alias);
else
$aliases = $alias;
- if(count($aliases)) {
+ if($aliases && count($aliases)) {
foreach($aliases as $alias) {
$links[]['@attributes'] = array('rel' => 'alias' , 'href' => $alias);
}
@@ -693,3 +693,25 @@ function parse_xml_string($s,$strict = true) {
}
return $x;
}}
+
+function add_fcontact($arr) {
+
+ $r = q("insert into fcontact ( `url`,`name`,`photo`,`request`,`nick`,`addr`,
+ `notify`,`poll`,`confirm`,`network`,`alias`,`pubkey`,`updated` )
+ values('%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s')",
+ dbesc($arr['url']),
+ dbesc($arr['name']),
+ dbesc($arr['photo']),
+ dbesc($arr['request']),
+ dbesc($arr['nick']),
+ dbesc($arr['addr']),
+ dbesc($arr['notify']),
+ dbesc($arr['poll']),
+ dbesc($arr['confirm']),
+ dbesc($arr['network']),
+ dbesc($arr['alias']),
+ dbesc($arr['pubkey']),
+ dbesc(datetime_convert())
+ );
+ return $r;
+}