The branch, master has been updated via f6982bae8491dc425e7d9a2e9cb0841a7ff435e1 (commit) via cccc78a98e0280d5a6fd7566de9a5a498dfaf069 (commit) via 46d0ea701fabee81e21272cd6aca005bcafa3c6b (commit) from 98f9a70ed92690167e498eba9ab7de2480dca694 (commit)
- Log ----------------------------------------------------------------- commit f6982bae8491dc425e7d9a2e9cb0841a7ff435e1 Author: Rouslan Placella rouslan@placella.com Date: Tue Aug 9 16:41:28 2011 +0100
Triggers don't work with views
commit cccc78a98e0280d5a6fd7566de9a5a498dfaf069 Author: Rouslan Placella rouslan@placella.com Date: Tue Aug 9 16:32:47 2011 +0100
Unified some localised strings for routines, triggers and events.
commit 46d0ea701fabee81e21272cd6aca005bcafa3c6b Author: Rouslan Placella rouslan@placella.com Date: Tue Aug 9 16:29:05 2011 +0100
Select current table in editor when adding a trigger
-----------------------------------------------------------------------
Summary of changes: libraries/rte/rte_events.lib.php | 2 +- libraries/rte/rte_routines.lib.php | 2 +- libraries/rte/rte_triggers.lib.php | 12 ++++++++---- libraries/tbl_links.inc.php | 2 +- 4 files changed, 11 insertions(+), 7 deletions(-)
diff --git a/libraries/rte/rte_events.lib.php b/libraries/rte/rte_events.lib.php index a449ff2..d6a8fdd 100644 --- a/libraries/rte/rte_events.lib.php +++ b/libraries/rte/rte_events.lib.php @@ -178,7 +178,7 @@ function PMA_EVN_handleEditor() } // Get the data for the form (if any) if (! empty($_REQUEST['add_item'])) { - $title = __("Create event"); + $title = PMA_RTE_getWord('add'); $item = PMA_EVN_getDataFromRequest(); $mode = 'add'; } else if (! empty($_REQUEST['edit_item'])) { diff --git a/libraries/rte/rte_routines.lib.php b/libraries/rte/rte_routines.lib.php index 2edb4ca..3e63603 100644 --- a/libraries/rte/rte_routines.lib.php +++ b/libraries/rte/rte_routines.lib.php @@ -337,7 +337,7 @@ function PMA_RTN_handleEditor() } // Get the data for the form (if any) if (! empty($_REQUEST['add_item'])) { - $title = __("Create routine"); + $title = PMA_RTE_getWord('add'); $routine = PMA_RTN_getDataFromRequest(); $mode = 'add'; } else if (! empty($_REQUEST['edit_item'])) { diff --git a/libraries/rte/rte_triggers.lib.php b/libraries/rte/rte_triggers.lib.php index 8c65a67..64b8b85 100644 --- a/libraries/rte/rte_triggers.lib.php +++ b/libraries/rte/rte_triggers.lib.php @@ -154,7 +154,7 @@ function PMA_TRI_handleEditor() ) { // Get the data for the form (if any) if (! empty($_REQUEST['add_item'])) { - $title = __("Create trigger"); + $title = PMA_RTE_getWord('add'); $item = PMA_TRI_getDataFromRequest(); $mode = 'add'; } else if (! empty($_REQUEST['edit_item'])) { @@ -308,10 +308,14 @@ function PMA_TRI_getEditorForm($mode, $item) $retval .= " <select name='item_table'>\n"; foreach (PMA_DBI_get_tables($db) as $key => $value) { $selected = ""; - if ($value == $item['item_table']) { - $selected = " selected='selected'"; + if (! PMA_Table::isView($db, $value)) { + if ($mode == 'add' && $value == $table) { + $selected = " selected='selected'"; + } else if ($mode == 'edit' && $value == $item['item_table']) { + $selected = " selected='selected'"; + } + $retval .= " <option$selected>$value</option>\n"; } - $retval .= " <option$selected>$value</option>\n"; } $retval .= " </select>\n"; $retval .= " </td>\n"; diff --git a/libraries/tbl_links.inc.php b/libraries/tbl_links.inc.php index 3de9ed2..1d8af40 100644 --- a/libraries/tbl_links.inc.php +++ b/libraries/tbl_links.inc.php @@ -98,7 +98,7 @@ if (PMA_Tracker::isActive()) { $tabs['tracking']['link'] = 'tbl_tracking.php'; } if (!$db_is_information_schema && !PMA_DRIZZLE) { - if (PMA_currentUserHasPrivilege('TRIGGER', $db, $table)) { + if (PMA_currentUserHasPrivilege('TRIGGER', $db, $table) && ! PMA_Table::isView($db, $table)) { $tabs['triggers']['link'] = 'tbl_triggers.php'; $tabs['triggers']['text'] = __('Triggers'); $tabs['triggers']['icon'] = 'ic_b_triggers';
hooks/post-receive