Sebastian Mendel a écrit :
Sebastian Mendel schrieb:
Hi,
if (PMA_MYSQL_INT_VERSION < 40002 || !empty($GLOBALS['cfg']['Server']['hide_db'])) {
if the above comes true every DB is checked with 'USE dB' for access, Why?
Why should this check run if i have MySQL >= 4.0.2?
I see no reason.
at least, shouldn't it be written with && instead of ||:
if (PMA_MYSQL_INT_VERSION < 40002 && !empty($GLOBALS['cfg']['Server']['hide_db'])) {
so that the db-list gets only checked if MySQL < 4.0.2 AND the hide_db-list is empty
and even more, i think this two things should handled completely independent - if i hide a single db i do not want to display all other db's not accessible. or is there something different written in the manual i can't find?
I agree, these two things should be handled independently. First, a loop for MySQL < 40002 that does the PMA_DBI_select_db() and unsets if the db cannot be selected. Then another loop for the hide case.
Marc