aboutsummaryrefslogtreecommitdiffstats
path: root/include/Contact.php
diff options
context:
space:
mode:
authorHaakon Meland Eriksen <haakon.eriksen@far.no>2016-01-21 17:30:04 +0100
committerHaakon Meland Eriksen <haakon.eriksen@far.no>2016-01-21 17:30:04 +0100
commitfb1e6ca6c17dc24cfe29bde375f933822117a9af (patch)
tree7ae08003969c59b7a08e8486c17a12939ceeca37 /include/Contact.php
parentda6abe5462eca82a2322f75c0d7bde01a45ebf36 (diff)
parentb711c050db39bd733f4a48cbe575b9e926aa3d0d (diff)
downloadvolse-hubzilla-fb1e6ca6c17dc24cfe29bde375f933822117a9af.tar.gz
volse-hubzilla-fb1e6ca6c17dc24cfe29bde375f933822117a9af.tar.bz2
volse-hubzilla-fb1e6ca6c17dc24cfe29bde375f933822117a9af.zip
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'include/Contact.php')
-rw-r--r--include/Contact.php6
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' ",