[Phpmyadmin-git] [SCM] phpMyAdmin branch, master, updated. RELEASE_3_4_6RC1-20760-gd1aa3e3

Marc Delisle lem9 at users.sourceforge.net
Sat Oct 8 12:40:26 CEST 2011


The branch, master has been updated
       via  d1aa3e3b02fe97bf07224f0be16343c83187ea4e (commit)
      from  00fcdb2b3408bb0aebbff3326ec87bb1fab2c3da (commit)


- Log -----------------------------------------------------------------
commit d1aa3e3b02fe97bf07224f0be16343c83187ea4e
Author: Marc Delisle <marc at infomarc.info>
Date:   Sat Oct 8 06:40:10 2011 -0400

    [interface] Remove DefaultPropDisplay feature

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

Summary of changes:
 ChangeLog                                   |    1 +
 Documentation.html                          |   12 -----
 libraries/config.default.php                |    9 ----
 libraries/config.values.php                 |    1 -
 libraries/config/messages.inc.php           |    2 -
 libraries/config/setup.forms.php            |    3 +-
 libraries/config/user_preferences.forms.php |    3 +-
 libraries/tbl_properties.inc.php            |   67 ++++++--------------------
 8 files changed, 19 insertions(+), 79 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index ec72763..83d7660 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -49,6 +49,7 @@ phpMyAdmin - ChangeLog
 + [interface] 'Function based search' for GIS data
 + Support Drizzle database
 - bug #3356456 [interface] Interface problems for queries having LIMIT clauses
++ [interface] Remove DefaultPropDisplay feature
 
 3.4.7.0 (not yet released)
 - bug #3418610 [interface] Links in navigation when $cfg['MainPageIconic'] = false
diff --git a/Documentation.html b/Documentation.html
index 1c47508..83aecef 100644
--- a/Documentation.html
+++ b/Documentation.html
@@ -2003,18 +2003,6 @@ $cfg['TrustedProxies'] =
         otherwise.
     </dd>
 
-    <dt id="DefaultPropDisplay">
-        <span id="cfg_DefaultPropDisplay">$cfg['DefaultPropDisplay']</span>
-        string or integer</dt>
-    <dd>When editing/creating new columns in a table all fields normally get
-        lined up one field a line. (default: 'horizontal'). If you set this to
-        'vertical' you can have each field lined up vertically beneath each
-        other. You can save up a lot of place on the horizontal direction and
-        no longer have to scroll. If you set this to integer, editing of fewer
-        columns will appear in 'vertical' mode, while editing of more columns 
-        still in 'horizontal' mode. This way you can still effectively edit
-        large number of columns, while having full view on few of them.</dd>
-
     <dt id="cfg_ShowBrowseComments">$cfg['ShowBrowseComments'] boolean<br />
         <span id="cfg_ShowPropertyComments">$cfg['ShowPropertyComments'] </span>boolean
     </dt>
diff --git a/libraries/config.default.php b/libraries/config.default.php
index ed3ea8b..1d54bdb 100644
--- a/libraries/config.default.php
+++ b/libraries/config.default.php
@@ -2301,15 +2301,6 @@ $cfg['DefaultDisplay'] = 'horizontal';
 $cfg['RememberSorting'] = true;
 
 /**
- * default display direction for altering/creating columns (tbl_properties)
- * (horizontal|vertical|<number>)
- * number indicates maximum number for which vertical model is used
- *
- * @global integer $cfg['DefaultPropDisplay']
- */
-$cfg['DefaultPropDisplay'] = 3;
-
-/**
  * table-header rotation via faking or CSS? (css|fake|auto)
  * NOTE: CSS only works in IE browsers!
  *
diff --git a/libraries/config.values.php b/libraries/config.values.php
index f4a7a49..0e7cd93 100644
--- a/libraries/config.values.php
+++ b/libraries/config.values.php
@@ -150,7 +150,6 @@ $cfg_db['_overrides']['Servers/1/extension'] = extension_loaded('mysqli')
 $cfg_db['_validators'] = array(
     'CharTextareaCols' => 'validate_positive_number',
     'CharTextareaRows' => 'validate_positive_number',
-    'DefaultPropDisplay' => array(array('validate_by_regex', '/^(?:horizontal|vertical|\d+)$/')),
     'ExecTimeLimit' => 'validate_non_negative_number',
     'Export/sql_max_query_size' => 'validate_positive_number',
     'ForeignKeyMaxLimit' => 'validate_positive_number',
diff --git a/libraries/config/messages.inc.php b/libraries/config/messages.inc.php
index 3c55558..d938197 100644
--- a/libraries/config/messages.inc.php
+++ b/libraries/config/messages.inc.php
@@ -43,8 +43,6 @@ $strConfigConfirm_desc = __('Whether a warning ("Are your really sure...&qu
 $strConfigConfirm_name = __('Confirm DROP queries');
 $strConfigDBG_sql_name = __('Debug SQL');
 $strConfigDefaultDisplay_name = __('Default display direction');
-$strConfigDefaultPropDisplay_desc = __('[kbd]horizontal[/kbd], [kbd]vertical[/kbd] or a number that indicates maximum number for which vertical model is used');
-$strConfigDefaultPropDisplay_name = __('Display direction for altering/creating columns');
 $strConfigDefaultTabDatabase_desc = __('Tab that is displayed when entering a database');
 $strConfigDefaultTabDatabase_name = __('Default database tab');
 $strConfigDefaultTabServer_desc = __('Tab that is displayed when entering a server');
diff --git a/libraries/config/setup.forms.php b/libraries/config/setup.forms.php
index 8ab2874..6160456 100644
--- a/libraries/config/setup.forms.php
+++ b/libraries/config/setup.forms.php
@@ -219,8 +219,7 @@ $forms['Main_frame']['Edit'] = array(
     'LongtextDoubleTextarea',
     'InsertRows',
     'ForeignKeyDropdownOrder',
-    'ForeignKeyMaxLimit',
-    'DefaultPropDisplay');
+    'ForeignKeyMaxLimit');
 $forms['Main_frame']['Tabs'] = array(
     'LightTabs',
     'PropertiesIconic',
diff --git a/libraries/config/user_preferences.forms.php b/libraries/config/user_preferences.forms.php
index 5505931..2b0d5e2 100644
--- a/libraries/config/user_preferences.forms.php
+++ b/libraries/config/user_preferences.forms.php
@@ -122,8 +122,7 @@ $forms['Main_frame']['Edit'] = array(
     'ShowFieldTypesInDataEditView',
     'InsertRows',
     'ForeignKeyDropdownOrder',
-    'ForeignKeyMaxLimit',
-    'DefaultPropDisplay');
+    'ForeignKeyMaxLimit');
 $forms['Main_frame']['Tabs'] = array(
     'LightTabs',
     'DefaultTabServer',
diff --git a/libraries/tbl_properties.inc.php b/libraries/tbl_properties.inc.php
index e5342d3..c34bd1d 100644
--- a/libraries/tbl_properties.inc.php
+++ b/libraries/tbl_properties.inc.php
@@ -34,21 +34,7 @@ if (PMA_DRIZZLE) {
     include_once './libraries/data_mysql.inc.php';
 }
 
-if (is_int($cfg['DefaultPropDisplay'])) {
-    if ($num_fields <= $cfg['DefaultPropDisplay']) {
-        $display_type = 'vertical';
-    } else {
-        $display_type = 'horizontal';
-    }
-} else {
-    $display_type = $cfg['DefaultPropDisplay'];
-}
-
-if ('horizontal' == $display_type) {
-    $length_values_input_size = 8;
-} else {
-    $length_values_input_size = 30;
-}
+$length_values_input_size = 8;
 
 $_form_params = array(
     'db' => $db,
@@ -123,7 +109,7 @@ if (!$is_backup) {
     $header_cells[] = __('Index');
 }
 
-$header_cells[] = '<abbr title="AUTO_INCREMENT">' . ($display_type == 'horizontal' ? 'A_I' : 'AUTO_INCREMENT') . '</abbr>';
+$header_cells[] = '<abbr title="AUTO_INCREMENT">A_I</abbr>';
 
 require_once './libraries/transformations.lib.php';
 $cfgRelation = PMA_getRelationsParam();
@@ -279,7 +265,7 @@ for ($i = 0; $i < $num_fields; $i++) {
     $content_cells[$i][$ci] = '<input id="field_' . $i . '_' . ($ci - $ci_offset) . '"'
         . ' type="text" name="field_name[' . $i . ']"'
         . ' maxlength="64" class="textfield" title="' . __('Column') . '"'
-        . ' size="' . ($GLOBALS['cfg']['DefaultPropDisplay'] == 'horizontal' ? '10' : '30') . '"'
+        . ' size="10"'
         . ' value="' . (isset($row['Field']) ? htmlspecialchars($row['Field']) : '') . '"'
         . ' />';
     $ci++;
@@ -562,7 +548,7 @@ for ($i = 0; $i < $num_fields; $i++) {
 <script src="./js/keyhandler.js" type="text/javascript"></script>
 <script type="text/javascript">
 // <![CDATA[
-var switch_movement = <?php echo $display_type == 'horizontal' ? '0' : '1'; ?>;
+var switch_movement = 0;
 document.onkeydown = onKeyDownArrowsHandler;
 // ]]>
 </script>
@@ -602,48 +588,27 @@ if (is_array($content_cells) && is_array($header_cells)) {
     echo '<table id="table_columns" class="noclick">';
     echo '<caption class="tblHeaders">' . __('Structure') . PMA_showMySQLDocu('SQL-Syntax', 'CREATE_TABLE') . '</caption>';
 
-    if ($display_type == 'horizontal') {
         ?>
 <tr>
-        <?php foreach ($header_cells as $header_val) { ?>
+    <?php foreach ($header_cells as $header_val) { ?>
     <th><?php echo $header_val; ?></th>
-        <?php } ?>
+    <?php } ?>
 </tr>
-        <?php
+    <?php
 
-        $odd_row = true;
-        foreach ($content_cells as $content_row) {
-            echo '<tr class="' . ($odd_row ? 'odd' : 'even') . '">';
-            $odd_row = ! $odd_row;
+    $odd_row = true;
+    foreach ($content_cells as $content_row) {
+        echo '<tr class="' . ($odd_row ? 'odd' : 'even') . '">';
+        $odd_row = ! $odd_row;
 
-            if (is_array($content_row)) {
-                foreach ($content_row as $content_row_val) {
-                    ?>
+        if (is_array($content_row)) {
+            foreach ($content_row as $content_row_val) {
+                ?>
     <td align="center"><?php echo $content_row_val; ?></td>
-                    <?php
-                }
-            }
-            echo '</tr>';
-        }
-    } else {
-        $i = 0;
-        $odd_row = true;
-        foreach ($header_cells as $header_val) {
-            echo '<tr class="' . ($odd_row ? 'odd' : 'even') . '">';
-            $odd_row = ! $odd_row;
-            ?>
-    <th><?php echo $header_val; ?></th>
-            <?php
-            foreach ($content_cells as $content_cell) {
-                if (isset($content_cell[$i]) && $content_cell[$i] != '') {
-                    ?>
-    <td><?php echo $content_cell[$i]; ?></td>
-                    <?php
-                }
+                <?php
             }
-            echo '</tr>';
-            $i++;
         }
+        echo '</tr>';
     }
     ?>
 </table>


hooks/post-receive
-- 
phpMyAdmin




More information about the Git mailing list