function asaf_load_needed_files in Asaf (ajax submit for any form) 8
Same name and namespace in other branches
- 7 asaf.module \asaf_load_needed_files()
1 call to asaf_load_needed_files()
File
- ./
asaf.module, line 451 - Main module file.
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;
}
}
}