]> git.mxchange.org Git - friendica.git/blobdiff - src/Module/Admin/Queue.php
Remove join profile table
[friendica.git] / src / Module / Admin / Queue.php
index aadd5b768d42fb9ce5928ce107d9026496134bef..59912fc6c9ca83a3b875d88f3cc1aa37540e228c 100644 (file)
@@ -2,28 +2,28 @@
 
 namespace Friendica\Module\Admin;
 
-use Friendica\Core\L10n;
 use Friendica\Core\Renderer;
 use Friendica\Database\DBA;
-use Friendica\Module\BaseAdminModule;
+use Friendica\DI;
+use Friendica\Module\BaseAdmin;
 use Friendica\Util\Arrays;
 use Friendica\Util\DateTimeFormat;
 
 /**
- * @brief Admin Inspect Queue Page
+ * Admin Inspect Queue Page
  *
  * Generates a page for the admin to have a look into the current queue of
  * worker jobs. Shown are the parameters for the job and its priority.
  *
  * @return string
  */
-class Queue extends BaseAdminModule
+class Queue extends BaseAdmin
 {
-       public static function content()
+       public static function content(array $parameters = [])
        {
-               parent::content();
+               parent::content($parameters);
 
-               $a = self::getApp();
+               $a = DI::app();
 
                // @TODO: Replace with parameter from router
                $deferred = $a->argc > 2 && $a->argv[2] == 'deferred';
@@ -31,12 +31,12 @@ class Queue extends BaseAdminModule
                // get jobs from the workerqueue table
                if ($deferred) {
                        $condition = ["NOT `done` AND `retrial` > ?", 0];
-                       $sub_title = L10n::t('Inspect Deferred Worker Queue');
-                       $info = L10n::t("This page lists the deferred worker jobs. This are jobs that couldn't be executed at the first time.");
+                       $sub_title = DI::l10n()->t('Inspect Deferred Worker Queue');
+                       $info = DI::l10n()->t("This page lists the deferred worker jobs. This are jobs that couldn't be executed at the first time.");
                } else {
                        $condition = ["NOT `done` AND `retrial` = ?", 0];
-                       $sub_title = L10n::t('Inspect Worker Queue');
-                       $info = L10n::t('This page lists the currently queued worker jobs. These jobs are handled by the worker cronjob you\'ve set up during install.');
+                       $sub_title = DI::l10n()->t('Inspect Worker Queue');
+                       $info = DI::l10n()->t('This page lists the currently queued worker jobs. These jobs are handled by the worker cronjob you\'ve set up during install.');
                }
 
                // @TODO Move to Model\WorkerQueue::getEntries()
@@ -53,13 +53,13 @@ class Queue extends BaseAdminModule
 
                $t = Renderer::getMarkupTemplate('admin/queue.tpl');
                return Renderer::replaceMacros($t, [
-                       '$title' => L10n::t('Administration'),
+                       '$title' => DI::l10n()->t('Administration'),
                        '$page' => $sub_title,
                        '$count' => count($r),
-                       '$id_header' => L10n::t('ID'),
-                       '$param_header' => L10n::t('Job Parameters'),
-                       '$created_header' => L10n::t('Created'),
-                       '$prio_header' => L10n::t('Priority'),
+                       '$id_header' => DI::l10n()->t('ID'),
+                       '$param_header' => DI::l10n()->t('Job Parameters'),
+                       '$created_header' => DI::l10n()->t('Created'),
+                       '$prio_header' => DI::l10n()->t('Priority'),
                        '$info' => $info,
                        '$entries' => $r,
                ]);