X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fwall_attach.php;h=07092cf180f8163ca1b4812bf7cd8ade8fbd4604;hb=5765b8d498304e8bff0a6ea486138b62f4292043;hp=57d7b2e95279b22d53b3be4d8f3508e9f4d69145;hpb=6b44fbbda03af125035c185c964f10ce78f97610;p=friendica.git diff --git a/mod/wall_attach.php b/mod/wall_attach.php index 57d7b2e952..07092cf180 100644 --- a/mod/wall_attach.php +++ b/mod/wall_attach.php @@ -2,14 +2,14 @@ /** * @file mod/wall_attach.php */ + use Friendica\App; use Friendica\Core\Config; use Friendica\Core\L10n; use Friendica\Database\DBM; +use Friendica\Util\DateTimeFormat; use Friendica\Util\Mimetype; -require_once 'include/datetime.php'; - function wall_attach_post(App $a) { $r_json = (x($_GET,'response') && $_GET['response']=='json'); @@ -122,7 +122,7 @@ function wall_attach_post(App $a) { $filedata = @file_get_contents($src); $mimetype = Mimetype::getContentType($filename); $hash = get_guid(64); - $created = datetime_convert(); + $created = DateTimeFormat::utcNow(); $fields = ['uid' => $page_owner_uid, 'hash' => $hash, 'filename' => $filename, 'filetype' => $mimetype, 'filesize' => $filesize, 'data' => $filedata, 'created' => $created, 'edited' => $created,