[ticket/508] Only execute portal once when accessed via domain only

B3P-508
This commit is contained in:
Marc Alexander
2015-03-15 15:26:32 +01:00
parent c0430bb20e
commit eb24ba1425
3 changed files with 26 additions and 0 deletions

View File

@@ -83,6 +83,9 @@ class main
/** @var int Allowed columns */
protected $allowed_columns;
/** @var bool Portal active flag */
protected $portal_active = false;
/**
* Constructor
* NOTE: The parameters of this method must match in order and type with
@@ -133,8 +136,17 @@ class main
*/
public function handle($columns = array())
{
// Do not run portal if it's already active
if ($this->portal_active)
{
return;
}
$this->controller_helper->run_initial_tasks();
// Set portal active
$this->portal_active = true;
// Check if we should limit the columns to display
$this->set_allowed_columns($columns);