fix api-key creation
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
10
api_keys.php
10
api_keys.php
@@ -70,7 +70,9 @@ if ($action == 'delete') {
|
|||||||
), $id);
|
), $id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} elseif ($action == 'add' && isset($_POST['send']) && $_POST['send'] == 'send') {
|
} 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` = ''
|
||||||
@@ -90,6 +92,12 @@ if ($action == 'delete') {
|
|||||||
'cid' => $cid
|
'cid' => $cid
|
||||||
));
|
));
|
||||||
$success_message = $lng['apikeys']['apikey_added'];
|
$success_message = $lng['apikeys']['apikey_added'];
|
||||||
|
} else {
|
||||||
|
\Froxlor\UI\HTML::askYesNo('api_reallyadd', $filename, array(
|
||||||
|
'page' => $page,
|
||||||
|
'action' => $action
|
||||||
|
), $id);
|
||||||
|
}
|
||||||
} elseif ($action == 'jqEditApiKey') {
|
} elseif ($action == 'jqEditApiKey') {
|
||||||
$keyid = isset($_POST['id']) ? (int) $_POST['id'] : 0;
|
$keyid = isset($_POST['id']) ? (int) $_POST['id'] : 0;
|
||||||
if (empty($keyid)) {
|
if (empty($keyid)) {
|
||||||
|
|||||||
@@ -2140,6 +2140,7 @@ $lng['error']['pathmustberelative'] = 'The user does not have the permission to
|
|||||||
$lng['serversettings']['acmeshpath']['title'] = 'Path to acme.sh';
|
$lng['serversettings']['acmeshpath']['title'] = 'Path to acme.sh';
|
||||||
$lng['serversettings']['acmeshpath']['description'] = 'Set this to where acme.sh is installed to, including the acme.sh script<br>Default is <b>/root/.acme.sh/acme.sh</b>';
|
$lng['serversettings']['acmeshpath']['description'] = 'Set this to where acme.sh is installed to, including the acme.sh script<br>Default is <b>/root/.acme.sh/acme.sh</b>';
|
||||||
|
|
||||||
$lng['question']['api_reallydelete'] = 'Do you really want to delete the api-key #%d?';
|
$lng['question']['api_reallydelete'] = 'Do you really want to delete the api-key?';
|
||||||
$lng['question']['dnsentry_reallydelete'] = 'Do you really want to delete the dns entry #%d?';
|
$lng['question']['api_reallyadd'] = 'Do you really want to create a new api-key?';
|
||||||
$lng['question']['certificate_reallydelete'] = 'Do you really want to delete the certificate #%d?';
|
$lng['question']['dnsentry_reallydelete'] = 'Do you really want to delete the dns entry?';
|
||||||
|
$lng['question']['certificate_reallydelete'] = 'Do you really want to delete the certificate?';
|
||||||
|
|||||||
@@ -1786,6 +1786,7 @@ $lng['error']['pathmustberelative'] = 'Der Benutzer hat nicht die benötigten Be
|
|||||||
$lng['serversettings']['acmeshpath']['title'] = 'Pfad zu acme.sh';
|
$lng['serversettings']['acmeshpath']['title'] = 'Pfad zu acme.sh';
|
||||||
$lng['serversettings']['acmeshpath']['description'] = 'Installationspfad zu acme.sh, inklusive acme.sh Script<br>Standard ist <b>/root/.acme.sh/acme.sh</b>';
|
$lng['serversettings']['acmeshpath']['description'] = 'Installationspfad zu acme.sh, inklusive acme.sh Script<br>Standard ist <b>/root/.acme.sh/acme.sh</b>';
|
||||||
|
|
||||||
$lng['question']['api_reallydelete'] = 'Api-Key #%d wirklich löschen?';
|
$lng['question']['api_reallydelete'] = 'Api-Key wirklich löschen?';
|
||||||
$lng['question']['dnsentry_reallydelete'] = 'Zonen-Eintrag #%d wirklich löschen?';
|
$lng['question']['api_reallyadd'] = 'Einen neuen Api-Key erstellen?';
|
||||||
$lng['question']['certificate_reallydelete'] = 'Zertifikat #%d wirklich löschen?';
|
$lng['question']['dnsentry_reallydelete'] = 'Zonen-Eintrag wirklich löschen?';
|
||||||
|
$lng['question']['certificate_reallydelete'] = 'Zertifikat wirklich löschen?';
|
||||||
|
|||||||
Reference in New Issue
Block a user