From 82395c4fe169dc90b5f7a7c11b114fec178b9e48 Mon Sep 17 00:00:00 2001 From: yqjiang Date: Mon, 10 Jun 2013 15:00:20 -0300 Subject: [PATCH] fix the problem: If query sting has a space, cufts will only search the first word without per_page number --- targets/cufts/roblib_search_cufts.module | 2 ++ 1 file changed, 2 insertions(+) diff --git a/targets/cufts/roblib_search_cufts.module b/targets/cufts/roblib_search_cufts.module index 7f95756..ab58ccb 100644 --- a/targets/cufts/roblib_search_cufts.module +++ b/targets/cufts/roblib_search_cufts.module @@ -171,6 +171,8 @@ function roblib_search_cufts_get_results($query = NULL) { return ''; } } + + $query = str_replace(' ', '%20', $query); //http://cufts2.lib.sfu.ca/CJDB/PCU/browse/show?browse_field=title&search_type=startswith&format=json&search_terms=dog&submit=Search $url = variable_get('roblib_search_cufts_url', 'http://cufts2.lib.sfu.ca/CJDB/PCU/browse/show?'); $url_suffix = variable_get('roblib_search_cufts_search_suffix', 'browse_field=title&search_type=startswith&format=json&search_terms=');