diff --git a/ChangeLog b/ChangeLog index 4e38a9775..f4dfaf539 100755 --- a/ChangeLog +++ b/ChangeLog @@ -20,8 +20,14 @@ $Source$ #444767 (Other cases for display=simple). * user_details.php3: fixed some javascript bugs. * tbl_change.php3, lines 26 & 31: added some mysql_die() calls. - * lib.inc.php3, lines 135 & 147: go back to the previous calling script - that is not a confirmation form. + * lib.inc.php3, lines 135 & 147: in case of error in a query, go back to the + previous calling script that is not a confirmation form. + Fixed also a js bug line 147. + * config.inc.php3, lines 27-33; Documentation.html, lines 238-246; + db_details.php3, line 37; sql.php3, lines 20, 53 & 184; + tbl_properties.php3, lines 45 & 51; tbl_replace, line 143 & 252; + tbl_select.php3, line 181: according to rfc 2816, the location http + header requires an absolute URI. 2001-08-19 Olivier Müller * db_readdump.php3: if file contains mutiple queries, only show this line: diff --git a/Documentation.html b/Documentation.html index fc474469d..0bc6dd8d5 100755 --- a/Documentation.html +++ b/Documentation.html @@ -235,6 +235,15 @@

All configurable data is placed in config.inc.php3.

+
$cfgPmaAbsoluteUri string
+
+ Sets here the complete url (with full path) to your phpMyAdmin version. + E.g. http://www.your_web.net/path_to_your_phpMyAdmin_directory/. +
+ Don't forget the slash at the end of your url. +

+
+
$cfgServers array
Since version 1.4.2, phpMyAdmin supports the administration of multiple diff --git a/config.inc.php3 b/config.inc.php3 index b9ef16c22..4c4a9ad0b 100755 --- a/config.inc.php3 +++ b/config.inc.php3 @@ -24,6 +24,15 @@ */ +/** + * Your phpMyAdmin url + * + * Complete the variable below with the full url ie + * http://www.your_web.net/path_to_your_phpMyAdmin_directory/ + */ +$cfgPmaAbsoluteUri = ''; + + /** * Server(s) configuration */ @@ -82,7 +91,7 @@ unset($cfgServers[0]); $cfgConfirm = TRUE; // confirm 'DROP TABLE' & 'DROP DATABASE' $cfgPersistentConnections = FALSE; // use persistent connections to MySQL database $cfgShowBlob = FALSE; // display blob field contents in browse mode -$cfgProtectBlob = TRUE; // disallow editing of blob fields in edit mode +$cfgProtectBlob = TRUE; // disallow editing of blob fields in edit mode $cfgShowSQL = TRUE; // show SQL queries as run $cfgSkipLockedTables = FALSE; // mark used tables, make possible to show // locked tables (since MySQL 3.23.30) diff --git a/db_details.php3 b/db_details.php3 index ee633b8bb..1327fedb6 100755 --- a/db_details.php3 +++ b/db_details.php3 @@ -34,7 +34,7 @@ $tables = mysql_list_tables($db); $num_tables = @mysql_numrows($tables); // Not a valid db name -> back to the welcome page if (mysql_error() != '') { - header('Location: main.php3?lang=' . $lang . '&server=' . $server . '&reload=true'); + header('Location: ' . $cfgPmaAbsoluteUri . 'main.php3?lang=' . $lang . '&server=' . $server . '&reload=true'); exit(); } diff --git a/lib.inc.php3 b/lib.inc.php3 index 4f8962eab..9920720c1 100755 --- a/lib.inc.php3 +++ b/lib.inc.php3 @@ -144,7 +144,7 @@ if (!defined('__LIB_INC__')){ echo '

' . "\n"; echo ' ' . $GLOBALS['strMySQLSaid'] . ' ' . htmlspecialchars($error_message) . "\n"; echo '

' . "\n"; - echo '' . $GLOBALS['strBack'] . ''; + echo '' . $GLOBALS['strBack'] . ''; include('./footer.inc.php3'); exit(); diff --git a/sql.php3 b/sql.php3 index 5781024bd..dba61f25e 100755 --- a/sql.php3 +++ b/sql.php3 @@ -17,7 +17,7 @@ if (isset($store_bkm)) { $fields['label'] = stripslashes($fields['label']); } add_bookmarks($fields, $cfgBookmark); - header('Location: ' . $goto); + header('Location: ' . $cfgPmaAbsoluteUri . $goto); } @@ -50,7 +50,7 @@ if (isset($btnDrop) && $btnDrop == $strNo) { if (file_exists('./' . $goto)) { include('./' . ereg_replace('\.\.*', '.', $goto)); } else { - header('Location: ' . $goto); + header('Location: ' . $cfgPmaAbsoluteUri . $goto); } exit(); } // end if @@ -181,7 +181,7 @@ else { } // end if file_exist else { $message = $zero_rows; - header('Location: ' . $goto); + header('Location: ' . $cfgPmaAbsoluteUri . $goto); } // end else exit(); } // end no rows returned diff --git a/tbl_properties.php3 b/tbl_properties.php3 index bb4e9542c..3aa72f6d9 100755 --- a/tbl_properties.php3 +++ b/tbl_properties.php3 @@ -42,13 +42,13 @@ unset($sql_query); $is_db = @mysql_select_db($db); // Not a valid db name -> back to the welcome page if (!$is_db) { - header('Location: main.php3?lang=' . $lang . '&server=' . $server . '&reload=true'); + header('Location: ' . $cfgPmaAbsoluteUri . 'main.php3?lang=' . $lang . '&server=' . $server . '&reload=true'); exit(); } $is_table = @mysql_query('SHOW TABLES LIKE \'' . sql_addslashes($table, TRUE) . '\''); // Not a valid table name -> back to the db_details.php3 if (!@mysql_numrows($is_table)) { - header('Location: db_details.php3?lang=' . $lang . '&server=' . $server . '&db=' . urlencode($db) . '&reload=true'); + header('Location: ' . $cfgPmaAbsoluteUri . 'db_details.php3?lang=' . $lang . '&server=' . $server . '&db=' . urlencode($db) . '&reload=true'); exit(); } diff --git a/tbl_replace.php3 b/tbl_replace.php3 index d4ab5c60d..695502454 100755 --- a/tbl_replace.php3 +++ b/tbl_replace.php3 @@ -140,7 +140,7 @@ if (isset($primary_key) && ($submit_type != $strInsertAsNewRow)) { $message = $strNoModification; include('./' . ereg_replace('\.\.*', '.', $goto)); } else { - header('Location: ' . $goto); + header('Location: ' . $cfgPmaAbsoluteUri . $goto); } exit(); } @@ -249,7 +249,7 @@ if (!$result) { $message = $strModifications; include('./' . ereg_replace('\.\.*', '.', $goto)); } else { - header('Location: ' . $goto); + header('Location: ' . $cfgPmaAbsoluteUri . $goto); } exit(); } // end if diff --git a/tbl_select.php3 b/tbl_select.php3 index c2eae7682..ed980f526 100755 --- a/tbl_select.php3 +++ b/tbl_select.php3 @@ -178,7 +178,7 @@ else { . '&pos=0' . '&sessionMaxRows=' . $sessionMaxRows . '&goto=db_details.php3'; - header('Location: sql.php3?' . $url_query); + header('Location: ' . $cfgPmaAbsoluteUri . 'sql.php3?' . $url_query); } ?>