@@ -443,17 +443,18 @@ public static function isWorldReadable($oc_acls)
443
443
*/
444
444
public static function getAllRecordedSeriesIds (bool $ force = false )
445
445
{
446
- $ cache = StudipCacheFactory::getCache ();
446
+ $ cache = \ StudipCacheFactory::getCache ();
447
447
$ all_known_seriesids = $ cache ->read (self ::RECORDED_SERIES_ID_CACHE_ID );
448
- if ($ force || empty ($ cache_data )) {
449
- $ all_known_seriesids = [];
448
+ if ($ force || empty ($ all_known_seriesids )) {
449
+ $ combined_records = [];
450
450
$ user_series_ids =\SimpleCollection::createFromArray (
451
451
UserSeries::findBySql ('1 ' )
452
- )->toArray ()-> pluck ( ' series_id ' ) ;
452
+ )->toArray ();
453
453
$ seminar_series_ids =\SimpleCollection::createFromArray (
454
454
SeminarSeries::findBySql ('1 ' )
455
- )->toArray ()->pluck ('series_id ' );
456
- $ all_known_seriesids = array_merge ($ user_series_ids , $ seminar_series_ids );
455
+ )->toArray ();
456
+ $ combined_records = array_merge ($ user_series_ids , $ seminar_series_ids );
457
+ $ all_known_seriesids = array_column ($ combined_records , 'series_id ' );
457
458
$ all_known_seriesids = array_unique ($ all_known_seriesids );
458
459
$ cache ->write (self ::RECORDED_SERIES_ID_CACHE_ID , $ all_known_seriesids );
459
460
}
@@ -479,7 +480,8 @@ public static function isEventInThisStudip($oc_event)
479
480
}
480
481
481
482
$ all_known_seriesids = self ::getAllRecordedSeriesIds ();
482
- if (in_array ($ event ->is_part_of , $ all_known_seriesids )) {
483
+
484
+ if (in_array ($ oc_event ->is_part_of , $ all_known_seriesids )) {
483
485
return true ;
484
486
}
485
487
@@ -497,7 +499,7 @@ public static function isEventInThisStudip($oc_event)
497
499
*/
498
500
public static function invalidateRecordedSeriesIdsCache ()
499
501
{
500
- $ cache = StudipCacheFactory::getCache ();
502
+ $ cache = \ StudipCacheFactory::getCache ();
501
503
$ cache ->expire (self ::RECORDED_SERIES_ID_CACHE_ID );
502
504
}
503
505
}
0 commit comments