<br><br><div class="gmail_quote">On Fri, May 11, 2012 at 11:12 AM, Chanaka Dharmarathna <span dir="ltr"><<a href="mailto:pe.chanaka.ck@gmail.com" target="_blank">pe.chanaka.ck@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="HOEnZb"><div class="h5"><br><br><div class="gmail_quote">On Fri, May 11, 2012 at 7:05 AM, Chanaka Dharmarathna <span dir="ltr"><<a href="mailto:pe.chanaka.ck@gmail.com" target="_blank">pe.chanaka.ck@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div><div><br><br><div class="gmail_quote">On Fri, May 11, 2012 at 12:39 AM, Rouslan Placella <span dir="ltr"><<a href="mailto:rouslan@placella.com" target="_blank">rouslan@placella.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div><div>On 09/05/12 21:08, Chanaka Dharmarathna wrote:<br>
> On Wed, May 9, 2012 at 2:27 PM, Rouslan Placella<<a href="mailto:rouslan@placella.com" target="_blank">rouslan@placella.com</a>>wrote:<br>
><br>
>> On 09/05/12 09:39, Chanaka Dharmarathna wrote:<br>
>>> On Wed, May 9, 2012 at 9:21 AM, Chanaka Dharmarathna<<br>
>>> <a href="mailto:pe.chanaka.ck@gmail.com" target="_blank">pe.chanaka.ck@gmail.com</a>> wrote:<br>
>>><br>
>>>><br>
>>>><br>
>>>> On Wed, May 9, 2012 at 1:19 AM, Rouslan Placella<<a href="mailto:rouslan@placella.com" target="_blank">rouslan@placella.com</a><br>
>>> wrote:<br>
>>>><br>
>>>>> On 08/05/12 20:32, Chanaka Dharmarathna wrote:<br>
>>>>>> On Tue, May 8, 2012 at 7:23 PM, Chanaka Dharmarathna<<br>
>>>>>> <a href="mailto:pe.chanaka.ck@gmail.com" target="_blank">pe.chanaka.ck@gmail.com</a>> wrote:<br>
>>>>>><br>
>>>>>>><br>
>>>>>>><br>
>>>>>>> On Tue, May 8, 2012 at 7:08 PM, Marc Delisle<<a href="mailto:marc@infomarc.info" target="_blank">marc@infomarc.info</a>><br>
>>>>> wrote:<br>
>>>>>>><br>
>>>>>>>> Le 2012-05-08 09:25, Chanaka Dharmarathna a écrit :<br>
>>>>>>>><br>
>>>>>>>>>><br>
>>>>>>>>>> See "Class Variables and Methods" in [0].<br>
>>>>>>>>>><br>
>>>>>>>>>> [0] <a href="http://pear.php.net/manual/en/standards.naming.php" target="_blank">http://pear.php.net/manual/en/standards.naming.php</a><br>
>>>>>>>><br>
>>>>>>>>> Hi Marc,<br>
>>>>>>>>><br>
>>>>>>>>> I went through that document.<br>
>>>>>>>>> If the function is global, it will be like<br>
>>>>> 'PMA_getDivForSliderEffect()'<br>
>>>>>>>>> And if it is a local function (for particular class), it will be<br>
>> like<br>
>>>>>>>>> 'getDivForSliderEffect()'.<br>
>>>>>>>><br>
>>>>>>>> If this is a public method, yes. If a private one, prefix its name<br>
>>>>> with<br>
>>>>>>>> an underscore.<br>
>>>>>>>><br>
>>>>>>>>><br>
>>>>>>>>> Though I went through that document before this, I couldn't get<br>
>> that<br>
>>>>>>>> point.<br>
>>>>>>>>> Thanks for pointing out that.<br>
>>>>>>>><br>
>>>>>>>><br>
>>>>>>>><br>
>>>>>>>> --<br>
>>>>>>>> Marc Delisle<br>
>>>>>>>> <a href="http://infomarc.info" target="_blank">http://infomarc.info</a><br>
>>>>>>>><br>
>>>>>>>><br>
>>>>>>>><br>
>>>>>>>><br>
>>>>><br>
>> ------------------------------------------------------------------------------<br>
>>>>>>>> Live Security Virtual Conference<br>
>>>>>>>> Exclusive live event will cover all the ways today's security and<br>
>>>>>>>> threat landscape has changed and how IT managers can respond.<br>
>>>>> Discussions<br>
>>>>>>>> will include endpoint security, mobile security and the latest in<br>
>>>>> malware<br>
>>>>>>>> threats. <a href="http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/" target="_blank">http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/</a><br>
>>>>>>>> _______________________________________________<br>
>>>>>>>> Phpmyadmin-devel mailing list<br>
>>>>>>>> <a href="mailto:Phpmyadmin-devel@lists.sourceforge.net" target="_blank">Phpmyadmin-devel@lists.sourceforge.net</a><br>
>>>>>>>> <a href="https://lists.sourceforge.net/lists/listinfo/phpmyadmin-devel" target="_blank">https://lists.sourceforge.net/lists/listinfo/phpmyadmin-devel</a><br>
>>>>>>>><br>
>>>>>>>><br>
>>>>>>> Got it Marc.<br>
>>>>>>> Thanks.<br>
>>>>>>><br>
>>>>>>><br>
>>>>>>> --<br>
>>>>>>> ____________________________________<br>
>>>>>>><br>
>>>>>>> Chanaka Indrajith<br>
>>>>>>> Bsc.Computer Engineering Undergraduate<br>
>>>>>>> Faculty of Engineering<br>
>>>>>>> University of Peradeniya<br>
>>>>>>> Sri Lanka<br>
>>>>>>> ____________________________________<br>
>>>>>>><br>
>>>>>>><br>
>>>>>> Hi Michal,<br>
>>>>>><br>
>>>>>> I just did my first commit to my repository [0].<br>
>>>>>> In that commit I have done some refactoring on<br>
>>>>> "PMA_displayTableHeaders()"<br>
>>>>>> function in "display_tbl.php" file.<br>
>>>>>> All HTML renderings by "echo"s were removed and those HTML was<br>
>> rendered<br>
>>>>> at<br>
>>>>>> the bottom of the function at once.<br>
>>>>>> As well some related functions in "common.lib.php" file also were<br>
>>>>> modified<br>
>>>>>> in order to return a string of HTML content.<br>
>>>>>> But the tests were not yet modified according to my modifications.<br>
>>>>>> Since there was a conflict after my first local commit [1] (git<br>
>>>>> commit), I<br>
>>>>>> had to resolve conflicts and commit again. (that is [0])<br>
>>>>>><br>
>>>>>> I have already installed phpUnit framework.<br>
>>>>>> It will be very helpful if you can suggest me some documentation to<br>
>>>>> setup<br>
>>>>>> and run tests in PMA (selenium etc).<br>
>>>>>><br>
>>>>>> I'm intending to do the above refactoring procedure to all the<br>
>>>>> functions in<br>
>>>>>> "display_tbl.lib.php" file before moving to any other task.<br>
>>>>>><br>
>>>>>> [0] :<br>
>>>>>><br>
>>>>><br>
>> <a href="https://github.com/Chanaka/phpmyadmin/commit/dfc73d3494445ff9430e5d0b4f33f800c6e480e0" target="_blank">https://github.com/Chanaka/phpmyadmin/commit/dfc73d3494445ff9430e5d0b4f33f800c6e480e0</a><br>
>>>>>> [1] :<br>
>>>>>><br>
>>>>><br>
>> <a href="https://github.com/Chanaka/phpmyadmin/commit/004f4f5258a0820975e2da9fa02a6d3ba6622368" target="_blank">https://github.com/Chanaka/phpmyadmin/commit/004f4f5258a0820975e2da9fa02a6d3ba6622368</a><br>
>>>>>><br>
>>>>>> Regards !<br>
>>>>><br>
>>>>> I had a very quick look at your commit. I think that you're indenting<br>
>>>>> some lines incorrectly (but I stand to be corrected on this one).<br>
>> AFAIK,<br>
>>>>> you don't need to line up the operators, just indent by 4 spaces.<br>
>> Example:<br>
>>>>><br>
>>>>> // THIS IS BAD<br>
>>>>> $radio_html .= '<label for="' . $html_field_id . '">'<br>
>>>>> . $choice_label<br>
>>>>> . '</label>';<br>
>>>>><br>
>>>>> // THIS IS GOOD<br>
>>>>> $radio_html .= '<label for="' . $html_field_id . '">'<br>
>>>>> . $choice_label<br>
>>>>> . '</label>';<br>
>>>>><br>
>>>>> // THIS IS ALSO GOOD<br>
>>>>> $radio_html .= '<label for="' . $html_field_id . '">';<br>
>>>>> $radio_html .= $choice_label;<br>
>>>>> $radio_html .= '</label>';<br>
>>>>><br>
>>>>> Bye,<br>
>>>>> Rouslan<br>
>>>>><br>
>>>>><br>
>>>>><br>
>> ------------------------------------------------------------------------------<br>
>>>>> Live Security Virtual Conference<br>
>>>>> Exclusive live event will cover all the ways today's security and<br>
>>>>> threat landscape has changed and how IT managers can respond.<br>
>> Discussions<br>
>>>>> will include endpoint security, mobile security and the latest in<br>
>> malware<br>
>>>>> threats. <a href="http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/" target="_blank">http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/</a><br>
>>>>> _______________________________________________<br>
>>>>> Phpmyadmin-devel mailing list<br>
>>>>> <a href="mailto:Phpmyadmin-devel@lists.sourceforge.net" target="_blank">Phpmyadmin-devel@lists.sourceforge.net</a><br>
>>>>> <a href="https://lists.sourceforge.net/lists/listinfo/phpmyadmin-devel" target="_blank">https://lists.sourceforge.net/lists/listinfo/phpmyadmin-devel</a><br>
>>>>><br>
>>>><br>
>>>> Hi Rouslan,<br>
>>>><br>
>>>> Thanks for your suggestion.<br>
>>>> I'll follow the way you mentioned as "THIS IS GOOD".<br>
>>>><br>
>>>> Regards !<br>
>>>><br>
>>>> --<br>
>>>> ____________________________________<br>
>>>><br>
>>>> Chanaka Indrajith<br>
>>>> Bsc.Computer Engineering Undergraduate<br>
>>>> Faculty of Engineering<br>
>>>> University of Peradeniya<br>
>>>> Sri Lanka<br>
>>>> ____________________________________<br>
>>>><br>
>>>><br>
>>> Hi Michal,<br>
>>><br>
>>> In some functions there are pure HTML code snippets. (Ex :-<br>
>>> PMA_displayTableNavigationOneButton() function in display_tbl.lib.php)<br>
>>><br>
>>> As I feel, its not good to convert all these snippets as PHP string and<br>
>>> render them. So I'm intending to get those pure HTML snippets into<br>
>> separate<br>
>>> function. That function can be named as 'PMA_renderTableNavigationForm'<br>
>>> (for above case).<br>
>>> What do you think about this ?<br>
>>><br>
>>> As well is there any reason for the phrase 'One' in the function<br>
>>> "PMA_displayTableNavigation*One*Button()" ?<br>
>>><br>
>>> Regards !<br>
>><br>
>> I think that the above example is *exactly* the kind of stuff that needs<br>
>> to be converted to strings.<br>
>><br>
>> Bye,<br>
>> Rouslan<br>
>><br>
>><br>
>> ------------------------------------------------------------------------------<br>
>> Live Security Virtual Conference<br>
>> Exclusive live event will cover all the ways today's security and<br>
>> threat landscape has changed and how IT managers can respond. Discussions<br>
>> will include endpoint security, mobile security and the latest in malware<br>
>> threats. <a href="http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/" target="_blank">http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/</a><br>
>> _______________________________________________<br>
>> Phpmyadmin-devel mailing list<br>
>> <a href="mailto:Phpmyadmin-devel@lists.sourceforge.net" target="_blank">Phpmyadmin-devel@lists.sourceforge.net</a><br>
>> <a href="https://lists.sourceforge.net/lists/listinfo/phpmyadmin-devel" target="_blank">https://lists.sourceforge.net/lists/listinfo/phpmyadmin-devel</a><br>
>><br>
><br>
> Hi Rouslan,<br>
><br>
> I have little doubt of the way I understand your point.<br>
><br>
> You are suggesting to render HTML content by PHP string, instead of using<br>
> pure HTML, though there is nicely placed HTML code snippets. (around 5, 6<br>
> lines)<br>
> Am I correct Rouslan ? Sorry if I'm repeat the wheel.<br>
<br>
</div></div>Yes, that's correct. And I don't thing that those lines are nice at all.<br>
<div><div><br>
Bye,<br>
Rouslan<br>
<br>
------------------------------------------------------------------------------<br>
Live Security Virtual Conference<br>
Exclusive live event will cover all the ways today's security and<br>
threat landscape has changed and how IT managers can respond. Discussions<br>
will include endpoint security, mobile security and the latest in malware<br>
threats. <a href="http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/" target="_blank">http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/</a><br>
_______________________________________________<br>
Phpmyadmin-devel mailing list<br>
<a href="mailto:Phpmyadmin-devel@lists.sourceforge.net" target="_blank">Phpmyadmin-devel@lists.sourceforge.net</a><br>
<a href="https://lists.sourceforge.net/lists/listinfo/phpmyadmin-devel" target="_blank">https://lists.sourceforge.net/lists/listinfo/phpmyadmin-devel</a><br>
</div></div></blockquote></div><br></div></div>Hi Rouslan,<br><br>I was already thinking of do the same thing you pointed.<br>It will cause some sort of problems if I do the previous thing I suggested.<br>Thanks for your help.<div>
<div><br clear="all">
<br>Regards !<br>-- <br>____________________________________<br><br>Chanaka Indrajith<br>Bsc.Computer Engineering Undergraduate<br>Faculty of Engineering<br>University of Peradeniya<br>Sri Lanka<br>____________________________________<br>
<br>
</div></div></blockquote></div><br></div></div>Hi Michal,<br><br>The function "PMA_displayTableBody()" in display_tbl.lib.php is always return true.<br>But it does not seems like, useful for other place where it have been used. (Used only in "PMA_displayTable()" function in same file)<br clear="all">
<br>Inside "PMA_displayTable()" function it just assign the return value (true) to variable called '$clause_is_unique'.<br>And variable is only used at one place. it is,<br><br>echo '<input type="hidden" name="clause_is_unique"'<br>
.' value="' . <b>$clause_is_unique</b> . '" />' . "\n";<br><br>So, if this always return true, why don't we hard code true in the above case.<br>And modify the "PMA_displayTableBody()" function to return string of html content.<br>
<br>Am I going wrong ?<div class="HOEnZb"><div class="h5"><br><br>Regards !<br>-- <br>____________________________________<br><br>Chanaka Indrajith<br>Bsc.Computer Engineering Undergraduate<br>Faculty of Engineering<br>University of Peradeniya<br>
Sri Lanka<br>
____________________________________<br><br>
</div></div></blockquote></div><br>Hi Michal,<br><br>I think I was wrong.<br>Though the block comments of PMA_displayTableBody function, mentioned that it always return true,<br>when digging the code, and looking at the bottom comments, seems like its very important.<br>
<br>I'll modify the function to return an array, having two elements which are string of HTML content and boolean ($clause_is_unique)<br>The name will change from "PMA_displayTableBody" to "PMA_getTableBodyParams".<br>
I hope to see your suggestions.<br clear="all"><br>Regards !<br>-- <br>____________________________________<br><br>Chanaka Indrajith<br>Bsc.Computer Engineering Undergraduate<br>Faculty of Engineering<br>University of Peradeniya<br>
Sri Lanka<br>____________________________________<br><br>