From 91147d5c5bf9f96f9af121f18d86109c04743c6b Mon Sep 17 00:00:00 2001 From: Harald Eilertsen Date: Sat, 18 May 2024 21:22:56 +0200 Subject: Module\Rpost: Reuse value of local_chanel. We don't need to call it twice (actually trice in the original code). --- Zotlabs/Module/Rpost.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'Zotlabs') diff --git a/Zotlabs/Module/Rpost.php b/Zotlabs/Module/Rpost.php index 2f1ba98d8..3e30e5c72 100644 --- a/Zotlabs/Module/Rpost.php +++ b/Zotlabs/Module/Rpost.php @@ -32,7 +32,9 @@ class Rpost extends \Zotlabs\Web\Controller { function get() { - if(! local_channel()) { + $channel_id = local_channel(); + + if(! $channel_id) { return $this->redirect_or_login(); } @@ -165,7 +167,7 @@ class Rpost extends \Zotlabs\Web\Controller { 'permissions' => $channel_acl, 'bang' => '', 'visitor' => true, - 'profile_uid' => local_channel(), + 'profile_uid' => $channel_id, 'title' => $_REQUEST['title'] ?? '', 'body' => $_REQUEST['body'] ?? '', 'attachment' => $_REQUEST['attachment'] ?? '', -- cgit v1.2.3