Skip to content

Instantly share code, notes, and snippets.

@dchud
Created July 2, 2013 17:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dchud/5911546 to your computer and use it in GitHub Desktop.
Save dchud/5911546 to your computer and use it in GitHub Desktop.
diff to comment out all invoking of solr without apache2-level errors
dchud@gwdev-dchud12:~/public_html/ncsu-quicksearch (master *)$ git diff
diff --git a/bestbets/bestbets.php b/bestbets/bestbets.php
index ca547bd..703258a 100644
--- a/bestbets/bestbets.php
+++ b/bestbets/bestbets.php
@@ -45,7 +45,7 @@ class BestBet {
// instantiate new SolrPhpClient service with connection
// to best bets solr index
- $solr = new Apache_Solr_Service('HOST', PORT, 'SOLRULR'); // EDIT
+ //$solr = new Apache_Solr_Service('HOST', PORT, 'SOLRULR'); // EDIT
if (get_magic_quotes_gpc() == 1) {
$bestbets_query = stripslashes($bestbets_query);
@@ -54,7 +54,7 @@ class BestBet {
// make solr request and store response
try {
- $results = $solr->search($bestbets_query, 0, $limit, $params);
+ //$results = $solr->search($bestbets_query, 0, $limit, $params);
} catch ( Exception $e ) {
$errors[] = $e->getMessage();
}
diff --git a/includes/ss-functions.php b/includes/ss-functions.php
index 3eca457..a92b0a0 100755
--- a/includes/ss-functions.php
+++ b/includes/ss-functions.php
@@ -49,6 +49,7 @@ function get_subject_curriculum_mappings() {
function get_related_subject_terms_if_any($query) {
+ return 0;
require_once('SolrPhpClient/Service.php');
$maximum_subject_terms_to_display = 4;
@@ -136,4 +137,4 @@ function get_related_subject_terms_if_any($query) {
}
}
-?>
\ No newline at end of file
+?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment