]> git.mxchange.org Git - friendica.git/blobdiff - mod/wall_attach.php
Uncommon logger levels in Friendica (#5453)
[friendica.git] / mod / wall_attach.php
index 1ad435c45df19692305c74759ed709c98a8eac39..cf5d11f8bf26d1429a6e213beb2318e95b063ece 100644 (file)
@@ -6,11 +6,11 @@
 use Friendica\App;
 use Friendica\Core\Config;
 use Friendica\Core\L10n;
+use Friendica\Core\System;
+use Friendica\Database\DBA;
 use Friendica\Database\DBM;
+use Friendica\Util\DateTimeFormat;
 use Friendica\Util\Mimetype;
-use Friendica\Util\Temporal;
-
-require_once 'include/datetime.php';
 
 function wall_attach_post(App $a) {
 
@@ -123,14 +123,14 @@ function wall_attach_post(App $a) {
 
        $filedata = @file_get_contents($src);
        $mimetype = Mimetype::getContentType($filename);
-       $hash = get_guid(64);
-       $created = Temporal::convert();
+       $hash = System::createGUID(64);
+       $created = DateTimeFormat::utcNow();
 
        $fields = ['uid' => $page_owner_uid, 'hash' => $hash, 'filename' => $filename, 'filetype' => $mimetype,
                'filesize' => $filesize, 'data' => $filedata, 'created' => $created, 'edited' => $created,
                'allow_cid' => '<' . $page_owner_cid . '>', 'allow_gid' => '','deny_cid' => '', 'deny_gid' => ''];
 
-       $r = dba::insert('attach', $fields);
+       $r = DBA::insert('attach', $fields);
 
        @unlink($src);