You are here

function imce_process_profile in IMCE 6.2

Same name and namespace in other branches
  1. 6 inc/page.inc \imce_process_profile()
  2. 7 inc/imce.page.inc \imce_process_profile()

Get files and folders of the actve directory. Do custom processing.

2 calls to imce_process_profile()
imce_content in inc/imce.page.inc
Returns the content of the file browser.
imce_js in inc/imce.page.inc
Ajax operations. q=imce&jsop={op}

File

inc/imce.page.inc, line 777
Implements the file browser.

Code

function imce_process_profile(&$imce) {

  //get directory content. do a custom scan if it is set
  $scan = ($scan = variable_get('imce_custom_scan', '')) && function_exists($scan) ? $scan : 'imce_scan_directory';
  $imce += $scan($imce['dir'], $imce);

  //run custom process functions
  foreach (variable_get('imce_custom_process', array()) as $func => $state) {
    if ($state && function_exists($func)) {
      $func($imce);
    }
  }

  //set subdirectories
  if (!$imce['error'] && !imce_subdirectories_accessible($imce)) {
    $imce['subdirectories'] = array();
  }
}