diff --git a/application/config/fhcomplete.php b/application/config/fhcomplete.php index 8bdb6f71c..76250a6fe 100755 --- a/application/config/fhcomplete.php +++ b/application/config/fhcomplete.php @@ -1,6 +1,6 @@ 'basis/rechnungsbetrag', 'wawi.tbl_rechnungstyp' => 'basis/rechnungstyp', 'wawi.tbl_zahlungstyp' => 'basis/zahlungstyp', - DMS_PATH => 'fs/dms', - + 'public.tbl_sprache' => 'admin' ); + +$config['addons_aufnahme_url'] = 'http://debian.dev/build/addons/aufnahme/cis/index.php'; \ No newline at end of file diff --git a/application/config/message.php b/application/config/message.php index 29b354f7d..4caa2ca71 100644 --- a/application/config/message.php +++ b/application/config/message.php @@ -5,8 +5,8 @@ if (! defined('BASEPATH')) exit('No direct script access allowed'); $config['msg_delivery'] = true; $config['send_immediately'] = false; // If the message should be sent immediately $config['system_person_id'] = 1; // Dummy sender, used for sending messages from the system -$config['cis_message_view_url'] = 'readMessageByToken.php'; // Dummy sender, used for sending messages from the system -$config['message_html_view_url'] = 'index.ci.php/system/Messages/toHTML/'; +$config['redirect_view_message_url'] = 'index.ci.php/Redirect/redirectByToken/'; // +$config['message_html_view_url'] = 'index.ci.php/ViewMessage/toHTML/'; define('EMAIL_KONTAKT_TYPE', 'email'); // Email kontakt type define('SENT_INFO_NEWLINE', '\n'); // tbl_msg_recipient->sentInfo separator diff --git a/application/controllers/Redirect.php b/application/controllers/Redirect.php new file mode 100644 index 000000000..8c967d883 --- /dev/null +++ b/application/controllers/Redirect.php @@ -0,0 +1,41 @@ +config->load('fhcomplete'); + } + + public function redirectByToken($token) + { + if (isset($token)) + { + redirect($this->config->item('addons_aufnahme_url') . '?token=' . $token); + } + else + { + $this->response(); + } + } +} \ No newline at end of file diff --git a/application/controllers/ViewMessage.php b/application/controllers/ViewMessage.php new file mode 100644 index 000000000..88f46ab3d --- /dev/null +++ b/application/controllers/ViewMessage.php @@ -0,0 +1,45 @@ +load->library('MessageLib'); + } + + public function toHTML($token) + { + $msg = $this->messagelib->getMessageByToken($token); + if ($msg->error) + { + show_error($msg->retval); + } + + if (is_array($msg->retval) && count($msg->retval) > 0) + { + $data = array ( + 'message' => $msg->retval[0] + ); + + $this->load->view('system/messageHTML.php', $data); + } + } +} \ No newline at end of file diff --git a/application/controllers/api/v1/system/Message.php b/application/controllers/api/v1/system/Message.php index 46100c30e..4ebc97dfd 100644 --- a/application/controllers/api/v1/system/Message.php +++ b/application/controllers/api/v1/system/Message.php @@ -105,23 +105,6 @@ class Message extends APIv1_Controller } } - /** - * @return void - */ - public function getRedirectByToken() - { - $token = $this->get('token'); - - if (isset($token)) - { - redirect(CIS_ROOT); - } - else - { - $this->response(); - } - } - /** * @return void */ diff --git a/application/controllers/system/Messages.php b/application/controllers/system/Messages.php index 6b7939e80..0fdd6b8ec 100755 --- a/application/controllers/system/Messages.php +++ b/application/controllers/system/Messages.php @@ -141,24 +141,6 @@ class Messages extends VileSci_Controller redirect('/system/Messages/view/' . $msg->retval . '/' . $receiver_id); } - public function toHTML($token) - { - $msg = $this->messagelib->getMessageByToken($token); - if ($msg->error) - { - show_error($msg->retval); - } - - if (is_array($msg->retval) && count($msg->retval) > 0) - { - $data = array ( - 'message' => $msg->retval[0] - ); - - $this->load->view('system/messageHTML.php', $data); - } - } - private function getPersonId() { $person_id = null; diff --git a/application/libraries/MessageLib.php b/application/libraries/MessageLib.php index aafaf5042..c00f7847f 100644 --- a/application/libraries/MessageLib.php +++ b/application/libraries/MessageLib.php @@ -512,7 +512,7 @@ class MessageLib // If the person has an email account if (!is_null($result->retval[$i]->receiver) && $result->retval[$i]->receiver != '') { - $href = CIS_ROOT . $this->ci->config->item('cis_message_view_url') . '?token=' . $result->retval[$i]->token; + $href = APP_ROOT . $this->ci->config->item('redirect_view_message_url') . $result->retval[$i]->token; // Using a template for the html email body $body = $this->ci->parser->parse( 'templates/mailHTML', @@ -644,7 +644,7 @@ class MessageLib if (is_null($body)) { // Using a template for the html email body - $href = CIS_ROOT . $this->ci->config->item('cis_message_view_url') . '?token=' . $result->retval[$i]->token; + $href = APP_ROOT . $this->ci->config->item('redirect_view_message_url') . $result->retval[$i]->token; $bodyMsg = $this->ci->parser->parse( 'templates/mailHTML', array(