Skip to content

Commit

Permalink
ENH Allow File.keep_archived_assets to show files archive tab
Browse files Browse the repository at this point in the history
  • Loading branch information
emteknetnz committed Aug 7, 2023
1 parent 4a57298 commit ac0f183
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/Extensions/FileArchiveExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,14 @@ public function getArchiveField()
* The files archive is only useful if archived assets are stored
* so this checks if this option is enabled
*
* This should really only check File.keep_archived_assets, though it was originally
* only checking AssetControlExtension.keep_archived_assets, so keeping that for BC
*
* @return boolean
*/
public function isArchiveFieldEnabled()
{
return Config::inst()->get(AssetControlExtension::class, 'keep_archived_assets');
return Config::inst()->get(AssetControlExtension::class, 'keep_archived_assets')
|| Config::inst()->get(File::class, 'keep_archived_assets');
}
}

0 comments on commit ac0f183

Please sign in to comment.