The branch, master has been updated via e6c7aaad340854ae1aab19582c1f5529df165102 (commit) from 4a1b6af94429616de009866b11b525356dd6a37d (commit)
- Log ----------------------------------------------------------------- commit e6c7aaad340854ae1aab19582c1f5529df165102 Author: Marc Delisle marc@infomarc.info Date: Sun Aug 22 08:52:15 2010 -0400
simplify logic and rename parameter
-----------------------------------------------------------------------
Summary of changes: sql.php | 10 ++++------ tbl_structure.php | 2 +- 2 files changed, 5 insertions(+), 7 deletions(-)
diff --git a/sql.php b/sql.php index a3ae0cf..12c6ac5 100644 --- a/sql.php +++ b/sql.php @@ -178,8 +178,7 @@ if ($do_confirm) { <input type="hidden" name="back" value="<?php echo isset($back) ? PMA_sanitize($back, true) : ''; ?>" /> <input type="hidden" name="reload" value="<?php echo isset($reload) ? PMA_sanitize($reload, true) : 0; ?>" /> <input type="hidden" name="purge" value="<?php echo isset($purge) ? PMA_sanitize($purge, true) : ''; ?>" /> - <input type="hidden" name="cpurge" value="<?php echo isset($cpurge) ? PMA_sanitize($cpurge, true) : ''; ?>" /> - <input type="hidden" name="purgekey" value="<?php echo isset($purgekey) ? PMA_sanitize($purgekey, true) : ''; ?>" /> + <input type="hidden" name="dropped_column" value="<?php echo isset($dropped_column) ? PMA_sanitize($dropped_column, true) : ''; ?>" /> <input type="hidden" name="show_query" value="<?php echo isset($show_query) ? PMA_sanitize($show_query, true) : ''; ?>" /> <?php echo '<fieldset class="confirmation">' . "\n" @@ -465,12 +464,11 @@ if (isset($GLOBALS['show_as_php']) || !empty($GLOBALS['validatequery'])) { } // end if ($purge)
// If a column gets dropped, do relation magic. - if (isset($cpurge) && $cpurge == '1' && isset($purgekey) - && strlen($db) && strlen($table) && !empty($purgekey)) { + if (isset($dropped_column) && strlen($db) && strlen($table) && !empty($dropped_column)) { require_once './libraries/relation_cleanup.lib.php'; - PMA_relationsCleanupColumn($db, $table, $purgekey); + PMA_relationsCleanupColumn($db, $table, $dropped_column);
- } // end if column PMA_* purge + } // end if column was dropped } // end else "didn't ask to see php code"
// No rows returned -> move back to the calling page diff --git a/tbl_structure.php b/tbl_structure.php index c9c7fd3..e1b29f9 100644 --- a/tbl_structure.php +++ b/tbl_structure.php @@ -392,7 +392,7 @@ while ($row = PMA_DBI_fetch_assoc($fields_rs)) { <?php echo $titles['Change']; ?></a> </td> <td align="center" class="drop"> - <a href="sql.php?<?php echo $url_query; ?>&sql_query=<?php echo urlencode('ALTER TABLE ' . PMA_backquote($table) . ' DROP ' . PMA_backquote($row['Field'])); ?>&cpurge=1&purgekey=<?php echo urlencode($row['Field']); ?>&zero_rows=<?php echo urlencode(sprintf(__('Column %s has been dropped'), htmlspecialchars($row['Field']))); ?>" + <a href="sql.php?<?php echo $url_query; ?>&sql_query=<?php echo urlencode('ALTER TABLE ' . PMA_backquote($table) . ' DROP ' . PMA_backquote($row['Field'])); ?>&dropped_column=<?php echo urlencode($row['Field']); ?>&zero_rows=<?php echo urlencode(sprintf(__('Column %s has been dropped'), htmlspecialchars($row['Field']))); ?>" onclick="return confirmLink(this, 'ALTER TABLE <?php echo PMA_jsFormat($table); ?> DROP <?php echo PMA_jsFormat($row['Field']); ?>')"> <?php echo $titles['Drop']; ?></a> </td>
hooks/post-receive