aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Module/Rpost.php
diff options
context:
space:
mode:
authorHarald Eilertsen <haraldei@anduin.net>2024-05-18 21:22:56 +0200
committerHarald Eilertsen <haraldei@anduin.net>2024-06-13 13:34:20 +0200
commit91147d5c5bf9f96f9af121f18d86109c04743c6b (patch)
tree530f6697c97a8a34bd47c5d1bc03f3911946d7cd /Zotlabs/Module/Rpost.php
parent08d4bd94fac1831718c1eeac5f975acb7638a1f0 (diff)
downloadvolse-hubzilla-91147d5c5bf9f96f9af121f18d86109c04743c6b.tar.gz
volse-hubzilla-91147d5c5bf9f96f9af121f18d86109c04743c6b.tar.bz2
volse-hubzilla-91147d5c5bf9f96f9af121f18d86109c04743c6b.zip
Module\Rpost: Reuse value of local_chanel.
We don't need to call it twice (actually trice in the original code).
Diffstat (limited to 'Zotlabs/Module/Rpost.php')
-rw-r--r--Zotlabs/Module/Rpost.php6
1 files changed, 4 insertions, 2 deletions
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'] ?? '',