server/apps/files_external/ajax/removeRootCertificate.php

12 lines
334 B
PHP
Raw Normal View History

<?php
OCP\JSON::checkAppEnabled('files_external');
2012-08-09 22:44:35 +00:00
OCP\JSON::checkLoggedIn();
OCP\JSON::callCheck();
$view = \OCP\Files::getStorage("files_external");
$cert = $_POST['cert'];
$file = \OCP\Config::getSystemValue('datadirectory').$view->getAbsolutePath("").'uploads/'.$cert;
unlink($file);
OC_Mount_Config::createCertificateBundle();