You are here

function imce_mkdir_process_profile in IMCE Mkdir 7

Same name and namespace in other branches
  1. 6 imce_mkdir.module \imce_mkdir_process_profile()

Custom profile process. Redefines mkdir permission based on some other parameters.

File

./imce_mkdir.module, line 14

Code

function imce_mkdir_process_profile(&$imce) {
  if (!$imce['error']) {
    $imce['mkdirnum'] = (int) $imce['mkdirnum'];
    $imce['perm']['mkdir'] = $imce['perm']['mkdir'] && (!$imce['mkdirnum'] || $imce['direct'] && $imce['mkdirnum'] > count($imce['subdirectories']));
    $imce['perm']['rmdir'] = $imce['perm']['rmdir'] && (!$imce['mkdirnum'] || $imce['direct']);
  }
}