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-03-15 02:01:30 +0300
committerFelipe Figueroa <amenadiel@gmail.com>2018-03-15 02:01:30 +0300
commitc2a9af3868f88a47497b88b0dbd3ac4994e01670 (patch)
treea672a2221f1454d3cf761f797b49f312f1835a16 /src/controllers/PrivilegesController.php
parent2856b4d13c4cc95d6c328baddedf81c6a259a7f1 (diff)
add package tag to controllers
Diffstat (limited to 'src/controllers/PrivilegesController.php')
-rw-r--r--src/controllers/PrivilegesController.php96
1 files changed, 48 insertions, 48 deletions
diff --git a/src/controllers/PrivilegesController.php b/src/controllers/PrivilegesController.php
index aca40706..251f0a9e 100644
--- a/src/controllers/PrivilegesController.php
+++ b/src/controllers/PrivilegesController.php
@@ -1,7 +1,7 @@
<?php
-/*
- * PHPPgAdmin v6.0.0-beta.30
+/**
+ * PHPPgAdmin v6.0.0-beta.33
*/
namespace PHPPgAdmin\Controller;
@@ -12,14 +12,14 @@ namespace PHPPgAdmin\Controller;
class PrivilegesController extends BaseController
{
public $controller_name = 'PrivilegesController';
- public $table_place = 'privileges-privileges';
+ public $table_place = 'privileges-privileges';
/**
* Default method to render the controller according to the action parameter.
*/
public function render()
{
- $lang = $this->lang;
+ $lang = $this->lang;
$action = $this->action;
$this->printHeader($lang['strprivileges']);
@@ -54,9 +54,9 @@ class PrivilegesController extends BaseController
*/
public function doDefault($msg = '')
{
- $lang = $this->lang;
+ $lang = $this->lang;
$action = $this->action;
- $data = $this->misc->getDatabaseAccessor();
+ $data = $this->misc->getDatabaseAccessor();
$this->printTrail($_REQUEST['subject']);
@@ -79,8 +79,8 @@ class PrivilegesController extends BaseController
$this->printMsg($msg);
// Determine whether object should be ref'd by name or oid.
- if (isset($_REQUEST[$_REQUEST['subject'] . '_oid'])) {
- $object = $_REQUEST[$_REQUEST['subject'] . '_oid'];
+ if (isset($_REQUEST[$_REQUEST['subject'].'_oid'])) {
+ $object = $_REQUEST[$_REQUEST['subject'].'_oid'];
} else {
$object = $_REQUEST[$_REQUEST['subject']];
}
@@ -163,46 +163,46 @@ class PrivilegesController extends BaseController
case 'function':
case 'tablespace':
$alllabel = "showall{$_REQUEST['subject']}s";
- $allurl = "{$_REQUEST['subject']}s.php";
- $alltxt = $lang["strshowall{$_REQUEST['subject']}s"];
+ $allurl = "{$_REQUEST['subject']}s.php";
+ $alltxt = $lang["strshowall{$_REQUEST['subject']}s"];
break;
case 'schema':
$alllabel = 'showallschemas';
- $allurl = 'schemas.php';
- $alltxt = $lang['strshowallschemas'];
+ $allurl = 'schemas.php';
+ $alltxt = $lang['strshowallschemas'];
break;
case 'database':
$alllabel = 'showalldatabases';
- $allurl = 'alldb.php';
- $alltxt = $lang['strshowalldatabases'];
+ $allurl = 'alldb.php';
+ $alltxt = $lang['strshowalldatabases'];
break;
}
$subject = $_REQUEST['subject'];
- $object = $_REQUEST[$_REQUEST['subject']];
+ $object = $_REQUEST[$_REQUEST['subject']];
if ('function' == $_REQUEST['subject']) {
- $objectoid = $_REQUEST[$_REQUEST['subject'] . '_oid'];
- $urlvars = [
- 'action' => 'alter',
- 'server' => $_REQUEST['server'],
- 'database' => $_REQUEST['database'],
- 'schema' => $_REQUEST['schema'],
- $subject => $object,
+ $objectoid = $_REQUEST[$_REQUEST['subject'].'_oid'];
+ $urlvars = [
+ 'action' => 'alter',
+ 'server' => $_REQUEST['server'],
+ 'database' => $_REQUEST['database'],
+ 'schema' => $_REQUEST['schema'],
+ $subject => $object,
"{$subject}_oid" => $objectoid,
- 'subject' => $subject,
+ 'subject' => $subject,
];
} elseif ('column' == $_REQUEST['subject']) {
$urlvars = [
- 'action' => 'alter',
- 'server' => $_REQUEST['server'],
+ 'action' => 'alter',
+ 'server' => $_REQUEST['server'],
'database' => $_REQUEST['database'],
- 'schema' => $_REQUEST['schema'],
- $subject => $object,
- 'subject' => $subject,
+ 'schema' => $_REQUEST['schema'],
+ $subject => $object,
+ 'subject' => $subject,
];
if (isset($_REQUEST['table'])) {
@@ -212,11 +212,11 @@ class PrivilegesController extends BaseController
}
} else {
$urlvars = [
- 'action' => 'alter',
- 'server' => $_REQUEST['server'],
+ 'action' => 'alter',
+ 'server' => $_REQUEST['server'],
'database' => $_REQUEST['database'],
- $subject => $object,
- 'subject' => $subject,
+ $subject => $object,
+ 'subject' => $subject,
];
if (isset($_REQUEST['schema'])) {
$urlvars['schema'] = $_REQUEST['schema'];
@@ -224,19 +224,19 @@ class PrivilegesController extends BaseController
}
$navlinks = [
- 'grant' => [
- 'attr' => [
+ 'grant' => [
+ 'attr' => [
'href' => [
- 'url' => 'privileges.php',
+ 'url' => 'privileges.php',
'urlvars' => array_merge($urlvars, ['mode' => 'grant']),
],
],
'content' => $lang['strgrant'],
],
'revoke' => [
- 'attr' => [
+ 'attr' => [
'href' => [
- 'url' => 'privileges.php',
+ 'url' => 'privileges.php',
'urlvars' => array_merge($urlvars, ['mode' => 'revoke']),
],
],
@@ -246,11 +246,11 @@ class PrivilegesController extends BaseController
if (isset($allurl)) {
$navlinks[$alllabel] = [
- 'attr' => [
+ 'attr' => [
'href' => [
- 'url' => $allurl,
+ 'url' => $allurl,
'urlvars' => [
- 'server' => $_REQUEST['server'],
+ 'server' => $_REQUEST['server'],
'database' => $_REQUEST['database'],
],
],
@@ -274,9 +274,9 @@ class PrivilegesController extends BaseController
*/
public function doAlter($confirm, $mode, $msg = '')
{
- $lang = $this->lang;
+ $lang = $this->lang;
$action = $this->action;
- $data = $this->misc->getDatabaseAccessor();
+ $data = $this->misc->getDatabaseAccessor();
if (!isset($_REQUEST['username'])) {
$_REQUEST['username'] = [];
@@ -310,7 +310,7 @@ class PrivilegesController extends BaseController
}
$this->printMsg($msg);
- echo '<form action="' . \SUBFOLDER . "/src/views/privileges.php\" method=\"post\">\n";
+ echo '<form action="'.\SUBFOLDER."/src/views/privileges.php\" method=\"post\">\n";
echo "<table>\n";
echo "<tr><th class=\"data left\">{$lang['strusers']}</th>\n";
echo '<td class="data1"><select name="username[]" multiple="multiple" size="', min(6, $users->recordCount()), "\">\n";
@@ -364,9 +364,9 @@ class PrivilegesController extends BaseController
echo "<p><input type=\"hidden\" name=\"action\" value=\"save\" />\n";
echo '<input type="hidden" name="mode" value="', htmlspecialchars($mode), "\" />\n";
echo '<input type="hidden" name="subject" value="', htmlspecialchars($_REQUEST['subject']), "\" />\n";
- if (isset($_REQUEST[$_REQUEST['subject'] . '_oid'])) {
- echo '<input type="hidden" name="', htmlspecialchars($_REQUEST['subject'] . '_oid'),
- '" value="', htmlspecialchars($_REQUEST[$_REQUEST['subject'] . '_oid']), "\" />\n";
+ if (isset($_REQUEST[$_REQUEST['subject'].'_oid'])) {
+ echo '<input type="hidden" name="', htmlspecialchars($_REQUEST['subject'].'_oid'),
+ '" value="', htmlspecialchars($_REQUEST[$_REQUEST['subject'].'_oid']), "\" />\n";
}
echo '<input type="hidden" name="', htmlspecialchars($_REQUEST['subject']),
@@ -387,8 +387,8 @@ class PrivilegesController extends BaseController
echo "</form>\n";
} else {
// Determine whether object should be ref'd by name or oid.
- if (isset($_REQUEST[$_REQUEST['subject'] . '_oid'])) {
- $object = $_REQUEST[$_REQUEST['subject'] . '_oid'];
+ if (isset($_REQUEST[$_REQUEST['subject'].'_oid'])) {
+ $object = $_REQUEST[$_REQUEST['subject'].'_oid'];
} else {
$object = $_REQUEST[$_REQUEST['subject']];
}