Skip to content

Commit

Permalink
proper redirection of post requests to log.php.
Browse files Browse the repository at this point in the history
  • Loading branch information
padams committed Apr 2, 2012
1 parent ad126d4 commit ad40e84
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
3 changes: 3 additions & 0 deletions blank.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<?php
// silence is golden.
?>
9 changes: 5 additions & 4 deletions log.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');
}
Expand Down
4 changes: 2 additions & 2 deletions owa_requestContainer.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class owa_requestContainer {
var $server;
var $guid;
var $state;
var $request_type;
var $request_type = '';
var $timestamp;
var $current_url;

Expand Down Expand Up @@ -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();
}
Expand Down

0 comments on commit ad40e84

Please sign in to comment.