]> git.mxchange.org Git - friendica.git/blobdiff - src/Module/Attach.php
Changes:
[friendica.git] / src / Module / Attach.php
index fc7ba74d5948ba1582ea8474434a5a94cf43c3af..7d877c12655b0a11efa78413a0debaadc1e8d93c 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
- * @copyright Copyright (C) 2010-2022, the Friendica project
+ * @copyright Copyright (C) 2010-2024, the Friendica project
  *
  * @license GNU AGPL version 3 or any later version
  *
@@ -23,6 +23,7 @@ namespace Friendica\Module;
 
 use Friendica\BaseModule;
 use Friendica\Core\Logger;
+use Friendica\Core\System;
 use Friendica\DI;
 use Friendica\Model\Attach as MAttach;
 
@@ -36,7 +37,6 @@ class Attach extends BaseModule
         */
        protected function rawContent(array $request = [])
        {
-               $a = DI::app();
                if (empty($this->parameters['item'])) {
                        throw new \Friendica\Network\HTTPException\BadRequestException();
                }
@@ -49,7 +49,7 @@ class Attach extends BaseModule
                        throw new \Friendica\Network\HTTPException\NotFoundException(DI::l10n()->t('Item was not found.'));
                }
 
-               // Now we'll fetch the item, if we have enough permisson
+               // Now we'll fetch the item, if we have enough permission
                $item = MAttach::getByIdWithPermission($item_id);
                if ($item === false) {
                        throw new \Friendica\Network\HTTPException\ForbiddenException(DI::l10n()->t('Permission denied.'));
@@ -72,8 +72,7 @@ class Attach extends BaseModule
                }
 
                echo $data;
-               DI::page()->logRuntime();
-               exit();
+               System::exit();
                // NOTREACHED
        }
 }