diff --git a/db_datadict.php b/db_datadict.php index 0e3619a9e..ff4aff0c8 100644 --- a/db_datadict.php +++ b/db_datadict.php @@ -38,15 +38,15 @@ if (strlen($table)) { } if ($cfgRelation['commwork']) { - $comment = PMA_getComments($db); + $comment = PMA_getDbComment($db); /** * Displays DB comment */ - if (is_array($comment)) { + if ($comment) { ?>
-
+ diff --git a/libraries/List_Database.class.php b/libraries/List_Database.class.php index 3c850f4e6..64c2bd7cf 100644 --- a/libraries/List_Database.class.php +++ b/libraries/List_Database.class.php @@ -257,7 +257,7 @@ require_once './libraries/List.class.php'; * @uses $cfg['LeftFrameDBSeparator'] * @uses $cfg['ShowTooltipAliasDB'] * @uses PMA_getTableCount() - * @uses PMA_getComments() + * @uses PMA_getDbComment() * @uses is_array() * @uses implode() * @uses strstr() @@ -275,9 +275,9 @@ require_once './libraries/List.class.php'; $db_tooltip = ''; if ($GLOBALS['cfg']['ShowTooltip'] && $GLOBALS['cfgRelation']['commwork']) { - $_db_tooltip = PMA_getComments($db); - if (is_array($_db_tooltip)) { - $db_tooltip = implode(' ', $_db_tooltip); + $_db_tooltip = PMA_getDbComment($db); + if ($_db_tooltip) { + $db_tooltip = $_db_tooltip; } } diff --git a/libraries/header.inc.php b/libraries/header.inc.php index 2b166e1a8..4f12f244d 100644 --- a/libraries/header.inc.php +++ b/libraries/header.inc.php @@ -244,16 +244,15 @@ if (empty($GLOBALS['is_header_sent'])) { // Get additional information about tables for tooltip is done // in libraries/db_info.inc.php only once if ($cfgRelation['commwork']) { - $comment = PMA_getComments($GLOBALS['db']); - + $comment = PMA_getDbComment($GLOBALS['db']); /** * Displays table comment */ - if (is_array($comment) && ! empty($comment)) { + if (! empty($comment)) { echo '"' - .htmlspecialchars(implode(' ', $comment)) - .'"' . "\n"; + . ' id="span_table_comment">"' + . htmlspecialchars($comment) + . '"' . "\n"; } // end if } } diff --git a/navigation.php b/navigation.php index 8e32050fb..d533979ec 100644 --- a/navigation.php +++ b/navigation.php @@ -29,7 +29,7 @@ * @uses PMA_List_Database::getGroupedDetails() * @uses PMA_generate_common_url() * @uses PMA_generate_common_hidden_inputs() - * @uses PMA_getComments(); + * @uses PMA_getDbComment(); * @uses PMA_getTableCount() * @uses PMA_getTableList() * @uses PMA_getRelationsParam() @@ -79,7 +79,7 @@ if (! isset($_SESSION['navi_limit_offset'])) { if (isset($_REQUEST['pos'])) { $_SESSION['navi_limit_offset'] = (int) $_REQUEST['pos']; } -$pos = $_SESSION['navi_limit_offset']; +$pos = $_SESSION['navi_limit_offset']; // free the session file, for the other frames to be loaded session_write_close(); @@ -118,7 +118,7 @@ if (! isset($_SESSION['navi_limit_offset'])) { if (isset($_REQUEST['pos'])) { $_SESSION['navi_limit_offset'] = (int) $_REQUEST['pos']; } -$pos = $_SESSION['navi_limit_offset']; +$pos = $_SESSION['navi_limit_offset']; /* * Displays the frame @@ -249,9 +249,9 @@ if ($GLOBALS['cfg']['LeftFrameLight'] && strlen($GLOBALS['db'])) { if ($GLOBALS['cfg']['ShowTooltip'] && $GLOBALS['cfgRelation']['commwork']) { - $_db_tooltip = PMA_getComments($GLOBALS['db']); - if (is_array($_db_tooltip)) { - $db_tooltip = implode(' ', $_db_tooltip); + $_db_tooltip = PMA_getDbComment($GLOBALS['db']); + if ($_db_tooltip) { + $db_tooltip = $_db_tooltip; } } @@ -284,15 +284,15 @@ if ($GLOBALS['cfg']['LeftFrameLight'] && strlen($GLOBALS['db'])) { * offset in the list of tables ($_SESSION['navi_table_limit_offset']) * and use PMA_listNavigator(); do not just check pos in REQUEST * but add another hidden param to see if it's the pos of databases - * or the pos of tables. + * or the pos of tables. */ $table_list = PMA_getTableList($GLOBALS['db'], null, 0, $cfg['MaxTableList']); if (! empty($table_list)) { PMA_displayTableList($table_list, true, '', $GLOBALS['db']); // hint user that the table list is larger, until the todo is done if (count($table_list) <= $GLOBALS['cfg']['MaxTableList'] && PMA_getTableCount($GLOBALS['db']) > $GLOBALS['cfg']['MaxTableList']) { - echo ' ( 1 .. ', $GLOBALS['cfg']['MaxTableList'], ' / ', PMA_getTableCount($GLOBALS['db']), ' )'; - } + echo ' ( 1 .. ', $GLOBALS['cfg']['MaxTableList'], ' / ', PMA_getTableCount($GLOBALS['db']), ' )'; + } } else { echo $GLOBALS['strNoTablesFound']; } @@ -588,7 +588,7 @@ function PMA_displayTableList($tables, $visible = false, . ': ' . htmlspecialchars($table['Comment']) .' (' . PMA_formatNumber($table['Rows'], 0) . ' ' . $GLOBALS['strRows'] . ')"' .' id="quick_' . htmlspecialchars($table_db . '.' . $table['Name']) . '"' - .' href="' . $GLOBALS['cfg']['LeftDefaultTabTable'] . '?' + .' href="' . $GLOBALS['cfg']['LeftDefaultTabTable'] . '?' . $GLOBALS['common_url_query'] .'&table=' . urlencode($table['Name']) .'&goto=' . $GLOBALS['cfg']['LeftDefaultTabTable'] @@ -606,7 +606,7 @@ function PMA_displayTableList($tables, $visible = false, $href = $GLOBALS['cfg']['DefaultTabTable'] . '?' .$GLOBALS['common_url_query'] . '&table=' .urlencode($table['Name']); - echo '' @@ -619,13 +619,13 @@ function PMA_displayTableList($tables, $visible = false, } /** - * get the action word corresponding to a script name + * get the action word corresponding to a script name * in order to display it as a title in navigation panel * - * @uses switch() + * @uses switch() * @uses $GLOBALS * @param string a valid value for $cfg['LeftDefaultTabTable'] - * or $cfg['DefaultTabTable'] + * or $cfg['DefaultTabTable'] */ function PMA_getTitleForTarget($target) { switch ($target) { diff --git a/tbl_create.php b/tbl_create.php index ebcfa3303..d7cbf7be7 100644 --- a/tbl_create.php +++ b/tbl_create.php @@ -15,7 +15,6 @@ * @uses PMA_sqlAddslashes() * @uses PMA_DBI_try_query() * @uses PMA_getRelationsParam() - * @uses PMA_setComment() * @uses PMA_setMIME() * @uses PMA_mysqlDie() * @uses PMA_generate_common_url()