You are here

function filefield_source_imce_disable_perms in FileField Sources 7

Same name and namespace in other branches
  1. 6 sources/imce.inc \filefield_source_imce_disable_perms()

Disable IMCE profile permissions.

1 call to filefield_source_imce_disable_perms()
filefield_source_imce_custom_scan_restricted in sources/imce.inc
Scan directory and return file list, subdirectories, and total size for Restricted Mode.

File

sources/imce.inc, line 311
A FileField extension to allow referencing of files from IMCE.

Code

function filefield_source_imce_disable_perms(&$imce, $exceptions = array()) {
  $disable_all = empty($exceptions);
  foreach ($imce['perm'] as $name => $val) {
    if ($disable_all || !in_array($name, $exceptions)) {
      $imce['perm'][$name] = 0;
    }
  }
  $imce['directories'][$imce['dir']] = array(
    'name' => $imce['dir'],
  ) + $imce['perm'];
}