summaryrefslogtreecommitdiffstats
path: root/apps/files_external/ajax/removeRootCertificate.php
blob: f87d4a56308d9ed9c28e521c303a2bf12f76f2c7 (plain)
1
2
3
4
5
6
7
8
9
10
11
<?php

OCP\JSON::checkAppEnabled('files_external');
OCP\JSON::checkLoggedIn();
OCP\JSON::callCheck();

$view = \OCP\Files::getStorage("files_external");
$cert = ltrim($_POST['cert'], "/.");
$file = \OCP\Config::getSystemValue('datadirectory').$view->getAbsolutePath("").'uploads/'.$cert;
unlink($file);
OC_Mount_Config::createCertificateBundle();