mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-20 00:12:15 +00:00
Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -56,7 +56,7 @@ $config['roles'] = array
|
||||
'basis/adresse','basis/akte','basis/kontakt','basis/log','basis/nation','basis/notiz','basis/notizzuordnung',
|
||||
'basis/person','basis/prestudent','basis/prestudentstatus','basis/status','basis/zgv','basis/zgvmaster',
|
||||
'lehre/studienplan','system/filters','fs/dms','basis/message','basis/benutzerrolle', 'basis/sprache',
|
||||
'system/personlock','basis/benutzerfunktion','system/vorlagestudiengang'
|
||||
'system/personlock','basis/benutzerfunktion','system/vorlagestudiengang', 'basis/bewerbungstermine'
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
@@ -4,6 +4,10 @@ if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
class FHC_Controller extends CI_Controller
|
||||
{
|
||||
const FHC_CONTROLLER_ID = 'fhc_controller_id'; // name of the parameter used to identify uniquely a call to a controller
|
||||
|
||||
private $_controllerId; // contains the unique identifier of a call to a controller
|
||||
|
||||
/**
|
||||
* Standard construct for all the controllers, loads the authentication system
|
||||
*/
|
||||
@@ -11,6 +15,8 @@ class FHC_Controller extends CI_Controller
|
||||
{
|
||||
parent::__construct();
|
||||
|
||||
$this->_controllerId = null; // set _controllerId as null by default
|
||||
|
||||
$this->load->helper('fhcauth');
|
||||
}
|
||||
|
||||
@@ -23,4 +29,34 @@ class FHC_Controller extends CI_Controller
|
||||
{
|
||||
$this->load->library('PhrasesLib', array($categories, $language), 'p');
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the unique id for the called controller
|
||||
* NOTE: it is only working with HTTP GET request, not neeaded with POST
|
||||
* because the first call to the controller is via HTTP GET,
|
||||
* therefore a fhc_controller_id is already generated
|
||||
*/
|
||||
protected function setControllerId()
|
||||
{
|
||||
if ($_SERVER['REQUEST_METHOD'] === 'GET')
|
||||
{
|
||||
$this->_controllerId = $this->input->get(self::FHC_CONTROLLER_ID);
|
||||
|
||||
if (!isset($this->_controllerId) || empty($this->_controllerId))
|
||||
{
|
||||
$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));
|
||||
exit; // terminate immediately the execution of this controller
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the value of the property _controllerId
|
||||
*/
|
||||
protected function getControllerId()
|
||||
{
|
||||
return $this->_controllerId;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -57,8 +57,19 @@ class DocumentLib
|
||||
case 'application/vnd.ms-word':
|
||||
case 'application/vnd.oasis.opendocument.text':
|
||||
case 'text/plain':
|
||||
$this->convert($filename, $outFile, 'pdf');
|
||||
return success($outFile);
|
||||
// Unoconv Version 0.6 seems to fail on converting TXT Files
|
||||
if ($this->unoconv_version == '0.6')
|
||||
return error();
|
||||
|
||||
$ret = $this->convert($filename, $outFile, 'pdf');
|
||||
if(isSuccess($ret))
|
||||
{
|
||||
return success($outFile);
|
||||
}
|
||||
else
|
||||
{
|
||||
return error($ret->retval);
|
||||
}
|
||||
case 'application/pdf':
|
||||
return success($filename);
|
||||
default:
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
SELECT zeitpunkt
|
||||
FROM system.tbl_log
|
||||
WHERE taetigkeit_kurzbz IN(\'bewerbung\',\'kommunikation\')
|
||||
AND logdata->>\'name\' NOT IN (\'Login with code\', \'New application\')
|
||||
AND logdata->>\'name\' NOT IN (\'Login with code\', \'New application\', \'Interessent rejected\')
|
||||
AND person_id = p.person_id
|
||||
ORDER BY zeitpunkt DESC
|
||||
LIMIT 1
|
||||
@@ -23,7 +23,7 @@
|
||||
SELECT insertvon
|
||||
FROM system.tbl_log
|
||||
WHERE taetigkeit_kurzbz IN(\'bewerbung\',\'kommunikation\')
|
||||
AND logdata->>\'name\' NOT IN (\'Login with code\', \'New application\')
|
||||
AND logdata->>\'name\' NOT IN (\'Login with code\', \'New application\', \'Interessent rejected\')
|
||||
AND person_id = p.person_id
|
||||
ORDER BY zeitpunkt DESC
|
||||
LIMIT 1
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
// Retrives the URL path of the called controller + controller method
|
||||
// Retrives the URL path of the called controller + called controller method
|
||||
// NOTE: placed here because it doesn't work inside functions
|
||||
$calledPath = $this->router->directory.$this->router->class;
|
||||
$calledMethod = $this->router->method;
|
||||
@@ -15,6 +15,7 @@ $customJSs = isset($customJSs) ? $customJSs : null;
|
||||
// By default set the parameters to false
|
||||
$jquery = isset($jquery) ? $jquery : false;
|
||||
$jqueryui = isset($jqueryui) ? $jqueryui : false;
|
||||
$ajaxlib = isset($ajaxlib) ? $ajaxlib : false;
|
||||
$bootstrap = isset($bootstrap) ? $bootstrap : false;
|
||||
$fontawesome = isset($fontawesome) ? $fontawesome : false;
|
||||
$tablesorter = isset($tablesorter) ? $tablesorter : false;
|
||||
@@ -141,12 +142,15 @@ function _generateAddonsJSsInclude($calledFrom)
|
||||
// jQuery UI CSS
|
||||
if ($jqueryui === true) _generateCSSsInclude('vendor/components/jqueryui/themes/base/jquery-ui.min.css');
|
||||
|
||||
// bootstrap CSS
|
||||
// Bootstrap CSS
|
||||
if ($bootstrap === true) _generateCSSsInclude('vendor/twbs/bootstrap/dist/css/bootstrap.min.css');
|
||||
|
||||
// font awesome CSS
|
||||
// Font Awesome CSS
|
||||
if ($fontawesome === true) _generateCSSsInclude('vendor/components/font-awesome/css/font-awesome.min.css');
|
||||
|
||||
// AjaxLib CSS
|
||||
if ($ajaxlib === true) _generateCSSsInclude('public/css/AjaxLib.css');
|
||||
|
||||
// Table sorter CSS
|
||||
if ($tablesorter === true)
|
||||
{
|
||||
@@ -154,7 +158,7 @@ function _generateAddonsJSsInclude($calledFrom)
|
||||
_generateCSSsInclude('vendor/mottie/tablesorter/dist/css/jquery.tablesorter.pager.min.css');
|
||||
}
|
||||
|
||||
// sb admin template CSS
|
||||
// SB Admin 2 template CSS
|
||||
if ($sbadmintemplate === true)
|
||||
{
|
||||
_generateCSSsInclude('vendor/BlackrockDigital/startbootstrap-sb-admin-2/vendor/metisMenu/metisMenu.min.css');
|
||||
@@ -164,10 +168,11 @@ function _generateAddonsJSsInclude($calledFrom)
|
||||
// Eventually required CSS
|
||||
_generateCSSsInclude($customCSSs); // Eventually required CSS
|
||||
|
||||
|
||||
// --------------------------------------------------------------------------------------------------------
|
||||
// Javascripts
|
||||
|
||||
// Generates the global object to pass useful parms to the other javascripts
|
||||
// Generates the global object to pass useful parameters to other javascripts
|
||||
// NOTE: must be called before any other JS include
|
||||
_generateJSDataStorageObject($calledPath, $calledMethod);
|
||||
|
||||
@@ -178,11 +183,13 @@ function _generateAddonsJSsInclude($calledFrom)
|
||||
if ($jqueryui === true)
|
||||
{
|
||||
_generateJSsInclude('vendor/components/jqueryui/jquery-ui.min.js');
|
||||
//datepicker german language file
|
||||
_generateJSsInclude('vendor/components/jqueryui/ui/i18n/datepicker-de.js');
|
||||
_generateJSsInclude('vendor/components/jqueryui/ui/i18n/datepicker-de.js'); // datepicker german language file
|
||||
}
|
||||
|
||||
// bootstrap JS
|
||||
// AjaxLib JS
|
||||
if ($ajaxlib === true) _generateJSsInclude('public/js/AjaxLib.js');
|
||||
|
||||
// Bootstrap JS
|
||||
if ($bootstrap === true) _generateJSsInclude('vendor/twbs/bootstrap/dist/js/bootstrap.min.js');
|
||||
|
||||
// Table sorter JS
|
||||
@@ -193,10 +200,10 @@ function _generateAddonsJSsInclude($calledFrom)
|
||||
_generateJSsInclude('vendor/mottie/tablesorter/dist/js/extras/jquery.tablesorter.pager.min.js');
|
||||
}
|
||||
|
||||
//tinymce JS
|
||||
// Tinymce JS
|
||||
if($tinymce === true) _generateJSsInclude('vendor/tinymce/tinymce/tinymce.min.js') ;
|
||||
|
||||
// sb admin template JS
|
||||
// SB Admin 2 template JS
|
||||
if ($sbadmintemplate === true)
|
||||
{
|
||||
_generateJSsInclude('vendor/BlackrockDigital/startbootstrap-sb-admin-2/vendor/metisMenu/metisMenu.min.js');
|
||||
|
||||
Reference in New Issue
Block a user