bug #782966
This commit is contained in:
@@ -5,6 +5,10 @@ phpMyAdmin - Changelog
|
||||
$Id$
|
||||
$Source$
|
||||
|
||||
2003-08-05 Garvin Hicking <me@supergarv.de>
|
||||
* libraries/common.lib.php3: Moved docu function (PHP3 compatbility)
|
||||
(Bug #782966)
|
||||
|
||||
2003-08-05 Michal Cihar <nijel@users.sourceforge.net>
|
||||
* sql.php3: Fixed regular expression.
|
||||
* libraries/export/latex.php3: Use "table (field)" instead of
|
||||
|
@@ -390,6 +390,48 @@ h1 {font-family: sans-serif; font-size: large; font-weight: bold}
|
||||
} // end of the "PMA_formatSql()" function
|
||||
|
||||
|
||||
/**
|
||||
* Displays a link to the official MySQL documentation
|
||||
*
|
||||
* @param chapter of "HTML, one page per chapter" documentation
|
||||
* @param contains name of page/anchor that is being linked
|
||||
*
|
||||
* @return string the html link
|
||||
*
|
||||
* @access public
|
||||
*/
|
||||
function PMA_showMySQLDocu($chapter, $link)
|
||||
{
|
||||
if (!empty($GLOBALS['cfg']['MySQLManualBase'])) {
|
||||
if (!empty($GLOBALS['cfg']['MySQLManualType'])) {
|
||||
switch ($GLOBALS['cfg']['MySQLManualType']) {
|
||||
case 'old':
|
||||
return '[<a href="' . $GLOBALS['cfg']['MySQLManualBase'] . '/' . $link[0] . '/' . $link[1] . '/' . $link . '.html" target="mysql_doc">' . $GLOBALS['strDocu'] . '</a>]';
|
||||
case 'chapters':
|
||||
return '[<a href="' . $GLOBALS['cfg']['MySQLManualBase'] . '/manual_' . $chapter . '.html#' . $link . '" target="mysql_doc">' . $GLOBALS['strDocu'] . '</a>]';
|
||||
case 'big':
|
||||
return '[<a href="' . $GLOBALS['cfg']['MySQLManualBase'] . '#' . $link . '" target="mysql_doc">' . $GLOBALS['strDocu'] . '</a>]';
|
||||
case 'none':
|
||||
return '';
|
||||
case 'searchable':
|
||||
default:
|
||||
return '[<a href="' . $GLOBALS['cfg']['MySQLManualBase'] . '/' . $link . '.html" target="mysql_doc">' . $GLOBALS['strDocu'] . '</a>]';
|
||||
}
|
||||
} else {
|
||||
// no Type defined, show the old one
|
||||
return '[<a href="' . $GLOBALS['cfg']['MySQLManualBase'] . '/' . $link[0] . '/' . $link[1] . '/' . $link . '.html" target="mysql_doc">' . $GLOBALS['strDocu'] . '</a>]';
|
||||
}
|
||||
} else {
|
||||
// no URL defined
|
||||
if (!empty($GLOBALS['cfg']['ManualBaseShort'])) {
|
||||
// the old configuration
|
||||
return '[<a href="' . $GLOBALS['cfg']['MySQLManualBase'] . '/' . $link[0] . '/' . $link[1] . '/' . $link . '.html" target="mysql_doc">' . $GLOBALS['strDocu'] . '</a>]';
|
||||
} else {
|
||||
return '';
|
||||
}
|
||||
}
|
||||
} // end of the 'PMA_showDocu()' function
|
||||
|
||||
/**
|
||||
* Displays a MySQL error message in the right frame.
|
||||
*
|
||||
@@ -1507,49 +1549,6 @@ h1 {font-family: sans-serif; font-size: large; font-weight: bold}
|
||||
} // end of the 'PMA_showMessage()' function
|
||||
|
||||
|
||||
/**
|
||||
* Displays a link to the official MySQL documentation
|
||||
*
|
||||
* @param chapter of "HTML, one page per chapter" documentation
|
||||
* @param contains name of page/anchor that is being linked
|
||||
*
|
||||
* @return string the html link
|
||||
*
|
||||
* @access public
|
||||
*/
|
||||
function PMA_showMySQLDocu($chapter, $link)
|
||||
{
|
||||
if (!empty($GLOBALS['cfg']['MySQLManualBase'])) {
|
||||
if (!empty($GLOBALS['cfg']['MySQLManualType'])) {
|
||||
switch ($GLOBALS['cfg']['MySQLManualType']) {
|
||||
case 'old':
|
||||
return '[<a href="' . $GLOBALS['cfg']['MySQLManualBase'] . '/' . $link[0] . '/' . $link[1] . '/' . $link . '.html" target="mysql_doc">' . $GLOBALS['strDocu'] . '</a>]';
|
||||
case 'chapters':
|
||||
return '[<a href="' . $GLOBALS['cfg']['MySQLManualBase'] . '/manual_' . $chapter . '.html#' . $link . '" target="mysql_doc">' . $GLOBALS['strDocu'] . '</a>]';
|
||||
case 'big':
|
||||
return '[<a href="' . $GLOBALS['cfg']['MySQLManualBase'] . '#' . $link . '" target="mysql_doc">' . $GLOBALS['strDocu'] . '</a>]';
|
||||
case 'none':
|
||||
return '';
|
||||
case 'searchable':
|
||||
default:
|
||||
return '[<a href="' . $GLOBALS['cfg']['MySQLManualBase'] . '/' . $link . '.html" target="mysql_doc">' . $GLOBALS['strDocu'] . '</a>]';
|
||||
}
|
||||
} else {
|
||||
// no Type defined, show the old one
|
||||
return '[<a href="' . $GLOBALS['cfg']['MySQLManualBase'] . '/' . $link[0] . '/' . $link[1] . '/' . $link . '.html" target="mysql_doc">' . $GLOBALS['strDocu'] . '</a>]';
|
||||
}
|
||||
} else {
|
||||
// no URL defined
|
||||
if (!empty($GLOBALS['cfg']['ManualBaseShort'])) {
|
||||
// the old configuration
|
||||
return '[<a href="' . $GLOBALS['cfg']['MySQLManualBase'] . '/' . $link[0] . '/' . $link[1] . '/' . $link . '.html" target="mysql_doc">' . $GLOBALS['strDocu'] . '</a>]';
|
||||
} else {
|
||||
return '';
|
||||
}
|
||||
}
|
||||
} // end of the 'PMA_showDocuShort()' function
|
||||
|
||||
|
||||
/**
|
||||
* Formats $value to byte view
|
||||
*
|
||||
|
Reference in New Issue
Block a user