From 59478e06c25303a790a0840ab2ac30662c4ef781 Mon Sep 17 00:00:00 2001 From: Hugues Hiegel Date: Tue, 5 Aug 2014 16:46:22 +0200 Subject: c'est la merde.. --- program/lib/Roundcube/bootstrap.php | 30 ++++++++++++++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) (limited to 'program/lib/Roundcube/bootstrap.php') diff --git a/program/lib/Roundcube/bootstrap.php b/program/lib/Roundcube/bootstrap.php index 6e5143382..c3fac1f4d 100644 --- a/program/lib/Roundcube/bootstrap.php +++ b/program/lib/Roundcube/bootstrap.php @@ -54,11 +54,11 @@ foreach ($config as $optname => $optval) { } // framework constants -define('RCUBE_VERSION', '1.0-git'); +define('RCUBE_VERSION', '0.9.5'); define('RCUBE_CHARSET', 'UTF-8'); if (!defined('RCUBE_LIB_DIR')) { - define('RCUBE_LIB_DIR', dirname(__FILE__).DIRECTORY_SEPARATOR); + define('RCUBE_LIB_DIR', dirname(__FILE__).'/'); } if (!defined('RCUBE_INSTALL_PATH')) { @@ -302,6 +302,32 @@ function is_ascii($str, $control_chars = true) } +/** + * Remove single and double quotes from a given string + * + * @param string Input value + * + * @return string Dequoted string + */ +function strip_quotes($str) +{ + return str_replace(array("'", '"'), '', $str); +} + + +/** + * Remove new lines characters from given string + * + * @param string $str Input value + * + * @return string Stripped string + */ +function strip_newlines($str) +{ + return preg_replace('/[\r\n]/', '', $str); +} + + /** * Compose a valid representation of name and e-mail address * -- cgit v1.2.3