]> git.mxchange.org Git - friendica.git/blobdiff - src/Worker/Expire.php
spelling: effectiveness
[friendica.git] / src / Worker / Expire.php
index d64a63a843aef47d16fdc503f4e53ac6a5383617..15a9355342f8d7c3258fe46ec2fc004c8218a5d8 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
- * @copyright Copyright (C) 2010-2021, the Friendica project
+ * @copyright Copyright (C) 2010-2023, the Friendica project
  *
  * @license GNU AGPL version 3 or any later version
  *
@@ -51,7 +51,7 @@ class Expire
                        foreach (Hook::getByName('expire') as $hook) {
                                if ($hook[1] == $hook_function) {
                                        Logger::info('Calling expire hook', ['hook' => $hook[1]]);
-                                       Hook::callSingle($a, 'expire', $hook, $data);
+                                       Hook::callSingle('expire', $hook, $data);
                                }
                        }
                        return;
@@ -59,7 +59,7 @@ class Expire
 
                Logger::notice('start expiry');
 
-               $r = DBA::p("SELECT `uid`, `username` FROM `user` WHERE `expire` != 0");
+               $r = DBA::select('user', ['uid', 'username'], ["`expire` != ?", 0]);
                while ($row = DBA::fetch($r)) {
                        Logger::info('Calling expiry', ['user' => $row['uid'], 'username' => $row['username']]);
                        Worker::add(['priority' => $a->getQueueValue('priority'), 'created' => $a->getQueueValue('created'), 'dont_fork' => true],