You are here

function querypath_include_code in QueryPath 7.2

Attempt to load the QueryPath library when it is requested.

File

./querypath.module, line 34
The QueryPath module.

Code

function querypath_include_code() {

  // I'm not entirely happy with this particular method of including stuff.
  // But this seems to be the best way. (Note that there is already a check
  // in the install file.)
  // We include by relative path to allow PEAR and other things on PHP_PATH to
  // take precedence over the bundled version.
  @(include_once 'QueryPath/QueryPath.php');
  if (function_exists('qp')) {

    // module_load_include is sorta... meh. Just adds another stat call to a
    // require_once call.... plus it is apparently not ready in hook_boot.

    //module_load_include('inc', 'querypath', 'classes');
    require_once 'querypath.classes.inc';
  }
  else {
    watchdog('querypath', 'The QueryPath library is missing.', array(), WATCHDOG_ERROR);
  }
}