diff --git a/application/controllers/reports.php b/application/controllers/reports.php index 954d59e64..62c1e9340 100644 --- a/application/controllers/reports.php +++ b/application/controllers/reports.php @@ -12,14 +12,17 @@ class Reports extends Secure_area parent::__construct('reports'); $method_name = $this->uri->segment(2); $exploder = explode('_', $method_name); - $submodule_id = preg_match("/^(inventory)|([^_.]+)(?:_graph)?$/", $method_name, $matches); - var_dump($matches); - $submodule_id = preg_replace("/^(.*?)s?$/", "$1s", $matches[1]); + $submodule_id = preg_match("/(?:inventory)|([^_.]*)(?:_graph)?$/", $method_name, $matches); + $submodule_id = array_pop($matches); + if (count($matches) > 1) + { + $submodule_id = preg_replace("/^(.*?)s?$/", "$1s", $submodule_id); + } $employee_id=$this->Employee->get_logged_in_employee_info()->person_id; // check access to report submodule if (sizeof($exploder) > 1 && !$this->Employee->has_grant('reports_'.$submodule_id,$employee_id)) { - //redirect('no_access/'.$submodule_id.'/reports_' . $submodule_id); + redirect('no_access/'.$submodule_id.'/reports_' . $submodule_id); } $this->load->helper('report'); } diff --git a/system/libraries/Email.php b/system/libraries/Email.php index 7c50ff16b..c9aa6f4b8 100644 --- a/system/libraries/Email.php +++ b/system/libraries/Email.php @@ -610,10 +610,6 @@ class CI_Email { */ protected function _get_message_id() { - $from = $this->_headers['Return-Path']; - $from = str_replace(">", "", $from); - $from = str_replace("<", "", $from); - return "<".uniqid('').strstr($from, '@').">"; }