diff options
author | Brion Vibber <brion@pobox.com> | 2010-01-13 20:51:16 -0800 |
---|---|---|
committer | Brion Vibber <brion@pobox.com> | 2010-01-13 20:51:16 -0800 |
commit | 255f49067d4da5fafc3c409ef7dd509362751fb5 (patch) | |
tree | f866da2164edcdfe100db26f0ec82ab21c82a62d /scripts/initializeinbox.php | |
parent | 26edf3a5e5dc8f6ba1ed8d795198b788714a3f63 (diff) | |
parent | 35a2f8de4d46c403d6ca17695a8d040f003125c8 (diff) |
Merge branch 'master' into 0.9.x
Diffstat (limited to 'scripts/initializeinbox.php')
-rw-r--r-- | scripts/initializeinbox.php | 12 |
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"; |