Hi,
We previously had a script called grab_globals.lib.php, which created
global variables from a few superglobals arrays.
When this script was removed a few weeks ago, we added at the beginning
of other scripts some code, for example in tbl_change.php:
if (isset($_REQUEST['where_clause'])) {
$where_clause = $_REQUEST['where_clause'];
}
In the upcoming refactoring efforts, we should avoid this, because,
looking at the code further in the script, it's difficult to see the
origin of $where_clause. So, we should only refer to
$_REQUEST['where_clause'] (except in the situations where the global is
modified afterwards).
Another benefit is that this variable would not need to be passed as a
parameter to functions.
--
Marc Delisle
http://infomarc.info
Hi,
I'm working on "Refactoring: Displaying query results" [0] project idea
under GSoC 2012.
In my demo server project [1] the configurations for extended features like
"Creation of PDFs",
"Browser transformation", "Bookmarked SQL query" etc are already done *without
"User preferences".*
As well a new user "pma" is already created there, but with a different
password instead of general "pmapass".
In my local machine I just enable these all extended features and "error
displaying" by introducing "config.inc.php" file. And set the control user
(pma) password to general one (pmapass).
If I commit this configuration file, the demo server project configurations
will be override. ("error displaying" , "User preferences", "control user
password" will change)
So is it a good idea to commit these changes ?
Your suggestions are welcome.
[0] :
http://www.google-melange.com/gsoc/proposal/review/google/gsoc2012/chanaka7…
[1] : http://demo.phpmyadmin.net/gsoc-chanaka/
Regards !
--
____________________________________
Chanaka Indrajith
Bsc.Computer Engineering Undergraduate
Faculty of Engineering
University of Peradeniya
Sri Lanka
____________________________________
Thilina,
please move all your functions from tbl_change.php to
libraries/insert_edit.lib.php.
I suspect that other functions from refactoring tbl_replace.php and
tbl_replace_fields.inc.php will go there as well.
--
Marc Delisle
http://infomarc.info
Thilina,
with commit 1d7f48b966c66b06f9a9ef6e5c78178d645d4bdf I still see this
problem:
1. Browse a table
2. Click the checkbox for two rows
3. At the botton, click the With selected...change link
--
Marc Delisle
http://infomarc.info
Hi Madhura,
In a file you introduced (libraries/import/shp.php), on line 166, the
same method with similar parameters is called as the line above :
function _loadHeaders()
{
$this->recordNumber = loadData("N", readFromBuffer(4));
//We read the length of the record
$tmp = loadData("N", readFromBuffer(4));
$this->shapeType = loadData("V", readFromBuffer(4));
}
nothing happens with the $tmp afterwards, so I'm wondering if this
duplicate method call can be removed?
Or is there a reason for calling this method twice?
--
Kind regards,
Dieter Adriaenssens
Hi Marc,
I'm trying to start refactoring for Insert/edit section. There are main
three scripts to refactor. But before that, I need your suggestion to start
coding.
--
Regards.
Thilina Buddika Abeyrathna,
Department of Computer Engineering,
Faculty Of Engineering,
University of Peradeniya,
Sri Lanka.
Hi,
When touching a piece of code, if you see a "\n" generated for HTML,
it's pretty much safe to remove it (if proven otherwise, we'll build a
wiki page documenting those cases).
The reason was to generate more readable HTML code; now that we
(hopefully) use Firebug to look at the generated HTML, these "\n" are no
longer needed.
--
Marc Delisle
http://infomarc.info
Hello!
Could someone help me with the implementation of the following (taken
from users-list) ?
Regards,
G.
>>
>>
>>> Le 2012-05-02 20:12, Dimitrakakis Georgios a écrit :
>>>> Hello all!
>>>>
>>>> I am a relatively new user of PMA and this is my first post to this
>>>> list so please excuse my ignorance. I am looking to config PMA to not
>>>> show "Tracking" depending on which user has been logged in. I will try
>>>> to describe what I want to do. I want when a "super"user logs in to
>>>> have the ability to enable/disable tracking and all the other
>>>> functions. But when a "standard" user logs in to not be able to do
>>>> anything! Even better to hide completely the tracking option for him.
>>>> Is something like this possible? Could someone give me a hand?
>>>>
>>>> Best,
>>>>
>>>> G.
>>>
>>> Hi,
>>> I don't believe that this is configurable with the current version. Of
>>> course, the super-user could use another instance of phpMyAdmin,
>>> configured differently.
>>>
>>> Otherwise, you have to change the source code to implement this feature.
>>>
>>> --
>>> Marc Delisle
>>> http://infomarc.info
>>>
>>>
>>
>>
>> Hi Marc so you mean that I could have two instances of PMA under the
>> same path or should I have to put the second one somewhere else? Any
>> ideas (or even better links) on how to do this?
>>
>> On the other hand, I would be very interested in implementing this
>> feature in the source code but I would like some guidance where to
>> start looking.
>>
>> Best,
>>
>> G.
>>
>> ----------------------------------------------------------------
>> This message was sent using IMP, the Internet Messaging Program.
----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.