From ad40e8425204f74055ca50df0eed99316d62e4ca Mon Sep 17 00:00:00 2001 From: padams Date: Mon, 2 Apr 2012 04:37:43 +0000 Subject: [PATCH] proper redirection of post requests to log.php. --- blank.php | 3 +++ log.php | 9 +++++---- owa_requestContainer.php | 4 ++-- 3 files changed, 10 insertions(+), 6 deletions(-) create mode 100644 blank.php diff --git a/blank.php b/blank.php new file mode 100644 index 000000000..ef677e3ab --- /dev/null +++ b/blank.php @@ -0,0 +1,3 @@ + \ No newline at end of file diff --git a/log.php b/log.php index 4fd37e1fc..a763a9188 100644 --- a/log.php +++ b/log.php @@ -38,11 +38,12 @@ // log event $ret = $owa->logEventFromUrl(); - $r = owa_coreAPI::requestContainerSingleton(); - $rt = $r->getRequestType(); - + $s = owa_coreAPI::serviceSingleton(); + $rt = $s->request->getRequestType(); + owa_coreAPI::debug('request type. '.$rt); if ($rt === 'post') { - owa_lib::redirectBrowser( owa_coreAPI::getSetting('base', 'main_url').'/blank.php'); + + owa_lib::redirectBrowser( owa_coreAPI::getSetting('base', 'public_url').'blank.php'); } else { echo owa_coreAPI::displayView(array(), 'base.pixel'); } diff --git a/owa_requestContainer.php b/owa_requestContainer.php index 7c2782e82..cd4bd6e12 100644 --- a/owa_requestContainer.php +++ b/owa_requestContainer.php @@ -40,7 +40,7 @@ class owa_requestContainer { var $server; var $guid; var $state; - var $request_type; + var $request_type = ''; var $timestamp; var $current_url; @@ -155,7 +155,7 @@ function __construct() { $this->request_type = 'cli'; } - if ($this->request_type = 'get' || $this->request_type = 'post') { + if ( $this->request_type === 'get' || $this->request_type === 'post' ) { $this->current_url = owa_lib::get_current_url(); }