You are here

function imce_process_profile in IMCE 7

Same name and namespace in other branches
  1. 6.2 inc/imce.page.inc \imce_process_profile()
  2. 6 inc/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 898
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();
  }
}