Code Duplication    Length = 2-2 lines in 2 locations

main/inc/lib/search/ChamiloIndexer.class.php 1 location

@@ 44-45 (lines=2) @@
41
        $stored_terms = $this->get_terms_on_db($prefix, $course_code, $tool_id, $ref_id_high_level);
42
43
        // don't do anything if no change, verify only at DB, not the search engine
44
        if ((count(array_diff($terms, $stored_terms)) == 0) &&
45
            (count(array_diff($stored_terms, $terms)) == 0)
46
        ) {
47
            return false;
48
        }

main/lp/learnpath.class.php 1 location

@@ 4787-4788 (lines=2) @@
4784
        $stored_terms = $this->get_common_index_terms_by_prefix($prefix);
4785
4786
        // Don't do anything if no change, verify only at DB, not the search engine.
4787
        if ((count(array_diff($terms, $stored_terms)) == 0) && (count(array_diff($stored_terms, $terms)) == 0))
4788
            return false;
4789
4790
        require_once 'xapian.php'; // TODO: Try catch every xapian use or make wrappers on API.
4791
        require_once api_get_path(LIBRARY_PATH).'search/ChamiloIndexer.class.php';