[Phpmyadmin-devel] Problems with Garvin's Patches

Marc Delisle delislma at CollegeSherbrooke.qc.ca
Tue Feb 25 05:19:05 CET 2003

Olivier M. wrote:

> 'morning,
> On Tue, Feb 25, 2003 at 01:43:40PM +0100, Rabus wrote:
>>>I will add a code to "upgrade" the comment-table structure,
>>>if the fields are missing. Or is emitting a red warning on
>>>the start page a better way?
>>I disagree with that because you cannot expect the user to have the
>>privileges he needs to change the table structure. Imho, the best
>>solution would be to modify the code that checks the status of the
>>relational tables. Furthermore, PMA_mysqlDie() shouldn't be called if
>>the query fails: In this case, your feature should be disabled, instead.
> What about an automatic check on root login ? 

I like this idea.

Using $is_superuser (which is set with a check on 'USE mysql')?
Or checking directly the user's rights on $cfg['Servers'][$i]['pmadb']?
(Let's assume he has full rights on all the underlying tables).

> - if all the tables are existing & uptodate -> work as usual
> - if some tables are outdated: display a kind of splash-screen
>   suggesting the required changes, with an "Upgrade" button
>   which fixes everything
> - and if there are no tables at all (bookmarks, relations, etc): 
>   allow the root user to create everything "on the fly" (text
>   fields asking for User/DB name to use), and which display a
>   part of code to copy paste for the config.inc.php file
>   (a little bit like phpMyEdit).
> so a kind of user-friendly "setup.php" :)
> Cheers,
> Olivier

More information about the Developers mailing list