diff options
author | Felipe Figueroa <amenadiel@gmail.com> | 2018-02-15 22:17:10 +0300 |
---|---|---|
committer | StyleCI Bot <bot@styleci.io> | 2018-02-15 22:17:10 +0300 |
commit | b0dfd36560280099ec02aac7e46f4c36166f0b7e (patch) | |
tree | b338938e9412d108e1e4bb60e4ea59d33cbc6f7d /src/controllers/ColpropertiesController.php | |
parent | b4944af333e89b9aa9d3bb5e975a4787599a40fc (diff) |
Apply fixes from StyleCI
[ci skip] [skip ci]
Diffstat (limited to 'src/controllers/ColpropertiesController.php')
-rw-r--r-- | src/controllers/ColpropertiesController.php | 86 |
1 files changed, 43 insertions, 43 deletions
diff --git a/src/controllers/ColpropertiesController.php b/src/controllers/ColpropertiesController.php index 13e7795e..342de19f 100644 --- a/src/controllers/ColpropertiesController.php +++ b/src/controllers/ColpropertiesController.php @@ -14,8 +14,8 @@ use PHPPgAdmin\Decorators\Decorator; class ColpropertiesController extends BaseController { public $controller_name = 'ColpropertiesController'; - public $tableName = ''; - public $table_place = 'colproperties-colproperties'; + public $tableName = ''; + public $table_place = 'colproperties-colproperties'; /** * Default method to render the controller according to the action parameter. @@ -32,9 +32,9 @@ class ColpropertiesController extends BaseController $conf = $this->conf; - $lang = $this->lang; + $lang = $this->lang; $action = $this->action; - $data = $this->misc->getDatabaseAccessor(); + $data = $this->misc->getDatabaseAccessor(); $this->printHeader($lang['strtables'].' - '.$this->tableName, null, true, 'header_select2.twig'); $this->printBody(); @@ -111,9 +111,9 @@ class ColpropertiesController extends BaseController if ($isTable) { $column['notnull'] = [ - 'title' => $lang['strnotnull'], - 'field' => Decorator::field('attnotnull'), - 'type' => 'bool', + 'title' => $lang['strnotnull'], + 'field' => Decorator::field('attnotnull'), + 'type' => 'bool', 'params' => ['true' => 'NOT NULL', 'false' => ''], ]; $column['default'] = [ @@ -128,8 +128,8 @@ class ColpropertiesController extends BaseController echo "<br />\n"; $f_attname = $_REQUEST['column']; - $f_table = $this->tableName; - $f_schema = $data->_schema; + $f_table = $this->tableName; + $f_schema = $data->_schema; $data->fieldClean($f_attname); $data->fieldClean($f_table); $data->fieldClean($f_schema); @@ -144,16 +144,16 @@ class ColpropertiesController extends BaseController 'browse' => [ 'attr' => [ 'href' => [ - 'url' => 'display.php', + 'url' => 'display.php', 'urlvars' => [ - 'subject' => 'column', - 'server' => $_REQUEST['server'], + 'subject' => 'column', + 'server' => $_REQUEST['server'], 'database' => $_REQUEST['database'], - 'schema' => $_REQUEST['schema'], - 'table' => $this->tableName, - 'column' => $_REQUEST['column'], - 'return' => 'column', - 'query' => $query, + 'schema' => $_REQUEST['schema'], + 'table' => $this->tableName, + 'column' => $_REQUEST['column'], + 'return' => 'column', + 'query' => $query, ], ], ], @@ -162,14 +162,14 @@ class ColpropertiesController extends BaseController 'alter' => [ 'attr' => [ 'href' => [ - 'url' => 'colproperties.php', + 'url' => 'colproperties.php', 'urlvars' => [ - 'action' => 'properties', - 'server' => $_REQUEST['server'], + 'action' => 'properties', + 'server' => $_REQUEST['server'], 'database' => $_REQUEST['database'], - 'schema' => $_REQUEST['schema'], - 'table' => $this->tableName, - 'column' => $_REQUEST['column'], + 'schema' => $_REQUEST['schema'], + 'table' => $this->tableName, + 'column' => $_REQUEST['column'], ], ], ], @@ -178,14 +178,14 @@ class ColpropertiesController extends BaseController 'drop' => [ 'attr' => [ 'href' => [ - 'url' => 'tblproperties.php', + 'url' => 'tblproperties.php', 'urlvars' => [ - 'action' => 'confirm_drop', - 'server' => $_REQUEST['server'], + 'action' => 'confirm_drop', + 'server' => $_REQUEST['server'], 'database' => $_REQUEST['database'], - 'schema' => $_REQUEST['schema'], - 'table' => $this->tableName, - 'column' => $_REQUEST['column'], + 'schema' => $_REQUEST['schema'], + 'table' => $this->tableName, + 'column' => $_REQUEST['column'], ], ], ], @@ -198,16 +198,16 @@ class ColpropertiesController extends BaseController 'browse' => [ 'attr' => [ 'href' => [ - 'url' => 'display.php', + 'url' => 'display.php', 'urlvars' => [ - 'subject' => 'column', - 'server' => $_REQUEST['server'], + 'subject' => 'column', + 'server' => $_REQUEST['server'], 'database' => $_REQUEST['database'], - 'schema' => $_REQUEST['schema'], - 'view' => $this->tableName, - 'column' => $_REQUEST['column'], - 'return' => 'column', - 'query' => $query, + 'schema' => $_REQUEST['schema'], + 'view' => $this->tableName, + 'column' => $_REQUEST['column'], + 'return' => 'column', + 'query' => $query, ], ], ], @@ -258,21 +258,21 @@ class ColpropertiesController extends BaseController } echo "<th class=\"data\">{$lang['strnotnull']}</th>\n<th class=\"data\">{$lang['strdefault']}</th>\n<th class=\"data\">{$lang['strcomment']}</th></tr>\n"; - $column = $data->getTableAttributes($_REQUEST['table'], $_REQUEST['column']); + $column = $data->getTableAttributes($_REQUEST['table'], $_REQUEST['column']); $column->fields['attnotnull'] = $data->phpBool($column->fields['attnotnull']); // Upon first drawing the screen, load the existing column information // from the database. if (!isset($_REQUEST['default'])) { $_REQUEST['field'] = $column->fields['attname']; - $_REQUEST['type'] = $column->fields['base_type']; + $_REQUEST['type'] = $column->fields['base_type']; // Check to see if its' an array type... // XXX: HACKY if ('[]' == substr($column->fields['base_type'], strlen($column->fields['base_type']) - 2)) { - $_REQUEST['type'] = substr($column->fields['base_type'], 0, strlen($column->fields['base_type']) - 2); + $_REQUEST['type'] = substr($column->fields['base_type'], 0, strlen($column->fields['base_type']) - 2); $_REQUEST['array'] = '[]'; } else { - $_REQUEST['type'] = $column->fields['base_type']; + $_REQUEST['type'] = $column->fields['base_type']; $_REQUEST['array'] = ''; } // To figure out the length, look in the brackets :( @@ -299,12 +299,12 @@ class ColpropertiesController extends BaseController $escaped_predef_types = []; // the JS escaped array elements if ($data->hasAlterColumnType()) { // Fetch all available types - $types = $data->getTypes(true, false, true); + $types = $data->getTypes(true, false, true); $types_for_js = []; echo "<td><select name=\"type\" id=\"type\" class=\"select2\" onchange=\"checkLengths(document.getElementById('type').value,'');\">"."\n"; while (!$types->EOF) { - $typname = $types->fields['typname']; + $typname = $types->fields['typname']; $types_for_js[] = $typname; echo "\t<option value=\"", htmlspecialchars($typname), '"', ($typname == $_REQUEST['type']) ? ' selected="selected"' : '', '>', $this->misc->printVal($typname), "</option>\n"; |