<br><br><div class="gmail_quote">On Mon, Apr 2, 2012 at 9:14 PM, Marc Delisle <span dir="ltr"><<a href="mailto:marc@infomarc.info">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-04-02 11:33, tuncay kilicoglu a écrit :<br>
<div class="im">><br>
> I need to take some advice before I start reading source code. What kind of<br>
> refactoring styles are we talking about? What are Table search, db search<br>
> and multitable query are related to? What's bad with current code? Do we<br>
> also need to modularize scripts into seperate for better abstraction? or<br>
> It's about refactoring inner details of functions? or is it about<br>
> objectifying the code?<br>
<br>
</div>Here is what needs improvement in the current code:<br>
<br>
- large chunks of procedural code without functions<br>
- reference to global variables<br></blockquote><div>Hi,<br>Can we have more clarity on improving reference to global variables. Is the following snippet an example of the same where?<br>(From tbl_select.php, $_POST parameters are referenced through $GLOBALS)<br>
$post_params = array(<br> 'ajax_request',<br> 'collations',<br> 'db',<br> 'distinct',<br> 'fields',<br> 'func',<br> 'max_number_of_fields',<br> 'names',<br>
'order',<br> 'orderField',<br> 'param',<br> 'session_max_rows',<br> 'table',<br> 'types',<br> 'where',<br>);<br>foreach ($post_params as $one_post_param) {<br>
if (isset($_POST[$one_post_param])) {<br> $GLOBALS[$one_post_param] = $_POST[$one_post_param];<br> }<br>}<br><br> </div><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
- HTML and PHP mixed together (but we are not implementing a templating<br>
solution)<br>
<br>
Going to OOP is not necessary in the project but would be welcome.<br>
<div class="HOEnZb"><div class="h5"><br>
><br>
> Please give me a quick brief about project because I couldn't find any on<br>
> mailing list. (You may give the link for the thread, too)<br>
<br>
<br>
<br>
</div></div><span class="HOEnZb"><font color="#888888">--<br>
Marc Delisle<br>
<a href="http://infomarc.info" target="_blank">http://infomarc.info</a><br>
<br>
</font></span><br>------------------------------------------------------------------------------<br>
This SF email is sponsosred by:<br>
Try Windows Azure free for 90 days Click Here<br>
<a href="http://p.sf.net/sfu/sfd2d-msazure" target="_blank">http://p.sf.net/sfu/sfd2d-msazure</a><br>_______________________________________________<br>
Phpmyadmin-devel mailing list<br>
<a href="mailto:Phpmyadmin-devel@lists.sourceforge.net">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></blockquote></div><br>