diff options
Diffstat (limited to 'src/controllers/TriggersController.php')
-rw-r--r-- | src/controllers/TriggersController.php | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/src/controllers/TriggersController.php b/src/controllers/TriggersController.php index 9a9c3145..2c1eab77 100644 --- a/src/controllers/TriggersController.php +++ b/src/controllers/TriggersController.php @@ -29,7 +29,7 @@ class TriggersController extends BaseController switch ($this->action) { case 'alter': - if (isset($_POST['alter'])) { + if (null !== $this->getPostParam('alter')) { $this->doSaveAlter(); } else { $this->doDefault(); @@ -49,7 +49,7 @@ class TriggersController extends BaseController break; case 'save_create': - if (isset($_POST['cancel'])) { + if (null !== $this->getPostParam('cancel')) { $this->doDefault(); } else { $this->doSaveCreate(); @@ -273,7 +273,7 @@ class TriggersController extends BaseController if (0 < $triggerdata->recordCount()) { $this->coalesceArr($_POST, 'name', $triggerdata->fields['tgname']); - echo '<form action="' . self::SUBFOLDER . '/src/views/triggers" method="post">' . \PHP_EOL; + echo '<form action="' . \containerInstance()->subFolder . '/src/views/triggers" method="post">' . \PHP_EOL; echo '<table>' . \PHP_EOL; echo "<tr><th class=\"data\">{$this->lang['strname']}</th>" . \PHP_EOL; echo '<td class="data1">'; @@ -281,11 +281,11 @@ class TriggersController extends BaseController \htmlspecialchars($_POST['name']), '" />' . \PHP_EOL; echo '</table>' . \PHP_EOL; echo '<p><input type="hidden" name="action" value="alter" />' . \PHP_EOL; - echo '<input type="hidden" name="table" value="', \htmlspecialchars($_REQUEST['table']), '" />' . \PHP_EOL; + echo \sprintf('<input type="hidden" name="table" value="%s" />%s', \htmlspecialchars($_REQUEST['table']), \PHP_EOL); echo '<input type="hidden" name="trigger" value="', \htmlspecialchars($_REQUEST['trigger']), '" />' . \PHP_EOL; - echo $this->misc->form; + echo $this->view->form; echo "<input type=\"submit\" name=\"alter\" value=\"{$this->lang['strok']}\" />" . \PHP_EOL; - echo "<input type=\"submit\" name=\"cancel\" value=\"{$this->lang['strcancel']}\" /></p>" . \PHP_EOL; + echo \sprintf('<input type="submit" name="cancel" value="%s" /></p>%s', $this->lang['strcancel'], \PHP_EOL); echo '</form>' . \PHP_EOL; } else { echo "<p>{$this->lang['strnodata']}</p>" . \PHP_EOL; @@ -311,11 +311,11 @@ class TriggersController extends BaseController $this->misc->printVal($_REQUEST['table']) ), '</p>' . \PHP_EOL; - echo '<form action="' . self::SUBFOLDER . '/src/views/triggers" method="post">' . \PHP_EOL; + echo '<form action="' . \containerInstance()->subFolder . '/src/views/triggers" method="post">' . \PHP_EOL; echo '<input type="hidden" name="action" value="drop" />' . \PHP_EOL; - echo '<input type="hidden" name="table" value="', \htmlspecialchars($_REQUEST['table']), '" />' . \PHP_EOL; + echo \sprintf('<input type="hidden" name="table" value="%s" />%s', \htmlspecialchars($_REQUEST['table']), \PHP_EOL); echo '<input type="hidden" name="trigger" value="', \htmlspecialchars($_REQUEST['trigger']), '" />' . \PHP_EOL; - echo $this->misc->form; + echo $this->view->form; echo "<p><input type=\"checkbox\" id=\"cascade\" name=\"cascade\" /> <label for=\"cascade\">{$this->lang['strcascade']}</label></p>" . \PHP_EOL; echo "<input type=\"submit\" name=\"yes\" value=\"{$this->lang['stryes']}\" />" . \PHP_EOL; echo "<input type=\"submit\" name=\"no\" value=\"{$this->lang['strno']}\" />" . \PHP_EOL; @@ -350,11 +350,11 @@ class TriggersController extends BaseController $this->misc->printVal($_REQUEST['table']) ), '</p>' . \PHP_EOL; - echo '<form action="' . self::SUBFOLDER . '/src/views/triggers" method="post">' . \PHP_EOL; + echo '<form action="' . \containerInstance()->subFolder . '/src/views/triggers" method="post">' . \PHP_EOL; echo '<input type="hidden" name="action" value="enable" />' . \PHP_EOL; - echo '<input type="hidden" name="table" value="', \htmlspecialchars($_REQUEST['table']), '" />' . \PHP_EOL; + echo \sprintf('<input type="hidden" name="table" value="%s" />%s', \htmlspecialchars($_REQUEST['table']), \PHP_EOL); echo '<input type="hidden" name="trigger" value="', \htmlspecialchars($_REQUEST['trigger']), '" />' . \PHP_EOL; - echo $this->misc->form; + echo $this->view->form; echo "<input type=\"submit\" name=\"yes\" value=\"{$this->lang['stryes']}\" />" . \PHP_EOL; echo "<input type=\"submit\" name=\"no\" value=\"{$this->lang['strno']}\" />" . \PHP_EOL; echo '</form>' . \PHP_EOL; @@ -388,11 +388,11 @@ class TriggersController extends BaseController $this->misc->printVal($_REQUEST['table']) ), '</p>' . \PHP_EOL; - echo '<form action="' . self::SUBFOLDER . '/src/views/triggers" method="post">' . \PHP_EOL; + echo '<form action="' . \containerInstance()->subFolder . '/src/views/triggers" method="post">' . \PHP_EOL; echo '<input type="hidden" name="action" value="disable" />' . \PHP_EOL; - echo '<input type="hidden" name="table" value="', \htmlspecialchars($_REQUEST['table']), '" />' . \PHP_EOL; + echo \sprintf('<input type="hidden" name="table" value="%s" />%s', \htmlspecialchars($_REQUEST['table']), \PHP_EOL); echo '<input type="hidden" name="trigger" value="', \htmlspecialchars($_REQUEST['trigger']), '" />' . \PHP_EOL; - echo $this->misc->form; + echo $this->view->form; echo "<input type=\"submit\" name=\"yes\" value=\"{$this->lang['stryes']}\" />" . \PHP_EOL; echo "<input type=\"submit\" name=\"no\" value=\"{$this->lang['strno']}\" />" . \PHP_EOL; echo '</form>' . \PHP_EOL; @@ -449,7 +449,7 @@ class TriggersController extends BaseController $sel3 = new \PHPPgAdmin\XHtml\XHtmlSelect('formFrequency'); $sel3->set_data($data->triggerFrequency); - echo '<form action="' . self::SUBFOLDER . '/src/views/triggers" method="post">' . \PHP_EOL; + echo '<form action="' . \containerInstance()->subFolder . '/src/views/triggers" method="post">' . \PHP_EOL; echo '<table>' . \PHP_EOL; echo '<tr>' . \PHP_EOL; echo " <th class=\"data\">{$this->lang['strname']}</th>" . \PHP_EOL; @@ -473,10 +473,10 @@ class TriggersController extends BaseController echo '<td class="data1">(<input type="text" name="formTriggerArgs" size="32" />)</td>' . \PHP_EOL; echo '</tr></table>' . \PHP_EOL; echo "<p><input type=\"submit\" value=\"{$this->lang['strcreate']}\" />" . \PHP_EOL; - echo "<input type=\"submit\" name=\"cancel\" value=\"{$this->lang['strcancel']}\" /></p>" . \PHP_EOL; + echo \sprintf('<input type="submit" name="cancel" value="%s" /></p>%s', $this->lang['strcancel'], \PHP_EOL); echo '<input type="hidden" name="action" value="save_create" />' . \PHP_EOL; - echo '<input type="hidden" name="table" value="', \htmlspecialchars($_REQUEST['table']), '" />' . \PHP_EOL; - echo $this->misc->form; + echo \sprintf('<input type="hidden" name="table" value="%s" />%s', \htmlspecialchars($_REQUEST['table']), \PHP_EOL); + echo $this->view->form; echo '</form>' . \PHP_EOL; } |