diff options
author | Brion Vibber <brion@pobox.com> | 2009-10-13 11:57:58 -0700 |
---|---|---|
committer | Brion Vibber <brion@pobox.com> | 2009-10-13 11:57:58 -0700 |
commit | 7ea73ccad6abd56b689cd7679ec44bef2a66bafb (patch) | |
tree | 3e9e95b16e02c1bd2c6a514c9e91feda33a1c6ec /scripts/fixup_conversations.php | |
parent | 304b3cfff858a3fea8077fd5edf3a26d1c1cc0f4 (diff) | |
parent | c4028f1d0767b070d2b450f8bd6d4403a7644684 (diff) |
Merge branch '0.8.x' of gitorious.org:statusnet/mainline into 0.8.x
Diffstat (limited to 'scripts/fixup_conversations.php')
-rwxr-xr-x | scripts/fixup_conversations.php | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/scripts/fixup_conversations.php b/scripts/fixup_conversations.php index 8a9f7bb57..80890fe98 100755 --- a/scripts/fixup_conversations.php +++ b/scripts/fixup_conversations.php @@ -24,17 +24,17 @@ require_once INSTALLDIR.'/scripts/commandline.inc'; common_log(LOG_INFO, 'Fixing up conversations.'); -$nid = new Notice(); -$nid->query('select id, reply_to from notice where conversation is null'); +$notice = new Notice(); +$notice->query('select id, reply_to from notice where conversation is null'); -while ($nid->fetch()) { +while ($notice->fetch()) { $cid = null; - $notice = new Notice(); + $orig = clone($notice); - if (empty($nid->reply_to)) { - $cid = $nid->id; + if (empty($notice->reply_to)) { + $notice->conversation = $notice->id; } else { $reply = Notice::staticGet('id', $notice->reply_to); @@ -61,9 +61,7 @@ while ($nid->fetch()) { continue; } - $notice = null; $orig = null; - unset($notice); unset($orig); print ".\n"; |