if ($application_name == "")
$application_name = $a->get_hostname();
+ $adminlist = explode(",", str_replace(" ", "", $a->config['admin_email']));
+
$params["type"] = "client_associate";
- $params["contacts"] = $a->config['admin_email'];
+ $params["contacts"] = $adminlist[0];
$params["application_type"] = "native";
$params["application_name"] = $application_name;
$params["logo_url"] = $a->get_baseurl()."/images/friendica-256.png";
set_pconfig(local_user(),'pumpio','mirror',false);
set_pconfig(local_user(),'pumpio','post_by_default',false);
set_pconfig(local_user(),'pumpio','lastdate', 0);
+ set_pconfig(local_user(),'pumpio','last_id', '');
} else {
// filtering the username if it is filled wrong
$user = $_POST['pumpio_user'];
}
}
-
-function pumpio_cron(&$a,$b) {
+function pumpio_sync(&$a) {
$last = get_config('pumpio','last_poll');
$poll_interval = intval(get_config('pumpio','poll_interval'));
set_config('pumpio','last_poll', time());
}
+function pumpio_cron(&$a,$b) {
+ //pumpio_sync($a);
+ proc_run("php","addon/pumpio/pumpio_sync.php");
+}
+
function pumpio_fetchtimeline(&$a, $uid) {
$ckey = get_pconfig($uid, 'pumpio', 'consumer_key');
$csecret = get_pconfig($uid, 'pumpio', 'consumer_secret');
$postarray['body'] = "[share author='".$post->object->author->displayName.
"' profile='".$post->object->author->url.
"' avatar='".$post->object->author->image->url.
+ "' posted='".datetime_convert('UTC','UTC',$post->object->created).
"' link='".$post->links->self->href."']".$postarray['body']."[/share]";
} else {
// Let shares look like wall-to-wall posts
return false;
$top_item = item_store($postarray);
+ $postarray["id"] = $top_item;
if (($top_item == 0) AND ($post->verb == "update")) {
$r = q("UPDATE `item` SET `title` = '%s', `body` = '%s' , `changed` = '%s' WHERE `uri` = '%s' AND `uid` = %d",