server/apps/files_external/ajax/removeRootCertificate.php
2012-09-27 12:37:23 +02:00

14 lines
310 B
PHP

<?php
OCP\JSON::checkAppEnabled('files_external');
OCP\JSON::checkLoggedIn();
OCP\JSON::callCheck();
$view = \OCP\Files::getStorage("files_external");
$file = 'uploads/'.ltrim($_POST['cert'], "/\\.");
if ( $view->file_exists($file) ) {
$view->unlink($file);
OC_Mount_Config::createCertificateBundle();
}