diff --git a/application/core/Auth_Controller.php b/application/core/Auth_Controller.php index 1af83ba2c..c3be8b4d9 100644 --- a/application/core/Auth_Controller.php +++ b/application/core/Auth_Controller.php @@ -48,6 +48,10 @@ class Auth_Controller extends FHC_Controller } } + /** + * Converts an array of permissions to a string that contains them as a comma separated list + * Ex: ", , " + */ private function _rpsToString($requiredPermissions, $method) { $strRequiredPermissions = ''; // string that contains all the required permissions needed to access to this method diff --git a/application/core/FHC_Controller.php b/application/core/FHC_Controller.php index 1f51a72d7..b62d3f9b8 100644 --- a/application/core/FHC_Controller.php +++ b/application/core/FHC_Controller.php @@ -28,6 +28,9 @@ class FHC_Controller extends CI_Controller // Loads helper session to manage the php session $this->load->helper('session'); + + // Loads language helper + $this->load->helper('language'); } //------------------------------------------------------------------------------------------------------------------ diff --git a/application/helpers/language_helper.php b/application/helpers/language_helper.php new file mode 100644 index 000000000..cf6b94fe5 --- /dev/null +++ b/application/helpers/language_helper.php @@ -0,0 +1,42 @@ +load->model('person/Person_model', 'PersonModelLanguage'); + + $language = $ci->PersonModelLanguage->getLanguage(getAuthUID()); + } + + return $language; +} diff --git a/application/helpers/session_helper.php b/application/helpers/session_helper.php index e74468896..a0a8a60b9 100644 --- a/application/helpers/session_helper.php +++ b/application/helpers/session_helper.php @@ -10,13 +10,6 @@ * @since Version 1.0.0 */ -/** - * Message Helper - * - * @subpackage Helpers - * @category Helpers - */ - if (! defined('BASEPATH')) exit('No direct script access allowed'); // -------------------------------------------------------------------------------------------------------