diff options
author | Michal Čihař <michal@cihar.com> | 2016-02-19 15:33:56 +0300 |
---|---|---|
committer | Michal Čihař <michal@cihar.com> | 2016-02-19 15:33:56 +0300 |
commit | fbf756c7d65285e428ffa09fbd293a0132ee901b (patch) | |
tree | 6ed200470b2ed41cb10c1300bdae5b831ba575b2 /lint.php | |
parent | 969e16858b94a465332f3ce6cd1bfad895607f2f (diff) | |
parent | 47ff669fdc0d9b00c50c878dd85b7b27106daf94 (diff) |
Merge branch 'QA_4_5' into QA_4_6
Diffstat (limited to 'lint.php')
-rw-r--r-- | lint.php | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -31,4 +31,16 @@ PMA\libraries\Response::getInstance()->disable(); PMA_headerJSON(); +if (! empty($_POST['options'])) { + $options = $_POST['options']; + + if (! empty($options['routine_editor'])) { + $sql_query = 'CREATE PROCEDURE `a`() ' . $sql_query; + } elseif (! empty($options['trigger_editor'])) { + $sql_query = 'CREATE TRIGGER `a` AFTER INSERT ON `b` FOR EACH ROW ' . $sql_query; + } elseif (! empty($options['event_editor'])) { + $sql_query = 'CREATE EVENT `a` ON SCHEDULE EVERY MINUTE DO ' . $sql_query; + } +} + echo json_encode(Linter::lint($sql_query)); |