Le 2012-05-12 08:28, Chanaka Dharmarathna a écrit :
On Sat, May 12, 2012 at 4:58 PM, Marc Delisle marc@infomarc.info wrote:
Le 2012-05-12 00:51, Chanaka Dharmarathna a écrit :
Hi All,
While I'm refactoring some files relating to display query results (currently display_tbl.lib.php, common.lib.php), I can method names are used regardless of the inside functionality.
Ex :- "PMA_displayHtmlRadio" in common.lib.php method return a string of HTML content.
It does not return anything.
But the name tells the function displays HTML itself.
This is exactly what this function is doing.
Hi Marc,
It was a mistake by me. Due to I have push some of modifications to my repository, I thought they were returning string. However still there are some functions need to modify. ( PMA_buttonOrImage should be PMA_displayButtonOrImage as you pointed)
But what I actually need to suggest is, instead of render them inside functions, render them in files like sql.php Above function can be PMA_getButtonOrImage and if it need to render somewhere we can just do "echo PMA_getButtonOrImage" So that function only contains some logics (manipulations, calculations etc) and it gives a separate layer for PMA.
I agree that these functions should only return a string.
I did some modifications in my repository [0]. I'm stuck with these things, because when I merge PMA to my repository, there were lots of conflicts in files. Please guide me to do the right thing.
[0] : https://github.com/Chanaka/phpmyadmin/commit/bf15800089d11e83dc7998e5064dafc...
Regards !