summaryrefslogtreecommitdiff
path: root/includes/helper
diff options
context:
space:
mode:
Diffstat (limited to 'includes/helper')
-rw-r--r--includes/helper/email_helper.php3
-rw-r--r--includes/helper/internationalization_helper.php8
2 files changed, 6 insertions, 5 deletions
diff --git a/includes/helper/email_helper.php b/includes/helper/email_helper.php
index 0ef4326a..462b5641 100644
--- a/includes/helper/email_helper.php
+++ b/includes/helper/email_helper.php
@@ -16,7 +16,8 @@ function engelsystem_email_to_user($recipient_user, $title, $message, $not_if_it
}
function engelsystem_email($address, $title, $message) {
- $result = mail($address, $title, $message, "Content-Type: text/plain; charset=UTF-8\r\nFrom: Engelsystem <noreply@engelsystem.de>");
+ global $no_reply_email;
+ $result = mail($address, $title, $message, sprintf("Content-Type: text/plain; charset=UTF-8\r\nFrom: Engelsystem <%s>", $no_reply_email));
if ($result === false) {
engelsystem_error('Unable to send email.');
}
diff --git a/includes/helper/internationalization_helper.php b/includes/helper/internationalization_helper.php
index 7127bdee..a537ef3d 100644
--- a/includes/helper/internationalization_helper.php
+++ b/includes/helper/internationalization_helper.php
@@ -25,15 +25,15 @@ function locale_short() {
*/
function gettext_init() {
global $locales, $default_locale;
-
- if (isset($_REQUEST['set_locale']) && in_array($_REQUEST['set_locale'], array_keys($locales))) {
+
+ if (isset($_REQUEST['set_locale']) && isset($locales[$_REQUEST['set_locale']])) {
$_SESSION['locale'] = $_REQUEST['set_locale'];
} elseif (! isset($_SESSION['locale'])) {
$_SESSION['locale'] = $default_locale;
}
-
+
gettext_locale();
- bindtextdomain('default', __DIR__ . '../../locale');
+ bindtextdomain('default', realpath(__DIR__ . '/../../locale'));
bind_textdomain_codeset('default', 'UTF-8');
textdomain('default');
}