Merge pull request #5894 from open-sausages/pulls/4.0/remove-autobuild

Remove DatabaseAdmin::autoBuild
This commit is contained in:
Loz Calver 2016-08-16 10:47:05 +01:00 committed by GitHub
commit bbb2824f3a

View File

@ -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