diff options
Diffstat (limited to 'src/controllers/IndexesController.php')
-rw-r--r-- | src/controllers/IndexesController.php | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/controllers/IndexesController.php b/src/controllers/IndexesController.php index 2b4aa54c..2bdfd9b8 100644 --- a/src/controllers/IndexesController.php +++ b/src/controllers/IndexesController.php @@ -15,7 +15,7 @@ class IndexesController extends BaseController { public $controller_title = 'strindexes'; - public $scripts = '<script src="' . self::SUBFOLDER . '/assets/js/indexes.js" type="text/javascript"></script>'; + public $scripts = '<script src="/assets/js/indexes.js" type="text/javascript"></script>'; /** * Default method to render the controller according to the action parameter. @@ -25,7 +25,7 @@ class IndexesController extends BaseController if ('tree' === $this->action) { return $this->doTree(); } - + $this->scripts = '<script src="' . \containerInstance()->subFolder . '/assets/js/indexes.js" type="text/javascript"></script>'; $this->printHeader($this->headerTitle(), $this->scripts); $onloadInit = false; @@ -53,7 +53,7 @@ class IndexesController extends BaseController break; case 'save_create_index': - if (isset($_POST['cancel'])) { + if (null !== $this->getPostParam('cancel')) { $this->doDefault(); } else { $this->doSaveCreateIndex(); @@ -65,7 +65,7 @@ class IndexesController extends BaseController break; case 'drop_index': - if (isset($_POST['drop'])) { + if (null !== $this->getPostParam('drop')) { $this->doDropIndex(false); } else { $this->doDefault(); @@ -144,7 +144,7 @@ class IndexesController extends BaseController ], ]; - $url = self::SUBFOLDER . '/src/views/indexes'; + $url = \containerInstance()->subFolder . '/src/views/indexes'; $actions = [ 'cluster' => [ @@ -268,13 +268,13 @@ class IndexesController extends BaseController echo '<p>', \sprintf($this->lang['strconfcluster'], $this->misc->printVal($_REQUEST['index'])), '</p>' . \PHP_EOL; - echo '<form action="' . self::SUBFOLDER . '/src/views/indexes" method="post">' . \PHP_EOL; + echo '<form action="' . \containerInstance()->subFolder . '/src/views/indexes" method="post">' . \PHP_EOL; echo '<p><input type="checkbox" id="analyze" name="analyze"', (isset($_REQUEST['analyze']) ? ' checked="checked"' : ''), ' />'; echo "<label for=\"analyze\">{$this->lang['stranalyze']}</label></p>" . \PHP_EOL; echo '<input type="hidden" name="action" value="cluster_index" />' . \PHP_EOL; echo '<input type="hidden" name="table" value="', \htmlspecialchars($object), '" />' . \PHP_EOL; echo '<input type="hidden" name="index" value="', \htmlspecialchars($_REQUEST['index']), '" />' . \PHP_EOL; - echo $this->misc->form; + echo $this->view->form; echo "<input type=\"submit\" name=\"cluster\" value=\"{$this->lang['strclusterindex']}\" />" . \PHP_EOL; echo "<input type=\"submit\" name=\"cancel\" value=\"{$this->lang['strcancel']}\" />" . \PHP_EOL; echo '</form>' . \PHP_EOL; @@ -434,11 +434,11 @@ class IndexesController extends BaseController echo '</table>'; echo '<p><input type="hidden" name="action" value="save_create_index" />' . \PHP_EOL; - echo $this->misc->form; + echo $this->view->form; echo '<input type="hidden" name="subject" value="', \htmlspecialchars($subject), '" />' . \PHP_EOL; echo '<input type="hidden" name="' . $subject . '" value="', \htmlspecialchars($object), '" />' . \PHP_EOL; echo "<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 '</form>' . \PHP_EOL; } @@ -503,11 +503,11 @@ class IndexesController extends BaseController $this->printTitle($this->lang['strdrop'], 'pg.index.drop'); echo '<p>', \sprintf($this->lang['strconfdropindex'], $this->misc->printVal($this->getRequestParam('index'))), '</p>' . \PHP_EOL; - echo '<form action="' . self::SUBFOLDER . '/src/views/indexes" method="post">' . \PHP_EOL; + echo '<form action="' . \containerInstance()->subFolder . '/src/views/indexes" method="post">' . \PHP_EOL; echo '<input type="hidden" name="action" value="drop_index" />' . \PHP_EOL; echo '<input type="hidden" name="table" value="', \htmlspecialchars($object), '" />' . \PHP_EOL; echo '<input type="hidden" name="index" value="', \htmlspecialchars($this->getRequestParam('index')), '" />' . \PHP_EOL; - echo $this->misc->form; + echo $this->view->form; echo '<p><input type="checkbox" id="cascade" name="cascade" value="1" />'; echo '<label for="cascade">' . $this->lang['strcascade'] . '</label></p>' . \PHP_EOL; echo "<input type=\"submit\" name=\"drop\" value=\"{$this->lang['strdrop']}\" />" . \PHP_EOL; |