fix short variables
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
This commit is contained in:
@@ -432,15 +432,15 @@ abstract class ApiCommand
|
|||||||
* @param string $table
|
* @param string $table
|
||||||
* @param string $keyfield
|
* @param string $keyfield
|
||||||
* @param int $key
|
* @param int $key
|
||||||
* @param string $op
|
* @param string $operator
|
||||||
* @param string $resource
|
* @param string $resource
|
||||||
* @param string $extra
|
* @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("
|
$stmt = Database::prepare("
|
||||||
UPDATE `" . $table . "`
|
UPDATE `" . $table . "`
|
||||||
SET `" . $resource . "` = `" . $resource . "` " . $op . " 1 " . $extra . "
|
SET `" . $resource . "` = `" . $resource . "` " . $operator . " 1 " . $extra . "
|
||||||
WHERE `" . $keyfield . "` = :key
|
WHERE `" . $keyfield . "` = :key
|
||||||
");
|
");
|
||||||
Database::pexecute($stmt, array(
|
Database::pexecute($stmt, array(
|
||||||
|
|||||||
@@ -114,7 +114,7 @@ class FpmDaemons extends ApiCommand implements ResourceEntity
|
|||||||
$config_dir = $this->getParam('config_dir');
|
$config_dir = $this->getParam('config_dir');
|
||||||
|
|
||||||
// parameters
|
// parameters
|
||||||
$pm = $this->getParam('pm', true, 'static');
|
$pmanager = $this->getParam('pm', true, 'static');
|
||||||
$max_children = $this->getParam('max_children', true, 0);
|
$max_children = $this->getParam('max_children', true, 0);
|
||||||
$start_servers = $this->getParam('start_servers', true, 0);
|
$start_servers = $this->getParam('start_servers', true, 0);
|
||||||
$min_spare_servers = $this->getParam('min_spare_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);
|
$description = validate($description, 'description', '', '', array(), true);
|
||||||
$reload_cmd = validate($reload_cmd, 'reload_cmd', '', '', array(), true);
|
$reload_cmd = validate($reload_cmd, 'reload_cmd', '', '', array(), true);
|
||||||
$config_dir = validate($config_dir, 'config_dir', '', '', array(), true);
|
$config_dir = validate($config_dir, 'config_dir', '', '', array(), true);
|
||||||
if (! in_array($pm, array(
|
if (! in_array($pmanager, array(
|
||||||
'static',
|
'static',
|
||||||
'dynamic',
|
'dynamic',
|
||||||
'ondemand'
|
'ondemand'
|
||||||
@@ -158,7 +158,7 @@ class FpmDaemons extends ApiCommand implements ResourceEntity
|
|||||||
'desc' => $description,
|
'desc' => $description,
|
||||||
'reload_cmd' => $reload_cmd,
|
'reload_cmd' => $reload_cmd,
|
||||||
'config_dir' => makeCorrectDir($config_dir),
|
'config_dir' => makeCorrectDir($config_dir),
|
||||||
'pm' => $pm,
|
'pm' => $pmanager,
|
||||||
'max_children' => $max_children,
|
'max_children' => $max_children,
|
||||||
'start_servers' => $start_servers,
|
'start_servers' => $start_servers,
|
||||||
'min_spare_servers' => $min_spare_servers,
|
'min_spare_servers' => $min_spare_servers,
|
||||||
@@ -202,7 +202,7 @@ class FpmDaemons extends ApiCommand implements ResourceEntity
|
|||||||
$description = $this->getParam('description', true, $result['description']);
|
$description = $this->getParam('description', true, $result['description']);
|
||||||
$reload_cmd = $this->getParam('reload_cmd', true, $result['reload_cmd']);
|
$reload_cmd = $this->getParam('reload_cmd', true, $result['reload_cmd']);
|
||||||
$config_dir = $this->getParam('config_dir', true, $result['config_dir']);
|
$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']);
|
$max_children = $this->getParam('max_children', true, $result['max_children']);
|
||||||
$start_servers = $this->getParam('start_servers', true, $result['start_servers']);
|
$start_servers = $this->getParam('start_servers', true, $result['start_servers']);
|
||||||
$min_spare_servers = $this->getParam('min_spare_servers', true, $result['min_spare_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);
|
$description = validate($description, 'description', '', '', array(), true);
|
||||||
$reload_cmd = validate($reload_cmd, 'reload_cmd', '', '', array(), true);
|
$reload_cmd = validate($reload_cmd, 'reload_cmd', '', '', array(), true);
|
||||||
$config_dir = validate($config_dir, 'config_dir', '', '', array(), true);
|
$config_dir = validate($config_dir, 'config_dir', '', '', array(), true);
|
||||||
if (! in_array($pm, array(
|
if (! in_array($pmanager, array(
|
||||||
'static',
|
'static',
|
||||||
'dynamic',
|
'dynamic',
|
||||||
'ondemand'
|
'ondemand'
|
||||||
@@ -247,7 +247,7 @@ class FpmDaemons extends ApiCommand implements ResourceEntity
|
|||||||
'desc' => $description,
|
'desc' => $description,
|
||||||
'reload_cmd' => $reload_cmd,
|
'reload_cmd' => $reload_cmd,
|
||||||
'config_dir' => makeCorrectDir($config_dir),
|
'config_dir' => makeCorrectDir($config_dir),
|
||||||
'pm' => $pm,
|
'pm' => $pmanager,
|
||||||
'max_children' => $max_children,
|
'max_children' => $max_children,
|
||||||
'start_servers' => $start_servers,
|
'start_servers' => $start_servers,
|
||||||
'min_spare_servers' => $min_spare_servers,
|
'min_spare_servers' => $min_spare_servers,
|
||||||
|
|||||||
Reference in New Issue
Block a user