mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
Merge pull request #7201 from kinglozzer/build-perf
Ensure ClassManifest isn't flushed twice on build
This commit is contained in:
commit
2c500c79c3
@ -122,8 +122,12 @@ class DatabaseAdmin extends Controller
|
||||
// The default time limit of 30 seconds is normally not enough
|
||||
Environment::increaseTimeLimitTo(600);
|
||||
|
||||
// Get all our classes
|
||||
ClassLoader::inst()->getManifest()->regenerate(false);
|
||||
// If this code is being run outside of a dev/build or without a ?flush query string param,
|
||||
// the class manifest hasn't been flushed, so do it here
|
||||
$request = $this->getRequest();
|
||||
if (!array_key_exists('flush', $request->getVars()) && strpos($request->getURL(), 'dev/build') !== 0) {
|
||||
ClassLoader::inst()->getManifest()->regenerate(false);
|
||||
}
|
||||
|
||||
$url = $this->getReturnURL();
|
||||
if ($url) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user