| 
                                
                                    @@ 313-316 (lines=4) @@
                                 | 
                            
                                                            
                                    | 310 | 
                                     | 
                                            $fileIds = $vars['ids'];  | 
                                
                                                            
                                    | 311 | 
                                     | 
                                            $files = $this->getList()->filter("ID", $fileIds)->toArray(); | 
                                
                                                            
                                    | 312 | 
                                     | 
                                     | 
                                
                                                            
                                    | 313 | 
                                     | 
                                            if (!count($files)) { | 
                                
                                                            
                                    | 314 | 
                                     | 
                                                return (new HTTPResponse(json_encode(['status' => 'error']), 404))  | 
                                
                                                            
                                    | 315 | 
                                     | 
                                                    ->addHeader('Content-Type', 'application/json'); | 
                                
                                                            
                                    | 316 | 
                                     | 
                                            }  | 
                                
                                                            
                                    | 317 | 
                                     | 
                                     | 
                                
                                                            
                                    | 318 | 
                                     | 
                                            if (!min(array_map(function (File $file) { | 
                                
                                                            
                                    | 319 | 
                                     | 
                                                return $file->canArchive();  | 
                                
                                                                                
                                 | 
                                
                                    @@ 969-972 (lines=4) @@
                                 | 
                            
                                                            
                                    | 966 | 
                                     | 
                                            /** @var File $record */  | 
                                
                                                            
                                    | 967 | 
                                     | 
                                            $record = $this->getList()->filter('ID', $id)->first(); | 
                                
                                                            
                                    | 968 | 
                                     | 
                                     | 
                                
                                                            
                                    | 969 | 
                                     | 
                                            if (!$record) { | 
                                
                                                            
                                    | 970 | 
                                     | 
                                                return (new HTTPResponse(json_encode(['status' => 'error']), 404))  | 
                                
                                                            
                                    | 971 | 
                                     | 
                                                    ->addHeader('Content-Type', 'application/json'); | 
                                
                                                            
                                    | 972 | 
                                     | 
                                            }  | 
                                
                                                            
                                    | 973 | 
                                     | 
                                     | 
                                
                                                            
                                    | 974 | 
                                     | 
                                            if (!$record->canEdit() || ($doPublish && !$record->canPublish())) { | 
                                
                                                            
                                    | 975 | 
                                     | 
                                                return (new HTTPResponse(json_encode(['status' => 'error']), 401))  |