From eb37c8716da32d69896e5bc98be4fc28dc96dc29 Mon Sep 17 00:00:00 2001 From: G R Lewis Date: Sat, 31 Mar 2012 07:20:46 -0400 Subject: [PATCH] New transformation: append string --- .../text_plain__append.inc.php | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 libraries/transformations/text_plain__append.inc.php diff --git a/libraries/transformations/text_plain__append.inc.php b/libraries/transformations/text_plain__append.inc.php new file mode 100644 index 0000000000..8a8b3f4198 --- /dev/null +++ b/libraries/transformations/text_plain__append.inc.php @@ -0,0 +1,25 @@ + __('Appends text to a string. The only option is the text to be appended (enclosed in single quotes, default empty string).'), + ); +} + +function PMA_transformation_text_plain__append($buffer, $options = array(), $meta = '') { + + if (! isset($options[0]) || $options[0] == '') { + $options[0] = ''; + } + + $newtext = $buffer . $options[0]; //just append the option to the original text + + return $newtext; +} + +?>