Code

Moved function "prepare4mailbody" from 'functions.inc'
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 19 Dec 2007 13:39:20 +0000 (13:39 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 19 Dec 2007 13:39:20 +0000 (13:39 +0000)
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
gosa-core/include/php_setup.inc

index b3e441aa01218791ad5a238a1222c3a183ecda3e..73368af1eb291ed1f3911d996e8dd595bb76f865 100644 (file)
@@ -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)
index 2901f8d2a6675e6a9109bcd967bc43111b21ddc3..a41373dc0c9abcee9623c7635d98214cb000837d 100644 (file)
@@ -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()
 {
 }