Skip to content

Commit

Permalink
improved logic
Browse files Browse the repository at this point in the history
  • Loading branch information
Marc Delisle committed Sep 30, 2005
1 parent 46c6250 commit 5ed987e
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion libraries/display_create_table.lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,17 @@

foreach($dbs_where_create_table_allowed as $allowed_db) {
// '*' indicates a global CREATE priv
if ($allowed_db == '*' || preg_match('@' .str_replace($mysql_wildcards, $preg_patterns, $allowed_db) . '@i', $db)) {
if ($allowed_db == '*') {
$is_create_table_priv = TRUE;
break;
}
$matches = '';
if (preg_match('@' .str_replace($mysql_wildcards, $preg_patterns, $allowed_db) . '@i', $db, $matches)) {
if ($matches[0] == $db) {
$is_create_table_priv = TRUE;
break;
}
}
}
if ($is_create_table_priv) {
?>
Expand Down

0 comments on commit 5ed987e

Please sign in to comment.