$params['resource_type']); $this->_execute_core_function('load_resource_plugin', $_params); } } if ($params['resource_type'] == 'file') { if (!preg_match("/^([\/\\\\]|[a-zA-Z]:[\/\\\\])/", $params['resource_name'])) { // relative pathname to $params['file_base_path'] // use the first directory where the file is found $_file_base_path = $params['file_base_path']; settype($_file_base_path, 'array'); foreach ($_file_base_path as $_curr_path) { $_fullpath = $_curr_path . DIRECTORY_SEPARATOR . $params['resource_name']; if (file_exists($_fullpath) && is_file($_fullpath)) { $params['resource_name'] = $_fullpath; return true; } // didn't find the file, try include_path $_params = array('file_path' => $_fullpath); if($this->_execute_core_function('get_include_path', $_params)) { $params['resource_name'] = $_params['new_file_path']; return true; } } return false; } } // resource type != file return true; } /* vim: set expandtab: */ ?>