aboutsummaryrefslogtreecommitdiffstats
path: root/include/poller.php
diff options
context:
space:
mode:
authorzottel <github@zottel.net>2012-03-16 08:33:01 +0100
committerzottel <github@zottel.net>2012-03-16 08:33:01 +0100
commitea4c806c5c3adacb6ef585de657e5f34c2e24c98 (patch)
tree1e3314f76eefd8f7d014ae8e4a218dc9663ae3d7 /include/poller.php
parent69f4448adaf7afddf00deeb2f832938d5505abcf (diff)
parent47e1b8d0c07d79c33f8b2de52145aa751d4b955a (diff)
downloadvolse-hubzilla-ea4c806c5c3adacb6ef585de657e5f34c2e24c98.tar.gz
volse-hubzilla-ea4c806c5c3adacb6ef585de657e5f34c2e24c98.tar.bz2
volse-hubzilla-ea4c806c5c3adacb6ef585de657e5f34c2e24c98.zip
Merge remote branch 'upstream/master'
Diffstat (limited to 'include/poller.php')
-rwxr-xr-xinclude/poller.php21
1 files changed, 18 insertions, 3 deletions
diff --git a/include/poller.php b/include/poller.php
index cfbc46b87..3bc98e36f 100755
--- a/include/poller.php
+++ b/include/poller.php
@@ -1,7 +1,6 @@
<?php
require_once("boot.php");
-require_once("include/quoteconvert.php");
function poller_run($argv, $argc){
@@ -70,6 +69,19 @@ function poller_run($argv, $argc){
// clear old cache
Cache::clear();
+ // clear item cache files if they are older than one day
+ $cache = get_config('system','itemcache');
+ if (($cache != '') and is_dir($cache)) {
+ if ($dh = opendir($cache)) {
+ while (($file = readdir($dh)) !== false) {
+ $fullpath = $cache."/".$file;
+ if ((filetype($fullpath) == "file") and filectime($fullpath) < (time() - 86400))
+ unlink($fullpath);
+ }
+ closedir($dh);
+ }
+ }
+
$manual_id = 0;
$generation = 0;
$hub_update = false;
@@ -141,7 +153,10 @@ function poller_run($argv, $argc){
if($manual_id)
$contact['last-update'] = '0000-00-00 00:00:00';
- if($contact['network'] === NETWORK_DFRN || $contact['network'] === NETWORK_OSTATUS)
+ if($contact['network'] === NETWORK_DFRN)
+ $contact['priority'] = 2;
+
+ if(!get_config('system','ostatus_use_priority') and ($contact['network'] === NETWORK_OSTATUS))
$contact['priority'] = 2;
if($contact['priority'] || $contact['subhub']) {
@@ -494,7 +509,7 @@ function poller_run($argv, $argc){
logger("Mail: can't fetch msg ".$msg_uid);
continue;
}
- $datarray['body'] = escape_tags(convertquote($r['body'], false));
+ $datarray['body'] = escape_tags($r['body']);
logger("Mail: Importing ".$msg_uid);