[Phpmyadmin-devel] File renaming

Marc Delisle Marc.Delisle at cegepsherbrooke.qc.ca
Wed Oct 25 16:04:48 CEST 2006


Michal Čihař a écrit :
> On Wed, 25 Oct 2006 15:41:37 +0200
> Michal Čihař <michal at cihar.com> wrote:
> 
>> On Wed, 25 Oct 2006 09:39:16 -0400
>> Marc Delisle <Marc.Delisle at cegepsherbrooke.qc.ca> wrote:
>>
>>> There will be a problem for upgrading since we tell users:
>>> "Simply copy ./config.inc.php from your previous installation into the 
>>> newly unpacked one."
>>>
>>> In older config.inc.php, these directives might be present and if so, 
>>> contain the old script name:
>>>
>>> $cfg['DefaultTabDatabase']
>>> $cfg['DefaultTabTable']
>>>
>>> Do we just warn users about this?
>> We could add a translation for those...
>>
> 
> What about something like attached patch? Anyway do we somewhere check
> content of those configuration settings?
> 
> 
> 
> ------------------------------------------------------------------------
> 
> Index: libraries/Config.class.php
> ===================================================================
> --- libraries/Config.class.php	(revision 9597)
> +++ libraries/Config.class.php	(working copy)
> @@ -384,6 +384,16 @@
>          }
>  
>          /**
> +         * Backward compatibility code
> +         */
> +        if (!empty($cfg['DefaultTabTable'])) {
> +            $cfg['DefaultTabTable'] = str_replace('_properties', '', str_replace('tbl_properties.php', 'tbl_sql.php', $cfg['DefaultTabTable']));
> +        }
> +        if (!empty($cfg['DefaultTabDatabase'])) {
> +            $cfg['DefaultTabDatabase'] = str_replace('_details', '', str_replace('db_details.php', 'db_sql.php', $cfg['DefaultTabDatabase']));
> +        }
> +
> +        /**
>           * @todo check validity of $_COOKIE['pma_collation_connection']
>           */
>          if (! empty($_COOKIE['pma_collation_connection'])) {

Ok for me. But our initial mistake was to use script names there instead 
of a content that describes the functionality needed, and to map 
parameter to a script name somewhere in the code, not in the config.

For your other question, we don't check the contents of these directives 
but we still need BC.

Marc




More information about the Developers mailing list