bug #1490193 and code simplification

This commit is contained in:
Marc Delisle
2006-05-18 16:53:40 +00:00
parent fde2f613ad
commit 6215a6d94a
6 changed files with 19 additions and 25 deletions

View File

@@ -1167,4 +1167,15 @@ function PMA_DBI_getCompatibilities()
return $compats;
}
/**
* returns true (int > 0) if current user is superuser
* otherwise 0
*
* @return integer $is_superuser
*/
function PMA_isSuperuser() {
return PMA_DBI_try_query( 'SELECT COUNT(*) FROM mysql.user',
$GLOBALS['userlink'], PMA_DBI_QUERY_STORE );
}
?>