Merge branch 'master' into 0.9.x
This commit is contained in:
commit
255f49067d
@ -72,7 +72,7 @@ try {
|
|||||||
foreach ($ids as $id) {
|
foreach ($ids as $id) {
|
||||||
$user = User::staticGet('id', $id);
|
$user = User::staticGet('id', $id);
|
||||||
if (empty($user)) {
|
if (empty($user)) {
|
||||||
throw new Exception("Can't find user with id '$id'.");
|
print "Can't find user with id '$id'.\n";
|
||||||
}
|
}
|
||||||
initializeInbox($user);
|
initializeInbox($user);
|
||||||
}
|
}
|
||||||
@ -91,14 +91,20 @@ function initializeInbox($user)
|
|||||||
print "Initializing inbox for $user->nickname...";
|
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 (!empty($inbox)) {
|
||||||
if (!have_option('q', 'quiet')) {
|
if (!have_option('q', 'quiet')) {
|
||||||
print "SKIP\n";
|
print "SKIP\n";
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$inbox = Inbox::initialize($user_id);
|
$inbox = Inbox::initialize($user->id);
|
||||||
if (!have_option('q', 'quiet')) {
|
if (!have_option('q', 'quiet')) {
|
||||||
if (empty($inbox)) {
|
if (empty($inbox)) {
|
||||||
print "ERR\n";
|
print "ERR\n";
|
||||||
|
Loading…
Reference in New Issue
Block a user