Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/HuasoFoundries/phpPgAdmin6.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelipe Figueroa <amenadiel@gmail.com>2018-05-11 20:03:56 +0300
committerFelipe Figueroa <amenadiel@gmail.com>2018-05-11 20:03:56 +0300
commit1c9b5db203985b2d6e23728f33b0080e02f2f1aa (patch)
tree2b99c1ab8189ac61dfe831630b0013f91c8757eb /src/controllers/ViewsController.php
parentf9149bf8e6068cdfe725fb90d3145315f90cc0e9 (diff)
enable correct routing when running with dev server
Diffstat (limited to 'src/controllers/ViewsController.php')
-rw-r--r--src/controllers/ViewsController.php23
1 files changed, 12 insertions, 11 deletions
diff --git a/src/controllers/ViewsController.php b/src/controllers/ViewsController.php
index af406826..41ccc251 100644
--- a/src/controllers/ViewsController.php
+++ b/src/controllers/ViewsController.php
@@ -17,6 +17,7 @@ class ViewsController extends BaseController
{
public $table_place = 'views-views';
public $controller_title = 'strviews';
+
/**
* Default method to render the controller according to the action parameter.
*/
@@ -117,7 +118,7 @@ class ViewsController extends BaseController
'view' => [
'title' => $this->lang['strview'],
'field' => Decorator::field('relname'),
- 'url' => \SUBFOLDER . "/redirect/view?{$this->misc->href}&amp;",
+ 'url' => \SUBFOLDER."/redirect/view?{$this->misc->href}&amp;",
'vars' => ['view' => 'relname'],
],
'owner' => [
@@ -304,7 +305,7 @@ class ViewsController extends BaseController
$attrs = $data->getTableAttributes($_REQUEST['view']);
- echo '<form action="' . \SUBFOLDER . '/src/views/' . $this->script . '" method="post" id="selectform">';
+ echo '<form action="'.\SUBFOLDER.'/src/views/'.$this->script.'" method="post" id="selectform">';
echo "\n";
if ($attrs->recordCount() > 0) {
@@ -436,7 +437,7 @@ class ViewsController extends BaseController
$this->printTrail('view');
$this->printTitle($this->lang['strdrop'], 'pg.view.drop');
- echo '<form action="' . \SUBFOLDER . "/src/views/views\" method=\"post\">\n";
+ echo '<form action="'.\SUBFOLDER."/src/views/views\" method=\"post\">\n";
//If multi drop
if (isset($_REQUEST['ma'])) {
@@ -547,7 +548,7 @@ class ViewsController extends BaseController
[
'schemaname' => $arrSelTables[$i]['schemaname'],
'tablename' => $arrSelTables[$i]['tablename'],
- 'fieldname' => $attrs->fields['attname']]
+ 'fieldname' => $attrs->fields['attname'], ]
);
$attrs->moveNext();
}
@@ -556,7 +557,7 @@ class ViewsController extends BaseController
}
asort($arrFields);
- echo '<form action="' . \SUBFOLDER . "/src/views/views\" method=\"post\">\n";
+ echo '<form action="'.\SUBFOLDER."/src/views/views\" method=\"post\">\n";
echo "<table>\n";
echo "<tr><th class=\"data\">{$this->lang['strviewname']}</th></tr>";
echo "<tr>\n<td class=\"data1\">\n";
@@ -635,7 +636,7 @@ class ViewsController extends BaseController
echo "<p><input type=\"hidden\" name=\"action\" value=\"save_create_wiz\" />\n";
foreach ($arrSelTables as $curTable) {
- echo '<input type="hidden" name="formTables[]" value="' . htmlspecialchars(serialize($curTable)) . "\" />\n";
+ echo '<input type="hidden" name="formTables[]" value="'.htmlspecialchars(serialize($curTable))."\" />\n";
}
echo $this->misc->form;
@@ -660,7 +661,7 @@ class ViewsController extends BaseController
$this->printTitle($this->lang['strcreateviewwiz'], 'pg.view.create');
$this->printMsg($msg);
- echo '<form action="' . \SUBFOLDER . "/src/views/views\" method=\"post\">\n";
+ echo '<form action="'.\SUBFOLDER."/src/views/views\" method=\"post\">\n";
echo "<table>\n";
echo "<tr><th class=\"data\">{$this->lang['strtables']}</th></tr>";
echo "<tr>\n<td class=\"data1\">\n";
@@ -670,7 +671,7 @@ class ViewsController extends BaseController
$arrTmp = [];
$arrTmp['schemaname'] = $tables->fields['nspname'];
$arrTmp['tablename'] = $tables->fields['relname'];
- $arrTables[$tables->fields['nspname'] . '.' . $tables->fields['relname']] = serialize($arrTmp);
+ $arrTables[$tables->fields['nspname'].'.'.$tables->fields['relname']] = serialize($arrTmp);
$tables->moveNext();
}
echo \PHPPgAdmin\XHtml\HTMLController::printCombo($arrTables, 'formTables[]', false, '', true);
@@ -712,7 +713,7 @@ class ViewsController extends BaseController
$this->printTitle($this->lang['strcreateview'], 'pg.view.create');
$this->printMsg($msg);
- echo '<form action="' . \SUBFOLDER . "/src/views/views\" method=\"post\">\n";
+ echo '<form action="'.\SUBFOLDER."/src/views/views\" method=\"post\">\n";
echo "<table style=\"width: 100%\">\n";
echo "\t<tr>\n\t\t<th class=\"data left required\">{$this->lang['strname']}</th>\n";
echo "\t<td class=\"data1\"><input name=\"formView\" size=\"32\" maxlength=\"{$data->_maxNameLen}\" value=\"",
@@ -828,7 +829,7 @@ class ViewsController extends BaseController
if ((!in_array($curLink, $arrJoined, true) && in_array($tbl1, $arrUsedTbls, true)) || !count($arrJoined)) {
// Make sure for multi-column foreign keys that we use a table alias tables joined to more than once
// This can (and should be) more optimized for multi-column foreign keys
- $adj_tbl2 = in_array($tbl2, $arrUsedTbls, true) ? "${tbl2} AS alias_ppa_" . mktime() : $tbl2;
+ $adj_tbl2 = in_array($tbl2, $arrUsedTbls, true) ? "${tbl2} AS alias_ppa_".mktime() : $tbl2;
$linkFields .= strlen($linkFields) ? "{$curLink['operator']} ${adj_tbl2} ON (\"{$arrLeftLink['schemaname']}\".\"{$arrLeftLink['tablename']}\".\"{$arrLeftLink['fieldname']}\" = \"{$arrRightLink['schemaname']}\".\"{$arrRightLink['tablename']}\".\"{$arrRightLink['fieldname']}\") "
: "${tbl1} {$curLink['operator']} ${adj_tbl2} ON (\"{$arrLeftLink['schemaname']}\".\"{$arrLeftLink['tablename']}\".\"{$arrLeftLink['fieldname']}\" = \"{$arrRightLink['schemaname']}\".\"{$arrRightLink['tablename']}\".\"{$arrRightLink['fieldname']}\") ";
@@ -874,7 +875,7 @@ class ViewsController extends BaseController
//add where from additional conditions
if (strlen($addConditions)) {
- $viewQuery .= ' WHERE ' . $addConditions;
+ $viewQuery .= ' WHERE '.$addConditions;
}
try {