You are here

function apachesolr_confgen_load_config_file in Apache Solr Config Generator 6

Same name and namespace in other branches
  1. 7 apachesolr_confgen.module \apachesolr_confgen_load_config_file()
3 calls to apachesolr_confgen_load_config_file()
apachesolr_confgen_form_validate in ./apachesolr_confgen.admin.inc
Implements hook_form_validate().
apachesolr_confgen_load_xml_file in ./apachesolr_confgen.module
Loads raw xml file and resolves xi:includes
apachesolr_confgen_textfiles_variable_info in apachesolr_confgen_textfiles/apachesolr_confgen_textfiles.variable.inc
Implements hook_variable_info().

File

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

Code

function apachesolr_confgen_load_config_file($file) {
  $solr_conf_path = drupal_get_path('module', 'apachesolr_confgen') . '/solr-conf/';
  if (!file_exists($solr_conf_path . $file)) {
    $solr_conf_path = drupal_get_path('module', 'apachesolr') . '/solr-conf/';
  }

  // TODO error handling
  return file_get_contents($solr_conf_path . $file);
}