Remove common prefix in backward key
git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@1074 7c3ca157-0c34-0410-bff1-cbf682f78f5c
This commit is contained in:
parent
b74dfdc512
commit
b9ffd64dd3
|
@ -117,7 +117,8 @@ if ($_POST && !$error) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
page_header(lang('Select') . ": " . $adminer->tableName($table_status), $error);
|
$table_name = $adminer->tableName($table_status);
|
||||||
|
page_header(lang('Select') . ": $table_name", $error);
|
||||||
|
|
||||||
$foreign_keys = column_foreign_keys($TABLE);
|
$foreign_keys = column_foreign_keys($TABLE);
|
||||||
echo "<p>";
|
echo "<p>";
|
||||||
|
@ -181,7 +182,7 @@ if (!$columns) {
|
||||||
foreach ($backward_keys as $key => $val) {
|
foreach ($backward_keys as $key => $val) {
|
||||||
$val = $adminer->tableName(table_status($key));
|
$val = $adminer->tableName(table_status($key));
|
||||||
if (strlen($val)) {
|
if (strlen($val)) {
|
||||||
$table_names[$key] = $val;
|
$table_names[$key] = (preg_match('(^' . preg_quote($table_name) . '(:|\\s*-)?\\s+(.+))', $val, $match) ? $match[2] : $val);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue