From 75bb450a6ece6b2e30ad4c148083b7192d7d7224 Mon Sep 17 00:00:00 2001 From: rvelices Date: Wed, 27 Feb 2008 02:31:51 +0000 Subject: - first smarty use ... (in admin.php and admin plugins page) git-svn-id: http://piwigo.org/svn/trunk@2216 68402e56-0260-453c-a942-63ccdbb3a9ee --- include/smarty/libs/plugins/modifier.strip.php | 33 ++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 include/smarty/libs/plugins/modifier.strip.php (limited to 'include/smarty/libs/plugins/modifier.strip.php') diff --git a/include/smarty/libs/plugins/modifier.strip.php b/include/smarty/libs/plugins/modifier.strip.php new file mode 100644 index 000000000..cc5c453c8 --- /dev/null +++ b/include/smarty/libs/plugins/modifier.strip.php @@ -0,0 +1,33 @@ + + * Name: strip
+ * Purpose: Replace all repeated spaces, newlines, tabs + * with a single space or supplied replacement string.
+ * Example: {$var|strip} {$var|strip:" "} + * Date: September 25th, 2002 + * @link http://smarty.php.net/manual/en/language.modifier.strip.php + * strip (Smarty online manual) + * @author Monte Ohrt + * @version 1.0 + * @param string + * @param string + * @return string + */ +function smarty_modifier_strip($text, $replace = ' ') +{ + return preg_replace('!\s+!', $replace, $text); +} + +/* vim: set expandtab: */ + +?> -- cgit v1.2.3