Code Duplication    Length = 2-2 lines in 2 locations

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

@@ 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

main/newscorm/learnpath.class.php 1 location

@@ 4632-4633 (lines=2) @@
4629
        $stored_terms = $this->get_common_index_terms_by_prefix($prefix);
4630
4631
        // Don't do anything if no change, verify only at DB, not the search engine.
4632
        if ((count(array_diff($terms, $stored_terms)) == 0) && (count(array_diff($stored_terms, $terms)) == 0))
4633
            return false;
4634
4635
        require_once 'xapian.php'; // TODO: Try catch every xapian use or make wrappers on API.
4636
        require_once api_get_path(LIBRARY_PATH).'search/ChamiloIndexer.class.php';