From c1d9fe96ffeff5c56f1728034ad5e94eb2391d2e Mon Sep 17 00:00:00 2001 From: hickert Date: Wed, 19 Dec 2007 13:37:38 +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/branches/2.5@8150 594d385d-05f5-0310-b6e9-bd551577e9d8 --- include/functions.inc | 42 ----------------------------------------- include/php_setup.inc | 44 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 44 insertions(+), 42 deletions(-) diff --git a/include/functions.inc b/include/functions.inc index e46df87dc..e83805413 100644 --- a/include/functions.inc +++ b/include/functions.inc @@ -2480,48 +2480,6 @@ function get_base_from_hook($dn, $attrib) } -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", - "%38", - "%28", - "%29", - "%22"); - - $string = preg_replace($from,$to,$string); - - return($string); -} function mac2company($mac) diff --git a/include/php_setup.inc b/include/php_setup.inc index 3ad89e47e..8260e9593 100644 --- a/include/php_setup.inc +++ b/include/php_setup.inc @@ -222,6 +222,50 @@ 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", + "%38", + "%28", + "%29", + "%22"); + + $string = preg_replace($from,$to,$string); + + return($string); +} + + function dummy_error_handler() { } -- 2.30.2