summaryrefslogtreecommitdiffstats
path: root/apps/files_external/ajax/removeRootCertificate.php
blob: 6871b0fd1d4eaea09c6bd9e0110fd2e0d98cd5da (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
<?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();
}