Skip to content

Commit 9ee610e

Browse files
committed
revert special treatment of oc 13+14, not necessary
1 parent 3bd5baa commit 9ee610e

File tree

1 file changed

+8
-16
lines changed

1 file changed

+8
-16
lines changed

classes/OCRestClient/ApiEventsClient.php

+8-16
Original file line numberDiff line numberDiff line change
@@ -84,24 +84,16 @@ public function getBySeries($series_id, $course_id)
8484
/* * * * * * * * * * * * * * * * * * * * * * * * */
8585
// first, get list of events ids from search service
8686

87-
// special treatment for Opencast 14 and below
88-
if (version_compare($this->getOcVersion(), '15', '<')) {
89-
$search_events = $search_service->getJSON(
90-
"/episode.json?sid=$series_id&q=". urlencode($search)
91-
. "&sort=". urlencode($sort) ."&limit=$limit&offset=$offset"
92-
);
93-
} else {
94-
$search_query = '';
95-
if ($search) {
96-
$search_query = " AND ( *:(dc_title_:($search)^6.0 dc_creator_:($search)^4.0 dc_subject_:($search)^4.0 dc_publisher_:($search)^2.0 dc_contributor_:($search)^2.0 dc_abstract_:($search)^4.0 dc_description_:($search)^4.0 fulltext:($search) fulltext:(*$search*) ) OR (id:$search) )";
97-
}
87+
$search_query = '';
88+
if ($search) {
89+
$search_query = " AND ( *:(dc_title_:($search)^6.0 dc_creator_:($search)^4.0 dc_subject_:($search)^4.0 dc_publisher_:($search)^2.0 dc_contributor_:($search)^2.0 dc_abstract_:($search)^4.0 dc_description_:($search)^4.0 fulltext:($search) fulltext:(*$search*) ) OR (id:$search) )";
90+
}
9891

99-
$lucene_query = '(dc_is_part_of:' . $series_id . ')' . $search_query
100-
. ' AND oc_acl_read:' . $course_id . '_' . $type;
92+
$lucene_query = '(dc_is_part_of:' . $series_id . ')' . $search_query
93+
. ' AND oc_acl_read:' . $course_id . '_' . $type;
10194

102-
$search_events = $search_service->getJSON('/lucene.json?q=' . urlencode($lucene_query)
103-
. "&sort=$sort&limit=$limit&offset=$offset");
104-
}
95+
$search_events = $search_service->getJSON('/lucene.json?q=' . urlencode($lucene_query)
96+
. "&sort=$sort&limit=$limit&offset=$offset");
10597

10698
Pager::setLength($search_events->{'search-results'}->total);
10799

0 commit comments

Comments
 (0)