@@ -114,10 +114,10 @@ class mysql_clientdb_plugin {
if($valid==false)continue;
if($action=='GRANT'){
if(!$link->query("GRANT ".($user_read_only?"SELECT":"ALL")." ON ".$link->escape_string($database_name).".* TO '".$link->escape_string($database_user)."'@'$db_host' IDENTIFIED BY PASSWORD '".$link->escape_string($database_password)."';"))$success=false;
$app->log("GRANT ".($user_read_only?"SELECT":"ALL")." ON ".$link->escape_string($database_name).".* TO '".$link->escape_string($database_user)."'@'$db_host' IDENTIFIED BY PASSWORD '".$link->escape_string($database_password)."'; success? ".($success?'yes':'no'),LOGLEVEL_DEBUG);
if(!$link->query("GRANT ".($user_read_only?"SELECT":"ALL")." ON `".$link->escape_string($database_name)."`.* TO '".$link->escape_string($database_user)."'@'$db_host' IDENTIFIED BY PASSWORD '".$link->escape_string($database_password)."';"))$success=false;
$app->log("GRANT ".($user_read_only?"SELECT":"ALL")." ON `".$link->escape_string($database_name)."`.* TO '".$link->escape_string($database_user)."'@'$db_host' IDENTIFIED BY PASSWORD '".$link->escape_string($database_password)."'; success? ".($success?'yes':'no'),LOGLEVEL_DEBUG);
}elseif($action=='REVOKE'){
if(!$link->query("REVOKE ALL PRIVILEGES ON ".$link->escape_string($database_name).".* FROM '".$link->escape_string($database_user)."'@'$db_host' IDENTIFIED BY PASSWORD '".$link->escape_string($database_password)."';"))$success=false;
if(!$link->query("REVOKE ALL PRIVILEGES ON `".$link->escape_string($database_name)."`.* FROM '".$link->escape_string($database_user)."'@'$db_host' IDENTIFIED BY PASSWORD '".$link->escape_string($database_password)."';"))$success=false;
}elseif($action=='DROP'){
if(!$link->query("DROP USER '".$link->escape_string($database_user)."'@'$db_host';"))$success=false;