From c4028f1d0767b070d2b450f8bd6d4403a7644684 Mon Sep 17 00:00:00 2001 From: Eric Helgeson Date: Tue, 13 Oct 2009 13:34:28 -0400 Subject: define LACONICA for compatibility on scripts fixup_conversations.php fixes --- scripts/fixup_conversations.php | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'scripts/fixup_conversations.php') 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"; -- cgit v1.2.3-54-g00ecf