diff options
author | friendica <info@friendica.com> | 2012-10-01 19:04:21 -0700 |
---|---|---|
committer | friendica <info@friendica.com> | 2012-10-01 19:04:21 -0700 |
commit | dc8a46477b245dc89c3de69ddc61e83a2b8bd22a (patch) | |
tree | 5b44415ab9c6c7ac036c719e5a1c10d8e0f6d7ea /mod | |
parent | 846a9813b23911ae2a87d87fb6fd9f188ed84dc0 (diff) | |
download | volse-hubzilla-dc8a46477b245dc89c3de69ddc61e83a2b8bd22a.tar.gz volse-hubzilla-dc8a46477b245dc89c3de69ddc61e83a2b8bd22a.tar.bz2 volse-hubzilla-dc8a46477b245dc89c3de69ddc61e83a2b8bd22a.zip |
use hash for channel id
Diffstat (limited to 'mod')
-rw-r--r-- | mod/manage.php | 18 | ||||
-rw-r--r-- | mod/zchannel.php | 4 |
2 files changed, 10 insertions, 12 deletions
diff --git a/mod/manage.php b/mod/manage.php index b9237822b..593ba4ae2 100644 --- a/mod/manage.php +++ b/mod/manage.php @@ -7,24 +7,18 @@ function manage_content(&$a) { return; } + require_once('include/security.php'); + $change_channel = ((argc() > 1) ? intval(argv(1)) : 0); + if($change_channel) { - $r = q("select * from channel where channel_id = %d and channel_account_id = %d limit 1", - intval($change_channel), - intval(get_account_id()) - ); - if($r && count($r)) { - $_SESSION['uid'] = intval($r[0]['channel_id']); - get_app()->set_channel($r[0]); - $_SESSION['theme'] = $r[0]['channel_theme']; - date_default_timezone_set($r[0]['channel_timezone']); - } - if($r[0]['channel_startpage']) + $r = change_channel($change_channel); + + if($r && $r[0]['channel_startpage']) goaway(z_root() . '/' . $r[0]['channel_startpage']); goaway(z_root()); } - $channels = null; if(local_user()) { diff --git a/mod/zchannel.php b/mod/zchannel.php index f401d91c6..eca22b0a9 100644 --- a/mod/zchannel.php +++ b/mod/zchannel.php @@ -73,6 +73,10 @@ function zchannel_post(&$a) { return; } + $newuid = $result['channel']['channel_id']; + + change_channel($result['channel']['channel_id']); + if(! strlen($next_page = get_config('system','workflow_channel_next'))) $next_page = 'settings'; |