Skip to content

Commit

Permalink
Fix exception from SendItController route
Browse files Browse the repository at this point in the history
Fix exception when using SendIt for project files e.g. export results
  • Loading branch information
lsgs committed Oct 4, 2018
1 parent 90191ae commit 8ae77ac
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions DAGSwitcher.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,21 +29,26 @@ class DAGSwitcher extends AbstractExternalModule
private $super_user;
private $user;
private $user_rights;
private $Proj;

public static $IgnorePages = array('FileRepository','ProjectSetup','ExternalModules','UserRights','DataAccessGroups');
public static $IgnorePages = array('FileRepository','ProjectSetup','ExternalModules','UserRights','DataAccessGroups','SendItController');

public function __construct() {
parent::__construct();
global $lang, $user_rights;
global $Proj, $lang, $user_rights;
$this->lang = &$lang;
$this->page = PAGE;
$this->project_id = intval(PROJECT_ID);
$this->super_user = SUPER_USER;
$this->user = strtolower(USERID);
$this->user_rights = &$user_rights;
$this->Proj = $Proj;
}

public function hook_every_page_top($project_id) {
global $Proj;
if (!isset($this->Proj)) { return; } // return if no project context even if project_id set (e.g. in export SendIController)

$pageRoute = $this->getPageRoute();

if ($pageRoute==='DataAccessGroups') {
Expand Down

0 comments on commit 8ae77ac

Please sign in to comment.