mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Merge pull request #5894 from open-sausages/pulls/4.0/remove-autobuild
Remove DatabaseAdmin::autoBuild
This commit is contained in:
commit
bbb2824f3a
@ -151,21 +151,6 @@ class DatabaseAdmin extends Controller {
|
||||
return Director::absoluteURL($url, true);
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if database needs to be built, and build it if it does.
|
||||
*/
|
||||
public static function autoBuild() {
|
||||
$dataClasses = ClassInfo::subclassesFor('SilverStripe\ORM\DataObject');
|
||||
$lastBuilt = self::lastBuilt();
|
||||
foreach($dataClasses as $class) {
|
||||
if(filemtime(getClassFile($class)) > $lastBuilt) {
|
||||
$da = new DatabaseAdmin();
|
||||
$da->doBuild(true);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Build the default data, calling requireDefaultRecords on all
|
||||
* DataObject classes
|
||||
|
Loading…
Reference in New Issue
Block a user