function include_clear_root in Include 8
Same name and namespace in other branches
- 6 include.module \include_clear_root()
- 7 include.module \include_clear_root()
Clear the include files repository from the include_path.
This function is called when an unrecoverable error occurs. It sets the include_error flag to true, which prevents any further changes to the filesystem or include_path.
1 call to include_clear_root()
- include_check_path in ./
include.module - Verifies or installs a file or directory into the include repository.
File
- ./
include.module, line 71 - The Include module manages files on the include_files path.
Code
function include_clear_root() {
static $done = FALSE;
if ($done || cache_get('include_error', 'cache_menu')) {
return;
}
set_include_path(implode(PATH_SEPARATOR, array_diff(explode(PATH_SEPARATOR, get_include_path()), array(
include_get_root(),
))));
// Clearing the include_set_root variable prevents future attempts to set the
// include_path in include_init().
variable_del('include_set_root');
// Don't try this again unless something changes.
cache_set('include_error', TRUE, 'cache_menu');
}