diff --git a/ChangeLog b/ChangeLog index 88aa9dfdd..2467a84f4 100755 --- a/ChangeLog +++ b/ChangeLog @@ -9,8 +9,8 @@ $Source$ * config.inc.php3: $cfgServers[1]['connect_type'] preferred connection type * lib.inc.php3 - line 285: $cfgServer['connect_type'] implemented * Documentation.html - - documented $cfgServers[n]['connect_type'] - - two minor fixes for typo's that i noticed + - documented $cfgServers[n]['connect_type'] + - two minor fixes for typo's that i noticed 2001-08-22 Olivier Müller * main.php3: relooked the start page with the help of Loïc. @@ -30,6 +30,11 @@ $Source$ option has been checked. - split_sql_file(): fix a bug when a backquoted table/field name ends with a backslash. + - lines 96-100: added a magic feature to append a slash at the end of + $cfgPmaAbsoluteUri if required. + - display_table(): displays a space character if a field is empty to + ensure the cell format is used with NS. + - defines $server_port & $server_socket only once. * main.php3: XHTML1.0 fixes. * footer.inc.php3, lines 9-10; lib.inc.php3, line 162: the "" html tag was lacking. diff --git a/lib.inc.php3 b/lib.inc.php3 index 84ae07b72..66c5fc413 100755 --- a/lib.inc.php3 +++ b/lib.inc.php3 @@ -93,6 +93,11 @@ if (!defined('__LIB_INC__')){ if (!isset($cfgTextareaRows)) { $cfgTextareaRows = 7; } + // Adds a trailing slash et the end of the phpMyAdmin uri if it does not + // exist + if (substr($cfgPmaAbsoluteUri, -1) != '/') { + $cfgPmaAbsoluteUri .= '/'; + } include('./defines.inc.php3'); @@ -214,6 +219,17 @@ if (!defined('__LIB_INC__')){ else if (isset($cfgServers[$server])) { $cfgServer = $cfgServers[$server]; + // Check how the config says to connect to the server + $server_port = (empty($cfgServer['port'])) + ? '' + : ':' . $cfgServer['port']; + if (strtolower($cfgServer['connect_type']) == 'tcp') { + $cfgServer['socket'] = ''; + } + $server_socket = (empty($cfgServer['socket']) || PHP_INT_VERSION < 30010) + ? '' + : ':' . $cfgServer['socket']; + // The user can work with only some databases if (isset($cfgServer['only_db']) && !empty($cfgServer['only_db'])) { if (is_array($cfgServer['only_db'])) { @@ -281,22 +297,11 @@ if (!defined('__LIB_INC__')){ } } - // Check how the config says to connect to the server - if (strtolower($cfgServer['connect_type']) == 'tcp') { - $cfgServer['socket'] = ''; - } - // Calls the authentication window or validates user's login if ($do_auth) { auth(); } else { - $server_port = (empty($cfgServer['port'])) - ? '' - : ':' . $cfgServer['port']; - $server_socket = (empty($cfgServer['socket']) || PHP_INT_VERSION < 30010) - ? '' - : ':' . $cfgServer['socket']; - $dbh = @$connect_func( + $dbh = @$connect_func( $cfgServer['host'] . $server_port . $server_socket, $cfgServer['stduser'], $cfgServer['stdpass'] @@ -395,13 +400,7 @@ if (!defined('__LIB_INC__')){ } // end Advanced authentication // Do connect to the user's database - $server_port = (empty($cfgServer['port'])) - ? '' - : ':' . $cfgServer['port']; - $server_socket = (empty($cfgServer['socket']) || PHP_INT_VERSION < 30010) - ? '' - : ':' . $cfgServer['socket']; - $link = @$connect_func( + $link = @$connect_func( $cfgServer['host'] . $server_port . $server_socket, $cfgServer['user'], $cfgServer['password'] @@ -1203,7 +1202,7 @@ var errorMsg2 = 'numeric == 1) { - echo ' ' . $row[$i] . ' ' . "\n"; + echo ' ' . $row[$i] . '' . "\n"; } else if ($GLOBALS['cfgShowBlob'] == FALSE && eregi('BLOB', $primary->type)) { // loic1 : mysql_fetch_fields returns BLOB in place of TEXT // fields type, however TEXT fields must be displayed even @@ -1219,15 +1218,15 @@ var errorMsg2 = '/ - // echo ' ' . htmlspecialchars($row[$i]) . ' ' . "\n"; + // echo ' ' . htmlspecialchars($row[$i]) . '' . "\n"; $row[$i] = ereg_replace("((\015\012)|(\015)|(\012))+", '
', htmlspecialchars($row[$i])); - echo ' ' . $row[$i] . ' ' . "\n"; + echo ' ' . $row[$i] . '' . "\n"; } } else { // loic1 : displays / - // echo ' ' . htmlspecialchars($row[$i]) . ' ' . "\n"; + // echo ' ' . htmlspecialchars($row[$i]) . '' . "\n"; $row[$i] = ereg_replace("((\015\012)|(\015)|(\012))+", '
', htmlspecialchars($row[$i])); - echo ' ' . $row[$i] . ' ' . "\n"; + echo ' ' . $row[$i] . '' . "\n"; } } // end for // Possibility to have the modify/delete button on the left added