<br><br><div class="gmail_quote">On Mon, Jun 18, 2012 at 6:36 PM, 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 17, 2012 at 4:39 PM, Marc Delisle <span dir="ltr"><<a href="mailto:marc@infomarc.info" target="_blank">marc@infomarc.info</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Le 2012-06-16 00:26, Chanaka Dharmarathna a écrit :<br>
<div><br>
> Hi All,<br>
><br>
> I have already create a class for display_tbl.lib.php<br>
</div>> andPMA_getDataCellForBlobField() in master used the<br>
<div>> PMA_mimeDefaultFunction() function as a global function.<br>
> EX :<br>
> $str = 'PMA_mimeDefaultFunction';<br>
> $str($parameters);<br>
><br>
> I have moved the PMA_mimeDefaultFunction() from display_tbl.lib.php (in<br>
> master) to common.lib.php file due to the way it has used inside<br>
> display_tbl.lib.php.<br>
><br>
> Now I'm implementing class behavior in common.lib.php file.<br>
> So can anyone tell me a file, which contain global function, to where I<br>
> should again move this PMA_mimeDefaultFunction().<br>
><br>
> Regards !<br>
<br>
</div>Chanaka,<br>
I believe that this function should not be global, as it's only called<br>
from other functions in libraries/DisplayResults.class.php, right?<br>
<div><br>
--<br>
Marc Delisle<br>
<a href="http://infomarc.info" target="_blank">http://infomarc.info</a><br>
<br>
</div><div><div>------------------------------------------------------------------------------<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 Marc,<br><br>Sorry for little bit delay to respond.<br>I first try to use this function while it is inside the PMA_DisplayResults class.<br>But if there is any field with transformations, it does not work properly.<br>
<br>So that put it as a global function.<br>But I can again consider on that after completing the implement class behavior of common.lib.php file<br>For just now I move PMA_mimeDefaultFunction() function to core.lib.php file.<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>There are many places which are using functions in common.lib.php file.<br>After implement the class behavior for this file, all the other places need to call those functions using an object of PMA_CommonFunctions class.<br>
Even in the same file I may need to create several objects of the PMA_CommonFunctions class. (files with global functions)<br><br>So I' thinking of using global variable (in $GLOBALS super global array) to store an object of PMA_CommonFunctions class and introduce a global function (may be under core.lib.php) to get that object by checking whether the global variable is set or not.<br>
So that even inside the procedural code segments, that function can be used.<br>Its highly appreciated if you can give me your feedback on this approach.<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>