aboutsummaryrefslogtreecommitdiffstats
path: root/include/items.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2014-08-19 22:47:11 -0700
committerfriendica <info@friendica.com>2014-08-19 22:47:11 -0700
commit0fef39a3265602905d1f629c1209e8279c54f0d9 (patch)
tree6069ad32f80b130bcf6a19b5950626dd0110b2c3 /include/items.php
parent0c8866acdec1cef35ab5ac0e449f10a50e59a60e (diff)
downloadvolse-hubzilla-0fef39a3265602905d1f629c1209e8279c54f0d9.tar.gz
volse-hubzilla-0fef39a3265602905d1f629c1209e8279c54f0d9.tar.bz2
volse-hubzilla-0fef39a3265602905d1f629c1209e8279c54f0d9.zip
fangs bared
Diffstat (limited to 'include/items.php')
-rwxr-xr-xinclude/items.php24
1 files changed, 23 insertions, 1 deletions
diff --git a/include/items.php b/include/items.php
index 0392e07a0..30a685ed3 100755
--- a/include/items.php
+++ b/include/items.php
@@ -3005,7 +3005,7 @@ function mail_store($arr) {
* recursion.
*/
-function consume_feed($xml,$importer,&$contact, &$hub, $datedir = 0, $pass = 0) {
+function consume_feed($xml,$importer,&$contact,$pass = 0) {
require_once('library/simplepie/simplepie.inc');
@@ -3361,6 +3361,28 @@ logger('consume_feed: ' . print_r($datarray,true));
}
+function handle_feed($uid,$abook_id,$url) {
+
+ require_once('include/Contact.php');
+ $channel = channelx_by_n($uid);
+ if(! $channel)
+ return;
+ $x = q("select * from abook left join xchan on abook_xchan = xchan_hash where abook_id = %d and abook_channel = %d limit 1",
+ dbesc($abook_id),
+ intval($uid)
+ );
+
+ $recurse = 0;
+ $z = z_fetch_url($url,false,$recurse,array('novalidate' => true));
+
+logger('handle_feed:' . print_r($z,true));
+
+ if($z['success']) {
+ consume_feed($z['body'],$channel,$x[0],0);
+ consume_feed($z['body'],$channel,$x[0],1);
+ }
+}
+
function atom_author($tag,$name,$uri,$h,$w,$type,$photo) {
$o = '';