You are here

function filefield_source_imce_disable_perms in FileField Sources 6

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

Disable IMCE profile permissions.

2 calls to filefield_source_imce_disable_perms()
filefield_source_imce_custom_scan_full in sources/imce.inc
Scan directory and return file list, subdirectories, and total size for Full Mode.
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 294
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'];
}