<br><br><div class="gmail_quote">On Tue, Jun 12, 2012 at 1:32 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 Sun, Jun 10, 2012 at 11:21 PM, Dieter Adriaenssens <span dir="ltr"><<a href="mailto:dieter.adriaenssens@gmail.com" target="_blank">dieter.adriaenssens@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">2012/6/9 Chanaka Dharmarathna <<a href="mailto:pe.chanaka.ck@gmail.com" target="_blank">pe.chanaka.ck@gmail.com</a>>:<br>
<div><div>><br>
><br>
> On Fri, Jun 8, 2012 at 10:58 AM, Chanaka Dharmarathna<br>
> <<a href="mailto:pe.chanaka.ck@gmail.com" target="_blank">pe.chanaka.ck@gmail.com</a>> wrote:<br>
>><br>
>> Hi All,<br>
>><br>
>> I have a doubt of using @see tag in Docblock comments for functions.<br>
>> In the comments of functions PMA_getTable() and PMA_getTableBody() in<br>
>> display_tbl.lib.php file, @see tag is used for different purposes.<br>
>> As I feel PMA_getTableBody() used that corrrectly.<br>
>> What should be the actual behavior ?<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>
><br>
> Hi All,<br>
><br>
> I am fixing some code violations in my code now.<br>
> For remove code violation of large comparison in a if condition, what would<br>
> be the better approach ?<br>
><br>
> Ex:-<br>
> if ((PMA_strlen($wkbval) > $GLOBALS['cfg']['LimitChars'])<br>
> && ($_SESSION['tmp_user_values']['display_text'] ==<br>
> self::DISPLAY_PARTIAL_TEXT)<br>
> ) {<br>
> // code<br>
> }<br>
><br>
> Is that good to use tempory variable insted of using<br>
> $_SESSION['tmp_user_values']['display_text'] ?<br>
<br>
</div></div>It depends :<br>
<br>
If the value of $_SESSION['tmp_user_values']['display_text'] is used<br>
later on in the code, you could assign it to a shorter local<br>
(temporary) variable, and use that variable with a shorter name, in<br>
the if statement and further on in the code.<br>
<br>
If it is used only oncet you might consider assigning the result of<br>
<br>
$_SESSION['tmp_user_values']['display_text'] == self::DISPLAY_PARTIAL_TEXT<br>
<br>
to a local (temporary) variable and use that variable in the if statement.<br>
<br>
Hope this helps!<br>
<span><font color="#888888"><br>
--<br>
Kind regards,<br>
<br>
Dieter Adriaenssens<br>
</font></span><div><div><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 Dieter,<br><br>Thanks for your reply.<br>I agreed your first point.<br>But I feels little odd in the second point because only for one place we use an additional variable.<br>
Its better if we can put that kind of conditions to two lines. Currently it gives errors by code sniffer.<div class="HOEnZb"><div class="h5"><br>
<br clear="all">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'll moving into refactoring common.lib.php file.<br>I'm intending to use the same improvements for this file as DisplayResults.class.php , including creating common.lib.php as a class.<br>
Is there any suggestions from your side ?<br><br clear="all">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>