From ebb54d1e7328877b14fb1d89143444ce66f53ebb Mon Sep 17 00:00:00 2001 From: mohrt Date: Mon, 24 Feb 2003 16:31:47 +0000 Subject: [PATCH] added cat modifier to distribution --- NEWS | 1 + libs/plugins/modifier.cat.php | 23 +++++++++++++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 libs/plugins/modifier.cat.php diff --git a/NEWS b/NEWS index 8cb91fbe..b54adf91 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,4 @@ + - added cat modifier (Monte) - added << >> <> support to if statments (SMK, Monte) - fix _assign_smarty_interface to not overwrite keys other than 'request' (Jerome Poudevigne, Monte) diff --git a/libs/plugins/modifier.cat.php b/libs/plugins/modifier.cat.php new file mode 100644 index 00000000..48f38854 --- /dev/null +++ b/libs/plugins/modifier.cat.php @@ -0,0 +1,23 @@ + + * Purpose: catentate a value to a variable + * Input: string to catenate + * Example: {$var|cat:"foo"} + * ------------------------------------------------------------- + */ +function smarty_modifier_cat($string, $cat) +{ + return $string . $cat; +} + +/* vim: set expandtab: */ + +?>