Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Support for browsing selected columns (RFE #1275909).

  • Loading branch information...
commit 64bd56dfba419951886c092c6d0ba6948d05ce95 1 parent 176c60c
Michal Čihař nijel authored

Showing 176 changed files with 7,182 additions and 556 deletions. Show diff stats Hide diff stats

  1. +1 1  .cvsignore
  2. +166 2 ChangeLog
  3. +27 17 Documentation.html
  4. +70 8 LICENSE
  5. +1 1  README
  6. +25 18 config.inc.php → config.default.php
  7. +166 1 css/phpmyadmin.css.php
  8. +29 2 db_details_links.php
  9. +20 0 db_import.php
  10. +8 2 export.php
  11. +4 4 header.inc.php
  12. +250 0 import.php
  13. +1 0  lang/.cvsignore
  14. +15 7 lang/add_message.sh
  15. +12 4 lang/add_message_file.sh
  16. +151 0 lang/afrikaans-iso-8859-1.inc.php
  17. +151 0 lang/afrikaans-utf-8.inc.php
  18. +151 0 lang/albanian-iso-8859-1.inc.php
  19. +151 0 lang/albanian-utf-8.inc.php
  20. +151 0 lang/arabic-utf-8.inc.php
  21. +151 0 lang/arabic-windows-1256.inc.php
  22. +151 0 lang/azerbaijani-iso-8859-9.inc.php
  23. +151 0 lang/azerbaijani-utf-8.inc.php
  24. +151 0 lang/basque-iso-8859-1.inc.php
  25. +151 0 lang/basque-utf-8.inc.php
  26. +281 130 lang/belarusian_cyrillic-utf-8.inc.php
  27. +281 130 lang/belarusian_cyrillic-windows-1251.inc.php
  28. +302 151 lang/belarusian_latin-utf-8.inc.php
  29. +151 0 lang/bosnian-utf-8.inc.php
  30. +151 0 lang/bosnian-windows-1250.inc.php
  31. +151 0 lang/brazilian_portuguese-iso-8859-1.inc.php
  32. +151 0 lang/brazilian_portuguese-utf-8.inc.php
  33. +151 0 lang/bulgarian-koi8-r.inc.php
  34. +151 0 lang/bulgarian-utf-8.inc.php
  35. +151 0 lang/bulgarian-windows-1251.inc.php
  36. +151 0 lang/catalan-iso-8859-1.inc.php
  37. +151 0 lang/catalan-utf-8.inc.php
  38. +151 0 lang/chinese_simplified-gb2312.inc.php
  39. +151 0 lang/chinese_simplified-utf-8.inc.php
  40. +151 0 lang/chinese_traditional-big5.inc.php
  41. +151 0 lang/chinese_traditional-utf-8.inc.php
  42. +151 0 lang/croatian-iso-8859-2.inc.php
  43. +151 0 lang/croatian-utf-8.inc.php
  44. +151 0 lang/croatian-windows-1250.inc.php
  45. +180 26 lang/czech-iso-8859-2.inc.php
  46. +180 26 lang/czech-utf-8.inc.php
  47. +180 26 lang/czech-windows-1250.inc.php
  48. +151 0 lang/danish-iso-8859-1.inc.php
  49. +151 0 lang/danish-utf-8.inc.php
  50. +151 0 lang/dutch-iso-8859-1.inc.php
  51. +151 0 lang/dutch-iso-8859-15.inc.php
  52. +151 0 lang/dutch-utf-8.inc.php
  53. +151 0 lang/english-iso-8859-1.inc.php
  54. +151 0 lang/english-iso-8859-15.inc.php
Sorry, we could not display the entire diff because it was too big.
2  .cvsignore
... ... @@ -1,4 +1,4 @@
1   -config.inc.developer.php
  1 +config.inc.php
2 2 phpmyadmin.wpj
3 3 upload
4 4 save
168 ChangeLog
... ... @@ -1,10 +1,174 @@
1   -----------------------
  1 +----------------------
2 2 phpMyAdmin - Changelog
3 3 ----------------------
4 4
5 5 $Id$
6 6 $Source$
7 7
  8 +2005-09-26 Sebastian Mendel <cybot_tm@users.sourceforge.net>
  9 + * libraries/database_interface.lib.php: fixed bug in PMA_DBI_fetch_*()
  10 + using PMA_DBI_num_rows() on unbuffered queries
  11 +
  12 +2005-09-26 Michal Čihař <michal@cihar.com>
  13 + * libraries/export/sql.php: Fix constraint parsing (bug #1304600).
  14 + * libraries/display_import.lib.php, libraries/import/csv.php: Rename
  15 + plugin parameters to allow using same parameter by multiple plugins.
  16 + * config.default.php, lang/*, libraries/import/ldi.php: Alternate LOAD
  17 + DATA import plugin for CSV.
  18 + * libraries/display_import.lib.php: Sort list of import plugins.
  19 + * mult_submits.inc.php, tbl_properties_structure.php: Support for browsing
  20 + selected columns (RFE #1275909).
  21 +
  22 +2005-09-25 Marc Delisle <lem9@users.sourceforge.net>
  23 + * server_privileges.php: support MySQL 5 privileges
  24 +
  25 +2005-09-25 Michal Čihař <michal@cihar.com>
  26 + * lang/*: Messages for Sebastian.
  27 + * lang/czech: Partial update.
  28 +
  29 +2005-09-25 Sebastian Mendel <cybot_tm@users.sourceforge.net>
  30 + * left.php, queryframe.php, libraries/common.lib.php,
  31 + libraries/left_header.inc.php, css/phpmyadmin.css.php:
  32 + grouping databases (bug #1281262)
  33 + * server_status.php, libraries/common.lib.php, css/phpmyadmin.css.php:
  34 + extended server status information with description and warnings,
  35 + added PMA_formatNumber()
  36 + * server_privilegs.php: fixed bug table not found
  37 + * tbl_properties_structure.php, css/phpmyadmin.css.php:
  38 + made statistic tables floating, moved styles into css
  39 + * css/phpmyadmin.css.php: set font-size in caption to normal
  40 +
  41 +2005-09-24 Sebastian Mendel <cybot_tm@users.sourceforge.net>
  42 + * querywindow.php, css/phpmyadmin.css.php:
  43 + resize querywindow to content (bug #1277375)
  44 +
  45 +2005-09-24 Marc Delisle <lem9@users.sourceforge.net>
  46 + * db_details_links.php, server_privileges.php, server_common.inc.php:
  47 + bug #1302985, Privileges tab on database
  48 + * tbl_change.php: bug #1272290, multiple MAX_FILE_SIZE limits BLOB
  49 + insertion
  50 +
  51 +2005-09-24 Michal Čihař <michal@cihar.com>
  52 + * lang/add_message_file.sh: Make it deal with regullar php file, do not
  53 + mark english text as to translate.
  54 + * lang/add_message.sh: Do not mark english text as to translate.
  55 + * *import*, Documentation.html, lang/*, main.php, *links*,
  56 + css/phpmyadmin.css.php, libraries/unzip.lib.php: New import system,
  57 + please test it (patch #1288933, RFEs: 618255, 780754, 1017598, 1097670,
  58 + 1274500, 807830).
  59 + * libraries/import.lib.php, libraries/import/csv.php,
  60 + libraries/import/sql.php, libraries/import/README: Fix possible data
  61 + leak when reading large buffer.
  62 +
  63 +2005-09-23 Michal Čihař <michal@cihar.com>
  64 + * libraries/auth/cookie.auth.lib.php: Do not pass empty variables as
  65 + haystack to strpos (bug #1299422).
  66 + * server_privileges.php: Reload left frame if dropping database (bug
  67 + #1298678).
  68 + * libraries/fpdf/fpdf.php: Fix filename for PDF pages containing space in
  69 + name (bug #1300837).
  70 +
  71 +2005-09-23 Marc Delisle <lem9@users.sourceforge.net>
  72 + * libraries/display_export.lib.php, libraries/export/csv.php:
  73 + bug #1301374, csv on-screen export broken
  74 +
  75 +2005-09-20 Michal Čihař <michal@cihar.com>
  76 + * libraries/database_interface.lib.php: Added some useful functions to DBI
  77 + layer (patch #1286451), thanks to Sebastian Mendel.
  78 + * Documentation.html, config.default.php, libraries/common.lib.php: Add
  79 + support for forcing https access to phpMyAdmin (RFE #1111333).
  80 +
  81 +2005-09-20 Marc Delisle <lem9@users.sourceforge.net>
  82 + * libraries/sqlparser.data.php: patch #1295365, missing function
  83 + definitions in parser, thanks to Sebastian Mendel
  84 + * db_details_links.php: patch #1196806, Privileges link on db page
  85 +
  86 +2005-09-18 Marc Delisle <lem9@users.sourceforge.net>
  87 + * libraries/display_export.lib.php: bug #1293937 Export compression
  88 + default: bzip instead of bzip2, thanks to Rene Leonhardt
  89 +
  90 +2005-09-15 Michal Čihař <michal@cihar.com>
  91 + * config.default.php, libraries/common.lib.php: Simplify loading of
  92 + defaults, why did I write such crap before?
  93 + * libraries/common.lib.php: Fail if pcre support is missing.
  94 +
  95 +2005-09-14 Marc Delisle <lem9@users.sourceforge.net>
  96 + * export.php: bug #1290730, https export under MSIE fails
  97 +
  98 +2005-09-14 Michal Čihař <michal@cihar.com>
  99 + * css/phpmyadmin.css.php: Do not wrap tabs (patch #1282247), thanks to
  100 + Sebastian Mendel.
  101 + * config.default.php: Do not set blowfish_secret here at all, this needs
  102 + to be done by user (bug #1290990).
  103 + * libraries/auth/cookie.auth.lib.php: Fix undefined variable warnings.
  104 + * libraries/common.lib.php, lang/*: Detect wrong authentication method and
  105 + warn user using error.php (bug #1290888).
  106 + * tbl_properties_operations.php: Update auto_increment value (bug
  107 + #1290413).
  108 + * read_dump.php, server_links.inc.php, server_sql.php, sql.php, lang/*:
  109 + Add SQL tab for server (patch #1291084), (RFE #1048090).
  110 + * Documentation.html: We dropped support for PHP 3 some time ago, so let's
  111 + drop mentions about it from documentation.
  112 +
  113 +2005-09-13 Marc Delisle <lem9@users.sourceforge.net>
  114 + * scripts/create-release.sh: no longer copy config.inc.php to
  115 + config.default.php to keep a backup of the previous version
  116 +
  117 +2005-09-13 Michal Čihař <michal@cihar.com>
  118 + * libraries/common.lib.php: Add support for lang/added_messages.php
  119 + (mostly as feature for developer, to allow easilly adding messages
  120 + while working on some features).
  121 + * .cvsignore, Documentation.html, config.default.php,
  122 + config.inc.php[removed], libraries/common.lib.php,
  123 + libraries/config_import.lib.php[removed]: New configuration handling,
  124 + use config.inc.php for configuration, default values are stored in
  125 + config.default.php.
  126 + * config.default.php: Remove non configuration stuff.
  127 + * lang/.cvsignore: Ignore lang/added_messages.php.
  128 +
  129 +2005-09-12 Marc Delisle <lem9@users.sourceforge.net>
  130 + * tbl_relation.php: bug #1287611, no Save button in Relation view
  131 + when pmadb is not defined
  132 +
  133 +2005-09-10 Marc Delisle <lem9@users.sourceforge.net>
  134 + ### 2.6.4 released
  135 +
  136 +2005-09-09 Marc Delisle <lem9@users.sourceforge.net>
  137 + * libraries/display_tbl.lib.php: bug #1283813, SHOW STATUS typed in a
  138 + query box produces a SHOW CREATE TABLE STATUS under MySQL 5.0.x
  139 + * lang/mongolian* update, thanks to Bayarsaikhan Enkhtaivan
  140 +
  141 +2005-09-07 Michal Čihař <michal@cihar.com>
  142 + * main.php, libraries/auth/cookie.auth.lib.php: XSS on username (bug
  143 + #1283552)
  144 + * ChangeLog: Move vim modelines to correctly interpret et after setting
  145 + file type (otherwise tabs were not expanded as changelog ft sets noet).
  146 +
  147 +2005-09-06 Marc Delisle <lem9@users.sourceforge.net>
  148 + * lang/serbian: Updated, thanks to Mihailo Stefanovic (mikis).
  149 +
  150 +2005-09-05 Marc Delisle <lem9@users.sourceforge.net>
  151 + * libraries/defines.lib.php, themes/*/info.inc.php: about themes version,
  152 + phpMyAdmin 2.6.4 needs generation 2, version 1;
  153 + phpMyAdmin 2.6.5 (currently) needs generation 2, version 2
  154 + * header.inc.php: XSS on $title, thanks to Christian Wenz
  155 +
  156 +2005-09-05 Michal Čihař <michal@cihar.com>
  157 + * libraries/export/sql.php: Do not treat BLOBs as number (bug #1277309).
  158 +
  159 +2005-09-04 Marc Delisle <lem9@users.sourceforge.net>
  160 + * tbl_properties.inc.php: bug #1281533, collation not kept while
  161 + changing table field count
  162 +
  163 +2005-09-02 Marc Delisle <lem9@users.sourceforge.net>
  164 + * lang/turkish update, thanks to boralioglu.
  165 +
  166 +2005-08-28 Marc Delisle <lem9@users.sourceforge.net>
  167 + * lang/belarusian updates, thanks to Jaska Zedlik
  168 + ### 2.6.4-rc1 released
  169 + * server_privileges, themes/*/css/theme_right.css.php: patch #1251692,
  170 + fieldsets for privileges interface, thanks to Sebastian Mendel
  171 +
8 172 2005-08-26 Marc Delisle <lem9@users.sourceforge.net>
9 173 * lang/indonesian: update thanks to Rachim Tamsjadi - tamsy
10 174 * lang/polish: update thanks to Jakub Wilk - ubanus
@@ -7002,7 +7166,7 @@ $Source$
7002 7166 --- Older ChangeLogs can be found on our project website ---
7003 7167 http://www.phpmyadmin.net/old-stuff/ChangeLogs/
7004 7168
  7169 +# vim: et ts=4 sw=4 sts=4
7005 7170 # vim: ft=changelog fenc=utf-8 encoding=utf-8
7006   -# vim: expandtab ts=4 sw=4 sts=4
7007 7171 # vim: fde=getline(v\:lnum-1)=~'^\\s*$'&&getline(v\:lnum)=~'\\S'?'>1'\:1&&v\:lnum>8&&getline(v\:lnum)!~'^#'
7008 7172 # vim: fdn=1 fdm=expr
44 Documentation.html
@@ -163,10 +163,11 @@
163 163 running in safe mode, having some scripts with an owner different
164 164 from the owner of other scripts will be a
165 165 problem). See <a href="#faq4_2">FAQ 4.2</a> for suggestions.</li>
166   - <li> Open the file <tt>config.inc.php</tt> in your favorite editor and change
167   - the values for host, user, password and authentication mode to fit
168   - your environment. Here, &quot;host&quot; means the MySQL server.
169   - Have a look at
  166 + <li> Create the file <tt>config.inc.php</tt> in your favorite editor and
  167 + fill in there values for host, user, password and authentication mode
  168 + to fit your environment. Look at <tt>config.default.php</tt> how
  169 + these fields should be defined. Here, &quot;host&quot; means the
  170 + MySQL server. Have a look at
170 171 <a href="#config">Configuration section</a> for an
171 172 explanation of all values. Please also read the remaining of this
172 173 Installation section for information about authentication modes
@@ -218,12 +219,9 @@
218 219 <h3>Upgrading from an older version</h3>
219 220 <ul>
220 221 <li>
221   - You can safely copy your older <i>config.inc.php</i> over a new one, if
222   - you can live with default values for possible new parameters (you can
223   - check release notes to see what new features were added). This
224   - compatibility will stay for long time, current version supports
225   - importing config files from 2.2 and maybe even older (nobody has tried
226   - that).
  222 + Just copy <i>config.inc.php</i> from previous installation into a
  223 + newly unpacked one. Old configuration files will be supported for a
  224 + very long time.
227 225 </li>
228 226 </ul>
229 227
@@ -467,8 +465,7 @@
467 465
468 466 <dt><b>$cfg['Servers'][$i]['socket']</b> string</dt>
469 467 <dd>
470   - The path to the socket to use. Leave blank for default.<br />
471   - To use the socket feature you must run PHP 3.0.10 or more.
  468 + The path to the socket to use. Leave blank for default.
472 469 <br /><br />
473 470 </dd>
474 471
@@ -961,6 +958,12 @@
961 958 <br /><br />
962 959 </dd>
963 960
  961 + <dt><b>$cfg['ForceSSL'] </b>boolean</dt>
  962 + <dd>
  963 + Whether to force using https while accessing phpMyAdmin.
  964 + <br /><br />
  965 + </dd>
  966 +
964 967 <dt><b>$cfg['ExecTimeLimit'] </b>integer [number of seconds]</dt>
965 968 <dd>
966 969 Set the number of seconds a script is allowed to run. If seconds is set
@@ -1699,6 +1702,14 @@
1699 1702 <br /><br />
1700 1703 </dd>
1701 1704
  1705 + <dt><b>$cfg['Import'] </b>array</dt>
  1706 + <dd>
  1707 + In this array are defined default parameters for import, names of
  1708 + items are similar to texts seen on import page, so you can easily
  1709 + identify what they mean.
  1710 + <br /><br />
  1711 + </dd>
  1712 +
1702 1713 <dt><b>$cfg['RepeatCells'] </b>integer</dt>
1703 1714 <dd>
1704 1715 Repeat the headers every X cells, or 0 to deactivate.
@@ -2807,7 +2818,7 @@
2807 2818 headers already sent by ...&quot; is displayed, what's the problem?
2808 2819 </h4>
2809 2820 <p>
2810   - Edit your <i>config.inc.php or .php</i> file and ensure there is nothing
  2821 + Edit your <i>config.inc.php</i> file and ensure there is nothing
2811 2822 (I.E. no blank lines, no spaces, no characters...) neither before the
2812 2823 <tt>&lt;?php</tt> tag at the beginning, neither after the <tt>?&gt;</tt>
2813 2824 tag at the end.
@@ -2857,10 +2868,9 @@
2857 2868 (<i>/tmp/mysql.sock</i>, for example).
2858 2869 </li>
2859 2870 <li>
2860   - Then, you need to tell PHP to use this socket.<br />Assuming you are
2861   - using PHP 3.0.10 or better, you can specify the socket to use when you
2862   - open the connection. To do this in phpMyAdmin, you need to complete the
2863   - socket information in the <i>config.inc.php</i>.<br />
  2871 + Then, you need to tell PHP to use this socket.<br /> To do this in
  2872 + phpMyAdmin, you need to complete the socket information in the
  2873 + <i>config.inc.php</i>.<br />
2864 2874 For example:
2865 2875 <tt>$cfg['Servers'][$i]['socket']&nbsp;=&nbsp;'/tmp/mysql.sock';</tt><br /><br />
2866 2876 Please also make sure that the permissions of this file allow to be readable
78 LICENSE
... ... @@ -1,12 +1,12 @@
1   - GNU GENERAL PUBLIC LICENSE
2   - Version 2, June 1991
  1 + GNU GENERAL PUBLIC LICENSE
  2 + Version 2, June 1991
3 3
4 4 Copyright (C) 1989, 1991 Free Software Foundation, Inc.
5   - 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  5 + 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
6 6 Everyone is permitted to copy and distribute verbatim copies
7 7 of this license document, but changing it is not allowed.
8 8
9   - Preamble
  9 + Preamble
10 10
11 11 The licenses for most software are designed to take away your
12 12 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.
55 55
56 56 The precise terms and conditions for copying, distribution and
57 57 modification follow.
58   - GNU GENERAL PUBLIC LICENSE
  58 +
  59 + GNU GENERAL PUBLIC LICENSE
59 60 TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
60 61
61 62 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:
109 110 License. (Exception: if the Program itself is interactive but
110 111 does not normally print such an announcement, your work based on
111 112 the Program is not required to print an announcement.)
  113 +
112 114 These requirements apply to the modified work as a whole. If
113 115 identifiable sections of that work are not derived from the Program,
114 116 and can be reasonably considered independent and separate works in
@@ -166,6 +168,7 @@ access to copy from a designated place, then offering equivalent
166 168 access to copy the source code from the same place counts as
167 169 distribution of the source code, even though third parties are not
168 170 compelled to copy the source along with the object code.
  171 +
169 172 4. You may not copy, modify, sublicense, or distribute the Program
170 173 except as expressly provided under this License. Any attempt
171 174 otherwise to copy, modify, sublicense or distribute the Program is
@@ -222,7 +225,7 @@ impose that choice.
222 225
223 226 This section is intended to make thoroughly clear what is believed to
224 227 be a consequence of the rest of this License.
225   -
  228 +
226 229 8. If the distribution and/or use of the Program is restricted in
227 230 certain countries either by patents or by copyrighted interfaces, the
228 231 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
252 255 of preserving the free status of all derivatives of our free software and
253 256 of promoting the sharing and reuse of software generally.
254 257
255   - NO WARRANTY
  258 + NO WARRANTY
256 259
257 260 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
258 261 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
274 277 PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
275 278 POSSIBILITY OF SUCH DAMAGES.
276 279
277   - END OF TERMS AND CONDITIONS
  280 + END OF TERMS AND CONDITIONS
  281 +
  282 + How to Apply These Terms to Your New Programs
  283 +
  284 + If you develop a new program, and you want it to be of the greatest
  285 +possible use to the public, the best way to achieve this is to make it
  286 +free software which everyone can redistribute and change under these terms.
  287 +
  288 + To do so, attach the following notices to the program. It is safest
  289 +to attach them to the start of each source file to most effectively
  290 +convey the exclusion of warranty; and each file should have at least
  291 +the "copyright" line and a pointer to where the full notice is found.
  292 +
  293 + <one line to give the program's name and a brief idea of what it does.>
  294 + Copyright (C) <year> <name of author>
  295 +
  296 + This program is free software; you can redistribute it and/or modify
  297 + it under the terms of the GNU General Public License as published by
  298 + the Free Software Foundation; either version 2 of the License, or
  299 + (at your option) any later version.
  300 +
  301 + This program is distributed in the hope that it will be useful,
  302 + but WITHOUT ANY WARRANTY; without even the implied warranty of
  303 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  304 + GNU General Public License for more details.
  305 +
  306 + You should have received a copy of the GNU General Public License
  307 + along with this program; if not, write to the Free Software
  308 + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
  309 +
  310 +
  311 +Also add information on how to contact you by electronic and paper mail.
  312 +
  313 +If the program is interactive, make it output a short notice like this
  314 +when it starts in an interactive mode:
  315 +
  316 + Gnomovision version 69, Copyright (C) year name of author
  317 + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
  318 + This is free software, and you are welcome to redistribute it
  319 + under certain conditions; type `show c' for details.
  320 +
  321 +The hypothetical commands `show w' and `show c' should show the appropriate
  322 +parts of the General Public License. Of course, the commands you use may
  323 +be called something other than `show w' and `show c'; they could even be
  324 +mouse-clicks or menu items--whatever suits your program.
  325 +
  326 +You should also get your employer (if you work as a programmer) or your
  327 +school, if any, to sign a "copyright disclaimer" for the program, if
  328 +necessary. Here is a sample; alter the names:
  329 +
  330 + Yoyodyne, Inc., hereby disclaims all copyright interest in the program
  331 + `Gnomovision' (which makes passes at compilers) written by James Hacker.
  332 +
  333 + <signature of Ty Coon>, 1 April 1989
  334 + Ty Coon, President of Vice
278 335
  336 +This General Public License does not permit incorporating your program into
  337 +proprietary programs. If your program is a subroutine library, you may
  338 +consider it more useful to permit linking proprietary applications with the
  339 +library. If this is what you want to do, use the GNU Library General
  340 +Public License instead of this License.
2  README
@@ -30,7 +30,7 @@ phpMyAdmin - Readme
30 30
31 31 You should have received a copy of the GNU General Public License
32 32 along with this program; if not, write to the Free Software
33   - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  33 + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
34 34
35 35 Requirements:
36 36 php 4.1.0 or later
43 config.inc.php → config.default.php
@@ -10,15 +10,6 @@
10 10
11 11
12 12 /**
13   - * Sets the php error reporting - Please do not change this line!
14   - */
15   -if (!isset($old_error_reporting)) {
16   - error_reporting(E_ALL);
17   - @ini_set('display_errors', '1');
18   -}
19   -
20   -
21   -/**
22 13 * Your phpMyAdmin URL.
23 14 *
24 15 * Complete the variable below with the full url ie
@@ -197,6 +188,7 @@
197 188 */
198 189 $cfg['OBGzip'] = 'auto'; // use GZIP output buffering if possible (TRUE|FALSE|'auto')
199 190 $cfg['PersistentConnections'] = FALSE; // use persistent connections to MySQL database
  191 +$cfg['ForceSLL'] = FALSE; // whether to force using https
200 192 $cfg['ExecTimeLimit'] = 300; // maximum execution time in seconds (0 for no limit)
201 193 $cfg['SkipLockedTables'] = FALSE; // mark used tables, make possible to show
202 194 // locked tables (since MySQL 3.23.30)
@@ -382,6 +374,29 @@
382 374 $cfg['Export']['sql_header_comment'] = ''; // \n is replaced by new line
383 375
384 376 /**
  377 + * Import defaults
  378 + */
  379 +$cfg['Import']['format'] = 'sql';
  380 +$cfg['Import']['allow_interrupt'] = TRUE;
  381 +$cfg['Import']['skip_queries'] = '0';
  382 +$cfg['Import']['csv_replace'] = FALSE;
  383 +$cfg['Import']['csv_terminated'] = ';';
  384 +$cfg['Import']['csv_enclosed'] = '"';
  385 +$cfg['Import']['csv_enclosed_optionally'] = FALSE;
  386 +$cfg['Import']['csv_escaped'] = '\\';
  387 +$cfg['Import']['csv_new_line'] = 'auto';
  388 +$cfg['Import']['csv_columns'] = '';
  389 +$cfg['Import']['ldi_replace'] = FALSE;
  390 +$cfg['Import']['ldi_terminated'] = ';';
  391 +$cfg['Import']['ldi_enclosed'] = '"';
  392 +$cfg['Import']['ldi_enclosed_optionally'] = FALSE;
  393 +$cfg['Import']['ldi_escaped'] = '\\';
  394 +$cfg['Import']['ldi_new_line'] = 'auto';
  395 +$cfg['Import']['ldi_columns'] = '';
  396 +$cfg['Import']['ldi_local_option'] = 'auto'; // 'auto' for autodetection, TRUE or FALSE for forcing
  397 +
  398 +
  399 +/**
385 400 * Link to the official MySQL documentation.
386 401 * Be sure to include no trailing slash on the path.
387 402 * See http://dev.mysql.com/doc/ for more information
@@ -470,6 +485,7 @@
470 485 'koi8-r',
471 486 'big5',
472 487 'gb2312',
  488 + 'utf-16',
473 489 'utf-8',
474 490 'utf-7',
475 491 'x-user-defined',
@@ -852,13 +868,4 @@
852 868 'IS NOT NULL' => 1
853 869 );
854 870
855   -/**
856   - * Unset magic_quotes_runtime - do not change!
857   - */
858   -set_magic_quotes_runtime(0);
859   -
860   -/**
861   - * File Revision - do not change either!
862   - */
863   -$cfg['FileRevision'] = '$Revision$';
864 871 ?>
167 css/phpmyadmin.css.php
@@ -17,6 +17,81 @@
17 17 require_once('./libraries/header_http.inc.php');
18 18 unset( $ctype );
19 19 ?>
  20 +html {
  21 + margin: 0;
  22 + padding: 0;
  23 +}
  24 +
  25 +a img {
  26 + border: 0;
  27 +}
  28 +
  29 +caption {
  30 + font-size: <?php echo $font_size; ?>;
  31 +}
  32 +
  33 +table .value {
  34 + text-align: right;
  35 + white-space: nowrap;
  36 + white-space: pre;
  37 + font-family: "Courier New", Courier, monospace;
  38 +}
  39 +
  40 +table .name {
  41 + text-align: left;
  42 + font-weight: normal;
  43 +}
  44 +
  45 +div#tablestatistics {
  46 + border-bottom: 0.1em solid silver;
  47 + margin-bottom: 0.5em;
  48 + padding-bottom: 0.5em;
  49 +}
  50 +
  51 +div#tablestatistics table {
  52 + float: left;
  53 + margin-bottom: 0.5em;
  54 + margin-right: 0.5em;
  55 +}
  56 +
  57 +div#tablestatistics table caption {
  58 + margin-right: 0.5em;
  59 +}
  60 +
  61 +div#pmalogo,
  62 +div#leftframelinks,
  63 +div#databaseList {
  64 + text-align: center;
  65 + border-bottom: 0.1em solid silver;
  66 + margin-bottom: 0.5em;
  67 + padding-bottom: 0.5em;
  68 +}
  69 +
  70 +div#leftframelinks a {
  71 + margin: 0.1em;
  72 + padding: 0.2em;
  73 + border: 0.1em solid <?php echo $cfg['BgcolorTwo']; ?>;
  74 +}
  75 +
  76 +div#leftframelinks a:hover {
  77 + border-color: gray;
  78 + background-color: silver;
  79 +}
  80 +
  81 +div#databaseList form {
  82 + display: inline;
  83 +}
  84 +
  85 +body#bodyquerywindow {
  86 + margin: 0;
  87 + padding: 0;
  88 +}
  89 +
  90 +div#querywindowcontainer {
  91 + margin: 0;
  92 + padding: 0.5em;
  93 + float: left;
  94 +}
20 95
21 96 /* Calendar */
22 97 table.calendar { width: 100%; }
@@ -39,6 +114,14 @@
39 114 form.clock { text-align: center; }
40 115 /* end Calendar */
41 116
  117 +/* Options, eg. on import page */
  118 +fieldset.options {
  119 + background-color: <?php echo $cfg['BgcolorOne']; ?>;
  120 +}
  121 +fieldset.options legend {
  122 + background-color: transparent;
  123 +}
  124 +
42 125 .nowrap { white-space: nowrap; }
43 126 div.nowrap { margin: 0; padding: 0; }
44 127
@@ -62,6 +145,7 @@
62 145 .tab, .tabcaution, .tabactive {
63 146 margin-right: 0.1em;
64 147 margin-left: 0.1em;
  148 + white-space: nowrap;
65 149 }
66 150
67 151 /* disbaled tabs */
@@ -124,6 +208,87 @@
124 208 }
125 209 <?php } ?>
126 210 /* end topmenu */
  211 +
  212 +
  213 +/* odd table rows 1,3,5,7,... */
  214 +table tbody tr.odd td,
  215 +table tbody tr.odd th {
  216 + background-color: <?php echo $cfg['BgcolorOne']; ?>;
  217 +}
  218 +
  219 +/* even table rows 2,4,6,8,... */
  220 +table tbody tr.even td,
  221 +table tbody tr.even th {
  222 + background-color: <?php echo $cfg['BgcolorTwo']; ?>;
  223 +}
  224 +
  225 +
  226 +.value .attention {
  227 + color: red;
  228 + font-weight: bold;
  229 +}
  230 +
  231 +.value .allfine {
  232 + color: green;
  233 +}
  234 +
  235 +
  236 +/* serverstatus */
  237 +div#serverstatus table caption a.top {
  238 + float: right;
  239 +}
  240 +
  241 +table.data caption,
  242 +table.data th,
  243 +table.data td,
  244 +div#serverstatus table caption,
  245 +div#serverstatus table th,
  246 +div#serverstatus table td {
  247 + padding: 0.1em 0.5em 0.1em 0.5em;
  248 + margin: 0.1em;
  249 + vertical-align: top;
  250 +}
  251 +
  252 +div#serverstatus div#serverstatusqueriesdetails table,
  253 +div#serverstatus table#serverstatustraffic,
  254 +div#serverstatus table#serverstatusconnections {
  255 + float: left;
  256 +}
  257 +
  258 +#serverstatussection,
  259 +.clearfloat {
  260 + clear: both;
  261 +}
  262 +
  263 +div#serverstatus table.statuslist .name {
  264 + width: 18em;
  265 +}
  266 +div#serverstatus table.statuslist .value {
  267 + width: 6em;
  268 +}
  269 +
  270 +div#serverstatus table tbody td.descr a,
  271 +div#serverstatus table .tblFooters a {
  272 + white-space: nowrap;
  273 +}
  274 +div#serverstatus div#statuslinks a:before,
  275 +div#serverstatus div#sectionlinks a:before,
  276 +div#serverstatus table tbody td.descr a:before,
  277 +div#serverstatus table .tblFooters a:before {
  278 + content: '[';
  279 +}
  280 +div#serverstatus div#statuslinks a:after,
  281 +div#serverstatus div#sectionlinks a:after,
  282 +div#serverstatus table tbody td.descr a:after,
  283 +div#serverstatus table .tblFooters a:after {
  284 + content: ']';
  285 +}
  286 +
  287 +div#serverstatus table.statuslist {
  288 + width: 100%;
  289 + margin-bottom: 1em;
  290 +}
  291 +/* end serverstatus */
127 292 <?php
128 293
129 294 $_valid_css = array( 'left', 'right', 'print' );
@@ -146,4 +311,4 @@
146 311 include( $_css_file );
147 312 }
148 313 unset( $_css_file );
149   -?>
  314 +?>
31 db_details_links.php
@@ -11,6 +11,14 @@
@@ -21,16 +29,23 @@
@@ -51,19 +66,27 @@
@@ -74,7 +97,11 @@
20 db_import.php
... ... @@ -0,0 +1,20 @@
  1 +<?php
  2 +/* $Id$ */
  3 +// vim: expandtab sw=4 ts=4 sts=4:
  4 +
  5 +
  6 +/**
  7 + * Gets tables informations and displays top links
  8 + */
  9 +require('./db_details_common.php');
  10 +require('./db_details_db_info.php');
  11 +
  12 +$import_type = 'database';
  13 +require('./libraries/display_import.lib.php');
  14 +
  15 +/**
  16 + * Displays the footer
  17 + */
  18 +require('./footer.inc.php');
  19 +?>
  20 +
10 export.php
@@ -317,9 +317,15 @@ function PMA_exportOutputHandler($line)
317 317 // IE 5.50.4807.2300
318 318 // IE 6.0.2800.1106 (small glitch, asks twice when I click Open)
319 319 // IE 6.0.2900.2180
320   - // Firefox 1.0.4
  320 + // Firefox 1.0.6
  321 + // in http and https
321 322 header('Content-Disposition: attachment; filename="' . $filename . '"');
322   - header('Pragma: no-cache');
  323 + if (PMA_USR_BROWSER_AGENT == 'IE') {
  324 + header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
  325 + header('Pragma: public');
  326 + } else {
  327 + header('Pragma: no-cache');
  328 + }
323 329 } else {
324 330 // HTML
325 331 $backup_cfgServer = $cfg['Server'];
8 header.inc.php
@@ -41,16 +41,16 @@
41 41 */
42 42 $title = '';
43 43 if ($cfg['ShowHttpHostTitle']) {
44   - $title .= (empty($GLOBALS['cfg']['SetHttpHostTitle']) && isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : $GLOBALS['cfg']['SetHttpHostTitle']) . ' >> ';
  44 + $title .= (empty($GLOBALS['cfg']['SetHttpHostTitle']) && isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : $GLOBALS['cfg']['SetHttpHostTitle']) . ' / ';
45 45 }
46 46 if (!empty($GLOBALS['cfg']['Server']) && isset($GLOBALS['cfg']['Server']['host'])) {
47 47 $title.=str_replace('\'', '\\\'', $GLOBALS['cfg']['Server']['host']);
48 48 }
49 49 if (isset($GLOBALS['db'])) {
50   - $title .= ' >> ' . str_replace('\'', '\\\'', $GLOBALS['db']);
  50 + $title .= ' / ' . str_replace('\'', '\\\'', $GLOBALS['db']);
51 51 }
52 52 if (isset($GLOBALS['table'])) {
53   - $title .= (empty($title) ? '' : ' ') . ' >> ' . str_replace('\'', '\\\'', $GLOBALS['table']);
  53 + $title .= (empty($title) ? '' : ' ') . ' / ' . str_replace('\'', '\\\'', $GLOBALS['table']);
54 54 }
55 55 $title .= ' | phpMyAdmin ' . PMA_VERSION;
56 56 ?>
@@ -59,7 +59,7 @@
59 59 // Updates the title of the frameset if possible (ns4 does not allow this)
60 60 if (typeof(parent.document) != 'undefined' && typeof(parent.document) != 'unknown'
61 61 && typeof(parent.document.title) == 'string') {
62   - parent.document.title = '<?php echo $title; ?>';
  62 + parent.document.title = '<?php echo PMA_sanitize($title); ?>';
63 63 }
64 64
65 65 document.write('<style type="text/css">');
250 import.php
... ... @@ -0,0 +1,250 @@
  1 +<?php
  2 +/* $Id$ */
  3 +// vim: expandtab sw=4 ts=4 sts=4:
  4 +
  5 +/* Core script for import, this is just the glue around all other stuff */
  6 +
  7 +/**
  8 + * Get the variables sent or posted to this script and a core script
  9 + */
  10 +require_once('./libraries/grab_globals.lib.php');
  11 +$js_to_run = 'functions.js';
  12 +require_once('./libraries/common.lib.php');
  13 +
  14 +PMA_checkParameters(array('import_type', 'what'));
  15 +
  16 +// Import functions
  17 +require_once('./libraries/import.lib.php');
  18 +
  19 +if ($import_type == 'table') {
  20 + $err_url = 'tbl_import.php?' . PMA_generate_common_url($db, $table);
  21 +} elseif ($import_type == 'database') {
  22 + $err_url = 'db_import.php?' . PMA_generate_common_url($db);
  23 +} else {
  24 + $err_url = 'server_import.php?' . PMA_generate_common_url();
  25 +}
  26 +
  27 +
  28 +if ($import_type != 'server') {
  29 + PMA_DBI_select_db($db);
  30 +}
  31 +
  32 +@set_time_limit($cfg['ExecTimeLimit']);
  33 +$timestamp = time();
  34 +if (isset($allow_interrupt)) {
  35 + $maximum_time = ini_get('max_execution_time');
  36 +} else {
  37 + $maximum_time = 0;
  38 +}
  39 +
  40 +// set default values
  41 +$timeout_passed = FALSE;
  42 +$error = FALSE;
  43 +$read_multiply = 1;
  44 +$finished = FALSE;
  45 +$offset = 0;
  46 +$max_sql_len = 0;
  47 +$file_to_unlink = '';
  48 +$sql_query = '';
  49 +$sql_query_disabled = FALSE;
  50 +$go_sql = FALSE;
  51 +$reload = FALSE;
  52 +$executed_queries = 0;
  53 +
  54 +// We can not read all at once, otherwise we can run out of memory
  55 +$memory_limit = trim(@ini_get('memory_limit'));
  56 +// 2 MB as default
  57 +if (empty($memory_limit)) $memory_limit = 2 * 1024 * 1024;
  58 +
  59 +// Calculate value of the limit
  60 +if (strtolower(substr($memory_limit, -1)) == 'm') $memory_limit = (int)substr($memory_limit, 0, -1) * 1024 * 1024;
  61 +elseif (strtolower(substr($memory_limit, -1)) == 'k') $memory_limit = (int)substr($memory_limit, 0, -1) * 1024;
  62 +elseif (strtolower(substr($memory_limit, -1)) == 'g') $memory_limit = (int)substr($memory_limit, 0, -1) * 1024 * 1024 * 1024;
  63 +else $memory_limit = (int)$memory_limit;
  64 +
  65 +$read_limit = $memory_limit / 4; // Just to be sure, there might be lot of memory needed for uncompression
  66 +
  67 +// handle filenames
  68 +if (!empty($local_import_file) && !empty($cfg['UploadDir'])) {
  69 +
  70 + // sanitize $local_import_file as it comes from a POST
  71 + $local_import_file = PMA_securePath($local_import_file);
  72 +
  73 + if (substr($cfg['UploadDir'], -1) != '/') {
  74 + $cfg['UploadDir'] .= '/';
  75 + }
  76 +
  77 + $import_file = $cfg['UploadDir'] . $local_import_file;
  78 +} else if (empty($import_file) || !is_uploaded_file($import_file)) {
  79 + $import_file = 'none';
  80 +}
  81 +
  82 +// work around open_basedir and other limitations
  83 +if ($import_file != 'none') {
  84 + $open_basedir = @ini_get('open_basedir');
  85 +
  86 + // If we are on a server with open_basedir, we must move the file
  87 + // before opening it. The doc explains how to create the "./tmp"
  88 + // directory
  89 +
  90 + if (!empty($open_basedir)) {
  91 +
  92 + $tmp_subdir = (PMA_IS_WINDOWS ? '.\\tmp\\' : './tmp/');
  93 +
  94 + // function is_writeable() is valid on PHP3 and 4
  95 + if (is_writeable($tmp_subdir)) {
  96 + $import_file_new = $tmp_subdir . basename($import_file);
  97 + if (move_uploaded_file($import_file, $import_file_new)) {
  98 + $import_file = $import_file_new;
  99 + $file_to_unlink = $import_file_new;
  100 + }
  101 + }
  102 + }
  103 +
  104 + $compression = PMA_detectCompression($import_file);
  105 + if ($compression === FALSE) {
  106 + $message = $strFileCouldNotBeRead;
  107 + $show_error_header = TRUE;
  108 + $error = TRUE;
  109 + }
  110 +
  111 + switch ($compression) {
  112 + case 'application/bzip2':
  113 + if ($cfg['BZipDump'] && @function_exists('bzopen')) {
  114 + $import_handle = @bzopen($import_file, 'r');
  115 + } else {
  116 + $message = sprintf($strUnsupportedCompressionDetected, $compression);
  117 + $show_error_header = TRUE;
  118 + $error = TRUE;
  119 + }
  120 + break;
  121 + case 'application/gzip':
  122 + if ($cfg['GZipDump'] && @function_exists('gzopen')) {
  123 + $import_handle = @gzopen($import_file, 'r');
  124 + } else {
  125 + $message = sprintf($strUnsupportedCompressionDetected, $compression);
  126 + $show_error_header = TRUE;
  127 + $error = TRUE;
  128 + }
  129 + break;
  130 + case 'application/zip':
  131 + if ($cfg['GZipDump'] && @function_exists('gzinflate')) {
  132 + include_once('./libraries/unzip.lib.php');
  133 + $import_handle = new SimpleUnzip();
  134 + $import_handle->ReadFile($import_file);
  135 + if ($import_handle->Count() == 0) {
  136 + $message = $strNoFilesFoundInZip;
  137 + $show_error_header = TRUE;
  138 + $error = TRUE;
  139 + } elseif ($import_handle->GetError(0) != 0) {
  140 + $message = $strErrorInZipFile . ' ' . $import_handle->GetErrorMsg(0);
  141 + $show_error_header = TRUE;
  142 + $error = TRUE;
  143 + } else {
  144 + $import_text = $import_handle->GetData(0);
  145 + }
  146 + // We don't need to store it further
  147 + $import_handle = '';
  148 + } else {
  149 + $message = sprintf($strUnsupportedCompressionDetected, $compression);
  150 + $show_error_header = TRUE;
  151 + $error = TRUE;
  152 + }
  153 + break;
  154 + case 'none':
  155 + $import_handle = @fopen($import_file, 'r');
  156 + break;
  157 + default:
  158 + $message = sprintf($strUnsupportedCompressionDetected, $compression);
  159 + $show_error_header = TRUE;
  160 + $error = TRUE;
  161 + break;
  162 + }
  163 + if (!$error && $import_handle === FALSE) {
  164 + $message = $strFileCouldNotBeRead;
  165 + $show_error_header = TRUE;
  166 + $error = TRUE;
  167 + }
  168 +} else {
  169 + if (!isset($import_text) || empty($import_text)) {
  170 + $message = $strNothingToImport;
  171 + $show_error_header = TRUE;
  172 + $error = TRUE;
  173 + }
  174 +}
  175 +
  176 +// Convert the file's charset if necessary
  177 +$charset_conversion = FALSE;
  178 +$reset_charset = FALSE;
  179 +if (PMA_MYSQL_INT_VERSION < 40100
  180 + && $cfg['AllowAnywhereRecoding'] && $allow_recoding
  181 + && isset($charset_of_file) && $charset_of_file != $charset) {
  182 + $charset_conversion = TRUE;
  183 +} else if (PMA_MYSQL_INT_VERSION >= 40100
  184 + && isset($charset_of_file) && $charset_of_file != 'utf8') {
  185 + PMA_DBI_query('SET NAMES \'' . $charset_of_file . '\'');
  186 + $reset_charset = TRUE;
  187 +}
  188 +
  189 +// Something to skip?
  190 +if (isset($skip)) {
  191 + $original_skip = $skip;
  192 + while ($skip > 0) {
  193 + PMA_importGetNextChunk($skip < $read_limit ? $skip : $read_limit);
  194 + $read_multiply = 1; // Disable read progresivity, otherwise we eat all memory!
  195 + $skip -= $read_limit;
  196 + }
  197 + unset($skip);
  198 +}
  199 +
  200 +if (!$error) {
  201 + // Do the real import
  202 + require('./libraries/import/' . PMA_securePath($what) . '.php');
  203 +}
  204 +
  205 +// Cleanup temporary file
  206 +if ($file_to_unlink != '') {
  207 + unlink($file_to_unlink);
  208 +}
  209 +// Reset charset back, if we did some changes
  210 +if ($reset_charset) {
  211 + PMA_DBI_query('SET CHARACTER SET utf8');
  212 + PMA_DBI_query('SET SESSION collation_connection =\'' . $collation_connection . '\'');
  213 +}
  214 +
  215 +if ($finished && !$error) {
  216 + $message = $strImportFinished;
  217 +}
  218 +
  219 +if ($timeout_passed) {
  220 + $message = $strTimeoutPassed;
  221 + if ($offset == 0 || (isset($original_skip) && $original_skip == $offset)) {
  222 + $message .= ' ' . $strTimeoutNothingParsed;
  223 + }
  224 +}
  225 +
  226 +// Display back import page
  227 +require_once('./header.inc.php');
  228 +
  229 +// There was an error?
  230 +if (isset($my_die)) {
  231 + foreach ($my_die AS $key => $die) {
  232 + PMA_mysqlDie($die['error'], $die['sql'], '', $err_url, $error);
  233 + echo '<hr />';
  234 + }
  235 +}
  236 +
  237 +if ($go_sql) {
  238 + require_once('./sql.php');
  239 +} elseif ($import_type == 'server') {
  240 + $active_page = 'server_import.php';
  241 + require_once('./server_import.php');
  242 +} elseif ($import_type == 'database') {
  243 + $active_page = 'db_import.php';
  244 + require_once('./db_import.php');
  245 +} else {
  246 + $active_page = 'tbl_import.php';
  247 + require_once('./tbl_import.php');
  248 +}
  249 +exit();
  250 +?>
1  lang/.cvsignore
... ... @@ -1 +1,2 @@
1 1 tmp-check
  2 +added_messages.php
22 lang/add_message.sh
@@ -10,15 +10,23 @@ if [ $# -ne 2 ] ; then
10 10 echo "usage: add_message.sh '\$strNewMessage' 'new message contents'"
11 11 exit 1
12 12 fi
13   -
  13 +
14 14 for file in *.inc.php
15 15 do
16   - echo $file " "
17   - grep -v '?>' ${file} > ${file}.new
18   - echo "$1 = '"$2"'; //to translate" >> ${file}.new
19   - echo "?>" >> ${file}.new
20   - rm $file
21   - mv ${file}.new $file
  16 + echo $file " "
  17 + grep -v '?>' ${file} > ${file}.new
  18 + case $file in
  19 + english*)
  20 + echo "$1 = '"$2"';" >> ${file}.new
  21 + ;;
  22 + *)
  23 + echo "$1 = '"$2"'; //to translate" >> ${file}.new
  24 + ;;
  25 + esac
  26 + echo "?>" >> ${file}.new
  27 + rm $file
  28 + mv ${file}.new $file
22 29 done
  30 +./sort_lang.sh english*
23 31 echo " "
24 32 echo "Message added to all message files (including english)"
16 lang/add_message_file.sh
... ... @@ -1,8 +1,8 @@
1 1 #!/bin/bash
2 2 # $Id$
3 3 #
4   -# Shell script that adds a message file to all message files
5   -# adding "//to translate" on each line
  4 +# Shell script that adds a message file to all message files
  5 +# adding "//to translate" on each line
6 6 #
7 7 # Example: add_message_file.sh xxx
8 8 #
@@ -10,15 +10,23 @@ if [ $# -ne 1 ] ; then
10 10 echo "usage: add_message_file.sh filename"
11 11 exit 1
12 12 fi
13   -
  13 +
14 14 for file in *.inc.php
15 15 do
16 16 echo $file " "
17 17 grep -v '?>' ${file} > ${file}.new
18   - sed 's/;/;\/\/to translate/' <$1 >> ${file}.new
  18 + case $file in
  19 + english*)
  20 + sed -n 's/\(.*\);/\1;/p' $1 >> ${file}.new
  21 + ;;
  22 + *)
  23 + sed -n 's/\(.*\);/\1; \/\/to translate/p' $1 >> ${file}.new
  24 + ;;
  25 + esac
19 26 echo "?>" >> ${file}.new
20 27 rm $file
21 28 mv ${file}.new $file
22 29 done
  30 +./sort_lang.sh english*
23 31 echo " "
24 32 echo "Messages added to add message files (including english)"
151 lang/afrikaans-iso-8859-1.inc.php