Skip to content

Commit

Permalink
Fix an error intro'd in merge, and move the module inculdes...
Browse files Browse the repository at this point in the history
1. Error was a variable name which became inconsistent.
2. Having the includes at the top of the file means that they were
  called simply by having the module enabled, which could lead to
  bootstrapping issues, as the function requires functions defined
  during the bootstrap process.  Moving them inside the _init()
  hook ensures they are included when this module is used, without
  breaking stuff.
  • Loading branch information
adam-vessey committed Oct 19, 2011
1 parent 6535e4e commit 66b1125
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion IslandoraSolrResults.inc
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ class IslandoraSolrResults {
* Also, perhaps there's no difference between primary and secondary profiles?
*/

$output .= $this->printResults($solrResult);
$output .= $this->printResults($apacheSolrResult);
if (variable_get('islandora_solr_search_debug_mode', 0)) {
$output .= $this->printDebugOutput($solrResult);
}
Expand Down
7 changes: 3 additions & 4 deletions islandora_solr_search.module
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
<?php

module_load_include('inc', 'islandora_solr_search', 'islandora_solr_search.admin');
module_load_include('inc', 'islandora_solr_search', 'includes/common');
module_load_include('inc', 'islandora_solr_search', 'IslandoraSolrQueryProcessor');

//$islandora_query;
$queryClass;

Expand Down Expand Up @@ -438,6 +434,9 @@ function islandora_solr_search_help($path, $arg) {
* @staticvar boolean $islandora_solr_search_init
*/
function islandora_solr_search_init() {
module_load_include('inc', 'islandora_solr_search', 'islandora_solr_search.admin');
module_load_include('inc', 'islandora_solr_search', 'includes/common');
module_load_include('inc', 'islandora_solr_search', 'IslandoraSolrQueryProcessor');
static $islandora_solr_search_init = FALSE;
if (!$islandora_solr_search_init) {
drupal_add_css(drupal_get_path('module', 'islandora_solr_search') . '/islandora_solr_search.css');
Expand Down

0 comments on commit 66b1125

Please sign in to comment.