add EmailFowarders ApiCommand

Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
This commit is contained in:
Michael Kaufmann (d00p)
2018-03-11 10:24:17 +01:00
parent 164650adc3
commit b205f8ea5d
4 changed files with 274 additions and 68 deletions

View File

@@ -349,6 +349,16 @@ abstract class ApiCommand
throw new Exception("Unable to update parameter '" . $param . "' as it does not exist", 500);
}
/**
* return list of all parameters
*
* @return array
*/
protected function getParamList()
{
return $this->cmd_params;
}
/**
* return logger instance
*
@@ -455,6 +465,9 @@ abstract class ApiCommand
$this->getUserDetail('customerid')
);
}
if (empty($customer_ids)) {
throw new Exception("Required resource unsatisfied.", 405);
}
return $customer_ids;
}
@@ -472,7 +485,7 @@ abstract class ApiCommand
{
$stmt = Database::prepare("
UPDATE `" . $table . "`
SET `" . $resource . "` = `" . $resource . "` " . $operator . " " . (int)$step . " " . $extra . "
SET `" . $resource . "` = `" . $resource . "` " . $operator . " " . (int) $step . " " . $extra . "
WHERE `" . $keyfield . "` = :key
");
Database::pexecute($stmt, array(