make use of PMA_getDbComment()
This commit is contained in:
@@ -38,15 +38,15 @@ if (strlen($table)) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($cfgRelation['commwork']) {
|
if ($cfgRelation['commwork']) {
|
||||||
$comment = PMA_getComments($db);
|
$comment = PMA_getDbComment($db);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Displays DB comment
|
* Displays DB comment
|
||||||
*/
|
*/
|
||||||
if (is_array($comment)) {
|
if ($comment) {
|
||||||
?>
|
?>
|
||||||
<p> <?php echo $strDBComment; ?>
|
<p> <?php echo $strDBComment; ?>
|
||||||
<i><?php echo htmlspecialchars(implode(' ', $comment)); ?></i></p>
|
<i><?php echo htmlspecialchars($comment); ?></i></p>
|
||||||
<?php
|
<?php
|
||||||
} // end if
|
} // end if
|
||||||
}
|
}
|
||||||
|
@@ -22,11 +22,9 @@ require_once './libraries/mysql_charsets.lib.php';
|
|||||||
/**
|
/**
|
||||||
* Rename/move or copy database
|
* Rename/move or copy database
|
||||||
*/
|
*/
|
||||||
if (strlen($db) &&
|
if (strlen($db) && (! empty($db_rename) || ! empty($db_copy))) {
|
||||||
((isset($db_rename) && $db_rename == 'true') ||
|
|
||||||
(isset($db_copy) && $db_copy == 'true'))) {
|
|
||||||
|
|
||||||
if (isset($db_rename) && $db_rename == 'true') {
|
if (! empty($db_rename)) {
|
||||||
$move = true;
|
$move = true;
|
||||||
} else {
|
} else {
|
||||||
$move = false;
|
$move = false;
|
||||||
@@ -188,8 +186,8 @@ $cfgRelation = PMA_getRelationsParam();
|
|||||||
* Check if comments were updated
|
* Check if comments were updated
|
||||||
* (must be done before displaying the menu tabs)
|
* (must be done before displaying the menu tabs)
|
||||||
*/
|
*/
|
||||||
if ($cfgRelation['commwork'] && isset($db_comment) && $db_comment == 'true') {
|
if (isset($_REQUEST['comment'])) {
|
||||||
PMA_SetComment($db, '', '(db_comment)', $comment);
|
PMA_setDbComment($db, $comment);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -224,23 +222,13 @@ if (!$is_information_schema) {
|
|||||||
?>
|
?>
|
||||||
<form method="post" action="db_operations.php">
|
<form method="post" action="db_operations.php">
|
||||||
<?php echo PMA_generate_common_hidden_inputs($db); ?>
|
<?php echo PMA_generate_common_hidden_inputs($db); ?>
|
||||||
<input type="hidden" name="db_comment" value="true" />
|
|
||||||
<fieldset>
|
<fieldset>
|
||||||
<legend>
|
<legend>
|
||||||
<?php
|
<?php PMA_getIcon('b_comment.png', $strDBComment, false, true); ?>
|
||||||
if ($cfg['PropertiesIconic']) {
|
|
||||||
echo '<img class="icon" src="' . $pmaThemeImage . 'b_comment.png"'
|
|
||||||
.' alt="" border="0" width="16" height="16" hspace="2" align="middle" />';
|
|
||||||
}
|
|
||||||
echo $strDBComment;
|
|
||||||
$comment = PMA_getComments($db);
|
|
||||||
?>
|
|
||||||
</legend>
|
</legend>
|
||||||
<input type="text" name="comment" class="textfield" size="30"
|
<input type="text" name="comment" class="textfield" size="30"
|
||||||
value="<?php
|
value="<?php
|
||||||
echo (isset($comment) && is_array($comment)
|
echo htmlspecialchars(PMA_getDbComment($db)); ?>" />
|
||||||
? htmlspecialchars(implode(' ', $comment))
|
|
||||||
: ''); ?>" />
|
|
||||||
<input type="submit" value="<?php echo $strGo; ?>" />
|
<input type="submit" value="<?php echo $strGo; ?>" />
|
||||||
</fieldset>
|
</fieldset>
|
||||||
</form>
|
</form>
|
||||||
|
@@ -257,7 +257,7 @@ require_once './libraries/List.class.php';
|
|||||||
* @uses $cfg['LeftFrameDBSeparator']
|
* @uses $cfg['LeftFrameDBSeparator']
|
||||||
* @uses $cfg['ShowTooltipAliasDB']
|
* @uses $cfg['ShowTooltipAliasDB']
|
||||||
* @uses PMA_getTableCount()
|
* @uses PMA_getTableCount()
|
||||||
* @uses PMA_getComments()
|
* @uses PMA_getDbComment()
|
||||||
* @uses is_array()
|
* @uses is_array()
|
||||||
* @uses implode()
|
* @uses implode()
|
||||||
* @uses strstr()
|
* @uses strstr()
|
||||||
@@ -275,9 +275,9 @@ require_once './libraries/List.class.php';
|
|||||||
$db_tooltip = '';
|
$db_tooltip = '';
|
||||||
if ($GLOBALS['cfg']['ShowTooltip']
|
if ($GLOBALS['cfg']['ShowTooltip']
|
||||||
&& $GLOBALS['cfgRelation']['commwork']) {
|
&& $GLOBALS['cfgRelation']['commwork']) {
|
||||||
$_db_tooltip = PMA_getComments($db);
|
$_db_tooltip = PMA_getDbComment($db);
|
||||||
if (is_array($_db_tooltip)) {
|
if ($_db_tooltip) {
|
||||||
$db_tooltip = implode(' ', $_db_tooltip);
|
$db_tooltip = $_db_tooltip;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -244,16 +244,15 @@ if (empty($GLOBALS['is_header_sent'])) {
|
|||||||
// Get additional information about tables for tooltip is done
|
// Get additional information about tables for tooltip is done
|
||||||
// in libraries/db_info.inc.php only once
|
// in libraries/db_info.inc.php only once
|
||||||
if ($cfgRelation['commwork']) {
|
if ($cfgRelation['commwork']) {
|
||||||
$comment = PMA_getComments($GLOBALS['db']);
|
$comment = PMA_getDbComment($GLOBALS['db']);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Displays table comment
|
* Displays table comment
|
||||||
*/
|
*/
|
||||||
if (is_array($comment) && ! empty($comment)) {
|
if (! empty($comment)) {
|
||||||
echo '<span class="table_comment"'
|
echo '<span class="table_comment"'
|
||||||
.' id="span_table_comment">"'
|
. ' id="span_table_comment">"'
|
||||||
.htmlspecialchars(implode(' ', $comment))
|
. htmlspecialchars($comment)
|
||||||
.'"</span>' . "\n";
|
. '"</span>' . "\n";
|
||||||
} // end if
|
} // end if
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -29,7 +29,7 @@
|
|||||||
* @uses PMA_List_Database::getGroupedDetails()
|
* @uses PMA_List_Database::getGroupedDetails()
|
||||||
* @uses PMA_generate_common_url()
|
* @uses PMA_generate_common_url()
|
||||||
* @uses PMA_generate_common_hidden_inputs()
|
* @uses PMA_generate_common_hidden_inputs()
|
||||||
* @uses PMA_getComments();
|
* @uses PMA_getDbComment();
|
||||||
* @uses PMA_getTableCount()
|
* @uses PMA_getTableCount()
|
||||||
* @uses PMA_getTableList()
|
* @uses PMA_getTableList()
|
||||||
* @uses PMA_getRelationsParam()
|
* @uses PMA_getRelationsParam()
|
||||||
@@ -79,7 +79,7 @@ if (! isset($_SESSION['navi_limit_offset'])) {
|
|||||||
if (isset($_REQUEST['pos'])) {
|
if (isset($_REQUEST['pos'])) {
|
||||||
$_SESSION['navi_limit_offset'] = (int) $_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
|
// free the session file, for the other frames to be loaded
|
||||||
session_write_close();
|
session_write_close();
|
||||||
@@ -118,7 +118,7 @@ if (! isset($_SESSION['navi_limit_offset'])) {
|
|||||||
if (isset($_REQUEST['pos'])) {
|
if (isset($_REQUEST['pos'])) {
|
||||||
$_SESSION['navi_limit_offset'] = (int) $_REQUEST['pos'];
|
$_SESSION['navi_limit_offset'] = (int) $_REQUEST['pos'];
|
||||||
}
|
}
|
||||||
$pos = $_SESSION['navi_limit_offset'];
|
$pos = $_SESSION['navi_limit_offset'];
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Displays the frame
|
* Displays the frame
|
||||||
@@ -249,9 +249,9 @@ if ($GLOBALS['cfg']['LeftFrameLight'] && strlen($GLOBALS['db'])) {
|
|||||||
|
|
||||||
if ($GLOBALS['cfg']['ShowTooltip']
|
if ($GLOBALS['cfg']['ShowTooltip']
|
||||||
&& $GLOBALS['cfgRelation']['commwork']) {
|
&& $GLOBALS['cfgRelation']['commwork']) {
|
||||||
$_db_tooltip = PMA_getComments($GLOBALS['db']);
|
$_db_tooltip = PMA_getDbComment($GLOBALS['db']);
|
||||||
if (is_array($_db_tooltip)) {
|
if ($_db_tooltip) {
|
||||||
$db_tooltip = implode(' ', $_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'])
|
* offset in the list of tables ($_SESSION['navi_table_limit_offset'])
|
||||||
* and use PMA_listNavigator(); do not just check pos in REQUEST
|
* 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
|
* 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']);
|
$table_list = PMA_getTableList($GLOBALS['db'], null, 0, $cfg['MaxTableList']);
|
||||||
if (! empty($table_list)) {
|
if (! empty($table_list)) {
|
||||||
PMA_displayTableList($table_list, true, '', $GLOBALS['db']);
|
PMA_displayTableList($table_list, true, '', $GLOBALS['db']);
|
||||||
// hint user that the table list is larger, until the todo is done
|
// 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']) {
|
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 {
|
} else {
|
||||||
echo $GLOBALS['strNoTablesFound'];
|
echo $GLOBALS['strNoTablesFound'];
|
||||||
}
|
}
|
||||||
@@ -588,7 +588,7 @@ function PMA_displayTableList($tables, $visible = false,
|
|||||||
. ': ' . htmlspecialchars($table['Comment'])
|
. ': ' . htmlspecialchars($table['Comment'])
|
||||||
.' (' . PMA_formatNumber($table['Rows'], 0) . ' ' . $GLOBALS['strRows'] . ')"'
|
.' (' . PMA_formatNumber($table['Rows'], 0) . ' ' . $GLOBALS['strRows'] . ')"'
|
||||||
.' id="quick_' . htmlspecialchars($table_db . '.' . $table['Name']) . '"'
|
.' id="quick_' . htmlspecialchars($table_db . '.' . $table['Name']) . '"'
|
||||||
.' href="' . $GLOBALS['cfg']['LeftDefaultTabTable'] . '?'
|
.' href="' . $GLOBALS['cfg']['LeftDefaultTabTable'] . '?'
|
||||||
. $GLOBALS['common_url_query']
|
. $GLOBALS['common_url_query']
|
||||||
.'&table=' . urlencode($table['Name'])
|
.'&table=' . urlencode($table['Name'])
|
||||||
.'&goto=' . $GLOBALS['cfg']['LeftDefaultTabTable']
|
.'&goto=' . $GLOBALS['cfg']['LeftDefaultTabTable']
|
||||||
@@ -606,7 +606,7 @@ function PMA_displayTableList($tables, $visible = false,
|
|||||||
$href = $GLOBALS['cfg']['DefaultTabTable'] . '?'
|
$href = $GLOBALS['cfg']['DefaultTabTable'] . '?'
|
||||||
.$GLOBALS['common_url_query'] . '&table='
|
.$GLOBALS['common_url_query'] . '&table='
|
||||||
.urlencode($table['Name']);
|
.urlencode($table['Name']);
|
||||||
echo '<a href="' . $href
|
echo '<a href="' . $href
|
||||||
. '" title="' . htmlspecialchars(PMA_getTitleForTarget($GLOBALS['cfg']['DefaultTabTable']) . ': ' . $table['Comment']
|
. '" title="' . htmlspecialchars(PMA_getTitleForTarget($GLOBALS['cfg']['DefaultTabTable']) . ': ' . $table['Comment']
|
||||||
.' (' . PMA_formatNumber($table['Rows'], 0) . ' ' . $GLOBALS['strRows']) . ')"'
|
.' (' . PMA_formatNumber($table['Rows'], 0) . ' ' . $GLOBALS['strRows']) . ')"'
|
||||||
.' id="' . htmlspecialchars($table_db . '.' . $table['Name']) . '">'
|
.' id="' . htmlspecialchars($table_db . '.' . $table['Name']) . '">'
|
||||||
@@ -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
|
* in order to display it as a title in navigation panel
|
||||||
*
|
*
|
||||||
* @uses switch()
|
* @uses switch()
|
||||||
* @uses $GLOBALS
|
* @uses $GLOBALS
|
||||||
* @param string a valid value for $cfg['LeftDefaultTabTable']
|
* @param string a valid value for $cfg['LeftDefaultTabTable']
|
||||||
* or $cfg['DefaultTabTable']
|
* or $cfg['DefaultTabTable']
|
||||||
*/
|
*/
|
||||||
function PMA_getTitleForTarget($target) {
|
function PMA_getTitleForTarget($target) {
|
||||||
switch ($target) {
|
switch ($target) {
|
||||||
|
@@ -15,7 +15,6 @@
|
|||||||
* @uses PMA_sqlAddslashes()
|
* @uses PMA_sqlAddslashes()
|
||||||
* @uses PMA_DBI_try_query()
|
* @uses PMA_DBI_try_query()
|
||||||
* @uses PMA_getRelationsParam()
|
* @uses PMA_getRelationsParam()
|
||||||
* @uses PMA_setComment()
|
|
||||||
* @uses PMA_setMIME()
|
* @uses PMA_setMIME()
|
||||||
* @uses PMA_mysqlDie()
|
* @uses PMA_mysqlDie()
|
||||||
* @uses PMA_generate_common_url()
|
* @uses PMA_generate_common_url()
|
||||||
|
Reference in New Issue
Block a user