From: Michael Vogel Date: Sun, 3 Oct 2021 20:00:22 +0000 (+0200) Subject: Apply suggestions from code review X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=f9e758e2a8eb4b4d3790001569f81a2ace32bf37;p=friendica-addons.git Apply suggestions from code review Co-authored-by: Hypolite Petovan --- diff --git a/pumpio/pumpio.php b/pumpio/pumpio.php index a29402a2..53ea8fe7 100644 --- a/pumpio/pumpio.php +++ b/pumpio/pumpio.php @@ -686,7 +686,7 @@ function pumpio_sync(App $a) } Logger::notice('pumpio: cron_start'); - $pconfigs = DBA::selectToArray('pconfig', ['cat' => 'pumpio', 'k' => 'mirror', 'v' => '1']); + $pconfigs = DBA::selectToArray('pconfig', ['uid'], ['cat' => 'pumpio', 'k' => 'mirror', 'v' => '1']); foreach ($pconfigs as $rr) { Logger::notice('pumpio: mirroring user '.$rr['uid']); pumpio_fetchtimeline($a, $rr['uid']); @@ -699,7 +699,7 @@ function pumpio_sync(App $a) $abandon_limit = date(DateTimeFormat::MYSQL, time() - $abandon_days * 86400); - $pconfigs = DBA::selectToArray('pconfig', ['cat' => 'pumpio', 'k' => 'import', 'v' => '1']); + $pconfigs = DBA::selectToArray('pconfig', ['uid'], ['cat' => 'pumpio', 'k' => 'import', 'v' => '1']); foreach ($pconfigs as $rr) { if ($abandon_days != 0) { if (DBA::exists('user', ["uid = ? AND `login_date` >= ?", $rr['uid'], $abandon_limit])) {