addMountPoint.php 500 B

12345678910111213141516171819
  1. <?php
  2. OCP\JSON::checkAppEnabled('files_external');
  3. OCP\JSON::callCheck();
  4. if ($_POST['isPersonal'] == 'true') {
  5. OCP\JSON::checkLoggedIn();
  6. $isPersonal = true;
  7. } else {
  8. OCP\JSON::checkAdminUser();
  9. $isPersonal = false;
  10. }
  11. $status = OC_Mount_Config::addMountPoint($_POST['mountPoint'],
  12. $_POST['class'],
  13. $_POST['classOptions'],
  14. $_POST['mountType'],
  15. $_POST['applicable'],
  16. $isPersonal);
  17. OCP\JSON::success(array('data' => array('message' => $status)));