]> git.mxchange.org Git - friendica.git/blobdiff - mod/editpost.php
Display the publish time in the local timezone
[friendica.git] / mod / editpost.php
index 31f121bd546150f62563c77bb0657d765ccc8ec6..848e1ce862706dce946548db2d03d50330fc3cce 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
- * @copyright Copyright (C) 2020, Friendica
+ * @copyright Copyright (C) 2010-2021, the Friendica project
  *
  * @license GNU AGPL version 3 or any later version
  *
@@ -38,7 +38,7 @@ function editpost_content(App $a)
                return;
        }
 
-       $post_id = (($a->argc > 1) ? intval($a->argv[1]) : 0);
+       $post_id = ((DI::args()->getArgc() > 1) ? intval(DI::args()->getArgv()[1]) : 0);
 
        if (!$post_id) {
                notice(DI::l10n()->t('Item not found'));
@@ -46,7 +46,7 @@ function editpost_content(App $a)
        }
 
        $fields = ['allow_cid', 'allow_gid', 'deny_cid', 'deny_gid',
-               'type', 'body', 'title', 'uri-id', 'wall', 'post-type', 'guid'];
+               'body', 'title', 'uri-id', 'wall', 'post-type', 'guid'];
 
        $item = Post::selectFirstForUser(local_user(), $fields, ['id' => $post_id, 'uid' => local_user()]);
 
@@ -124,7 +124,6 @@ function editpost_content(App $a)
                '$profile_uid' => $_SESSION['uid'],
                '$preview' => DI::l10n()->t('Preview'),
                '$jotplugins' => $jotplugins,
-               '$sourceapp' => DI::l10n()->t($a->sourcename),
                '$cancel' => DI::l10n()->t('Cancel'),
                '$rand_num' => Crypto::randomDigits(12),