From 08c353d467d50b4cf39a38ce3849fbdcffa84b28 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Chapeaux?= Date: Sat, 8 Sep 2001 12:59:45 +0000 Subject: [PATCH] Splitted the big "lib.inc.php3" into smaller libraries --- ChangeLog | 12 +- Documentation.html | 17 +- config.inc.php3 | 5 +- db_create.php3 | 2 +- db_details.php3 | 9 +- db_printview.php3 | 2 +- db_stats.php3 | 2 +- header.inc.php3 | 6 +- index.php3 | 4 +- ldi_check.php3 | 4 +- ldi_table.php3 | 2 +- left.php3 | 6 +- lib.inc.php3 | 2492 ----------------- libraries/bookmark.lib.php3 | 159 ++ libraries/build_dump.lib.php3 | 501 ++++ libraries/common.lib.php3 | 906 ++++++ .../defines.lib.php3 | 0 libraries/display_tbl.lib.php3 | 902 ++++++ functions.js => libraries/functions.js | 1 - .../grab_globals.lib.php3 | 0 left.js => libraries/left.js | 0 ob_lib.inc.php3 => libraries/ob.lib.php3 | 6 +- libraries/read_dump.lib.php3 | 117 + .../select_lang.lib.php3 | 6 +- main.php3 | 2 +- scripts/create-release.sh | 2 +- sql.php3 | 10 +- tbl_addfield.php3 | 2 +- tbl_alter.php3 | 2 +- tbl_change.php3 | 2 +- tbl_copy.php3 | 4 +- tbl_create.php3 | 2 +- tbl_dump.php3 | 5 +- tbl_printview.php3 | 2 +- tbl_properties.php3 | 9 +- tbl_qbe.php3 | 4 +- tbl_rename.php3 | 4 +- tbl_replace.php3 | 4 +- tbl_select.php3 | 4 +- user_details.php3 | 4 +- 40 files changed, 2669 insertions(+), 2554 deletions(-) delete mode 100755 lib.inc.php3 create mode 100644 libraries/bookmark.lib.php3 create mode 100644 libraries/build_dump.lib.php3 create mode 100644 libraries/common.lib.php3 rename defines.inc.php3 => libraries/defines.lib.php3 (100%) mode change 100755 => 100644 create mode 100644 libraries/display_tbl.lib.php3 rename functions.js => libraries/functions.js (99%) mode change 100755 => 100644 rename grab_globals.inc.php3 => libraries/grab_globals.lib.php3 (100%) rename left.js => libraries/left.js (100%) rename ob_lib.inc.php3 => libraries/ob.lib.php3 (96%) create mode 100644 libraries/read_dump.lib.php3 rename select_lang.inc.php3 => libraries/select_lang.lib.php3 (97%) mode change 100755 => 100644 diff --git a/ChangeLog b/ChangeLog index 57582aa51..7367fdf6a 100755 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,14 @@ phpMyAdmin - Changelog $Id$ $Source$ +2001-09-08 Loïc Chapeaux + * IMPORTANT UPDATE: "lib.inc.php3" has been splitted into smaller libraries + in order to lower the server charge. All the libraries are now stored in + a new sub-directory which name is... "libraries". + * db_readdump.php3 has been renamed to read_dump.php3. + * lang/italian.inc.php3: updated thanks to + Pietro Danesi . + 2001-09-07 Loïc Chapeaux * main.php3, line 208: fixed an invalid link id. * db_details.php3: @@ -22,7 +30,9 @@ $Source$ - line 2337: fixed an illegal index warning with php3; - line 1762: invalid number of parameters in the function call. * db_printview.php3; tbl_printview.php3: extended so the generated pages - contains the same informations that the one in the calling page. + contains the same informations that the one in the calling page. Based on + patch #444128 (display & dump index length) thanks to + Marcus Börger . * db_details.php3; db_readdump.php3; sql.php3; lib.inc.php3; main.php3; tbl_copy.php3; tbl_properties.inc.php3; tbl_properties.php3; tbl_rename.php3; mult_submits.inc.php3: $reload has now true boolean diff --git a/Documentation.html b/Documentation.html index 13a0ad060..1ef5bba4c 100755 --- a/Documentation.html +++ b/Documentation.html @@ -323,10 +323,10 @@ (see $cfgServers[n]['stduser']).

- Please also note that if you try a phpMyAdmin login with this stduser, - you could get some errors, depending on the exact privileges you - gave to this stduser. phpMyAdmin does not support a direct login - with the stduser. + Please also note that if you try a phpMyAdmin login with this stduser, + you could get some errors, depending on the exact privileges you gave + to this stduser. phpMyAdmin does not support a direct login with the + the stduser.

See also the FAQ section for more information about security. @@ -959,13 +959,16 @@

  • - All files include header.inc.php3 (layout), lib.inc.php3 - (common functions) and config.inc.php3. + All files include header.inc.php3 (layout), + libraries/common.lib.php3 (common functions) and + config.inc.php3.
    All configuration data belongs in config.inc.php3. Please keep it free from other code.
    - Commonly used functions should be added to lib.inc.php3. + Commonly used functions should be added to + libraries/lib.inc.php3 and more specific ones may be added + within a library stored into the libraries sub-directory.
  • Obviously, you're free to use whatever coding style you want. But diff --git a/config.inc.php3 b/config.inc.php3 index eee74e1aa..0f51483de 100755 --- a/config.inc.php3 +++ b/config.inc.php3 @@ -125,10 +125,11 @@ $cfgManualBase = 'http://www.mysql.com/documentation/mysql/bychapter'; */ // Default language to use, if not browser-defined or user-defined $cfgDefaultLang = 'en'; -// Force: always use this language - must be defined in select_lang.inc.php3 +// Force: always use this language - must be defined in +// libraries/select_lang.lib.php3 // $cfgLang = 'en'; // Loads language file -require('./select_lang.inc.php3'); +require('./libraries/select_lang.lib.php3'); /** diff --git a/db_create.php3 b/db_create.php3 index a48736a73..663b71f2f 100755 --- a/db_create.php3 +++ b/db_create.php3 @@ -5,7 +5,7 @@ /** * Gets some core libraries */ -require('./grab_globals.inc.php3'); +require('./libraries/grab_globals.lib.php3'); $js_to_run = 'functions.js'; require('./header.inc.php3'); diff --git a/db_details.php3 b/db_details.php3 index 6b6e0e40e..da0f4857d 100755 --- a/db_details.php3 +++ b/db_details.php3 @@ -6,8 +6,9 @@ * Gets some core libraries, ensures the database exists (else move to the * "parent" script) and diplays headers */ -require('./grab_globals.inc.php3'); -require('./lib.inc.php3'); +require('./libraries/grab_globals.lib.php3'); +require('./libraries/common.lib.php3'); +require('./libraries/bookmark.lib.php3'); // Not a valid db name -> back to the welcome page if (!empty($db)) { $is_db = @mysql_select_db($db); @@ -386,7 +387,7 @@ $url_query = 'lang=' . $lang . '&db=' . urlencode($db) . '&goto=db_details.php3'; if (isset($show_query) && $show_query == 'y') { - // This script has been called by db_readdump.php3 + // This script has been called by read_dump.php3 if (isset($sql_query_cpy)) { $query_to_display = $sql_query_cpy; } @@ -416,7 +417,7 @@ if ($num_tables > 0) {
  • -
    diff --git a/db_printview.php3 b/db_printview.php3 index 63285e0b4..c24fe267c 100755 --- a/db_printview.php3 +++ b/db_printview.php3 @@ -5,7 +5,7 @@ /** * Gets the variables sent or posted to this script, then displays headers */ -require('./grab_globals.inc.php3'); +require('./libraries/grab_globals.lib.php3'); require('./header.inc.php3'); diff --git a/db_stats.php3 b/db_stats.php3 index 686398e02..c4068ac51 100644 --- a/db_stats.php3 +++ b/db_stats.php3 @@ -4,7 +4,7 @@ /** * Gets the variables sent to this script and send headers */ -require('./grab_globals.inc.php3'); +require('./libraries/grab_globals.lib.php3'); require('./header.inc.php3'); diff --git a/header.inc.php3 b/header.inc.php3 index ea0438a98..e1dcebba3 100755 --- a/header.inc.php3 +++ b/header.inc.php3 @@ -5,8 +5,8 @@ /** * Gets a core script and starts output buffering work */ -require('./lib.inc.php3'); -require('./ob_lib.inc.php3'); +require('./libraries/common.lib.php3'); +require('./libraries/ob.lib.php3'); if ($cfgOBGzip) { $ob_mode = out_buffer_mode_get(); if ($ob_mode) { @@ -89,7 +89,7 @@ var noDropDbMsg = ''; //--> - + 1) { var isServer = 0) ? 'true' : 'false'; ?>; //--> - +