[Phpmyadmin-devel] server_privileges refactoring

Thilina Buddika Abeyrathna thilinaabeyrathna at gmail.com
Sat Jun 30 14:18:44 CEST 2012


On Sat, Jun 30, 2012 at 5:31 PM, Marc Delisle <marc at infomarc.info> wrote:

> Le 2012-06-30 03:04, Thilina Buddika Abeyrathna a écrit :
> > Hi Marc,
> > There are two hard coded values in server_privileges.lib.php script which
> > username and hostname lengths. (line 849). Can we define those values in
> a
> > config file and access using $GLOBAL['cfg']['username_length'] and
> >  $GLOBAL['cfg']['hostname_length'], Then it'll maintainable.
>
> Hi Thilina,
> I cannot find this in your repo, please reply by posting a code snippet.
>

in server_privileges.lib.php (lin 844)
    $username_length = 16;
    $hostname_length = 41;
My suggestion was, remove the hard corded value and define those hard
corded values in config file and access
using  $GLOBAL['cfg']['username_length'] etc.

-- 
Regards.

Thilina Abeyrathna
Gtalk : thilinaabeyrathna
skype: thilinabuddika88
thilinaa.wordpress.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.phpmyadmin.net/pipermail/developers/attachments/20120630/16f31d84/attachment.html>


More information about the Developers mailing list