[Phpmyadmin-git] [SCM] phpMyAdmin branch, master, updated. RELEASE_3_3_2-1606-g87d1939

Michal Čihař nijel at users.sourceforge.net
Fri Apr 16 15:41:27 CEST 2010


The branch, master has been updated
       via  87d19393b321f363a4857e9b3518dd9e7c1b5e3b (commit)
       via  84d25c0c00410383f8169fd7830316d401771b41 (commit)
       via  956c2fadcac585de87481c5f1baf15403c2852ba (commit)
      from  90d862ca779dff4035a71c94b137b4a93f2ac1a4 (commit)


- Log -----------------------------------------------------------------
commit 87d19393b321f363a4857e9b3518dd9e7c1b5e3b
Author: Michal Čihař <mcihar at novell.com>
Date:   Fri Apr 16 15:41:13 2010 +0200

    rfe #2972969 [interface] Fix flipping of headers in non-IE browsers.

commit 84d25c0c00410383f8169fd7830316d401771b41
Author: Michal Čihař <mcihar at novell.com>
Date:   Fri Apr 16 15:13:43 2010 +0200

    rfe #2981999 [interface] Default sort order is now SMART.

commit 956c2fadcac585de87481c5f1baf15403c2852ba
Author: Michal Čihař <mcihar at novell.com>
Date:   Fri Apr 16 15:13:13 2010 +0200

    Fix author name.

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

Summary of changes:
 ChangeLog                     |    4 ++-
 Documentation.html            |   21 ++++++++++------
 libraries/config.default.php  |    6 ++--
 libraries/display_tbl.lib.php |   51 +++++++++++++++++++++++-----------------
 4 files changed, 48 insertions(+), 34 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 8814169..18032ff 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -70,7 +70,9 @@ $Id$
 - patch #2986073 [interface] Convert upload progress bar to jQuery, thanks to
   Philip Frank.
 - patch #2983960 [interface] Add javascript validation of datetime input,
-  thanks to 
+  thanks to Sutharshan Balachandren.
+- rfe #2981999 [interface] Default sort order is now SMART.
+- rfe #2972969 [interface] Fix flipping of headers in non-IE browsers.
 
 3.3.3.0 (not yet released)
 - patch #2982480 [navi] Do not group if there would be one table in group,
diff --git a/Documentation.html b/Documentation.html
index 6805a48..c6ee94f 100644
--- a/Documentation.html
+++ b/Documentation.html
@@ -1875,20 +1875,25 @@ $cfg['TrustedProxies'] =
         "Left" and "right" are parsed as "top"
         and "bottom" with vertical display mode.</dd>
 
-    <dt id="cfg_DefaultDisplay">$cfg['DefaultDisplay'] string
-        <span id="cfg_HeaderFlipType">$cfg['HeaderFlipType'] </span>string
-    </dt>
+    <dt id="cfg_DefaultDisplay">$cfg['DefaultDisplay'] string</dt>
     <dd>There are 3 display modes: horizontal, horizontalflipped and vertical.
         Define which one is displayed by default. The first mode displays each
         row on a horizontal line, the second rotates the headers by 90
         degrees, so you can use descriptive headers even though fields only
         contain small values and still print them out. The vertical mode sorts
-        each row on a vertical lineup.<br /><br />
+        each row on a vertical lineup.
+    </dd>
 
-        The HeaderFlipType can be set to 'css' or 'fake'. When using 'css'
-        the rotation of the header for horizontalflipped is done via CSS. If
-        set to 'fake' PHP does the transformation for you, but of course this
-        does not look as good as CSS.</dd>
+    <dt id="cfg_HeaderFlipType">$cfg['HeaderFlipType'] </span>string</dt>
+    <dd>
+        The HeaderFlipType can be set to 'auto', 'css' or 'fake'. When using
+        'css' the rotation of the header for horizontalflipped is done via
+        CSS. The CSS transformation currently works only in Internet
+        Explorer.If set to 'fake' PHP does the transformation for you, but of
+        course this does not look as good as CSS. The 'auto' option enables
+        CSS transformation when browser supports it and use PHP based one
+        otherwise.
+    </dd>
 
     <dt id="DefaultPropDisplay">
         <span id="cfg_DefaultPropDisplay">$cfg['DefaultPropDisplay']</span>
diff --git a/libraries/config.default.php b/libraries/config.default.php
index d1426d5..64628bb 100644
--- a/libraries/config.default.php
+++ b/libraries/config.default.php
@@ -887,7 +887,7 @@ $cfg['MaxRows'] = 30;
  *
  * @global string $cfg['Order']
  */
-$cfg['Order'] = 'ASC';
+$cfg['Order'] = 'SMART';
 
 /**
  * default for 'Show binary contents as HEX'
@@ -2179,12 +2179,12 @@ $cfg['DefaultDisplay'] = 'horizontal';
 $cfg['DefaultPropDisplay'] = 3;
 
 /**
- * table-header rotation via faking or CSS? (css|fake)
+ * table-header rotation via faking or CSS? (css|fake|auto)
  * NOTE: CSS only works in IE browsers!
  *
  * @global string $cfg['HeaderFlipType']
  */
-$cfg['HeaderFlipType'] = 'css';
+$cfg['HeaderFlipType'] = 'auto';
 
 /**
  * shows stored relation-comments in 'browse' mode.
diff --git a/libraries/display_tbl.lib.php b/libraries/display_tbl.lib.php
index 4e2ccc5..e99b97c 100644
--- a/libraries/display_tbl.lib.php
+++ b/libraries/display_tbl.lib.php
@@ -187,16 +187,16 @@ function PMA_setDisplayMode(&$the_disp_mode, &$the_total)
 
 
 /**
- * Displays a navigation button 
+ * Displays a navigation button
  *
  * @uses    $GLOBALS['cfg']['NavigationBarIconic']
- * @uses    PMA_generate_common_hidden_inputs() 
+ * @uses    PMA_generate_common_hidden_inputs()
  *
  * @param   string   iconic caption for button
- * @param   string   text for button 
- * @param   integer  position for next query 
- * @param   string   query ready for display 
- * @param   string   optional onsubmit clause 
+ * @param   string   text for button
+ * @param   integer  position for next query
+ * @param   string   query ready for display
+ * @param   string   optional onsubmit clause
  * @param   string   optional hidden field for special treatment
  * @param   string   optional onclick clause
  *
@@ -246,7 +246,7 @@ function PMA_displayTableNavigationOneButton($caption, $title, $pos, $html_sql_q
  * @param   integer  the offset for the "next" page
  * @param   integer  the offset for the "previous" page
  * @param   string   the URL-encoded query
- * @param   string   the id for the direction dropdown 
+ * @param   string   the id for the direction dropdown
  *
  * @global  string   $db             the database name
  * @global  string   $table          the table name
@@ -334,9 +334,9 @@ onsubmit="return (checkFormElementInRange(this, 'session_max_rows', '<?php echo
         && $_SESSION['tmp_user_values']['max_rows'] != 'all') {
 
         // display the Next button
-        PMA_displayTableNavigationOneButton('>', 
-            $GLOBALS['strNext'], 
-            $pos_next, 
+        PMA_displayTableNavigationOneButton('>',
+            $GLOBALS['strNext'],
+            $pos_next,
             $html_sql_query);
 
         // prepare some options for the End button
@@ -349,9 +349,9 @@ onsubmit="return (checkFormElementInRange(this, 'session_max_rows', '<?php echo
         }
 
         // display the End button
-        PMA_displayTableNavigationOneButton('>>', 
-            $GLOBALS['strEnd'], 
-            @((ceil($unlim_num_rows / $_SESSION['tmp_user_values']['max_rows'])- 1) * $_SESSION['tmp_user_values']['max_rows']), 
+        PMA_displayTableNavigationOneButton('>>',
+            $GLOBALS['strEnd'],
+            @((ceil($unlim_num_rows / $_SESSION['tmp_user_values']['max_rows'])- 1) * $_SESSION['tmp_user_values']['max_rows']),
             $html_sql_query,
             'onsubmit="return ' . (($_SESSION['tmp_user_values']['pos'] + $_SESSION['tmp_user_values']['max_rows'] < $unlim_num_rows && $num_rows >= $_SESSION['tmp_user_values']['max_rows']) ? 'true' : 'false') . '"',
             $input_for_real_end,
@@ -442,7 +442,7 @@ onsubmit="return (checkFormElementInRange(this, 'session_max_rows', '<?php echo
  * @param   integer  the total number of fields returned by the SQL query
  * @param   array    the analyzed query
  *
- * @return  boolean  $clause_is_unique 
+ * @return  boolean  $clause_is_unique
  *
  * @global  string   $db               the database name
  * @global  string   $table            the table name
@@ -564,7 +564,7 @@ function PMA_displayTableHeaders(&$is_display, &$fields_meta, $fields_cnt = 0, $
         echo '</div>';
 
         // prepare full/partial text button or link
-        if ($_SESSION['tmp_user_values']['display_text']=='F') { 
+        if ($_SESSION['tmp_user_values']['display_text']=='F') {
             // currently in fulltext mode so show the opposite link
             $tmp_image_file = $GLOBALS['pmaThemeImage'] . 's_partialtext.png';
             $tmp_txt = $GLOBALS['strPartialText'];
@@ -789,7 +789,7 @@ function PMA_displayTableHeaders(&$is_display, &$fields_meta, $fields_cnt = 0, $
                 // Field name may be preceded by a space, or any number
                 // of characters followed by a dot (tablename.fieldname)
                 // so do a direct comparison for the sort expression;
-                // this avoids problems with queries like 
+                // this avoids problems with queries like
                 // "SELECT id, count(id)..." and clicking to sort
                 // on id or on count(id).
                 // Another query to test this:
@@ -852,6 +852,13 @@ function PMA_displayTableHeaders(&$is_display, &$fields_meta, $fields_cnt = 0, $
                     $order_link_params['onmouseout']  = 'if(document.getElementById(\'soimg' . $i . '\')){ document.getElementById(\'soimg' . $i . '\').src=\'' . $GLOBALS['pmaThemeImage'] . 's_desc.png\'; }';
                 }
             }
+            if ($GLOBALS['cfg']['HeaderFlipType'] == 'auto') {
+                if (PMA_USR_BROWSER_AGENT == 'IE') {
+                    $GLOBALS['cfg']['HeaderFlipType'] = 'css';
+                } else {
+                    $GLOBALS['cfg']['HeaderFlipType'] = 'fake';
+                }
+            }
             if ($_SESSION['tmp_user_values']['disp_direction'] == 'horizontalflipped'
              && $GLOBALS['cfg']['HeaderFlipType'] == 'css') {
                 $order_link_params['style'] = 'direction: ltr; writing-mode: tb-rl;';
@@ -1141,7 +1148,7 @@ function PMA_displayTableBody(&$dt_result, &$is_display, $map, $analyzed_sql) {
                 $lnk_goto = 'sql.php' . PMA_generate_common_url($_url_params, 'text');
 
                 $del_query = 'DELETE FROM ' . PMA_backquote($db) . '.' . PMA_backquote($table)
-                    . ' WHERE ' . $where_clause . ($clause_is_unique ? '' : ' LIMIT 1'); 
+                    . ' WHERE ' . $where_clause . ($clause_is_unique ? '' : ' LIMIT 1');
 
                 $_url_params = array(
                     'db'        => $db,
@@ -1154,7 +1161,7 @@ function PMA_displayTableBody(&$dt_result, &$is_display, $map, $analyzed_sql) {
 
                 $js_conf  = 'DELETE FROM ' . PMA_jsFormat($db) . '.' . PMA_jsFormat($table)
                           . ' WHERE ' . PMA_jsFormat($where_clause, false)
-                          . ($clause_is_unique ? '' : ' LIMIT 1'); 
+                          . ($clause_is_unique ? '' : ' LIMIT 1');
                 $del_str = PMA_getIcon('b_drop.png', $GLOBALS['strDelete'], true);
             } elseif ($is_display['del_lnk'] == 'kp') { // kill process case
 
@@ -1346,7 +1353,7 @@ function PMA_displayTableBody(&$dt_result, &$is_display, $map, $analyzed_sql) {
                         $vertical_display['data'][$row_no][$i] = '    <td' . $mouse_events . ' class="' . $class . ($condition_field ? ' condition' : '') . '"> </td>' . "\n";
                     }
                 }
-            // n o t   n u m e r i c   a n d   n o t   B L O B 
+            // n o t   n u m e r i c   a n d   n o t   B L O B
             } else {
                 if (!isset($row[$i]) || is_null($row[$i])) {
                     $vertical_display['data'][$row_no][$i]     = '    <td' . $mouse_events . ' class="' . $class . ($condition_field ? ' condition' : '') . '"><i>NULL</i></td>' . "\n";
@@ -1676,8 +1683,8 @@ function PMA_displayTable_checkConfigParams()
 
     // as this is a form value, the type is always string so we cannot
     // use PMA_isValid($_REQUEST['session_max_rows'], 'integer')
-    if ((PMA_isValid($_REQUEST['session_max_rows'], 'numeric') 
-        && (int) $_REQUEST['session_max_rows'] == $_REQUEST['session_max_rows']) 
+    if ((PMA_isValid($_REQUEST['session_max_rows'], 'numeric')
+        && (int) $_REQUEST['session_max_rows'] == $_REQUEST['session_max_rows'])
         || $_REQUEST['session_max_rows'] == 'all') {
         $_SESSION['tmp_user_values']['query'][$sql_md5]['max_rows'] = $_REQUEST['session_max_rows'];
         unset($_REQUEST['session_max_rows']);
@@ -1718,7 +1725,7 @@ function PMA_displayTable_checkConfigParams()
         // according to low-level field flags
         $_SESSION['tmp_user_values']['query'][$sql_md5]['display_binary'] = true;
     }
-    
+
     if (isset($_REQUEST['display_binary_as_hex'])) {
         $_SESSION['tmp_user_values']['query'][$sql_md5]['display_binary_as_hex'] = true;
         unset($_REQUEST['display_binary_as_hex']);


hooks/post-receive
-- 
phpMyAdmin




More information about the Git mailing list