aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2014-06-09 16:57:01 -0700
committerfriendica <info@friendica.com>2014-06-09 16:57:01 -0700
commit0fb82346930dd68d7a973d7c83ceb06935188cca (patch)
treed6c0c1e4c0a000f6080dccb6c5646a2e0143d073
parentf7c4ae7d1d3ec45f80928ba1524a17d4865fe9b3 (diff)
downloadvolse-hubzilla-0fb82346930dd68d7a973d7c83ceb06935188cca.tar.gz
volse-hubzilla-0fb82346930dd68d7a973d7c83ceb06935188cca.tar.bz2
volse-hubzilla-0fb82346930dd68d7a973d7c83ceb06935188cca.zip
allow rpost to take a channel argument (the channel nickname) and change channel to that if it's valid
-rw-r--r--mod/rpost.php11
1 files changed, 11 insertions, 0 deletions
diff --git a/mod/rpost.php b/mod/rpost.php
index dc25444a3..309208870 100644
--- a/mod/rpost.php
+++ b/mod/rpost.php
@@ -62,6 +62,17 @@ function rpost_content(&$a) {
unset($_SESSION['rpost']);
}
+ if(array_key_exists('channel',$_REQUEST)) {
+ $r = q("select channel_id from channel where channel_account_id = %d and channel_address = '%s' limit 1",
+ intval(get_account_id()),
+ dbesc($_REQUEST['channel'])
+ );
+ if($r) {
+ require_once('include/security.php');
+ $change = change_channel($r[0]['channel_id']);
+ }
+ }
+
if($_REQUEST['remote_return']) {
$_SESSION['remote_return'] = $_REQUEST['remote_return'];
}