diff --git a/gosa-core/include/smarty/plugins/modifier.count_words.php b/gosa-core/include/smarty/plugins/modifier.count_words.php
index 9d339f5422f93440c9539b508ac97e1b450d91b6..1079d8f2634eb87a515b4718d96659d067f3a66a 100644 (file)
/**
* Smarty plugin
* @package Smarty
- * @subpackage plugins
+ * @subpackage PluginsModifier
*/
*/
function smarty_modifier_count_words($string)
{
- // split text by ' ',\r,\n,\f,\t
- $split_array = preg_split('/\s+/',$string);
- // count matches that contain alphanumerics
- $word_count = preg_grep('/[a-zA-Z0-9\\x80-\\xff]/', $split_array);
-
- return count($word_count);
+ return str_word_count($string);
}
-
-/* vim: set expandtab: */
-
?>