| @@ 39-40 (lines=2) @@ | ||
| 36 | $stored_terms = $this->get_terms_on_db($prefix, $course_code, $tool_id, $ref_id_high_level); |
|
| 37 | ||
| 38 | // don't do anything if no change, verify only at DB, not the search engine |
|
| 39 | if ((count(array_diff($terms, $stored_terms)) == 0) && (count(array_diff($stored_terms, $terms)) == 0)) |
|
| 40 | return FALSE; |
|
| 41 | ||
| 42 | require_once api_get_path(LIBRARY_PATH) . 'search/xapian/XapianQuery.php'; |
|
| 43 | ||
| @@ 4623-4624 (lines=2) @@ | ||
| 4620 | $stored_terms = $this->get_common_index_terms_by_prefix($prefix); |
|
| 4621 | ||
| 4622 | // Don't do anything if no change, verify only at DB, not the search engine. |
|
| 4623 | if ((count(array_diff($terms, $stored_terms)) == 0) && (count(array_diff($stored_terms, $terms)) == 0)) |
|
| 4624 | return false; |
|
| 4625 | ||
| 4626 | require_once 'xapian.php'; // TODO: Try catch every xapian use or make wrappers on API. |
|
| 4627 | require_once api_get_path(LIBRARY_PATH).'search/ChamiloIndexer.class.php'; |
|