mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-22 09:22:22 +00:00
- Removed _setControllerId method from controller InfoCenter
- InfoCenter controller now uses setControllerId and getControllerId from FHC_Controller - Fixed URL query string character in method FHC_Controller->setControllerId
This commit is contained in:
@@ -95,7 +95,9 @@ class InfoCenter extends FHC_Controller
|
||||
if(!$this->permissionlib->isBerechtigt('basis/person'))
|
||||
show_error('You have no Permission! You need Infocenter Role');
|
||||
|
||||
$this->_setControllerId(); // sets the controller id
|
||||
$this->setControllerId(); // sets the controller id
|
||||
|
||||
$this->fhc_controller_id = $this->getControllerId();
|
||||
|
||||
$this->setNavigationMenuArray(); // sets property navigationMenuArray
|
||||
}
|
||||
@@ -1090,21 +1092,4 @@ class InfoCenter extends FHC_Controller
|
||||
$this->loglib->logError('Studiengang has no mail for sending Freigabe mail');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the unique id for the called controller
|
||||
*/
|
||||
private function _setControllerId()
|
||||
{
|
||||
$fhc_controller_id = $this->input->get('fhc_controller_id');
|
||||
|
||||
if (!isset($fhc_controller_id) || empty($fhc_controller_id))
|
||||
{
|
||||
$fhc_controller_id = uniqid();
|
||||
header('Location: '.$_SERVER['REQUEST_URI'].'?fhc_controller_id='.$fhc_controller_id);
|
||||
exit;
|
||||
}
|
||||
|
||||
$this->fhc_controller_id = $fhc_controller_id;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -46,7 +46,15 @@ class FHC_Controller extends CI_Controller
|
||||
{
|
||||
$this->_controllerId = uniqid(); // generate a unique id
|
||||
// Redirect to the same URL, but giving FHC_CONTROLLER_ID as HTTP GET parameter
|
||||
header(sprintf('Location: %s?%s=%s', $_SERVER['REQUEST_URI'], self::FHC_CONTROLLER_ID, $this->_controllerId));
|
||||
header(
|
||||
sprintf(
|
||||
'Location: %s%s%s=%s',
|
||||
$_SERVER['REQUEST_URI'],
|
||||
strpos($_SERVER['REQUEST_URI'], '?') === false ? '?' : '&', // place the corret character to divide parameters
|
||||
self::FHC_CONTROLLER_ID,
|
||||
$this->_controllerId
|
||||
)
|
||||
);
|
||||
exit; // terminate immediately the execution of this controller
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user