[Phpmyadmin-devel] Bit of code to contribute

Hi, Devs. I'm no real programmer, but I did cook up a new transformation for phpMyAdmin. All it does is append a specified string to the table data. I use it to add "°F" to a field containing temperature data. Only one problem: the tooltip that appears when defining the transformation (on the Structure page) says "No description is available for this transformation…". I don't know how to fix this. The function PMA_transformation_text_plain__append_info() returns "Appends text to a string. The only option is the text to be appended (enclosed in single quotes, default empty string)." As evidence, my function does appear correctly (with its description) on the transformation_overview.php page. If you can give me a hint how to fix the tooltip I will. The function code is short enough that I'm including it here: ----------------------------------------- <?php /* vim: set expandtab sw=4 ts=4 sts=4: */ /** * @package phpMyAdmin-Transformation * ******GRL 3/13/2012 based on the "substring" transformation included w/phpMyAdmin * 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; } ?>

Le 2012-03-13 15:19, XTender a écrit :
Hi, Devs.
I'm no real programmer, but I did cook up a new transformation for phpMyAdmin. All it does is append a specified string to the table data. I use it to add "°F" to a field containing temperature data.
Only one problem: the tooltip that appears when defining the transformation (on the Structure page) says "No description is available for this transformation…". I don't know how to fix this. The function PMA_transformation_text_plain__append_info() returns "Appends text to a string. The only option is the text to be appended (enclosed in single quotes, default empty string)."
As evidence, my function does appear correctly (with its description) on the transformation_overview.php page.
If you can give me a hint how to fix the tooltip I will. The function code is short enough that I'm including it here:
I think this is a general bug. When I try it with the 3.4 or the 3.5 branch, I see the same error message, as a tooltip for every transformation already defined. Which phpMyAdmin version are you using? -- Marc Delisle http://infomarc.info

On Wed, Mar 14, 2012 at 1:07 AM, Marc Delisle <marc@infomarc.info> wrote:
Le 2012-03-13 15:19, XTender a écrit :
Hi, Devs.
I'm no real programmer, but I did cook up a new transformation for phpMyAdmin. All it does is append a specified string to the table data. I use it to add "°F" to a field containing temperature data.
Only one problem: the tooltip that appears when defining the transformation (on the Structure page) says "No description is available for this transformation…". I don't know how to fix this. The function PMA_transformation_text_plain__append_info() returns "Appends text to a string. The only option is the text to be appended (enclosed in single quotes, default empty string)."
As evidence, my function does appear correctly (with its description) on the transformation_overview.php page.
If you can give me a hint how to fix the tooltip I will. The function code is short enough that I'm including it here:
I think this is a general bug. When I try it with the 3.4 or the 3.5 branch, I see the same error message, as a tooltip for every transformation already defined.
Added a tracker artifact[1] and fixed.
[1] https://sourceforge.net/tracker/?func=detail&aid=3504567&group_id=23067&atid... -- Thanks and Regards, Madhura Jayaratne
participants (3)
-
Madhura Jayaratne
-
Marc Delisle
-
XTender