From: hickert Date: Wed, 19 Dec 2007 13:39:20 +0000 (+0000) Subject: Moved function "prepare4mailbody" from 'functions.inc' X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=5c928f71fecc58e0f86e62f13d92fec0bdd34ea9;hp=0df27d707457a31d438026f20e6e43d1ff235480;p=gosa.git 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 --- 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() { }