diff options
author | Brion Vibber <brion@pobox.com> | 2010-12-22 14:55:13 -0800 |
---|---|---|
committer | Brion Vibber <brion@pobox.com> | 2010-12-22 14:55:13 -0800 |
commit | d5c2b0d21695f2ae661fa7ef4bbfbe9db0f66925 (patch) | |
tree | 7002709a0aaa8814c9d90df6626dd996bc8c948b | |
parent | 464e0f8115e3b5b01b6110ddc7a73274164c8584 (diff) |
When queueing is off, restore runs immediately. Indicate that we've already finished processing on the success page in this case; otherwise continue to show the 'will take a few minutes' message.
-rw-r--r-- | actions/restoreaccount.php | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/actions/restoreaccount.php b/actions/restoreaccount.php index 5c8e4a12c..8cf220a42 100644 --- a/actions/restoreaccount.php +++ b/actions/restoreaccount.php @@ -48,6 +48,7 @@ if (!defined('STATUSNET')) { class RestoreaccountAction extends Action { private $success = false; + private $inprogress = false; /** * Returns the title of the page @@ -208,8 +209,13 @@ class RestoreaccountAction extends Action $qm = QueueManager::get(); $qm->enqueue(array(common_current_user(), $xml, false), 'feedimp'); - $this->success = true; - + if ($qm instanceof UnQueueManager) { + // No active queuing means we've actually just completed the job! + $this->success = true; + } else { + // We've fed data into background queues, and it's probably still running. + $this->inprogress = true; + } $this->showPage(); } catch (Exception $e) { @@ -229,6 +235,9 @@ class RestoreaccountAction extends Action { if ($this->success) { $this->element('p', null, + _('Feed has been restored. Your old posts should now appear in search and your profile page.')); + } else if ($this->inprogress) { + $this->element('p', null, _('Feed will be restored. Please wait a few minutes for results.')); } else { $form = new RestoreAccountForm($this); |