diff --git a/ChangeLog b/ChangeLog index 2cec21484..abb124cff 100644 --- a/ChangeLog +++ b/ChangeLog @@ -11,6 +11,7 @@ $HeadURL: https://phpmyadmin.svn.sourceforge.net/svnroot/phpmyadmin/trunk/phpMyA + patch #2067462 [lang] link FAQ references in messages, thanks to Thijs Kinkhorst - kink + new setup script, thanks to Piotr Przybylski (work in progress) +- rfe #1892243 [export] more links to documentation 3.0.0.0 (not yet released) + [export] properly handle line breaks for YAML, thanks to Dan Barry - diff --git a/libraries/common.lib.php b/libraries/common.lib.php index 1f3ef0910..f2eec9f79 100644 --- a/libraries/common.lib.php +++ b/libraries/common.lib.php @@ -355,12 +355,13 @@ function PMA_formatSql($parsed_sql, $unparsed_sql = '') * @param string chapter of "HTML, one page per chapter" documentation * @param string contains name of page/anchor that is being linked * @param bool whether to use big icon (like in left frame) + * @param string anchor to page part * * @return string the html link * * @access public */ -function PMA_showMySQLDocu($chapter, $link, $big_icon = false) +function PMA_showMySQLDocu($chapter, $link, $big_icon = false, $anchor = '') { global $cfg; @@ -377,16 +378,25 @@ function PMA_showMySQLDocu($chapter, $link, $big_icon = false) if (empty($chapter)) { $chapter = 'index'; } - $url = $cfg['MySQLManualBase'] . '/' . $chapter . '.html#' . $link; + if (empty($anchor)) { + $anchor = $link; + } + $url = $cfg['MySQLManualBase'] . '/' . $chapter . '.html#' . $anchor; break; case 'big': - $url = $cfg['MySQLManualBase'] . '#' . $link; + if (empty($anchor)) { + $anchor = $link; + } + $url = $cfg['MySQLManualBase'] . '#' . $anchor; break; case 'searchable': if (empty($link)) { $link = 'index'; } $url = $cfg['MySQLManualBase'] . '/' . $link . '.html'; + if (!empty($anchor)) { + $url .= '#' . $anchor; + } break; case 'viewable': default: @@ -409,6 +419,9 @@ function PMA_showMySQLDocu($chapter, $link, $big_icon = false) } } $url = $cfg['MySQLManualBase'] . '/' . $mysql . '/' . $lang . '/' . $link . '.html'; + if (!empty($anchor)) { + $url .= '#' . $anchor; + } break; } diff --git a/libraries/export/sql.php b/libraries/export/sql.php index 058581ba7..05ba4c1ef 100644 --- a/libraries/export/sql.php +++ b/libraries/export/sql.php @@ -103,9 +103,9 @@ if (isset($plugin_list)) { $plugin_list['sql']['options'][] = array('type' => 'bgroup', 'name' => 'data', 'text' => 'strData', 'force' => 'structure'); $plugin_list['sql']['options'][] = - array('type' => 'bool', 'name' => 'columns', 'text' => 'strCompleteInserts'); + array('type' => 'bool', 'name' => 'columns', 'text' => 'strCompleteInserts', 'doc' => array('programs', 'mysqldump', 'option_mysqldump_complete-insert-option')); $plugin_list['sql']['options'][] = - array('type' => 'bool', 'name' => 'extended', 'text' => 'strExtendedInserts'); + array('type' => 'bool', 'name' => 'extended', 'text' => 'strExtendedInserts', 'doc' => array('programs', 'mysqldump', 'option_mysqldump_extended-insert-option')); $plugin_list['sql']['options'][] = array('type' => 'text', 'name' => 'max_query_size', 'text' => 'strMaximalQueryLength'); $plugin_list['sql']['options'][] = diff --git a/libraries/plugin_interface.lib.php b/libraries/plugin_interface.lib.php index ae4c04e58..0395fe779 100644 --- a/libraries/plugin_interface.lib.php +++ b/libraries/plugin_interface.lib.php @@ -272,7 +272,11 @@ function PMA_pluginGetOneOption($section, $plugin_name, $id, &$opt) $ret .= 'UNKNOWN OPTION ' . $opt['type'] . ' IN IMPORT PLUGIN ' . $plugin_name . '!'; } if (isset($opt['doc'])) { - $ret .= PMA_showMySQLDocu($opt['doc'][0], $opt['doc'][1]); + if (count($opt['doc'] == 3)) { + $ret .= PMA_showMySQLDocu($opt['doc'][0], $opt['doc'][1], false, $opt['doc'][2]); + } else { + $ret .= PMA_showMySQLDocu($opt['doc'][0], $opt['doc'][1]); + } } $ret .= "\n"; return $ret;