You are here

function asaf_load_needed_files in Asaf (ajax submit for any form) 7

Same name and namespace in other branches
  1. 8 asaf.module \asaf_load_needed_files()
1 call to asaf_load_needed_files()
asaf_pagecache_get_form in ./asaf.pages.inc

File

./asaf.module, line 446

Code

function asaf_load_needed_files(array $files) {
  foreach ($files as $file) {
    if (is_array($file) && isset($file['module'])) {
      $file += array(
        'type' => 'inc',
        'name' => $file['module'],
      );
      module_load_include($file['type'], $file['module'], $file['name']);
    }
    elseif (file_exists($file)) {
      require_once DRUPAL_ROOT . '/' . $file;
    }
  }
}