fix api-key creation
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
13
api_keys.php
13
api_keys.php
@@ -93,7 +93,8 @@ if ($action == 'delete' && $id > 0) {
|
|||||||
'page' => $page
|
'page' => $page
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
} elseif (isset($_POST['send']) && $_POST['send'] == 'send' && $action == 'add') {
|
} elseif ($action == 'add') {
|
||||||
|
if (isset($_POST['send']) && $_POST['send'] == 'send') {
|
||||||
$ins_stmt = Database::prepare("
|
$ins_stmt = Database::prepare("
|
||||||
INSERT INTO `" . TABLE_API_KEYS . "` SET
|
INSERT INTO `" . TABLE_API_KEYS . "` SET
|
||||||
`apikey` = :key, `secret` = :secret, `adminid` = :aid, `customerid` = :cid, `valid_until` = '-1', `allowed_from` = ''
|
`apikey` = :key, `secret` = :secret, `adminid` = :aid, `customerid` = :cid, `valid_until` = '-1', `allowed_from` = ''
|
||||||
@@ -117,6 +118,16 @@ if ($action == 'delete' && $id > 0) {
|
|||||||
'page' => $page
|
'page' => $page
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
HTML::askYesNo('apikey_reallyadd', $filename, [
|
||||||
|
'id' => $id,
|
||||||
|
'page' => $page,
|
||||||
|
'action' => $action
|
||||||
|
], '', [
|
||||||
|
'section' => 'index',
|
||||||
|
'page' => $page
|
||||||
|
]);
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
$log->logAction(FroxlorLogger::USR_ACTION, LOG_NOTICE, "viewed api::api_keys");
|
$log->logAction(FroxlorLogger::USR_ACTION, LOG_NOTICE, "viewed api::api_keys");
|
||||||
|
|
||||||
|
|||||||
@@ -1274,6 +1274,7 @@ Vielen Dank, Ihr Administrator',
|
|||||||
'admin_integritycheck_reallyfix' => 'Möchten Sie wirklich versuchen sämtliche Datenbank-Integritätsprobleme automatisch zu beheben?',
|
'admin_integritycheck_reallyfix' => 'Möchten Sie wirklich versuchen sämtliche Datenbank-Integritätsprobleme automatisch zu beheben?',
|
||||||
'plan_reallydelete' => 'Wollen Sie den Hostingplan %s wirklich löschen?',
|
'plan_reallydelete' => 'Wollen Sie den Hostingplan %s wirklich löschen?',
|
||||||
'apikey_reallydelete' => 'Wollen Sie den Api-Key wirklich löschen?',
|
'apikey_reallydelete' => 'Wollen Sie den Api-Key wirklich löschen?',
|
||||||
|
'apikey_reallyadd' => 'Einen neuen Api-Key erstellen?',
|
||||||
'dnsentry_reallydelete' => 'Wollen Sie den DNS-Eintrag wirklich löschen?',
|
'dnsentry_reallydelete' => 'Wollen Sie den DNS-Eintrag wirklich löschen?',
|
||||||
'certificate_reallydelete' => 'Wollen Sie diese Zertifikat wirklich löschen?',
|
'certificate_reallydelete' => 'Wollen Sie diese Zertifikat wirklich löschen?',
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -1386,6 +1386,7 @@ Yours sincerely, your administrator',
|
|||||||
'admin_integritycheck_reallyfix' => 'Do you really want to try fixing all database integrity problems automatically?',
|
'admin_integritycheck_reallyfix' => 'Do you really want to try fixing all database integrity problems automatically?',
|
||||||
'plan_reallydelete' => 'Do you really want to delete the hosting plan %s?',
|
'plan_reallydelete' => 'Do you really want to delete the hosting plan %s?',
|
||||||
'apikey_reallydelete' => 'Do you really want to delete this api-key?',
|
'apikey_reallydelete' => 'Do you really want to delete this api-key?',
|
||||||
|
'apikey_reallyadd' => 'Do you really want to create a new api-key?',
|
||||||
'dnsentry_reallydelete' => 'Do you really want to delete this zone entry?',
|
'dnsentry_reallydelete' => 'Do you really want to delete this zone entry?',
|
||||||
'certificate_reallydelete' => 'Do you really want to delete this certificate?',
|
'certificate_reallydelete' => 'Do you really want to delete this certificate?',
|
||||||
],
|
],
|
||||||
|
|||||||
Reference in New Issue
Block a user