mirror of
https://codeberg.org/streams/streams.git
synced 2024-09-20 03:35:13 +00:00
fangs bared
This commit is contained in:
parent
0c8866acde
commit
0fef39a326
1 changed files with 23 additions and 1 deletions
|
@ -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 = '';
|
||||
|
|
Loading…
Reference in a new issue