[Phpmyadmin-git] [SCM] phpMyAdmin branch, master, updated. RELEASE_3_4_0BETA2-228-gf2ffdfc

Michal Čihař nijel at users.sourceforge.net
Thu Jan 13 13:43:07 CET 2011


The branch, master has been updated
       via  f2ffdfce2e203b218625c72b73ca5bf79d60fb6a (commit)
       via  eeea3d6845016d0b20cf5ebc4b0c5139bcd28e06 (commit)
       via  f5c70b9b073909320ba292274caa22ecf655f607 (commit)
       via  0bc3fda45c2cab0dbf649ae21508b5e8cd0f7416 (commit)
       via  75da7ba0e4e65b828aebabddb80a184324121dcb (commit)
       via  3dbb31d3f627d32ae45ab02429def8f44e409727 (commit)
       via  aae1eb656713b73705adad1efb986aa1cc9eb07b (commit)
      from  89833a0603dde65f31138ba534a58e6841c767d9 (commit)


- Log -----------------------------------------------------------------
commit f2ffdfce2e203b218625c72b73ca5bf79d60fb6a
Merge: eeea3d6845016d0b20cf5ebc4b0c5139bcd28e06 f5c70b9b073909320ba292274caa22ecf655f607
Author: Michal Čihař <mcihar at novell.com>
Date:   Thu Jan 13 13:42:58 2011 +0100

    Merge remote branch 'pootle/master'

commit eeea3d6845016d0b20cf5ebc4b0c5139bcd28e06
Author: Michal Čihař <mcihar at novell.com>
Date:   Thu Jan 13 13:42:24 2011 +0100

    [export] Better handling of export to PHP array.
    
    There is no need for own logic here, we can use var_export.

commit f5c70b9b073909320ba292274caa22ecf655f607
Author: Victor Volkov <hanut at php-myadmin.ru>
Date:   Thu Jan 13 14:40:54 2011 +0200

    Translation update done using Pootle.

commit 0bc3fda45c2cab0dbf649ae21508b5e8cd0f7416
Author: Victor Volkov <hanut at php-myadmin.ru>
Date:   Thu Jan 13 14:39:42 2011 +0200

    Translation update done using Pootle.

commit 75da7ba0e4e65b828aebabddb80a184324121dcb
Author: Victor Volkov <hanut at php-myadmin.ru>
Date:   Thu Jan 13 14:38:13 2011 +0200

    Translation update done using Pootle.

commit 3dbb31d3f627d32ae45ab02429def8f44e409727
Author: Victor Volkov <hanut at php-myadmin.ru>
Date:   Thu Jan 13 14:38:01 2011 +0200

    Translation update done using Pootle.

commit aae1eb656713b73705adad1efb986aa1cc9eb07b
Author: Victor Volkov <hanut at php-myadmin.ru>
Date:   Thu Jan 13 14:31:18 2011 +0200

    Translation update done using Pootle.

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog                      |    1 +
 libraries/export/php_array.php |   19 ++++---------------
 po/ru.po                       |   11 ++++-------
 3 files changed, 9 insertions(+), 22 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 889c140..60985a1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -128,6 +128,7 @@
 + rfe #3141330 [relation] When displaying results, show a link to the foreign 
   table even when phpMyAdmin configuration storage is not active
 - bug #3141327 [relation] Foreign key input options
+- [export] Better handling of export to PHP array.
 
 3.3.10.0 (not yet released)
 - patch #3147400 [structure] Aria table size printed as unknown,
diff --git a/libraries/export/php_array.php b/libraries/export/php_array.php
index 5cf6fb7..983673c 100644
--- a/libraries/export/php_array.php
+++ b/libraries/export/php_array.php
@@ -147,7 +147,7 @@ function PMA_exportData($db, $table, $crlf, $error_url, $sql_query)
     while ($record = PMA_DBI_fetch_row($result)) {
 
         $record_cnt++;
-        
+
         // Output table name as comment if this is the first record of the table
         if ($record_cnt == 1) {
             $buffer .= $crlf . '// ' . $db . '.' . $table . $crlf;
@@ -159,28 +159,17 @@ function PMA_exportData($db, $table, $crlf, $error_url, $sql_query)
 
 
         for ($i = 0; $i < $columns_cnt; $i++) {
-
-            $isLastLine = ($i + 1 >= $columns_cnt);
-
-            $column = $columns[$i];
-
-            if (is_null($record[$i])) {
-                $buffer .= "'" . $column . "'=>null" . (! $isLastLine ? ',' : '');
-            } elseif (is_numeric($record[$i])) {
-                $buffer .= "'" . $column . "'=>" . $record[$i] . (! $isLastLine ? ',' : '');
-            } else {
-                $buffer .= "'" . $column . "'=>'" . addslashes($record[$i]) . "'" . (! $isLastLine ? ',' : '');
-            }
+            $buffer .= "'" . $columns[$i]. "'=>" . var_export($record[$i], true) . (($i + 1 >= $columns_cnt) ? '' : ',');
         }
 
         $buffer .= ')';
     }
-    
+
     $buffer .= $crlf . ');' . $crlf;
     if (! PMA_exportOutputHandler($buffer)) {
         return FALSE;
     }
-        
+
     PMA_DBI_free_result($result);
 
     return true;
diff --git a/po/ru.po b/po/ru.po
index d0fecef..a187754 100644
--- a/po/ru.po
+++ b/po/ru.po
@@ -4,7 +4,7 @@ msgstr ""
 "Project-Id-Version: phpMyAdmin 3.4.0-beta1\n"
 "Report-Msgid-Bugs-To: phpmyadmin-devel at lists.sourceforge.net\n"
 "POT-Creation-Date: 2011-01-07 07:51-0500\n"
-"PO-Revision-Date: 2011-01-13 14:27+0200\n"
+"PO-Revision-Date: 2011-01-13 14:40+0200\n"
 "Last-Translator: Victor Volkov <hanut at php-myadmin.ru>\n"
 "Language-Team: russian <ru at li.org>\n"
 "Language: ru\n"
@@ -2742,7 +2742,7 @@ msgstr "Режим совместимости SQL"
 
 #: libraries/config/messages.inc.php:118
 msgid "Syntax to use when inserting data"
-msgstr ""
+msgstr "Использовать синтаксис при вставке данных"
 
 #: libraries/config/messages.inc.php:119
 msgid "Creation/Update/Check dates"
@@ -2769,20 +2769,18 @@ msgid "Maximal length of created query"
 msgstr "Максимальная длина создаваемого запроса"
 
 #: libraries/config/messages.inc.php:133
-#, fuzzy
 #| msgid "Export tables"
 msgid "Export type"
-msgstr "Экспортировать таблицы"
+msgstr "Тип экспорта"
 
 #: libraries/config/messages.inc.php:134 libraries/export/sql.php:50
 msgid "Enclose export in a transaction"
 msgstr "Заключить экспорт в транзакцию"
 
 #: libraries/config/messages.inc.php:135
-#, fuzzy
 #| msgid "Export contents"
 msgid "Export time in UTC"
-msgstr "Экспортировать содержимое"
+msgstr "Экспорт времени в UTC"
 
 #: libraries/config/messages.inc.php:143
 msgid "Force secured connection while using phpMyAdmin"
@@ -2828,7 +2826,6 @@ msgstr "Настройка режима обзора данных"
 #: libraries/config/messages.inc.php:171 libraries/config/messages.inc.php:182
 #: libraries/config/messages.inc.php:184 libraries/config/messages.inc.php:212
 #: libraries/config/messages.inc.php:224
-#, fuzzy
 #| msgid "Customize default export options"
 msgid "Customize default options"
 msgstr "Настройте параметры экспорта используемые по умолчанию"


hooks/post-receive
-- 
phpMyAdmin




More information about the Git mailing list