diff options
author | Andrew Manning <tamanning@zoho.com> | 2016-01-21 21:40:29 -0500 |
---|---|---|
committer | Andrew Manning <tamanning@zoho.com> | 2016-01-21 21:40:29 -0500 |
commit | b368e0a1f9715c6360748e9107f47bb5b117f04b (patch) | |
tree | dfc3d91e4fad927c12ddb6fcedf5cacc32a402bb /include/Contact.php | |
parent | dff2cdc650cd3e0fc706640c01492fce2d9640f7 (diff) | |
parent | dcaef756e7f9531bc4d1353b04ff44736032ffda (diff) | |
download | volse-hubzilla-b368e0a1f9715c6360748e9107f47bb5b117f04b.tar.gz volse-hubzilla-b368e0a1f9715c6360748e9107f47bb5b117f04b.tar.bz2 volse-hubzilla-b368e0a1f9715c6360748e9107f47bb5b117f04b.zip |
Merge branch 'master' of https://github.com/redmatrix/hubzilla into activitystreams
Diffstat (limited to 'include/Contact.php')
-rw-r--r-- | include/Contact.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/include/Contact.php b/include/Contact.php index 3bd5f9936..611371db6 100644 --- a/include/Contact.php +++ b/include/Contact.php @@ -331,6 +331,7 @@ function channel_remove($channel_id, $local = true, $unset_session=true) { dbesc(datetime_convert()), intval($channel_id) ); + // if this was the default channel, set another one as default if($a->account['account_default_channel'] == $channel_id) { $r = q("select channel_id from channel where channel_account_id = %d and channel_removed = 0 limit 1", @@ -344,12 +345,11 @@ function channel_remove($channel_id, $local = true, $unset_session=true) { } else { $rr = q("update account set account_default_channel = 0 where account_id = %d", - intval($r[0]['channel_id']), - intval($a->account['account_id'])); + intval($a->account['account_id']) + ); } } - logger('deleting hublocs',LOGGER_DEBUG); $r = q("update hubloc set hubloc_deleted = 1 where hubloc_hash = '%s' and hubloc_url = '%s' ", |