aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax Kostikov <max@kostikov.co>2018-09-15 01:45:54 +0200
committerMax Kostikov <max@kostikov.co>2018-09-15 01:45:54 +0200
commit284e5dd2e8313f3ccd148f19699f996d4f4fe0a5 (patch)
tree9e9ddbd6797c19fa76f7bb1620a20064b53e639c
parent3d3f4f50fb7fb06c8e17e8ede70be4c004e39773 (diff)
downloadvolse-hubzilla-284e5dd2e8313f3ccd148f19699f996d4f4fe0a5.tar.gz
volse-hubzilla-284e5dd2e8313f3ccd148f19699f996d4f4fe0a5.tar.bz2
volse-hubzilla-284e5dd2e8313f3ccd148f19699f996d4f4fe0a5.zip
unification with zot.php code for future reuse
-rw-r--r--include/message.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/message.php b/include/message.php
index 2ac22c0ba..9e8b6be8b 100644
--- a/include/message.php
+++ b/include/message.php
@@ -511,14 +511,14 @@ function private_messages_drop($channel_id, $messageitem_id, $drop_conversation
);
if (! $z) {
// Get new first message...
- $r = q("SELECT mid FROM mail WHERE conv_guid = '%s' AND channel_id = %d ORDER BY id ASC LIMIT 1",
+ $r = q("SELECT mid, conv_guid FROM mail WHERE conv_guid = '%s' AND channel_id = %d ORDER BY id ASC LIMIT 1",
dbesc($x[0]['conv_guid']),
intval($channel_id)
);
// ...and refer whole thread to it
q("UPDATE mail SET parent_mid = '%s', mail_isreply = abs(mail_isreply - 1) WHERE conv_guid = '%s' AND channel_id = %d",
dbesc($r[0]['mid']),
- dbesc($x[0]['conv_guid']),
+ dbesc($r[0]['conv_guid']),
intval($channel_id)
);
}