diff --git a/.cvsignore b/.cvsignore index fea4f8821..9b2b2f7fa 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1,4 +1,4 @@ -config.inc.developer.php +config.inc.php phpmyadmin.wpj upload save diff --git a/ChangeLog b/ChangeLog index 26f1ef4b0..1f5fdd4e2 100755 --- a/ChangeLog +++ b/ChangeLog @@ -1,10 +1,174 @@ ----------------------- +---------------------- phpMyAdmin - Changelog ---------------------- $Id$ $Source$ +2005-09-26 Sebastian Mendel + * libraries/database_interface.lib.php: fixed bug in PMA_DBI_fetch_*() + using PMA_DBI_num_rows() on unbuffered queries + +2005-09-26 Michal Čihař + * libraries/export/sql.php: Fix constraint parsing (bug #1304600). + * libraries/display_import.lib.php, libraries/import/csv.php: Rename + plugin parameters to allow using same parameter by multiple plugins. + * config.default.php, lang/*, libraries/import/ldi.php: Alternate LOAD + DATA import plugin for CSV. + * libraries/display_import.lib.php: Sort list of import plugins. + * mult_submits.inc.php, tbl_properties_structure.php: Support for browsing + selected columns (RFE #1275909). + +2005-09-25 Marc Delisle + * server_privileges.php: support MySQL 5 privileges + +2005-09-25 Michal Čihař + * lang/*: Messages for Sebastian. + * lang/czech: Partial update. + +2005-09-25 Sebastian Mendel + * left.php, queryframe.php, libraries/common.lib.php, + libraries/left_header.inc.php, css/phpmyadmin.css.php: + grouping databases (bug #1281262) + * server_status.php, libraries/common.lib.php, css/phpmyadmin.css.php: + extended server status information with description and warnings, + added PMA_formatNumber() + * server_privilegs.php: fixed bug table not found + * tbl_properties_structure.php, css/phpmyadmin.css.php: + made statistic tables floating, moved styles into css + * css/phpmyadmin.css.php: set font-size in caption to normal + +2005-09-24 Sebastian Mendel + * querywindow.php, css/phpmyadmin.css.php: + resize querywindow to content (bug #1277375) + +2005-09-24 Marc Delisle + * db_details_links.php, server_privileges.php, server_common.inc.php: + bug #1302985, Privileges tab on database + * tbl_change.php: bug #1272290, multiple MAX_FILE_SIZE limits BLOB + insertion + +2005-09-24 Michal Čihař + * lang/add_message_file.sh: Make it deal with regullar php file, do not + mark english text as to translate. + * lang/add_message.sh: Do not mark english text as to translate. + * *import*, Documentation.html, lang/*, main.php, *links*, + css/phpmyadmin.css.php, libraries/unzip.lib.php: New import system, + please test it (patch #1288933, RFEs: 618255, 780754, 1017598, 1097670, + 1274500, 807830). + * libraries/import.lib.php, libraries/import/csv.php, + libraries/import/sql.php, libraries/import/README: Fix possible data + leak when reading large buffer. + +2005-09-23 Michal Čihař + * libraries/auth/cookie.auth.lib.php: Do not pass empty variables as + haystack to strpos (bug #1299422). + * server_privileges.php: Reload left frame if dropping database (bug + #1298678). + * libraries/fpdf/fpdf.php: Fix filename for PDF pages containing space in + name (bug #1300837). + +2005-09-23 Marc Delisle + * libraries/display_export.lib.php, libraries/export/csv.php: + bug #1301374, csv on-screen export broken + +2005-09-20 Michal Čihař + * libraries/database_interface.lib.php: Added some useful functions to DBI + layer (patch #1286451), thanks to Sebastian Mendel. + * Documentation.html, config.default.php, libraries/common.lib.php: Add + support for forcing https access to phpMyAdmin (RFE #1111333). + +2005-09-20 Marc Delisle + * libraries/sqlparser.data.php: patch #1295365, missing function + definitions in parser, thanks to Sebastian Mendel + * db_details_links.php: patch #1196806, Privileges link on db page + +2005-09-18 Marc Delisle + * libraries/display_export.lib.php: bug #1293937 Export compression + default: bzip instead of bzip2, thanks to Rene Leonhardt + +2005-09-15 Michal Čihař + * config.default.php, libraries/common.lib.php: Simplify loading of + defaults, why did I write such crap before? + * libraries/common.lib.php: Fail if pcre support is missing. + +2005-09-14 Marc Delisle + * export.php: bug #1290730, https export under MSIE fails + +2005-09-14 Michal Čihař + * css/phpmyadmin.css.php: Do not wrap tabs (patch #1282247), thanks to + Sebastian Mendel. + * config.default.php: Do not set blowfish_secret here at all, this needs + to be done by user (bug #1290990). + * libraries/auth/cookie.auth.lib.php: Fix undefined variable warnings. + * libraries/common.lib.php, lang/*: Detect wrong authentication method and + warn user using error.php (bug #1290888). + * tbl_properties_operations.php: Update auto_increment value (bug + #1290413). + * read_dump.php, server_links.inc.php, server_sql.php, sql.php, lang/*: + Add SQL tab for server (patch #1291084), (RFE #1048090). + * Documentation.html: We dropped support for PHP 3 some time ago, so let's + drop mentions about it from documentation. + +2005-09-13 Marc Delisle + * scripts/create-release.sh: no longer copy config.inc.php to + config.default.php to keep a backup of the previous version + +2005-09-13 Michal Čihař + * libraries/common.lib.php: Add support for lang/added_messages.php + (mostly as feature for developer, to allow easilly adding messages + while working on some features). + * .cvsignore, Documentation.html, config.default.php, + config.inc.php[removed], libraries/common.lib.php, + libraries/config_import.lib.php[removed]: New configuration handling, + use config.inc.php for configuration, default values are stored in + config.default.php. + * config.default.php: Remove non configuration stuff. + * lang/.cvsignore: Ignore lang/added_messages.php. + +2005-09-12 Marc Delisle + * tbl_relation.php: bug #1287611, no Save button in Relation view + when pmadb is not defined + +2005-09-10 Marc Delisle + ### 2.6.4 released + +2005-09-09 Marc Delisle + * libraries/display_tbl.lib.php: bug #1283813, SHOW STATUS typed in a + query box produces a SHOW CREATE TABLE STATUS under MySQL 5.0.x + * lang/mongolian* update, thanks to Bayarsaikhan Enkhtaivan + +2005-09-07 Michal Čihař + * main.php, libraries/auth/cookie.auth.lib.php: XSS on username (bug + #1283552) + * ChangeLog: Move vim modelines to correctly interpret et after setting + file type (otherwise tabs were not expanded as changelog ft sets noet). + +2005-09-06 Marc Delisle + * lang/serbian: Updated, thanks to Mihailo Stefanovic (mikis). + +2005-09-05 Marc Delisle + * libraries/defines.lib.php, themes/*/info.inc.php: about themes version, + phpMyAdmin 2.6.4 needs generation 2, version 1; + phpMyAdmin 2.6.5 (currently) needs generation 2, version 2 + * header.inc.php: XSS on $title, thanks to Christian Wenz + +2005-09-05 Michal Čihař + * libraries/export/sql.php: Do not treat BLOBs as number (bug #1277309). + +2005-09-04 Marc Delisle + * tbl_properties.inc.php: bug #1281533, collation not kept while + changing table field count + +2005-09-02 Marc Delisle + * lang/turkish update, thanks to boralioglu. + +2005-08-28 Marc Delisle + * lang/belarusian updates, thanks to Jaska Zedlik + ### 2.6.4-rc1 released + * server_privileges, themes/*/css/theme_right.css.php: patch #1251692, + fieldsets for privileges interface, thanks to Sebastian Mendel + 2005-08-26 Marc Delisle * lang/indonesian: update thanks to Rachim Tamsjadi - tamsy * lang/polish: update thanks to Jakub Wilk - ubanus @@ -7002,7 +7166,7 @@ $Source$ --- Older ChangeLogs can be found on our project website --- http://www.phpmyadmin.net/old-stuff/ChangeLogs/ +# vim: et ts=4 sw=4 sts=4 # vim: ft=changelog fenc=utf-8 encoding=utf-8 -# vim: expandtab ts=4 sw=4 sts=4 # vim: fde=getline(v\:lnum-1)=~'^\\s*$'&&getline(v\:lnum)=~'\\S'?'>1'\:1&&v\:lnum>8&&getline(v\:lnum)!~'^#' # vim: fdn=1 fdm=expr diff --git a/Documentation.html b/Documentation.html index 79ba99d69..337d739fd 100755 --- a/Documentation.html +++ b/Documentation.html @@ -163,10 +163,11 @@ running in safe mode, having some scripts with an owner different from the owner of other scripts will be a problem). See FAQ 4.2 for suggestions. -
  • Open the file config.inc.php in your favorite editor and change - the values for host, user, password and authentication mode to fit - your environment. Here, "host" means the MySQL server. - Have a look at +
  • Create the file config.inc.php in your favorite editor and + fill in there values for host, user, password and authentication mode + to fit your environment. Look at config.default.php how + these fields should be defined. Here, "host" means the + MySQL server. Have a look at Configuration section for an explanation of all values. Please also read the remaining of this Installation section for information about authentication modes @@ -218,12 +219,9 @@

    Upgrading from an older version

    • - You can safely copy your older config.inc.php over a new one, if - you can live with default values for possible new parameters (you can - check release notes to see what new features were added). This - compatibility will stay for long time, current version supports - importing config files from 2.2 and maybe even older (nobody has tried - that). + Just copy config.inc.php from previous installation into a + newly unpacked one. Old configuration files will be supported for a + very long time.
    @@ -467,8 +465,7 @@ GRANT SELECT, INSERT, UPDATE, DELETE ON <pma_db>.* TO 'pma'@'localhost';
    $cfg['Servers'][$i]['socket'] string
    - The path to the socket to use. Leave blank for default.
    - To use the socket feature you must run PHP 3.0.10 or more. + The path to the socket to use. Leave blank for default.

    @@ -961,6 +958,12 @@ GRANT SELECT, INSERT, UPDATE, DELETE ON <pma_db>.* TO 'pma'@'localhost';

    +
    $cfg['ForceSSL'] boolean
    +
    + Whether to force using https while accessing phpMyAdmin. +

    +
    +
    $cfg['ExecTimeLimit'] integer [number of seconds]
    Set the number of seconds a script is allowed to run. If seconds is set @@ -1699,6 +1702,14 @@ Defaults to FALSE (drop-down).


    +
    $cfg['Import'] array
    +
    + In this array are defined default parameters for import, names of + items are similar to texts seen on import page, so you can easily + identify what they mean. +

    +
    +
    $cfg['RepeatCells'] integer
    Repeat the headers every X cells, or 0 to deactivate. @@ -2807,7 +2818,7 @@ To create a new, empty mimetype please see libraries/transformations/template_ge headers already sent by ..." is displayed, what's the problem?

    - Edit your config.inc.php or .php file and ensure there is nothing + Edit your config.inc.php file and ensure there is nothing (I.E. no blank lines, no spaces, no characters...) neither before the <?php tag at the beginning, neither after the ?> tag at the end. @@ -2857,10 +2868,9 @@ To create a new, empty mimetype please see libraries/transformations/template_ge (/tmp/mysql.sock, for example).

  • - Then, you need to tell PHP to use this socket.
    Assuming you are - using PHP 3.0.10 or better, you can specify the socket to use when you - open the connection. To do this in phpMyAdmin, you need to complete the - socket information in the config.inc.php.
    + Then, you need to tell PHP to use this socket.
    To do this in + phpMyAdmin, you need to complete the socket information in the + config.inc.php.
    For example: $cfg['Servers'][$i]['socket'] = '/tmp/mysql.sock';

    Please also make sure that the permissions of this file allow to be readable diff --git a/LICENSE b/LICENSE index 207a79cbd..3912109b5 100755 --- a/LICENSE +++ b/LICENSE @@ -1,12 +1,12 @@ - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. - 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. - Preamble + Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public @@ -55,7 +55,8 @@ patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. - GNU GENERAL PUBLIC LICENSE + + GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains @@ -109,6 +110,7 @@ above, provided that you also meet all of these conditions: License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) + These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in @@ -166,6 +168,7 @@ access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. + 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is @@ -222,7 +225,7 @@ impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. - + 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License @@ -252,7 +255,7 @@ make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. - NO WARRANTY + NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN @@ -274,5 +277,64 @@ YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - END OF TERMS AND CONDITIONS + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + , 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General +Public License instead of this License. diff --git a/README b/README index 01cc01ee2..2b04a7f2e 100755 --- a/README +++ b/README @@ -30,7 +30,7 @@ phpMyAdmin - Readme You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Requirements: php 4.1.0 or later diff --git a/config.inc.php b/config.default.php similarity index 97% rename from config.inc.php rename to config.default.php index 37ad9bfeb..7db216fac 100644 --- a/config.inc.php +++ b/config.default.php @@ -9,15 +9,6 @@ */ -/** - * Sets the php error reporting - Please do not change this line! - */ -if (!isset($old_error_reporting)) { - error_reporting(E_ALL); - @ini_set('display_errors', '1'); -} - - /** * Your phpMyAdmin URL. * @@ -197,6 +188,7 @@ unset($cfg['Servers'][0]); */ $cfg['OBGzip'] = 'auto'; // use GZIP output buffering if possible (TRUE|FALSE|'auto') $cfg['PersistentConnections'] = FALSE; // use persistent connections to MySQL database +$cfg['ForceSLL'] = FALSE; // whether to force using https $cfg['ExecTimeLimit'] = 300; // maximum execution time in seconds (0 for no limit) $cfg['SkipLockedTables'] = FALSE; // mark used tables, make possible to show // locked tables (since MySQL 3.23.30) @@ -381,6 +373,29 @@ $cfg['Export']['sql_comments'] = FALSE; $cfg['Export']['sql_mime'] = FALSE; $cfg['Export']['sql_header_comment'] = ''; // \n is replaced by new line +/** + * Import defaults + */ +$cfg['Import']['format'] = 'sql'; +$cfg['Import']['allow_interrupt'] = TRUE; +$cfg['Import']['skip_queries'] = '0'; +$cfg['Import']['csv_replace'] = FALSE; +$cfg['Import']['csv_terminated'] = ';'; +$cfg['Import']['csv_enclosed'] = '"'; +$cfg['Import']['csv_enclosed_optionally'] = FALSE; +$cfg['Import']['csv_escaped'] = '\\'; +$cfg['Import']['csv_new_line'] = 'auto'; +$cfg['Import']['csv_columns'] = ''; +$cfg['Import']['ldi_replace'] = FALSE; +$cfg['Import']['ldi_terminated'] = ';'; +$cfg['Import']['ldi_enclosed'] = '"'; +$cfg['Import']['ldi_enclosed_optionally'] = FALSE; +$cfg['Import']['ldi_escaped'] = '\\'; +$cfg['Import']['ldi_new_line'] = 'auto'; +$cfg['Import']['ldi_columns'] = ''; +$cfg['Import']['ldi_local_option'] = 'auto'; // 'auto' for autodetection, TRUE or FALSE for forcing + + /** * Link to the official MySQL documentation. * Be sure to include no trailing slash on the path. @@ -470,6 +485,7 @@ $cfg['AvailableCharsets'] = array( 'koi8-r', 'big5', 'gb2312', + 'utf-16', 'utf-8', 'utf-7', 'x-user-defined', @@ -852,13 +868,4 @@ $cfg['UnaryOperators'] = array( 'IS NOT NULL' => 1 ); -/** - * Unset magic_quotes_runtime - do not change! - */ -set_magic_quotes_runtime(0); - -/** - * File Revision - do not change either! - */ -$cfg['FileRevision'] = '$Revision$'; ?> diff --git a/css/phpmyadmin.css.php b/css/phpmyadmin.css.php index c5abe54a1..990c16f1e 100644 --- a/css/phpmyadmin.css.php +++ b/css/phpmyadmin.css.php @@ -17,6 +17,81 @@ $ctype = 'css'; require_once('./libraries/header_http.inc.php'); unset( $ctype ); ?> +html { + margin: 0; + padding: 0; +} + +a img { + border: 0; +} + +caption { + font-size: ; +} + +table .value { + text-align: right; + white-space: nowrap; + white-space: pre; + font-family: "Courier New", Courier, monospace; +} + +table .name { + text-align: left; + font-weight: normal; +} + +div#tablestatistics { + border-bottom: 0.1em solid silver; + margin-bottom: 0.5em; + padding-bottom: 0.5em; +} + +div#tablestatistics table { + float: left; + margin-bottom: 0.5em; + margin-right: 0.5em; +} + +div#tablestatistics table caption { + margin-right: 0.5em; +} + +div#pmalogo, +div#leftframelinks, +div#databaseList { + text-align: center; + border-bottom: 0.1em solid silver; + margin-bottom: 0.5em; + padding-bottom: 0.5em; +} + +div#leftframelinks a { + margin: 0.1em; + padding: 0.2em; + border: 0.1em solid ; +} + +div#leftframelinks a:hover { + border-color: gray; + background-color: silver; +} + +div#databaseList form { + display: inline; +} + +body#bodyquerywindow { + margin: 0; + padding: 0; +} + +div#querywindowcontainer { + margin: 0; + padding: 0.5em; + float: left; +} /* Calendar */ table.calendar { width: 100%; } @@ -39,6 +114,14 @@ img.calendar { border: none; } form.clock { text-align: center; } /* end Calendar */ +/* Options, eg. on import page */ +fieldset.options { + background-color: ; +} +fieldset.options legend { + background-color: transparent; +} + .nowrap { white-space: nowrap; } div.nowrap { margin: 0; padding: 0; } @@ -62,6 +145,7 @@ textarea { overflow: auto; } .tab, .tabcaution, .tabactive { margin-right: 0.1em; margin-left: 0.1em; + white-space: nowrap; } /* disbaled tabs */ @@ -124,6 +208,87 @@ span.tab, span.tabcaution { } /* end topmenu */ + + +/* odd table rows 1,3,5,7,... */ +table tbody tr.odd td, +table tbody tr.odd th { + background-color: ; +} + +/* even table rows 2,4,6,8,... */ +table tbody tr.even td, +table tbody tr.even th { + background-color: ; +} + + +.value .attention { + color: red; + font-weight: bold; +} + +.value .allfine { + color: green; +} + + +/* serverstatus */ +div#serverstatus table caption a.top { + float: right; +} + +table.data caption, +table.data th, +table.data td, +div#serverstatus table caption, +div#serverstatus table th, +div#serverstatus table td { + padding: 0.1em 0.5em 0.1em 0.5em; + margin: 0.1em; + vertical-align: top; +} + +div#serverstatus div#serverstatusqueriesdetails table, +div#serverstatus table#serverstatustraffic, +div#serverstatus table#serverstatusconnections { + float: left; +} + +#serverstatussection, +.clearfloat { + clear: both; +} + +div#serverstatus table.statuslist .name { + width: 18em; +} +div#serverstatus table.statuslist .value { + width: 6em; +} + +div#serverstatus table tbody td.descr a, +div#serverstatus table .tblFooters a { + white-space: nowrap; +} +div#serverstatus div#statuslinks a:before, +div#serverstatus div#sectionlinks a:before, +div#serverstatus table tbody td.descr a:before, +div#serverstatus table .tblFooters a:before { + content: '['; +} +div#serverstatus div#statuslinks a:after, +div#serverstatus div#sectionlinks a:after, +div#serverstatus table tbody td.descr a:after, +div#serverstatus table .tblFooters a:after { + content: ']'; +} + +div#serverstatus table.statuslist { + width: 100%; + margin-bottom: 1em; +} +/* end serverstatus */ \ No newline at end of file +?> diff --git a/db_details_links.php b/db_details_links.php index c4fbc22f4..930ee8270 100644 --- a/db_details_links.php +++ b/db_details_links.php @@ -11,6 +11,14 @@ if (empty($sub_part)) { $sub_part = '_structure'; } +/** + * Checks for superuser privileges + */ + // We were checking privileges with 'USE mysql' but users with the global + // priv CREATE TEMPORARY TABLES or LOCK TABLES can do a 'USE mysql' + // (even if they cannot see the tables) + +$is_superuser = PMA_DBI_try_query('SELECT COUNT(*) FROM mysql.user', NULL, PMA_DBI_QUERY_STORE); /** * Prepares links @@ -21,16 +29,23 @@ if ($num_tables > 0) { $tab_search['link'] = 'db_search.php'; $tab_qbe['link'] = 'db_details_qbe.php'; } +$tab_import['link'] = 'db_import.php'; $tab_structure['link'] = 'db_details_structure.php'; $tab_sql['link'] = 'db_details.php'; $tab_sql['args']['db_query_force'] = 1; $tab_operation['link'] = 'db_operations.php'; +if ($is_superuser) { + $tab_privileges['link'] = 'server_privileges.php'; + $tab_privileges['args']['checkprivs'] = $db; + // stay on database view + $tab_privileges['args']['viewing_mode'] = 'db'; +} + // Drop link if allowed if (!$GLOBALS['cfg']['AllowUserDropDatabase']) { // Check if the user is a Superuser - $GLOBALS['cfg']['AllowUserDropDatabase'] = PMA_DBI_select_db('mysql'); - PMA_DBI_select_db($db); + $GLOBALS['cfg']['AllowUserDropDatabase'] = $is_superuser; } // rabus: Don't even try to drop information_schema. You won't be able to. // Believe me. You won't. @@ -51,19 +66,27 @@ if ($GLOBALS['cfg']['AllowUserDropDatabase']) { $tab_structure['text'] = $GLOBALS['strStructure']; $tab_sql['text'] = $GLOBALS['strSQL']; $tab_export['text'] = $GLOBALS['strExport']; +$tab_import['text'] = $GLOBALS['strImport']; $tab_search['text'] = $GLOBALS['strSearch']; $tab_drop['text'] = $GLOBALS['strDrop']; $tab_qbe['text'] = $GLOBALS['strQBE']; $tab_operation['text'] = $GLOBALS['strOperations']; +if ($is_superuser) { + $tab_privileges['text'] = $GLOBALS['strPrivileges']; +} // icons $tab_structure['icon'] = 'b_props.png'; $tab_sql['icon'] = 'b_sql.png'; $tab_export['icon'] = 'b_export.png'; +$tab_import['icon'] = 'b_import.png'; $tab_search['icon'] = 'b_search.png'; $tab_drop['icon'] = 'b_deltbl.png'; $tab_qbe['icon'] = 's_db.png'; $tab_operation['icon'] = 'b_tblops.png'; +if ($is_superuser) { + $tab_privileges['icon'] = 's_rights.png'; +} /** * Displays tab links @@ -74,7 +97,11 @@ $tabs[] =& $tab_sql; $tabs[] =& $tab_search; $tabs[] =& $tab_qbe; $tabs[] =& $tab_export; +$tabs[] =& $tab_import; $tabs[] =& $tab_operation; +if ($is_superuser) { + $tabs[] =& $tab_privileges; +} if ($GLOBALS['cfg']['AllowUserDropDatabase']) { $tabs[] =& $tab_drop; } diff --git a/db_import.php b/db_import.php new file mode 100644 index 000000000..ebfd86566 --- /dev/null +++ b/db_import.php @@ -0,0 +1,20 @@ + + diff --git a/export.php b/export.php index 8e20c4362..3b11c2de2 100644 --- a/export.php +++ b/export.php @@ -317,9 +317,15 @@ if (!$save_on_server) { // IE 5.50.4807.2300 // IE 6.0.2800.1106 (small glitch, asks twice when I click Open) // IE 6.0.2900.2180 - // Firefox 1.0.4 + // Firefox 1.0.6 + // in http and https header('Content-Disposition: attachment; filename="' . $filename . '"'); - header('Pragma: no-cache'); + if (PMA_USR_BROWSER_AGENT == 'IE') { + header('Cache-Control: must-revalidate, post-check=0, pre-check=0'); + header('Pragma: public'); + } else { + header('Pragma: no-cache'); + } } else { // HTML $backup_cfgServer = $cfg['Server']; diff --git a/header.inc.php b/header.inc.php index 7e7c335bf..78846436b 100644 --- a/header.inc.php +++ b/header.inc.php @@ -41,16 +41,16 @@ if (empty($GLOBALS['is_header_sent'])) { */ $title = ''; if ($cfg['ShowHttpHostTitle']) { - $title .= (empty($GLOBALS['cfg']['SetHttpHostTitle']) && isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : $GLOBALS['cfg']['SetHttpHostTitle']) . ' >> '; + $title .= (empty($GLOBALS['cfg']['SetHttpHostTitle']) && isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : $GLOBALS['cfg']['SetHttpHostTitle']) . ' / '; } if (!empty($GLOBALS['cfg']['Server']) && isset($GLOBALS['cfg']['Server']['host'])) { $title.=str_replace('\'', '\\\'', $GLOBALS['cfg']['Server']['host']); } if (isset($GLOBALS['db'])) { - $title .= ' >> ' . str_replace('\'', '\\\'', $GLOBALS['db']); + $title .= ' / ' . str_replace('\'', '\\\'', $GLOBALS['db']); } if (isset($GLOBALS['table'])) { - $title .= (empty($title) ? '' : ' ') . ' >> ' . str_replace('\'', '\\\'', $GLOBALS['table']); + $title .= (empty($title) ? '' : ' ') . ' / ' . str_replace('\'', '\\\'', $GLOBALS['table']); } $title .= ' | phpMyAdmin ' . PMA_VERSION; ?> @@ -59,7 +59,7 @@ if (empty($GLOBALS['is_header_sent'])) { // Updates the title of the frameset if possible (ns4 does not allow this) if (typeof(parent.document) != 'undefined' && typeof(parent.document) != 'unknown' && typeof(parent.document.title) == 'string') { - parent.document.title = ''; + parent.document.title = ''; } document.write('