function badbehavior_load_includes in Bad Behavior 6.2
Same name and namespace in other branches
- 6 badbehavior.module \badbehavior_load_includes()
- 7.2 badbehavior.module \badbehavior_load_includes()
Load BadBehavior library files.
Check to make sure the main Bad Behavior files (external content) exist and require them for the module to actually work. The default location is /sites/all/libraries/bad-behavior/bad-behavior/
Return value
bool Returns TRUE if files exist and are read, otherwise returns FALSE
4 calls to badbehavior_load_includes()
- badbehavior_event in ./
badbehavior.admin.inc - Builds the "Details" table displaying data about an individual log entry
- badbehavior_overview in ./
badbehavior.admin.inc - Builds the log table seen in the /admin/reports/badbehavior/ page.
- badbehavior_requirements in ./
badbehavior.install - Implements hook_requirements().
- badbehavior_start_badbehavior in ./
badbehavior.module
File
- ./
badbehavior.module, line 102 - Integrates Bad Behavior with Drupal
Code
function badbehavior_load_includes() {
if (is_file(BB2_CWD . '/bad-behavior/core.inc.php') && is_file(BB2_CWD . '/bad-behavior/responses.inc.php') && is_file(BB2_CWD . '/bad-behavior-mysql.php')) {
require_once BB2_CWD . '/bad-behavior/core.inc.php';
require_once BB2_CWD . '/bad-behavior/responses.inc.php';
require_once BB2_CWD . '/bad-behavior-mysql.php';
return TRUE;
}
else {
return FALSE;
}
}