Add links to mysqldump documentation for some options.

This commit is contained in:
Michal Čihař
2008-09-03 11:54:58 +00:00
parent 2da4a403c3
commit 181eb71fae
4 changed files with 24 additions and 6 deletions

View File

@@ -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 -

View File

@@ -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;
}

View File

@@ -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'][] =

View File

@@ -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;