Skip to content

Commit

Permalink
fix php notices and check return codes for asetting acls correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
tgloeggl committed Jun 10, 2024
1 parent f00d717 commit 669f46f
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lib/Models/Videos.php
Original file line number Diff line number Diff line change
Expand Up @@ -483,7 +483,7 @@ public function toSanitizedArray($cid = '', $playlist_id = '')
$data['preview'] = json_decode($data['preview'], true);
$data['publication'] = json_decode($data['publication'], true);

$data['perm'] = $this->getUserPerm($user_id);
$data['perm'] = $this->getUserPerm();
$data['playlists'] = $this->getPlaylists();
$data['seminar_visibility'] = $this->getSeminarVisibility($cid, $playlist_id);

Expand Down Expand Up @@ -515,7 +515,6 @@ private function getPlaylists()
if (!empty($this->playlists)) {

foreach ($this->playlists as $playlist) {
$course = $video_seminar->course;
$playlists[] = $playlist->toSanitizedArray();
}
}
Expand Down Expand Up @@ -796,7 +795,7 @@ public function updateAcl($new_vis = null)
$new_acl = self::addEpisodeAcl($this->episode, $acl, $current_acl);
$result = $api_client->setACL($this->episode, $new_acl);

if ($result['code'] != 200) {
if (in_array($result['code'], ['200', '204']) === false) {
return [
'republish' => false,
'update' => false
Expand Down

0 comments on commit 669f46f

Please sign in to comment.