From 5e6b69d350be508779db52f61c55b22d3b9b37e7 Mon Sep 17 00:00:00 2001 From: "Alexander M. Turek" Date: Fri, 26 Apr 2002 13:17:43 +0000 Subject: [PATCH] bug #547384 --- ChangeLog | 2 ++ libraries/display_tbl.lib.php3 | 20 ++++++++++++++++---- 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 373481cd2..03158b3b2 100755 --- a/ChangeLog +++ b/ChangeLog @@ -12,6 +12,8 @@ $Source$ 2002-04-26 Alexander M. Turek * libraries/common.lib.php3: fixed a controluser bug. + * libraries/display_tbl.lib.php3: fixed bug #547384 (Marker Color can't + equal Pointer Color) 2002-04-25 Alexander M. Turek * lang/italian.inc.php3: updated, thanks again to Pietro Danesi. diff --git a/libraries/display_tbl.lib.php3 b/libraries/display_tbl.lib.php3 index d71b13616..a35dbd1e2 100644 --- a/libraries/display_tbl.lib.php3 +++ b/libraries/display_tbl.lib.php3 @@ -742,7 +742,7 @@ if (!defined('PMA_DISPLAY_TBL_LIB_INCLUDED')){ // loic1: use 'mysql_fetch_array' rather than 'mysql_fetch_row' to get // the NULL values - while ($row = mysql_fetch_array($dt_result)) { + for ($row_no = 0; $row = mysql_fetch_array($dt_result); $row_no++) { // lem9: "vertical display" mode stuff if (($foo != 0) && ($repeat_cells != 0) && !($foo % $repeat_cells) && $disp_direction == 'horizontal') { @@ -770,11 +770,23 @@ if (!defined('PMA_DISPLAY_TBL_LIB_INCLUDED')){ // loic1: pointer code part $on_mouse = ''; if ($GLOBALS['cfg']['BrowsePointerColor'] != '') { - $on_mouse = ' onmouseover="setPointer(this, \'over\', \'' . $bgcolor . '\', \'' . $GLOBALS['cfg']['BrowsePointerColor'] . '\', \'' . $GLOBALS['cfg']['BrowseMarkerColor'] . '\')"' - . ' onmouseout="setPointer(this, \'out\', \'' . $bgcolor . '\', \'' . $GLOBALS['cfg']['BrowsePointerColor'] . '\', \'' . $GLOBALS['cfg']['BrowseMarkerColor'] . '\')"'; + $on_mouse = ' onmouseover="'; + if ($GLOBALS['cfg']['BrowsePointerColor'] == $GLOBALS['cfg']['BrowsePointerColor']) { + $on_mouse .= 'if (typeof(row' . $row_no . '_marked) == \'undefined\') { row' . $row_no . '_marked = false; }; '; + } + $on_mouse .= 'setPointer(this, \'over\', \'' . $bgcolor . '\', \'' . $GLOBALS['cfg']['BrowsePointerColor'] . '\', \'' . $GLOBALS['cfg']['BrowseMarkerColor'] . '\');"' + . ' onmouseout="'; + if ($GLOBALS['cfg']['BrowsePointerColor'] == $GLOBALS['cfg']['BrowsePointerColor']) { + $on_mouse .= 'if (!row' . $row_no . '_marked) '; + } + $on_mouse .= 'setPointer(this, \'out\', \'' . $bgcolor . '\', \'' . $GLOBALS['cfg']['BrowsePointerColor'] . '\', \'' . $GLOBALS['cfg']['BrowseMarkerColor'] . '\');"'; } if ($GLOBALS['cfg']['BrowseMarkerColor'] != '') { - $on_mouse .= ' onmousedown="setPointer(this, \'click\', \'' . $bgcolor . '\', \'' . $GLOBALS['cfg']['BrowsePointerColor'] . '\', \'' . $GLOBALS['cfg']['BrowseMarkerColor'] . '\')"'; + $on_mouse .= ' onmousedown="setPointer(this, \'click\', \'' . $bgcolor . '\', \'' . $GLOBALS['cfg']['BrowsePointerColor'] . '\', \'' . $GLOBALS['cfg']['BrowseMarkerColor'] . '\');'; + if ($GLOBALS['cfg']['BrowsePointerColor'] == $GLOBALS['cfg']['BrowsePointerColor']) { + $on_mouse .= 'if (row' . $row_no . '_marked) { row' . $row_no . '_marked = false; } else { row' . $row_no . '_marked = true; }'; + } + $on_mouse .= '"'; } ?> >