You are here

function apachesolr_confgen_get_original_qp in Apache Solr Config Generator 6

Same name and namespace in other branches
  1. 7 apachesolr_confgen.module \apachesolr_confgen_get_original_qp()
1 call to apachesolr_confgen_get_original_qp()
apachesolr_confgen_form_validate in ./apachesolr_confgen.admin.inc
Implements hook_form_validate().

File

./apachesolr_confgen.module, line 69
Generator for Apache Solr Configuration Files.

Code

function apachesolr_confgen_get_original_qp($type, $solr_version = '1.4.x') {

  // see http://drupal.org/node/1781878
  if (function_exists('querypath_include_code')) {
    querypath_include_code();
  }
  $local_path = apachesolr_confgen_get_local_path($solr_version);

  // TODO error handling
  if ($local_path) {
    return qp(apachesolr_confgen_load_xml_file($local_path . $type . '.xml'), NULL, array(
      'use_parser' => 'xml',
    ));
  }
}