fix short variables

Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
This commit is contained in:
Michael Kaufmann (d00p)
2018-03-03 21:29:16 +01:00
parent f30887e3c0
commit 7cc17b9ca5
2 changed files with 9 additions and 9 deletions

View File

@@ -432,15 +432,15 @@ abstract class ApiCommand
* @param string $table
* @param string $keyfield
* @param int $key
* @param string $op
* @param string $operator
* @param string $resource
* @param string $extra
*/
protected static function updateResourceUsage($table = null, $keyfield = null, $key = null, $op = '+', $resource = null, $extra = null)
protected static function updateResourceUsage($table = null, $keyfield = null, $key = null, $operator = '+', $resource = null, $extra = null)
{
$stmt = Database::prepare("
UPDATE `" . $table . "`
SET `" . $resource . "` = `" . $resource . "` " . $op . " 1 " . $extra . "
SET `" . $resource . "` = `" . $resource . "` " . $operator . " 1 " . $extra . "
WHERE `" . $keyfield . "` = :key
");
Database::pexecute($stmt, array(

View File

@@ -114,7 +114,7 @@ class FpmDaemons extends ApiCommand implements ResourceEntity
$config_dir = $this->getParam('config_dir');
// parameters
$pm = $this->getParam('pm', true, 'static');
$pmanager = $this->getParam('pm', true, 'static');
$max_children = $this->getParam('max_children', true, 0);
$start_servers = $this->getParam('start_servers', true, 0);
$min_spare_servers = $this->getParam('min_spare_servers', true, 0);
@@ -127,7 +127,7 @@ class FpmDaemons extends ApiCommand implements ResourceEntity
$description = validate($description, 'description', '', '', array(), true);
$reload_cmd = validate($reload_cmd, 'reload_cmd', '', '', array(), true);
$config_dir = validate($config_dir, 'config_dir', '', '', array(), true);
if (! in_array($pm, array(
if (! in_array($pmanager, array(
'static',
'dynamic',
'ondemand'
@@ -158,7 +158,7 @@ class FpmDaemons extends ApiCommand implements ResourceEntity
'desc' => $description,
'reload_cmd' => $reload_cmd,
'config_dir' => makeCorrectDir($config_dir),
'pm' => $pm,
'pm' => $pmanager,
'max_children' => $max_children,
'start_servers' => $start_servers,
'min_spare_servers' => $min_spare_servers,
@@ -202,7 +202,7 @@ class FpmDaemons extends ApiCommand implements ResourceEntity
$description = $this->getParam('description', true, $result['description']);
$reload_cmd = $this->getParam('reload_cmd', true, $result['reload_cmd']);
$config_dir = $this->getParam('config_dir', true, $result['config_dir']);
$pm = $this->getParam('pm', true, $result['pm']);
$pmanager = $this->getParam('pm', true, $result['pm']);
$max_children = $this->getParam('max_children', true, $result['max_children']);
$start_servers = $this->getParam('start_servers', true, $result['start_servers']);
$min_spare_servers = $this->getParam('min_spare_servers', true, $result['min_spare_servers']);
@@ -215,7 +215,7 @@ class FpmDaemons extends ApiCommand implements ResourceEntity
$description = validate($description, 'description', '', '', array(), true);
$reload_cmd = validate($reload_cmd, 'reload_cmd', '', '', array(), true);
$config_dir = validate($config_dir, 'config_dir', '', '', array(), true);
if (! in_array($pm, array(
if (! in_array($pmanager, array(
'static',
'dynamic',
'ondemand'
@@ -247,7 +247,7 @@ class FpmDaemons extends ApiCommand implements ResourceEntity
'desc' => $description,
'reload_cmd' => $reload_cmd,
'config_dir' => makeCorrectDir($config_dir),
'pm' => $pm,
'pm' => $pmanager,
'max_children' => $max_children,
'start_servers' => $start_servers,
'min_spare_servers' => $min_spare_servers,