summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrion Vibber <brion@pobox.com>2010-01-13 20:51:16 -0800
committerBrion Vibber <brion@pobox.com>2010-01-13 20:51:16 -0800
commit255f49067d4da5fafc3c409ef7dd509362751fb5 (patch)
treef866da2164edcdfe100db26f0ec82ab21c82a62d
parent26edf3a5e5dc8f6ba1ed8d795198b788714a3f63 (diff)
parent35a2f8de4d46c403d6ca17695a8d040f003125c8 (diff)
Merge branch 'master' into 0.9.x
-rw-r--r--scripts/initializeinbox.php12
1 files changed, 9 insertions, 3 deletions
diff --git a/scripts/initializeinbox.php b/scripts/initializeinbox.php
index bc31cba15..44508fe22 100644
--- a/scripts/initializeinbox.php
+++ b/scripts/initializeinbox.php
@@ -72,7 +72,7 @@ try {
foreach ($ids as $id) {
$user = User::staticGet('id', $id);
if (empty($user)) {
- throw new Exception("Can't find user with id '$id'.");
+ print "Can't find user with id '$id'.\n";
}
initializeInbox($user);
}
@@ -91,14 +91,20 @@ function initializeInbox($user)
print "Initializing inbox for $user->nickname...";
}
- $inbox = Inbox::staticGet('user_id', $user_id);
+ $inbox = Inbox::staticGet('user_id', $user->id);
+ if ($inbox && !empty($inbox->fake)) {
+ if (!have_option('q', 'quiet')) {
+ echo "(replacing faux cached inbox)";
+ }
+ $inbox = false;
+ }
if (!empty($inbox)) {
if (!have_option('q', 'quiet')) {
print "SKIP\n";
}
} else {
- $inbox = Inbox::initialize($user_id);
+ $inbox = Inbox::initialize($user->id);
if (!have_option('q', 'quiet')) {
if (empty($inbox)) {
print "ERR\n";