diff --git a/application/config/message.php b/application/config/message.php index 1dc1c67ea..8689f94bd 100644 --- a/application/config/message.php +++ b/application/config/message.php @@ -7,9 +7,11 @@ $config['send_immediately'] = false; $config['msg_delivery'] = true; // Default true $config['system_person_id'] = 1; // Dummy sender, used for sending messages from the system -$config['redirect_view_message_url'] = site_url('Redirect/redirectByToken/'); // -$config['message_html_view_url'] = site_url('ViewMessage/toHTML/'); -$config['message_server'] = 'http://www.fhcomplete.org/'; +$config['redirect_view_message_url'] = '/Redirect/redirectByToken/'; +$config['message_html_view_url'] = '/ViewMessage/toHTML/'; + +// Change this to CIS Server (https://cis.example.com/index.ci.php) if you are sending Messages from Vilesci +$config['message_server'] = site_url(); $config['assistent_function'] = 'ass'; define('EMAIL_KONTAKT_TYPE', 'email'); // Email kontakt type diff --git a/application/controllers/Redirect.php b/application/controllers/Redirect.php index a89598f63..38b7c6dbe 100644 --- a/application/controllers/Redirect.php +++ b/application/controllers/Redirect.php @@ -23,9 +23,6 @@ class Redirect extends FHC_Controller { parent::__construct(); - // Loads config file fhcomplete - $this->config->load('fhcomplete'); - // Loads model MessageTokenModel $this->load->model('system/MessageToken_model', 'MessageTokenModel'); } @@ -62,6 +59,8 @@ class Redirect extends FHC_Controller } $addonAufnahmeUrls = $this->config->item('addons_aufnahme_url'); + if(!isset($addonAufnahmeUrls[$organisationRoot])) + $organisationRoot = 'fallback'; if (isset($token) && hasData($msg) diff --git a/application/controllers/ViewMessage.php b/application/controllers/ViewMessage.php index fb614144c..118e16186 100644 --- a/application/controllers/ViewMessage.php +++ b/application/controllers/ViewMessage.php @@ -69,7 +69,7 @@ class ViewMessage extends FHC_Controller } if($this->config->item('redirect_view_message_url') != '') - $href = APP_ROOT . $this->config->item('redirect_view_message_url') . $token; + $href = $this->config->item('message_server').$this->config->item('redirect_view_message_url').$token; else $href = ''; diff --git a/application/core/FHC_Controller.php b/application/core/FHC_Controller.php index edab4b399..14acc1ca0 100644 --- a/application/core/FHC_Controller.php +++ b/application/core/FHC_Controller.php @@ -14,9 +14,9 @@ class FHC_Controller extends CI_Controller * - loads the authentication system * - loads all the helpers that later are always needed */ - public function __construct() + public function __construct() { - parent::__construct(); + parent::__construct(); $this->_controllerId = null; // set _controllerId as null by default