diff --git a/extcron.tgz b/extcron.tgz index dabe1d09..0e5b2892 100755 Binary files a/extcron.tgz and b/extcron.tgz differ diff --git a/extcron/extcron.php b/extcron/extcron.php index 3eb34cdc..e3c21209 100755 --- a/extcron/extcron.php +++ b/extcron/extcron.php @@ -5,7 +5,7 @@ * Name: external cron * Description: Use external server or service to run poller regularly * Version: 1.0 - * Author: Mike Macgirvin + * Author: Mike Macgirvin * * Notes: External service needs to make a web request to http(s)://yoursite/extcron */ diff --git a/facebook.tgz b/facebook.tgz index 2dbd4efd..6bf8f7a9 100644 Binary files a/facebook.tgz and b/facebook.tgz differ diff --git a/facebook/facebook.php b/facebook/facebook.php index 4c1c0a14..f977bef9 100644 --- a/facebook/facebook.php +++ b/facebook/facebook.php @@ -383,12 +383,10 @@ function fb_get_friends_sync_full($uid, $access_token, $persons) { if($s) { $results = json_decode($s); logger('fb_get_friends: info: ' . print_r($results,true), LOGGER_DATA); - if(count($results)) { - foreach ($results as $contact) { - if ($contact->code != 200) logger('fb_get_friends: not found: ' . print_r($contact,true), LOGGER_DEBUG); - else fb_get_friends_sync_parsecontact($uid, json_decode($contact->body)); - } - } + foreach ($results as $contact) { + if ($contact->code != 200) logger('fb_get_friends: not found: ' . print_r($contact,true), LOGGER_DEBUG); + else fb_get_friends_sync_parsecontact($uid, json_decode($contact->body)); + } } } } diff --git a/fbpost.tgz b/fbpost.tgz index 790a5732..ecf933d8 100644 Binary files a/fbpost.tgz and b/fbpost.tgz differ diff --git a/fbpost/fbpost.php b/fbpost/fbpost.php index bef8117e..1486afdb 100644 --- a/fbpost/fbpost.php +++ b/fbpost/fbpost.php @@ -394,6 +394,10 @@ function fbpost_post_hook(&$a,&$b) { if($b['deleted'] || ($b['created'] !== $b['edited'])) return; + // Don't transmit answers (have to be cleaned up in the following code) + if($b['parent'] != $b['id']) + return; + // if post comes from facebook don't send it back if($b['app'] == "Facebook") return; @@ -1016,6 +1020,8 @@ function fbpost_fetchwall($a, $uid) { $url = "https://graph.facebook.com/".$post_to_page."/feed?access_token=".$access_token; + $first_time = ($lastcreated == ""); + if ($lastcreated != "") $url .= "&since=".urlencode($lastcreated); @@ -1027,6 +1033,9 @@ function fbpost_fetchwall($a, $uid) { if ($item->created_time > $lastcreated) $lastcreated = $item->created_time; + if ($first_time) + continue; + if ($item->application->id == get_config('facebook','appid')) continue; diff --git a/forumdirectory.tgz b/forumdirectory.tgz index 0a84585d..249cd226 100644 Binary files a/forumdirectory.tgz and b/forumdirectory.tgz differ diff --git a/forumdirectory/forumdirectory.php b/forumdirectory/forumdirectory.php index 9837b9c1..0d7fbee8 100644 --- a/forumdirectory/forumdirectory.php +++ b/forumdirectory/forumdirectory.php @@ -168,12 +168,12 @@ function forumdirectory_content(&$a) { $entry = replace_macros($tpl,array( '$id' => $rr['id'], - '$profile_link' => $profile_link, + '$profile-link' => $profile_link, '$photo' => $a->get_cached_avatar_image($rr[$photo]), - '$alt_text' => $rr['name'], + '$alt-text' => $rr['name'], '$name' => $rr['name'], '$details' => $pdesc . $details, - '$page_type' => $page_type, + '$page-type' => $page_type, '$profile' => $profile, '$location' => template_escape($location), '$gender' => $gender, diff --git a/forumdirectory/view/forumdirectory_item.tpl b/forumdirectory/view/forumdirectory_item.tpl index e1bbffec..3b24d25f 100755 --- a/forumdirectory/view/forumdirectory_item.tpl +++ b/forumdirectory/view/forumdirectory_item.tpl @@ -2,14 +2,14 @@
$name
-
$page_type
+
$page-type
{{ if $pdesc }}
$profile.pdesc
{{ endif }}
diff --git a/forumdirectory/view/smarty3/forumdirectory_item.tpl b/forumdirectory/view/smarty3/forumdirectory_item.tpl index 66410efe..540a5aea 100644 --- a/forumdirectory/view/smarty3/forumdirectory_item.tpl +++ b/forumdirectory/view/smarty3/forumdirectory_item.tpl @@ -2,14 +2,14 @@
{{$name}}
-
{{$page_type}}
+
{{$page}}-type
{{if $pdesc}}
{{$profile.pdesc}}
{{/if}}
diff --git a/forumlist.tgz b/forumlist.tgz index 8356d443..1f303145 100644 Binary files a/forumlist.tgz and b/forumlist.tgz differ diff --git a/privacy_image_cache.tgz b/privacy_image_cache.tgz index 45444a68..b0690fc2 100644 Binary files a/privacy_image_cache.tgz and b/privacy_image_cache.tgz differ diff --git a/procrunner.tgz b/procrunner.tgz deleted file mode 100644 index fec9dfa7..00000000 Binary files a/procrunner.tgz and /dev/null differ diff --git a/procrunner/procrunner.php b/procrunner/procrunner.php deleted file mode 100755 index 4c6f64b6..00000000 --- a/procrunner/procrunner.php +++ /dev/null @@ -1,53 +0,0 @@ - - * Author: Mike Macgirvin - */ - -function procrunner_install() { - - $addons = get_config('system','addon'); - if(strstr('poormancron',$addons)) { - logger('procrunner incompatible with poormancron. Not installing procrunner.'); - return; - } - - // check for command line php - $a = get_app(); - $ex = Array(); - $ex[0] = ((x($a->config,'php_path')) && (strlen($a->config['php_path'])) ? $a->config['php_path'] : 'php'); - $ex[1] = dirname(dirname(dirname(__file__)))."/testargs.php"; - $ex[2] = "test"; - $out = exec(implode(" ", $ex)); - if ($out==="test") { - logger('procrunner not required on this system. Not installing.'); - return; - } else { - register_hook('proc_run', 'addon/procrunner/procrunner.php','procrunner_procrun'); - logger("installed procrunner"); - } - -} - -function procrunner_uninstall() { - unregister_hook('proc_run', 'addon/procrunner/procrunner.php','procrunner_procrun'); - logger("removed procrunner"); -} - - - -function procrunner_procrun(&$a, &$arr) { - - $argv = $arr['args']; - $arr['run_cmd'] = false; - logger("procrunner procrun ".implode(", ",$argv)); - array_shift($argv); - $argc = count($argv); - logger("procrunner procrun require_once ".basename($argv[0])); - require_once(basename($argv[0])); - $funcname=str_replace(".php", "", basename($argv[0]))."_run"; - $funcname($argv, $argc); -} diff --git a/statusnet.tgz b/statusnet.tgz index ea19ef18..9801af55 100755 Binary files a/statusnet.tgz and b/statusnet.tgz differ diff --git a/statusnet/statusnet.php b/statusnet/statusnet.php index 6a00d3df..d5700710 100755 --- a/statusnet/statusnet.php +++ b/statusnet/statusnet.php @@ -800,6 +800,8 @@ function statusnet_fetchtimeline($a, $uid) { $parameters = array("exclude_replies" => true, "trim_user" => true, "contributor_details" => false, "include_rts" => false); + $first_time = ($lastid == ""); + if ($lastid <> "") $parameters["since_id"] = $lastid; @@ -810,6 +812,9 @@ function statusnet_fetchtimeline($a, $uid) { if ($post->id > $lastid) $lastid = $post->id; + if ($firsttime) + continue; + if (is_object($post->retweeted_status)) continue; diff --git a/twitter.tgz b/twitter.tgz index d86175b0..0505830c 100755 Binary files a/twitter.tgz and b/twitter.tgz differ diff --git a/twitter/twitter.php b/twitter/twitter.php index aeacb5b2..b9cb3146 100755 --- a/twitter/twitter.php +++ b/twitter/twitter.php @@ -604,6 +604,8 @@ function twitter_fetchtimeline($a, $uid) { $parameters = array("exclude_replies" => true, "trim_user" => true, "contributor_details" => false, "include_rts" => false); + $first_time = ($lastid == ""); + if ($lastid <> "") $parameters["since_id"] = $lastid; @@ -614,6 +616,9 @@ function twitter_fetchtimeline($a, $uid) { if ($post->id_str > $lastid) $lastid = $post->id_str; + if ($firsttime) + continue; + if (!strpos($post->source, $application_name)) { $_SESSION["authenticated"] = true; $_SESSION["uid"] = $uid;