From 3281c0a025a645ee79bf01eac142163ec9357690 Mon Sep 17 00:00:00 2001 From: xue <> Date: Sat, 29 Apr 2006 12:58:06 +0000 Subject: Added THttpResponse::reload(). --- framework/Web/THttpResponse.php | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'framework/Web/THttpResponse.php') diff --git a/framework/Web/THttpResponse.php b/framework/Web/THttpResponse.php index 261c34ed..ce4bf4b1 100644 --- a/framework/Web/THttpResponse.php +++ b/framework/Web/THttpResponse.php @@ -284,6 +284,16 @@ class THttpResponse extends TModule implements ITextWriter exit(); } + /** + * Reloads the current page. + * The effect of this method call is the same as user pressing the + * refresh button on his browser (without post data). + **/ + public function reload() + { + $this->redirect($this->getRequest()->getRequestUri()); + } + /** * Outputs the buffered content, sends content-type and charset header. */ -- cgit v1.2.3