[Phpmyadmin-git] [SCM] phpMyAdmin branch, master, updated. RELEASE_3_4_0BETA4-1093-g0ac18e5

Madhura Jayaratne madhuracj at users.sourceforge.net
Sat Mar 26 22:21:42 CET 2011


The branch, master has been updated
       via  0ac18e564a78f4de9262473e26f5672ae1bcb19f (commit)
      from  68eaccee9e15ddab2c82b700795dd9f11e8a42fb (commit)


- Log -----------------------------------------------------------------
commit 0ac18e564a78f4de9262473e26f5672ae1bcb19f
Author: Madhura Jayaratne <madhura.cj at gmail.com>
Date:   Sun Mar 27 02:50:04 2011 +0530

    Bug #3194559 Error when editing records with geometry fields. Editing geometry fields disabled till GIS data is officially supported in PMA. Refer Bug #3038193

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

Summary of changes:
 tbl_change.php |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/tbl_change.php b/tbl_change.php
index 0f061b2..1b6a2b6 100644
--- a/tbl_change.php
+++ b/tbl_change.php
@@ -537,6 +537,9 @@ foreach ($rows as $row_id => $vrow) {
         $idindex  = ($o_rows * $fields_cnt) + $i + 1;
         $tabindex = $idindex;
 
+        // These GIS data types are not yet supported.
+        $no_support_types = array('geometry', 'point', 'linestring', 'polygon', 'multipoint', 'multilinestring', 'multipolygon', 'geometrycollection');
+
         // The function column
         // -------------------
         // We don't want binary data to be destroyed
@@ -547,7 +550,7 @@ foreach ($rows as $row_id => $vrow) {
             if (($cfg['ProtectBinary'] && $field['is_blob'] && !$is_upload)
              || ($cfg['ProtectBinary'] == 'all' && $field['is_binary'])) {
                 echo '        <td align="center">' . __('Binary') . '</td>' . "\n";
-            } elseif (strstr($field['True_Type'], 'enum') || strstr($field['True_Type'], 'set') || 'geometry' == $field['pma_type']) {
+            } elseif (strstr($field['True_Type'], 'enum') || strstr($field['True_Type'], 'set') || in_array($field['pma_type'], $no_support_types)) {
                 echo '        <td align="center">--</td>' . "\n";
             } else {
                 ?>
@@ -965,7 +968,7 @@ foreach ($rows as $row_id => $vrow) {
             } // end if (web-server upload directory)
         } // end elseif (binary or blob)
 
-        elseif ('geometry' == $field['pma_type']) {
+        elseif (in_array($field['pma_type'], $no_support_types)) {
             // ignore this column to avoid changing it
         }
         else {


hooks/post-receive
-- 
phpMyAdmin




More information about the Git mailing list