lib.inc.php3
* added a magic feature to append a slash at the end of $cfgPmaAbsoluteUri if required * 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
This commit is contained in:
@@ -9,8 +9,8 @@ $Source$
|
|||||||
* config.inc.php3: $cfgServers[1]['connect_type'] preferred connection type
|
* config.inc.php3: $cfgServers[1]['connect_type'] preferred connection type
|
||||||
* lib.inc.php3 - line 285: $cfgServer['connect_type'] implemented
|
* lib.inc.php3 - line 285: $cfgServer['connect_type'] implemented
|
||||||
* Documentation.html
|
* Documentation.html
|
||||||
- documented $cfgServers[n]['connect_type']
|
- documented $cfgServers[n]['connect_type']
|
||||||
- two minor fixes for typo's that i noticed
|
- two minor fixes for typo's that i noticed
|
||||||
|
|
||||||
2001-08-22 Olivier M<>ller <om@omnis.ch>
|
2001-08-22 Olivier M<>ller <om@omnis.ch>
|
||||||
* main.php3: relooked the start page with the help of Lo<4C>c.
|
* main.php3: relooked the start page with the help of Lo<4C>c.
|
||||||
@@ -30,6 +30,11 @@ $Source$
|
|||||||
option has been checked.
|
option has been checked.
|
||||||
- split_sql_file(): fix a bug when a backquoted table/field name ends
|
- split_sql_file(): fix a bug when a backquoted table/field name ends
|
||||||
with a backslash.
|
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.
|
* main.php3: XHTML1.0 fixes.
|
||||||
* footer.inc.php3, lines 9-10; lib.inc.php3, line 162: the "</body>" html
|
* footer.inc.php3, lines 9-10; lib.inc.php3, line 162: the "</body>" html
|
||||||
tag was lacking.
|
tag was lacking.
|
||||||
|
47
lib.inc.php3
47
lib.inc.php3
@@ -93,6 +93,11 @@ if (!defined('__LIB_INC__')){
|
|||||||
if (!isset($cfgTextareaRows)) {
|
if (!isset($cfgTextareaRows)) {
|
||||||
$cfgTextareaRows = 7;
|
$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');
|
include('./defines.inc.php3');
|
||||||
|
|
||||||
|
|
||||||
@@ -214,6 +219,17 @@ if (!defined('__LIB_INC__')){
|
|||||||
else if (isset($cfgServers[$server])) {
|
else if (isset($cfgServers[$server])) {
|
||||||
$cfgServer = $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
|
// The user can work with only some databases
|
||||||
if (isset($cfgServer['only_db']) && !empty($cfgServer['only_db'])) {
|
if (isset($cfgServer['only_db']) && !empty($cfgServer['only_db'])) {
|
||||||
if (is_array($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
|
// Calls the authentication window or validates user's login
|
||||||
if ($do_auth) {
|
if ($do_auth) {
|
||||||
auth();
|
auth();
|
||||||
} else {
|
} else {
|
||||||
$server_port = (empty($cfgServer['port']))
|
$dbh = @$connect_func(
|
||||||
? ''
|
|
||||||
: ':' . $cfgServer['port'];
|
|
||||||
$server_socket = (empty($cfgServer['socket']) || PHP_INT_VERSION < 30010)
|
|
||||||
? ''
|
|
||||||
: ':' . $cfgServer['socket'];
|
|
||||||
$dbh = @$connect_func(
|
|
||||||
$cfgServer['host'] . $server_port . $server_socket,
|
$cfgServer['host'] . $server_port . $server_socket,
|
||||||
$cfgServer['stduser'],
|
$cfgServer['stduser'],
|
||||||
$cfgServer['stdpass']
|
$cfgServer['stdpass']
|
||||||
@@ -395,13 +400,7 @@ if (!defined('__LIB_INC__')){
|
|||||||
} // end Advanced authentication
|
} // end Advanced authentication
|
||||||
|
|
||||||
// Do connect to the user's database
|
// Do connect to the user's database
|
||||||
$server_port = (empty($cfgServer['port']))
|
$link = @$connect_func(
|
||||||
? ''
|
|
||||||
: ':' . $cfgServer['port'];
|
|
||||||
$server_socket = (empty($cfgServer['socket']) || PHP_INT_VERSION < 30010)
|
|
||||||
? ''
|
|
||||||
: ':' . $cfgServer['socket'];
|
|
||||||
$link = @$connect_func(
|
|
||||||
$cfgServer['host'] . $server_port . $server_socket,
|
$cfgServer['host'] . $server_port . $server_socket,
|
||||||
$cfgServer['user'],
|
$cfgServer['user'],
|
||||||
$cfgServer['password']
|
$cfgServer['password']
|
||||||
@@ -1203,7 +1202,7 @@ var errorMsg2 = '<?php echo(str_replace('\'', '\\\'', $GLOBALS['strNotValidNumbe
|
|||||||
}
|
}
|
||||||
$primary = mysql_fetch_field($dt_result, $i);
|
$primary = mysql_fetch_field($dt_result, $i);
|
||||||
if ($primary->numeric == 1) {
|
if ($primary->numeric == 1) {
|
||||||
echo ' <td align="right">' . $row[$i] . ' </td>' . "\n";
|
echo ' <td align="right">' . $row[$i] . '</td>' . "\n";
|
||||||
} else if ($GLOBALS['cfgShowBlob'] == FALSE && eregi('BLOB', $primary->type)) {
|
} else if ($GLOBALS['cfgShowBlob'] == FALSE && eregi('BLOB', $primary->type)) {
|
||||||
// loic1 : mysql_fetch_fields returns BLOB in place of TEXT
|
// loic1 : mysql_fetch_fields returns BLOB in place of TEXT
|
||||||
// fields type, however TEXT fields must be displayed even
|
// fields type, however TEXT fields must be displayed even
|
||||||
@@ -1219,15 +1218,15 @@ var errorMsg2 = '<?php echo(str_replace('\'', '\\\'', $GLOBALS['strNotValidNumbe
|
|||||||
$row[$i] = substr($row[$i], 0, $GLOBALS['cfgLimitChars']) . '...';
|
$row[$i] = substr($row[$i], 0, $GLOBALS['cfgLimitChars']) . '...';
|
||||||
}
|
}
|
||||||
// loic1 : displays <cr>/<lf>
|
// loic1 : displays <cr>/<lf>
|
||||||
// echo ' <td>' . htmlspecialchars($row[$i]) . ' </td>' . "\n";
|
// echo ' <td>' . htmlspecialchars($row[$i]) . '</td>' . "\n";
|
||||||
$row[$i] = ereg_replace("((\015\012)|(\015)|(\012))+", '<br />', htmlspecialchars($row[$i]));
|
$row[$i] = ereg_replace("((\015\012)|(\015)|(\012))+", '<br />', htmlspecialchars($row[$i]));
|
||||||
echo ' <td>' . $row[$i] . ' </td>' . "\n";
|
echo ' <td>' . $row[$i] . '</td>' . "\n";
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// loic1 : displays <cr>/<lf>
|
// loic1 : displays <cr>/<lf>
|
||||||
// echo ' <td>' . htmlspecialchars($row[$i]) . ' </td>' . "\n";
|
// echo ' <td>' . htmlspecialchars($row[$i]) . '</td>' . "\n";
|
||||||
$row[$i] = ereg_replace("((\015\012)|(\015)|(\012))+", '<br />', htmlspecialchars($row[$i]));
|
$row[$i] = ereg_replace("((\015\012)|(\015)|(\012))+", '<br />', htmlspecialchars($row[$i]));
|
||||||
echo ' <td>' . $row[$i] . ' </td>' . "\n";
|
echo ' <td>' . $row[$i] . '</td>' . "\n";
|
||||||
}
|
}
|
||||||
} // end for
|
} // end for
|
||||||
// Possibility to have the modify/delete button on the left added
|
// Possibility to have the modify/delete button on the left added
|
||||||
|
Reference in New Issue
Block a user