]> git.mxchange.org Git - friendica.git/blobdiff - src/Module/Item/Ignore.php
Move L10n class from L10n subdir to Core (replacing old wrapper)
[friendica.git] / src / Module / Item / Ignore.php
index 6a28310b401146e8a4db4f5c749575d8b244a7c5..d855045de803ef1eaf868d382f1ac9a53c0f0b1d 100644 (file)
@@ -4,10 +4,11 @@ namespace Friendica\Module\Item;
 
 use Friendica\App;
 use Friendica\BaseModule;
-use Friendica\Core\L10n\L10n;
+use Friendica\Core\L10n;
 use Friendica\Core\Session;
 use Friendica\Core\System;
 use Friendica\Database\Database;
+use Friendica\DI;
 use Friendica\Model\Item;
 use Friendica\Network\HTTPException;
 
@@ -16,19 +17,16 @@ use Friendica\Network\HTTPException;
  */
 class Ignore extends BaseModule
 {
-       public static function rawContent()
+       public static function rawContent(array $parameters = [])
        {
-               /** @var L10n $l10n */
-               $l10n = self::getClass(L10n::class);
+               $l10n = DI::l10n();
 
                if (!Session::isAuthenticated()) {
                        throw new HttpException\ForbiddenException($l10n->t('Access denied.'));
                }
 
-               /** @var App\Arguments $args */
-               $args = self::getClass(App\Arguments::class);
-               /** @var Database $dba */
-               $dba = self::getClass(Database::class);
+               $args = DI::args();
+               $dba = DI::dba();
 
                $message_id = intval($args->get(2));
 
@@ -69,10 +67,10 @@ class Ignore extends BaseModule
                                $rand = "?$rand";
                        }
 
-                       self::getApp()->internalRedirect($return_path . $rand);
+                       DI::baseUrl()->redirect($return_path . $rand);
                }
 
                // the json doesn't really matter, it will either be 0 or 1
-               System::jsonExit([$ignored]);
+               System::jsonExit($ignored);
        }
 }