update row count in left frame bug #1243908
This commit is contained in:
@@ -7,6 +7,8 @@ $Source$
|
|||||||
|
|
||||||
2005-10-18 Sebastian Mendel <cybot_tm@users.sourceforge.net>
|
2005-10-18 Sebastian Mendel <cybot_tm@users.sourceforge.net>
|
||||||
* querywindow.php: wrong handling of linebreaks in query: bug #1243888
|
* querywindow.php: wrong handling of linebreaks in query: bug #1243888
|
||||||
|
* left.php, sql.php, tbl_change.php, libraries/common.lib.php,
|
||||||
|
libraries/querywindow.js: update row count in left frame bug #1243908
|
||||||
|
|
||||||
2005-10-17 Michal Čihař <michal@cihar.com>
|
2005-10-17 Michal Čihař <michal@cihar.com>
|
||||||
* lang/czech: Translation fixes.
|
* lang/czech: Translation fixes.
|
||||||
|
14
left.php
14
left.php
@@ -178,9 +178,9 @@ if ( $num_dbs === 0 ) {
|
|||||||
// within left.php. With no JS (<noscript>) the whole frameset will
|
// within left.php. With no JS (<noscript>) the whole frameset will
|
||||||
// be rebuilt with the new target frame.
|
// be rebuilt with the new target frame.
|
||||||
|
|
||||||
$img_plus = '<img id="el%dImg" src="' . $pmaThemeImage . 'b_plus.png"'
|
$img_plus = '<img class="icon" id="el%dImg" src="' . $pmaThemeImage . 'b_plus.png"'
|
||||||
.' width="9" height="9" alt="+" />';
|
.' width="9" height="9" alt="+" />';
|
||||||
$img_minus = '<img id="el%dImg" src="' . $pmaThemeImage . 'b_minus.png"'
|
$img_minus = '<img class="icon" id="el%dImg" src="' . $pmaThemeImage . 'b_minus.png"'
|
||||||
.' width="9" height="9" alt="-" />';
|
.' width="9" height="9" alt="-" />';
|
||||||
|
|
||||||
$href_left = '<a onclick="if ( toggle(\'%d\') ) return false;"'
|
$href_left = '<a onclick="if ( toggle(\'%d\') ) return false;"'
|
||||||
@@ -450,17 +450,19 @@ function PMA_displayTableList( $tables, $visible = false,
|
|||||||
echo '<a title="' . $GLOBALS['strBrowse'] . ': '
|
echo '<a title="' . $GLOBALS['strBrowse'] . ': '
|
||||||
. htmlspecialchars( $table['Comment'] )
|
. htmlspecialchars( $table['Comment'] )
|
||||||
.' (' . $table['Rows'] . ' ' . $GLOBALS['strRows'] . ')"'
|
.' (' . $table['Rows'] . ' ' . $GLOBALS['strRows'] . ')"'
|
||||||
.' id="' . htmlspecialchars( $table_db . '.' . $table['Name'] ) . '"'
|
.' id="browse_' . htmlspecialchars( $table_db . '.' . $table['Name'] ) . '"'
|
||||||
.' href="sql.php?' . $GLOBALS['common_url_query']
|
.' href="sql.php?' . $GLOBALS['common_url_query']
|
||||||
.'&table=' . urlencode( $table['Name'] )
|
.'&table=' . urlencode( $table['Name'] )
|
||||||
.'&goto=' . $GLOBALS['cfg']['DefaultTabTable']
|
.'&goto=' . $GLOBALS['cfg']['DefaultTabTable']
|
||||||
.'&sql_query=' . urlencode('SELECT * FROM `'
|
.'&sql_query=' . urlencode('SELECT * FROM `'
|
||||||
. $table['Name'] . '`') . '" '
|
. $table['Name'] . '`') . '" '
|
||||||
.' >'
|
.' >'
|
||||||
.'<img src="' . $GLOBALS['pmaThemeImage'] . 'b_sbrowse.png"'
|
.'<img class="icon" src="' . $GLOBALS['pmaThemeImage'] . 'b_sbrowse.png"'
|
||||||
.' width="10" height="10" alt="*" /></a>' . "\n"
|
.' id="icon_' . htmlspecialchars( $table_db . '.' . $table['Name'] ) . '"'
|
||||||
|
.' width="10" height="10" alt="' . $GLOBALS['strBrowse'] . '" /></a>' . "\n"
|
||||||
.'<a href="' . $href . '" title="' . $table['Comment']
|
.'<a href="' . $href . '" title="' . $table['Comment']
|
||||||
.' (' . $table['Rows'] . ' ' . $GLOBALS['strRows'] . ')">'
|
.' (' . $table['Rows'] . ' ' . $GLOBALS['strRows'] . ')"'
|
||||||
|
.' id="' . htmlspecialchars( $table_db . '.' . $table['Name'] ) . '">'
|
||||||
. htmlspecialchars( $table['disp_name'] ) . '</a>';
|
. htmlspecialchars( $table['disp_name'] ) . '</a>';
|
||||||
echo '</li>' . "\n";
|
echo '</li>' . "\n";
|
||||||
}
|
}
|
||||||
|
@@ -1837,7 +1837,7 @@ if ($is_minimum_common == FALSE) {
|
|||||||
echo "\n";
|
echo "\n";
|
||||||
$reload_url = './left.php?' . PMA_generate_common_url((isset($GLOBALS['db']) ? $GLOBALS['db'] : ''), '', '&');
|
$reload_url = './left.php?' . PMA_generate_common_url((isset($GLOBALS['db']) ? $GLOBALS['db'] : ''), '', '&');
|
||||||
?>
|
?>
|
||||||
<script type="text/javascript" language="javascript1.2">
|
<script type="text/javascript">
|
||||||
//<![CDATA[
|
//<![CDATA[
|
||||||
if (typeof(window.parent) != 'undefined'
|
if (typeof(window.parent) != 'undefined'
|
||||||
&& typeof(window.parent.frames[0]) != 'undefined') {
|
&& typeof(window.parent.frames[0]) != 'undefined') {
|
||||||
@@ -1876,19 +1876,12 @@ if (typeof(window.parent) != 'undefined'
|
|||||||
: $tbl_status['Comment'] . ' ';
|
: $tbl_status['Comment'] . ' ';
|
||||||
$tooltip .= '(' . $tbl_status['Rows'] . ' ' . $GLOBALS['strRows'] . ')';
|
$tooltip .= '(' . $tbl_status['Rows'] . ' ' . $GLOBALS['strRows'] . ')';
|
||||||
PMA_DBI_free_result($result);
|
PMA_DBI_free_result($result);
|
||||||
$uni_tbl = PMA_jsFormat( $GLOBALS['db'] . '.' . $GLOBALS['table'] );
|
$uni_tbl = PMA_jsFormat( $GLOBALS['db'] . '.' . $GLOBALS['table'], false );
|
||||||
echo "\n";
|
echo "\n";
|
||||||
?>
|
?>
|
||||||
<script type="text/javascript" language="javascript1.2">
|
<script type="text/javascript">
|
||||||
//<![CDATA[
|
//<![CDATA[
|
||||||
if (typeof(document.getElementById) != 'undefined'
|
window.parent.updateTableTitle( '<?php echo $uni_tbl; ?>', '<?php echo PMA_jsFormat($tooltip, false); ?>' );
|
||||||
&& typeof(window.parent.frames[0]) != 'undefined'
|
|
||||||
&& typeof(window.parent.frames[0].document) != 'undefined' && typeof(window.parent.frames[0].document) != 'unknown'
|
|
||||||
&& (window.parent.frames[0].document.getElementById('<?php echo $uni_tbl; ?>'))
|
|
||||||
&& typeof(window.parent.frames[0].document.getElementById('<?php echo $uni_tbl; ?>')) != 'undefined'
|
|
||||||
&& typeof(window.parent.frames[0].document.getElementById('<?php echo $uni_tbl; ?>').title) == 'string') {
|
|
||||||
window.parent.frames[0].document.getElementById('<?php echo $uni_tbl; ?>').title = '<?php echo PMA_jsFormat($tooltip, FALSE); ?>';
|
|
||||||
}
|
|
||||||
//]]>
|
//]]>
|
||||||
</script>
|
</script>
|
||||||
<?php
|
<?php
|
||||||
|
@@ -2,6 +2,7 @@ var querywindow = '';
|
|||||||
|
|
||||||
// sets current selected table (called from footer.inc.php)
|
// sets current selected table (called from footer.inc.php)
|
||||||
function setTable( new_db, new_table ) {
|
function setTable( new_db, new_table ) {
|
||||||
|
//alert('setTable');
|
||||||
if ( new_db != db || new_table != table ) {
|
if ( new_db != db || new_table != table ) {
|
||||||
// table or db has changed
|
// table or db has changed
|
||||||
|
|
||||||
@@ -90,6 +91,7 @@ function refreshQuerywindow( url ) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function goTo( targeturl, target ) {
|
function goTo( targeturl, target ) {
|
||||||
|
//alert('goto');
|
||||||
if ( target == 'main' ) {
|
if ( target == 'main' ) {
|
||||||
target = window.frames[1];
|
target = window.frames[1];
|
||||||
} else if ( target == 'query' ) {
|
} else if ( target == 'query' ) {
|
||||||
@@ -118,7 +120,21 @@ function goTo( targeturl, target ) {
|
|||||||
|
|
||||||
// opens selected db in main frame
|
// opens selected db in main frame
|
||||||
function openDb( db ) {
|
function openDb( db ) {
|
||||||
|
//alert('opendb');
|
||||||
goTo( opendb_url + '?' + common_query + '&db=' + db,
|
goTo( opendb_url + '?' + common_query + '&db=' + db,
|
||||||
window.parent.frames[1] );
|
window.parent.frames[1] );
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function updateTableTitle( table_link_id, new_title ) {
|
||||||
|
//alert('updateTableTitle');
|
||||||
|
if ( window.parent.frames[0].document.getElementById(table_link_id) ) {
|
||||||
|
var left = window.parent.frames[0].document;
|
||||||
|
left.getElementById(table_link_id).title = new_title;
|
||||||
|
new_title = left.getElementById('icon_' + table_link_id).alt + ': ' + new_title;
|
||||||
|
left.getElementById('browse_' + table_link_id).title = new_title;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
3
sql.php
3
sql.php
@@ -272,8 +272,7 @@ else {
|
|||||||
|
|
||||||
if ((!isset($reload) || $reload == 0)
|
if ((!isset($reload) || $reload == 0)
|
||||||
&& (preg_match('@^CREATE TABLE[[:space:]]+(.*)@i', $sql_query)
|
&& (preg_match('@^CREATE TABLE[[:space:]]+(.*)@i', $sql_query)
|
||||||
|| preg_match('@^ALTER TABLE[[:space:]]+(.*)RENAME@i', $sql_query)
|
|| preg_match('@^ALTER TABLE[[:space:]]+(.*)RENAME@i', $sql_query))) {
|
||||||
|| preg_match('@^TRUNCATE@i', $sql_query))) {
|
|
||||||
$reload = 1;
|
$reload = 1;
|
||||||
}
|
}
|
||||||
// Gets the number of rows per page
|
// Gets the number of rows per page
|
||||||
|
@@ -183,7 +183,6 @@ document.onkeydown = onKeyDownArrowsHandler;
|
|||||||
<input type="hidden" name="dontlimitchars" value="<?php echo (isset($dontlimitchars) ? $dontlimitchars : 0); ?>" />
|
<input type="hidden" name="dontlimitchars" value="<?php echo (isset($dontlimitchars) ? $dontlimitchars : 0); ?>" />
|
||||||
<input type="hidden" name="err_url" value="<?php echo urlencode($err_url); ?>" />
|
<input type="hidden" name="err_url" value="<?php echo urlencode($err_url); ?>" />
|
||||||
<input type="hidden" name="sql_query" value="<?php echo isset($sql_query) ? urlencode($sql_query) : ''; ?>" />
|
<input type="hidden" name="sql_query" value="<?php echo isset($sql_query) ? urlencode($sql_query) : ''; ?>" />
|
||||||
<input type="hidden" name="reload" value="1" />
|
|
||||||
<?php
|
<?php
|
||||||
if (isset($primary_key_array)) {
|
if (isset($primary_key_array)) {
|
||||||
foreach ($primary_key_array AS $primary_key) {
|
foreach ($primary_key_array AS $primary_key) {
|
||||||
|
Reference in New Issue
Block a user