diff options
author | Felipe Figueroa <amenadiel@gmail.com> | 2018-03-21 16:43:48 +0300 |
---|---|---|
committer | Felipe Figueroa <amenadiel@gmail.com> | 2018-03-21 16:43:48 +0300 |
commit | ad1beaaa0800fe776bb92e80e582be63984d3192 (patch) | |
tree | 7e6a004713cfc20f0ad00276665de4bad97179fb /src/controllers/AggregatesController.php | |
parent | 0cc5a0bc23dc46ad9b61dc563dab480e024a36cd (diff) |
replaces usage of php scripts in links and methods. Use slim routes instead
Diffstat (limited to 'src/controllers/AggregatesController.php')
-rw-r--r-- | src/controllers/AggregatesController.php | 30 |
1 files changed, 12 insertions, 18 deletions
diff --git a/src/controllers/AggregatesController.php b/src/controllers/AggregatesController.php index b23c0823..b70e1e44 100644 --- a/src/controllers/AggregatesController.php +++ b/src/controllers/AggregatesController.php @@ -18,22 +18,16 @@ class AggregatesController extends BaseController /** * Default method to render the controller according to the action parameter. */ - public function render() - { - } + public function render() {} /** * Show default list of aggregate functions in the database. * * @param mixed $msg */ - public function doDefault($msg = '') - { - } + public function doDefault($msg = '') {} - public function doTree() - { - } + public function doTree() {} /** * Actually creates the new aggregate in the database. @@ -129,7 +123,7 @@ class AggregatesController extends BaseController $this->printTitle($lang['strcreateaggregate'], 'pg.aggregate.create'); $this->printMsg($msg); - echo '<form action="'.\SUBFOLDER."/src/views/aggregates.php\" method=\"post\">\n"; + echo '<form action="' . \SUBFOLDER . "/src/views/aggregates\" method=\"post\">\n"; echo "<table>\n"; echo "\t<tr>\n\t\t<th class=\"data left required\">{$lang['strname']}</th>\n"; echo "\t\t<td class=\"data\"><input name=\"name\" size=\"32\" maxlength=\"{$data->_maxNameLen}\" value=\"", @@ -213,7 +207,7 @@ class AggregatesController extends BaseController $this->printTitle($lang['stralter'], 'pg.aggregate.alter'); $this->printMsg($msg); - echo '<form action="'.\SUBFOLDER."/src/views/aggregates.php\" method=\"post\">\n"; + echo '<form action="' . \SUBFOLDER . "/src/views/aggregates\" method=\"post\">\n"; $aggrdata = $data->getAggregate($_REQUEST['aggrname'], $_REQUEST['aggrtype']); if ($aggrdata->recordCount() > 0) { // Output table header @@ -262,7 +256,7 @@ class AggregatesController extends BaseController echo '<p>', sprintf($lang['strconfdropaggregate'], htmlspecialchars($_REQUEST['aggrname'])), "</p>\n"; - echo '<form action="'.\SUBFOLDER."/src/views/aggregates.php\" method=\"post\">\n"; + echo '<form action="' . \SUBFOLDER . "/src/views/aggregates\" method=\"post\">\n"; echo "<p><input type=\"checkbox\" id=\"cascade\" name=\"cascade\" /> <label for=\"cascade\">{$lang['strcascade']}</label></p>\n"; echo "<p><input type=\"hidden\" name=\"action\" value=\"drop\" />\n"; echo '<input type="hidden" name="aggrname" value="', htmlspecialchars($_REQUEST['aggrname']), "\" />\n"; @@ -328,9 +322,9 @@ class AggregatesController extends BaseController $navlinks = [ 'showall' => [ - 'attr' => [ + 'attr' => [ 'href' => [ - 'url' => 'aggregates.php', + 'url' => 'aggregates', 'urlvars' => [ 'server' => $_REQUEST['server'], 'database' => $_REQUEST['database'], @@ -344,9 +338,9 @@ class AggregatesController extends BaseController if ($data->hasAlterAggregate()) { $navlinks['alter'] = [ - 'attr' => [ + 'attr' => [ 'href' => [ - 'url' => 'aggregates.php', + 'url' => 'aggregates', 'urlvars' => [ 'action' => 'alter', 'server' => $_REQUEST['server'], @@ -362,9 +356,9 @@ class AggregatesController extends BaseController } $navlinks['drop'] = [ - 'attr' => [ + 'attr' => [ 'href' => [ - 'url' => 'aggregates.php', + 'url' => 'aggregates', 'urlvars' => [ 'action' => 'confirm_drop', 'server' => $_REQUEST['server'], |