You've already forked phpmyadmin
mirror of
https://github.com/phpmyadmin/phpmyadmin.git
synced 2026-10-29 21:24:44 +03:00
New transformation: append string
This commit is contained in:
25
libraries/transformations/text_plain__append.inc.php
Normal file
25
libraries/transformations/text_plain__append.inc.php
Normal file
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
/* vim: set expandtab sw=4 ts=4 sts=4: */
|
||||
/**
|
||||
* @package phpMyAdmin-Transformation
|
||||
* Has one option: the text to be appended (default '')
|
||||
*/
|
||||
|
||||
function PMA_transformation_text_plain__append_info() {
|
||||
return array(
|
||||
'info' => __('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;
|
||||
}
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user