Added hashes calculate and fix hashes problems
This commit is contained in:
@@ -106,7 +106,9 @@ class StoreEntryRequest extends FormRequest
|
||||
$rules['new-game-genre'] = 'required_with:new-game-title|integer|nullable|exists:genres,id';
|
||||
}
|
||||
|
||||
if( section_must_be( ['translations', 'romhacks'], $section ) ){
|
||||
$bypassHashes = $isEdit && $this->user()->can('moderate', $this->route('entry') ) && ($this->input('bypass_hashes') !== null);
|
||||
|
||||
if( section_must_be( ['translations', 'romhacks'], $section ) && !$bypassHashes ){
|
||||
$rules['hashes'] = 'array|required|min:1';
|
||||
$rules['hashes.*.filename'] = 'required|string|max:512';
|
||||
$rules['hashes.*.hash_crc32'] = 'required|string|max:512';
|
||||
|
||||
Reference in New Issue
Block a user