summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorZach Copley <zach@status.net>2009-10-16 23:42:02 +0000
committerZach Copley <zach@status.net>2009-10-16 23:42:02 +0000
commit0bbc05c1d57b0471c1d1f33ad0d1e00cd7d57e5c (patch)
tree3536179ac3bdafd7c00897ec5915863ad544e455 /scripts
parent0fd8e758ade32204b452cc9fd40e071f0ec8c0f6 (diff)
parente48efd322279fd67168957635fa30cf4cb46f81b (diff)
Merge branch '0.9.x' into TwitterBridgePlugin
Diffstat (limited to 'scripts')
-rw-r--r--scripts/commandline.inc1
-rwxr-xr-xscripts/fixup_conversations.php14
2 files changed, 7 insertions, 8 deletions
diff --git a/scripts/commandline.inc b/scripts/commandline.inc
index 1573b569d..9029bb19d 100644
--- a/scripts/commandline.inc
+++ b/scripts/commandline.inc
@@ -27,6 +27,7 @@ if (isset($_SERVER) && array_key_exists('REQUEST_METHOD', $_SERVER)) {
}
define('STATUSNET', true);
+define('LACONICA', true); // compatibility
// Set various flags so we don't time out on long-running processes
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";