1 2 3 4 5 6 7 8 9 10 11
<?php OCP\JSON::checkAppEnabled('files_external'); OCP\JSON::checkLoggedIn(); OCP\JSON::callCheck(); $name = $_POST['cert']; $certificateManager = \OC::$server->getCertificateManager(); if (\OC\Files\Filesystem::isValidPath($name)) { $certificateManager->removeCertificate($name); }