}
}
- function tableHelp($name) {
+ function tableHelp($name, $is_view = false) {
$maria = preg_match('~MariaDB~', $this->_conn->server_info);
if (information_schema(DB)) {
return strtolower("information-schema-" . ($maria ? "$name-table/" : str_replace("_", "-", $name) . "-table.html"));
return $this->_conn->warnings();
}
- function tableHelp($name) {
+ function tableHelp($name, $is_view = false) {
$links = array(
"information_schema" => "infoschema",
- "pg_catalog" => "catalog",
+ "pg_catalog" => ($is_view ? "view" : "catalog"),
);
$link = $links[$_GET["ns"]];
if ($link) {
return queries("REPLACE INTO " . table($table) . " (" . implode(", ", array_keys(reset($rows))) . ") VALUES\n" . implode(",\n", $values));
}
- function tableHelp($name) {
+ function tableHelp($name, $is_view = false) {
if ($name == "sqlite_sequence") {
return "fileformat2.html#seqtab";
}
if (support("table") || support("indexes")) {
$links["table"] = lang('Show structure');
}
+ $is_view = false;
if (support("table")) {
- if (is_view($tableStatus)) {
+ $is_view = is_view($tableStatus);
+ if ($is_view) {
$links["view"] = lang('Alter view');
} else {
$links["create"] = lang('Alter table');
foreach ($links as $key => $val) {
echo " <a href='" . h(ME) . "$key=" . urlencode($name) . ($key == "edit" ? $set : "") . "'" . bold(isset($_GET[$key])) . ">$val</a>";
}
- echo doc_link(array($jush => $driver->tableHelp($name)), "?");
+ echo doc_link(array($jush => $driver->tableHelp($name, $is_view)), "?");
echo "\n";
}
/** Get help link for table
* @param string
+ * @param bool
* @return string relative URL or null
*/
- function tableHelp($name) {
+ function tableHelp($name, $is_view = false) {
}
/** Check if C-style escapes are supported