From 0fb82346930dd68d7a973d7c83ceb06935188cca Mon Sep 17 00:00:00 2001 From: friendica Date: Mon, 9 Jun 2014 16:57:01 -0700 Subject: allow rpost to take a channel argument (the channel nickname) and change channel to that if it's valid --- mod/rpost.php | 11 +++++++++++ 1 file changed, 11 insertions(+) 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']; } -- cgit v1.2.3