Cleanup routes

This commit is contained in:
Robin Appelman 2014-08-21 14:15:43 +02:00
parent e64aa330fd
commit 1361bbb1e6
3 changed files with 4 additions and 5 deletions

View File

@ -306,7 +306,7 @@ $(document).ready(function () {
$('#sslCertificate').on('click', 'td.remove > img', function () {
var row = $(this).parent().parent();
$.post(OC.filePath('settings', 'ajax', 'removeRootCertificate.php'), {
$.post(OC.generateUrl('settings/ajax/removeRootCertificate'), {
cert: row.data('name')
});
row.remove();
@ -317,7 +317,6 @@ $(document).ready(function () {
$('#rootcert_import').fileupload({
done: function (e, data) {
console.log(data.result);
var issueDate = new Date(data.result.validFrom * 1000);
var expireDate = new Date(data.result.validTill * 1000);
var now = new Date();

View File

@ -62,9 +62,9 @@ $this->create('settings_ajax_restorekeys', '/settings/ajax/restorekeys.php')
->actionInclude('settings/ajax/restorekeys.php');
$this->create('settings_ajax_deletekeys', '/settings/ajax/deletekeys.php')
->actionInclude('settings/ajax/deletekeys.php');
$this->create('core_cert_post', '/settings/ajax/addRootCertificate.php')
$this->create('settings_cert_post', '/settings/ajax/addRootCertificate')
->actionInclude('settings/ajax/addRootCertificate.php');
$this->create('core_cert_remove', '/settings/ajax/removeRootCertificate.php')
$this->create('settings_cert_remove', '/settings/ajax/removeRootCertificate')
->actionInclude('settings/ajax/removeRootCertificate.php');
// apps
$this->create('settings_ajax_apps_ocs', '/settings/ajax/apps/ocs.php')

View File

@ -182,7 +182,7 @@ if($_['passwordChangeSupported']) {
<?php endforeach; ?>
</tbody>
</table>
<form class="uploadButton" method="post" action="<?php p(\OC_Helper::linkToRoute('core_cert_post')); ?>" target="certUploadFrame">
<form class="uploadButton" method="post" action="<?php p(\OC_Helper::linkToRoute('settings_cert_post')); ?>" target="certUploadFrame">
<input type="file" id="rootcert_import" name="rootcert_import" class="hidden">
<input type="button" id="rootcert_import_button" value="<?php p($l->t('Import Root Certificate')); ?>"/>
</form>