From 5c928f71fecc58e0f86e62f13d92fec0bdd34ea9 Mon Sep 17 00:00:00 2001 From: hickert Date: Wed, 19 Dec 2007 13:39:20 +0000 Subject: [PATCH] Moved function "prepare4mailbody" from 'functions.inc' to 'php_setup' to avoid, messages like that 'Fatal error: Call to undefined function prepare4mailbody() in /usr/share/gosa/include/php_setup.inc on line 132' git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@8151 594d385d-05f5-0310-b6e9-bd551577e9d8 --- gosa-core/include/functions.inc | 38 --------------------------------- gosa-core/include/php_setup.inc | 38 +++++++++++++++++++++++++++++++++ 2 files changed, 38 insertions(+), 38 deletions(-) diff --git a/gosa-core/include/functions.inc b/gosa-core/include/functions.inc index b3e441aa0..73368af1e 100644 --- a/gosa-core/include/functions.inc +++ b/gosa-core/include/functions.inc @@ -2327,44 +2327,6 @@ function check_schema($cfg,$rfc2307bis = FALSE) } -function prepare4mailbody($string) -{ - $string = html_entity_decode($string); - - $from = array( - "/%/", - "/ /", - "/\n/", - "/\r/", - "/!/", - "/#/", - "/\*/", - "/\//", - "//", - "/\?/", - "/\"/"); - - $to = array( - "%25", - "%20", - "%0A", - "%0D", - "%21", - "%23", - "%2A", - "%2F", - "%3C", - "%3E", - "%3F", - "%22"); - - $string = preg_replace($from,$to,$string); - - return($string); -} - - function get_languages($languages_in_own_language = FALSE,$strip_region_tag = FALSE) diff --git a/gosa-core/include/php_setup.inc b/gosa-core/include/php_setup.inc index 2901f8d2a..a41373dc0 100644 --- a/gosa-core/include/php_setup.inc +++ b/gosa-core/include/php_setup.inc @@ -205,6 +205,44 @@ function gosaRaiseError($errno, $errstr, $errfile, $errline) } +function prepare4mailbody($string) +{ + $string = html_entity_decode($string); + + $from = array( + "/%/", + "/ /", + "/\n/", + "/\r/", + "/!/", + "/#/", + "/\*/", + "/\//", + "//", + "/\?/", + "/\"/"); + + $to = array( + "%25", + "%20", + "%0A", + "%0D", + "%21", + "%23", + "%2A", + "%2F", + "%3C", + "%3E", + "%3F", + "%22"); + + $string = preg_replace($from,$to,$string); + + return($string); +} + + function dummy_error_handler() { } -- 2.30.2