X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fwall_attach.php;h=9d5641874ba68453b2834e6a386093da795de89f;hb=2a442952b69987d578288891c064b0fed0369086;hp=749d09dc06984f35688106038aa20b642f139e6c;hpb=ab8997f9db910ba70c592bf106a7f5fc41a55b2d;p=friendica.git diff --git a/mod/wall_attach.php b/mod/wall_attach.php index 749d09dc06..9d5641874b 100644 --- a/mod/wall_attach.php +++ b/mod/wall_attach.php @@ -1,10 +1,25 @@ . + * */ use Friendica\App; -use Friendica\Core\Config; use Friendica\Core\Session; use Friendica\Database\DBA; use Friendica\DI; @@ -16,8 +31,8 @@ function wall_attach_post(App $a) { $r_json = (!empty($_GET['response']) && $_GET['response']=='json'); - if ($a->argc > 1) { - $nick = $a->argv[1]; + if (DI::args()->getArgc() > 1) { + $nick = DI::args()->getArgv()[1]; $r = q("SELECT `user`.*, `contact`.`id` FROM `user` LEFT JOIN `contact` on `user`.`uid` = `contact`.`uid` WHERE `user`.`nickname` = '%s' AND `user`.`blocked` = 0 and `contact`.`self` = 1 LIMIT 1", DBA::escape($nick) ); @@ -78,7 +93,7 @@ function wall_attach_post(App $a) { $filename = basename($_FILES['userfile']['name']); $filesize = intval($_FILES['userfile']['size']); - $maxfilesize = Config::get('system','maxfilesize'); + $maxfilesize = DI::config()->get('system','maxfilesize'); /* Found html code written in text field of form, * when trying to upload a file with filesize @@ -91,7 +106,7 @@ function wall_attach_post(App $a) { if ($r_json) { echo json_encode(['error' => $msg]); } else { - notice($msg . EOL); + notice($msg); } @unlink($src); exit();