function badbehavior_load_includes in Bad Behavior 6
Same name and namespace in other branches
- 6.2 badbehavior.module \badbehavior_load_includes()
- 7.2 badbehavior.module \badbehavior_load_includes()
Load BadBehavior library files.
On first run, this will also include the required badbehavior.inc, core.inc.php, and version.inc.php files.
Parameters
$files: An array of BadBehavior files in the BB2_CWD/bad-behavior directory to include. The file type (.inc.php) will automatically be added to the file name.
Return value
TRUE if the files were included, or FALSE otherwise.
4 calls to badbehavior_load_includes()
- badbehavior_event in ./
badbehavior.admin.inc - badbehavior_overview in ./
badbehavior.admin.inc - @file Admin page callbacks for the badbehavior module.
- badbehavior_requirements in ./
badbehavior.install - Implements hook_requirements().
- badbehavior_start_badbehavior in ./
badbehavior.module
File
- ./
badbehavior.module, line 95
Code
function badbehavior_load_includes($files = array()) {
static $included;
if (!isset($included)) {
$included = TRUE;
array_unshift($files, 'core', 'version');
}
foreach ($files as $file) {
$file = BB2_CWD . "/bad-behavior/{$file}.inc.php";
if (is_file($file)) {
require_once $file;
}
else {
return FALSE;
}
}
return TRUE;
}