server/apps/files_external/ajax/removeRootCertificate.php

14 lines
309 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");
$file = 'uploads/'.ltrim($_POST['cert'], "/\\.");
if ( $view->file_exists($file) ) {
$view->unlink($file);
OC_Mount_Config::createCertificateBundle();
}