mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
Merge pull request #2062 from jthomerson/enhancement_3.1_allow_disabling_prepopulate_version_number_cache
ENHANCEMENT: allow disabling of Versioned prepopulate_versionnumber_cache
This commit is contained in:
commit
25ba77d333
@ -79,6 +79,14 @@ class Versioned extends DataExtension {
|
||||
'Version' => 'Int'
|
||||
);
|
||||
|
||||
/**
|
||||
* Used to enable or disable the prepopulation of the version number cache.
|
||||
* Defaults to true.
|
||||
*
|
||||
* @var boolean
|
||||
*/
|
||||
private static $prepopulate_versionnumber_cache = true;
|
||||
|
||||
/**
|
||||
* Keep track of the archive tables that have been created.
|
||||
*
|
||||
@ -1095,6 +1103,9 @@ class Versioned extends DataExtension {
|
||||
* @param array $idList
|
||||
*/
|
||||
public static function prepopulate_versionnumber_cache($class, $stage, $idList = null) {
|
||||
if (!Config::inst()->get('Versioned', 'prepopulate_versionnumber_cache')) {
|
||||
return;
|
||||
}
|
||||
$filter = "";
|
||||
|
||||
if($idList) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user