Replacing "q" calls with "DBA" calls #1180

Merged
annando merged 8 commits from more-q into develop 2021-10-04 01:03:49 +02:00
Showing only changes of commit cb1b5d3964 - Show all commits

View file

@ -701,25 +701,25 @@ function pumpio_sync(App $a)
$pconfigs = DBA::selectToArray('pconfig', ['uid'], ['cat' => 'pumpio', 'k' => 'import', 'v' => '1']); $pconfigs = DBA::selectToArray('pconfig', ['uid'], ['cat' => 'pumpio', 'k' => 'import', 'v' => '1']);
foreach ($pconfigs as $rr) { foreach ($pconfigs as $rr) {
if ($abandon_days != 0) { if ($abandon_days != 0) {
if (DBA::exists('user', ["uid = ? AND `login_date` >= ?", $rr['uid'], $abandon_limit])) { if (DBA::exists('user', ["uid = ? AND `login_date` >= ?", $rr['uid'], $abandon_limit])) {
Logger::notice('abandoned account: timeline from user '.$rr['uid'].' will not be imported'); Logger::notice('abandoned account: timeline from user '.$rr['uid'].' will not be imported');
continue; continue;
}
} }
}
Logger::notice('pumpio: importing timeline from user '.$rr['uid']); Logger::notice('pumpio: importing timeline from user '.$rr['uid']);
pumpio_fetchinbox($a, $rr['uid']); pumpio_fetchinbox($a, $rr['uid']);
// check for new contacts once a day // check for new contacts once a day
$last_contact_check = DI::pConfig()->get($rr['uid'], 'pumpio', 'contact_check'); $last_contact_check = DI::pConfig()->get($rr['uid'], 'pumpio', 'contact_check');
if ($last_contact_check) { if ($last_contact_check) {
$next_contact_check = $last_contact_check + 86400; $next_contact_check = $last_contact_check + 86400;
} else { } else {
$next_contact_check = 0; $next_contact_check = 0;
} }
if ($next_contact_check <= time()) { if ($next_contact_check <= time()) {
pumpio_getallusers($a, $rr["uid"]); pumpio_getallusers($a, $rr["uid"]);
DI::pConfig()->set($rr['uid'], 'pumpio', 'contact_check', time()); DI::pConfig()->set($rr['uid'], 'pumpio', 'contact_check', time());
} }