[Phpmyadmin-devel] $cfg - Functions and RestrictFunctions

Dieter Adriaenssens dieter.adriaenssens at gmail.com
Sun Jul 3 13:28:19 CEST 2011


2011/7/3 Piotr Przybylski <piotr.prz at gmail.com>:
> 2011/7/2 Marc Delisle <marc at infomarc.info>:
>> Le 2011-07-02 16:09, Piotr Przybylski a écrit :
>>> 2011/7/2 Marc Delisle<marc at infomarc.info>:
>>>> Le 2011-07-01 18:57, Piotr Przybylski a écrit :
>>>>> On a related topic - do we need these to be configurable in
>>>>> config.inc.php? I think these could be moved to a separate file (eg.
>>>>> libraries/mysql.data.php), along with everything that is in
>>>>> config.default.php under "MySQL settings" comment. I see no reason
>>>>> anybody would want to change these, unless you desperately need a user
>>>>> defined function available in phpMyAdmin interface.
>>>>>
>>>>
>>>> Piotr,
>>>> is this a problem to leave them configurable? Some users or providers
>>>> probably changed the configuration since it is configurable.
>>>>
>>>
>>> No, I will just have to do a bit more work to filter this for Drizzle :)
>>>
>>> I was just wondering, because the only use case I can think of is to
>>> add custom native functions.
>>>
>> It can be also to remove unused functions in order to shorten the lists.
>>
>> By the way, my assumption about the need of some for leaving it
>> configurable is just an assumption.
>>
>> I suggest asking about this on the phpmyadmin-users list.
>>
>
> Adding Drizzle functions look messy [1] and I am not satisfied with
> how this turned out. Here's an idea I would like to try, which would
> make it cleaner while still leaving these arrays configurable the same
> way as they are now:
> 1. I extract them to a separate file, eg. server_data_mysql.inc.php
> 2. arrays in config.default.php will become empty (just "array()").
> 3. If a non-empty value would appear in config.inc.php, it would
> overwrite data from new server_data_mysql.inc.php
> 4. My Drizzle-specific code would go mostly to server_data_drizzle.inc.php
>
> Pros:
> - after code refactoring and committing 1-3 to master I have to change
> just one file and make only small adjustments to add Drizzle support,
> - on average, less code to parse for phpMyAdmin and less data to store
> in memory because these are used only on three occasions - in db
> routines, table creation and column editing.
>

So, if I get this right, you will create two sets of arrays, one set
for MySQL and one set for Drizzle, which both go into a seperate
include file. Where the file that gets included depends on the
database server type.

Kind regards,

Dieter




More information about the Developers mailing list