set update-check-urls to api-version; started working on Customers-ApiCommand
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
This commit is contained in:
@@ -10,7 +10,7 @@ class IpsAndPorts extends ApiCommand
|
||||
$result_stmt = Database::prepare("
|
||||
SELECT * FROM `" . TABLE_PANEL_IPSANDPORTS . "` ORDER BY `ip` ASC, `port` ASC
|
||||
");
|
||||
Database::pexecute($result_stmt);
|
||||
Database::pexecute($result_stmt, null, true, true);
|
||||
$result = array();
|
||||
while ($row = $result_stmt->fetch(PDO::FETCH_ASSOC)) {
|
||||
$result[] = $row;
|
||||
@@ -174,12 +174,10 @@ class IpsAndPorts extends ApiCommand
|
||||
if ($this->isAdmin() && $this->getUserDetail('change_serversettings')) {
|
||||
$id = $this->getParam('id');
|
||||
|
||||
$result_stmt = Database::prepare("
|
||||
SELECT * FROM `" . TABLE_PANEL_IPSANDPORTS . "` WHERE `id` = :id
|
||||
");
|
||||
$result = Database::pexecute_first($result_stmt, array(
|
||||
$json_result = IpsAndPorts::getLocal($this->getUserData(), array(
|
||||
'id' => $id
|
||||
), true, true);
|
||||
))->get();
|
||||
$result = json_decode($json_result, true)['data'];
|
||||
|
||||
$ip = validate_ip2($this->getParam('ip', $result['ip']), false, 'invalidip', false, false, false, true);
|
||||
$port = validate($this->getParam('port', $result['port']), 'port', '/^(([1-9])|([1-9][0-9])|([1-9][0-9][0-9])|([1-9][0-9][0-9][0-9])|([1-5][0-9][0-9][0-9][0-9])|(6[0-4][0-9][0-9][0-9])|(65[0-4][0-9][0-9])|(655[0-2][0-9])|(6553[0-5]))$/Di', array(
|
||||
|
||||
Reference in New Issue
Block a user