allow rpost to take a channel argument (the channel nickname) and change channel to that if it's valid
This commit is contained in:
parent
f7c4ae7d1d
commit
0fb8234693
@ -62,6 +62,17 @@ function rpost_content(&$a) {
|
|||||||
unset($_SESSION['rpost']);
|
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']) {
|
if($_REQUEST['remote_return']) {
|
||||||
$_SESSION['remote_return'] = $_REQUEST['remote_return'];
|
$_SESSION['remote_return'] = $_REQUEST['remote_return'];
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user