From 78103553ed2f9c8bebc22ae72d6c03ec66ae30a2 Mon Sep 17 00:00:00 2001 From: Marc Delisle Date: Thu, 5 Jun 2003 19:53:49 +0000 Subject: [PATCH] remove Options tab --- ChangeLog | 2 + tbl_properties_links.php3 | 3 - tbl_properties_operations.php3 | 166 ++++++++++++++++++++++++++++- tbl_properties_options.php3 | 187 --------------------------------- 4 files changed, 166 insertions(+), 192 deletions(-) delete mode 100755 tbl_properties_options.php3 diff --git a/ChangeLog b/ChangeLog index 90bdd1d82..f80e1e727 100755 --- a/ChangeLog +++ b/ChangeLog @@ -8,6 +8,8 @@ $Source$ 2003-06-05 Marc Delisle * Documentation.html: new faq 6.20 about CREATE TEMPORARY TABLES * libraries/sqlparser.lib.php3: bug 716679, parsing of negation operator + * tbl_properties_links.php3, tbl_properties_operations.php3: merge + the Options tab into Operations 2003-06-05 Michal Cihar * libraries/display_export.lib.php3, libraries/functions.js: Some diff --git a/tbl_properties_links.php3 b/tbl_properties_links.php3 index 419df0bd6..aa161b46a 100755 --- a/tbl_properties_links.php3 +++ b/tbl_properties_links.php3 @@ -73,9 +73,6 @@ echo PMA_printTab($strSelect, $lnk4, $arg4); echo PMA_printTab($strInsert, 'tbl_change.php3', $url_query); echo PMA_printTab($strExport, 'tbl_properties_export.php3', $url_query); echo PMA_printTab($strOperations, 'tbl_properties_operations.php3', $url_query); -if (PMA_MYSQL_INT_VERSION >= 32322) { - echo PMA_printTab($strOptions, 'tbl_properties_options.php3', $url_query); -} echo PMA_printTab($strEmpty, $lnk6, $arg6, $att6); echo PMA_printTab($strDrop, 'sql.php3', $arg7, $att7); echo "\n"; diff --git a/tbl_properties_operations.php3 b/tbl_properties_operations.php3 index ed156805c..3fa51a49e 100755 --- a/tbl_properties_operations.php3 +++ b/tbl_properties_operations.php3 @@ -17,6 +17,37 @@ $url_query .= '&goto=tbl_properties_operations.php3&back=tbl_properties_ require('./libraries/relation.lib.php3'); $cfgRelation = PMA_getRelationsParam(); +/** + * Updates table comment, type and options if required + */ +if (isset($submitcomment)) { + if (empty($prev_comment) || urldecode($prev_comment) != $comment) { + $sql_query = 'ALTER TABLE ' . PMA_backquote($table) . ' COMMENT = \'' . PMA_sqlAddslashes($comment) . '\''; + $result = PMA_mysql_query($sql_query) or PMA_mysqlDie('', $sql_query, '', $err_url); + $message = $strSuccess; + } +} +if (isset($submittype)) { + $sql_query = 'ALTER TABLE ' . PMA_backquote($table) . ' TYPE = ' . $tbl_type; + $result = PMA_mysql_query($sql_query) or PMA_mysqlDie('', $sql_query, '', $err_url); + $message = $strSuccess; +} +if (isset($submitoptions)) { + $sql_query = 'ALTER TABLE ' . PMA_backquote($table) + . (isset($pack_keys) ? ' pack_keys=1': ' pack_keys=0') + . (isset($checksum) ? ' checksum=1': ' checksum=0') + . (isset($delay_key_write) ? ' delay_key_write=1': ' delay_key_write=0') + . (isset($auto_increment) ? ' auto_increment=' . PMA_sqlAddslashes($auto_increment) : ''); + $result = PMA_mysql_query($sql_query) or PMA_mysqlDie('', $sql_query, '', $err_url); + $message = $strSuccess; +} + +// Displays a message if a query had been submitted +if (isset($message)) { + PMA_showMessage($message); +} + + /** * Reordering the table has been requested by the user @@ -348,9 +379,140 @@ if ($cfgRelation['relwork']) {

- - = 32322) { + ?> + +
  • +
    + +  :  + +   +   + +
    +
  • + + + 0) { + while ($tmp = PMA_mysql_fetch_array($result)) { + if (isset($tmp['Variable_name'])) { + switch ($tmp['Variable_name']) { + case 'have_bdb': + if ($tmp['Value'] == 'YES') { + $tbl_bdb = TRUE; + } + break; + case 'have_gemini': + if ($tmp['Value'] == 'YES') { + $tbl_gemini = TRUE; + } + break; + case 'have_innodb': + if ($tmp['Value'] == 'YES') { + $tbl_innodb = TRUE; + } + break; + case 'have_isam': + if ($tmp['Value'] == 'YES') { + $tbl_isam = TRUE; + } + break; + } // end switch + } // end if isset($tmp['Variable_name']) + } // end while + } // end if $result + + mysql_free_result($result); + echo "\n"; + ?> +
  • +
    + +  :  +   +   + +
    +
  • + + +
  • + + + + +
    +
    + + + + + + + + + + + + + + + + + + + +
    />  
    />  
    />  
    />  
    +
    +
    +
  • + + = 32322) + /** * Displays the footer */ diff --git a/tbl_properties_options.php3 b/tbl_properties_options.php3 deleted file mode 100755 index 4f6aebd43..000000000 --- a/tbl_properties_options.php3 +++ /dev/null @@ -1,187 +0,0 @@ -= 32322) { - ?> -
      - -
    • -
      - -  :  - -   -   - -
      -
    • - - - 0) { - while ($tmp = PMA_mysql_fetch_array($result)) { - if (isset($tmp['Variable_name'])) { - switch ($tmp['Variable_name']) { - case 'have_bdb': - if ($tmp['Value'] == 'YES') { - $tbl_bdb = TRUE; - } - break; - case 'have_gemini': - if ($tmp['Value'] == 'YES') { - $tbl_gemini = TRUE; - } - break; - case 'have_innodb': - if ($tmp['Value'] == 'YES') { - $tbl_innodb = TRUE; - } - break; - case 'have_isam': - if ($tmp['Value'] == 'YES') { - $tbl_isam = TRUE; - } - break; - } // end switch - } // end if isset($tmp['Variable_name']) - } // end while - } // end if $result - - mysql_free_result($result); - echo "\n"; - ?> -
    • -
      - -  :  -   -   - -
      -
    • - - -
    • - - - - -
      -
      - - - - - - - - - - - - - - - - - - - -
      />  
      />  
      />  
      />  
      -
      -
      -
    • -
    - = 32322) - - -/** - * Displays the footer - */ -echo "\n"; -require('./footer.inc.php3'); -?>