diff --git a/ChangeLog b/ChangeLog index b6be8aaf2..091099a2f 100755 --- a/ChangeLog +++ b/ChangeLog @@ -7,7 +7,8 @@ $Source$ 2005-10-29 Michal Čihař * Documentation.html, config.default.php, libraries/common.lib.php: Link - documentation to version we run (RFE #1334292). + documentation to version we run (RFE #1334292), fix links for chapter + documentation (bug #1341676), drop support for old links. 2005-10-29 Olivier Mueller * scripts/upgrade.pl: various fixes (was not handling rc/pl correctely), diff --git a/Documentation.html b/Documentation.html index 06328c285..0a3b9ae21 100755 --- a/Documentation.html +++ b/Documentation.html @@ -1361,7 +1361,6 @@ Defaults to FALSE (drop-down).
  • searchable - "Searchable, with user comments"
  • chapters - "HTML, one page per chapter"
  • big - "HTML, all on one page"
  • -
  • old - old style used in phpMyAdmin 2.3.0 and earlier
  • none - do not show documentation links


  • diff --git a/config.default.php b/config.default.php index a939fe294..759fcaf0b 100644 --- a/config.default.php +++ b/config.default.php @@ -410,6 +410,7 @@ $cfg['MySQLManualBase'] = 'http://dev.mysql.com/doc/refman'; * viewable - "viewable online", current one used on MySQL website * searchable - "Searchable, with user comments" * chapters - "HTML, one page per chapter" + * chapters_old - "HTML, one page per chapter", format used prior to MySQL 5.0 release * big - "HTML, all on one page" * old - old style used in phpMyAdmin 2.3.0 and sooner * none - do not show documentation links diff --git a/libraries/common.lib.php b/libraries/common.lib.php index 5ec7368ef..f21cb1a13 100644 --- a/libraries/common.lib.php +++ b/libraries/common.lib.php @@ -524,12 +524,13 @@ if ($is_minimum_common == FALSE) { if ($cfg['MySQLManualType'] == 'none' || empty($cfg['MySQLManualBase'])) return ''; + // Fixup for newly used names: + $chapter = str_replace('_', '-', strtolower($chapter)); + $link = str_replace('_', '-', strtolower($link)); + switch ($cfg['MySQLManualType']) { - case 'old': - $url = $cfg['MySQLManualBase'] . '/' . $link[0] . '/' . $link[1] . '/' . $link . '.html'; - break; case 'chapters': - $url = $cfg['MySQLManualBase'] . '/manual_' . $chapter . '.html#' . $link; + $url = $cfg['MySQLManualBase'] . '/' . $chapter . '.html#' . $link; break; case 'big': $url = $cfg['MySQLManualBase'] . '#' . $link; @@ -554,7 +555,7 @@ if ($is_minimum_common == FALSE) { }else{ return '[' . $GLOBALS['strDocu'] . ']'; } - } // end of the 'PMA_showDocu()' function + } // end of the 'PMA_showMySQLDocu()' function /** * Displays a hint icon, on mouse over show the hint @@ -625,7 +626,7 @@ if ($is_minimum_common == FALSE) { // modified to show me the help on sql errors (Michael Keck) echo '

    ' . $GLOBALS['strSQLQuery'] . ':' . "\n"; if (strstr(strtolower($formatted_sql),'select')) { // please show me help to the error on select - echo PMA_showMySQLDocu('Reference', 'SELECT'); + echo PMA_showMySQLDocu('SQL-Syntax', 'SELECT'); } if ($is_modify_link && isset($db)) { if (isset($table)) {