From fda06a89a053b7142f09d01b60bf57a9ba5778f9 Mon Sep 17 00:00:00 2001 From: hickert Date: Fri, 19 Mar 2010 13:40:40 +0000 Subject: [PATCH] updated templates git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@16954 594d385d-05f5-0310-b6e9-bd551577e9d8 --- gosa-core/include/functions.inc | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/gosa-core/include/functions.inc b/gosa-core/include/functions.inc index 53558553f..dec99bbc2 100644 --- a/gosa-core/include/functions.inc +++ b/gosa-core/include/functions.inc @@ -3629,6 +3629,19 @@ function image($path, $action= "", $title= "", $align= "middle") } } +/*! \brief Encodes a complex string to be useable in HTML posts. + */ +function postEncode($str) +{ + return(preg_replace("/=/","_", base64_encode($str))); +} + +/*! \brief Decodes a string encoded by postEncode + */ +function postDecode($str) +{ + return(base64_decode(preg_replace("/_/","=", $str))); +} // vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler: ?> -- 2.30.2