mirror of
https://github.com/silverstripe/silverstripe-subsites
synced 2024-10-22 09:05:55 +00:00
parent
19f0162265
commit
e52fe41a23
@ -8,3 +8,5 @@ SilverStripe\Core\Injector\Injector:
|
||||
properties:
|
||||
Middlewares:
|
||||
SubsitesStateMiddleware: %$SilverStripe\Subsites\Middleware\InitStateMiddleware
|
||||
SilverStripe\Dev\Tasks\MigrateFileTask:
|
||||
class: SilverStripe\Subsites\Tasks\SubsiteMigrateFileTask
|
||||
|
20
src/Tasks/SubsiteMigrateFileTask.php
Normal file
20
src/Tasks/SubsiteMigrateFileTask.php
Normal file
@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
namespace SilverStripe\Subsites\Tasks;
|
||||
|
||||
|
||||
use SilverStripe\Dev\Tasks\MigrateFileTask;
|
||||
use SilverStripe\Subsites\Model\Subsite;
|
||||
|
||||
class SubsiteMigrateFileTask extends MigrateFileTask
|
||||
{
|
||||
public function run($request)
|
||||
{
|
||||
$origDisableSubsiteFilter = Subsite::$disable_subsite_filter;
|
||||
Subsite::disable_subsite_filter(true);
|
||||
|
||||
parent::run($request);
|
||||
|
||||
Subsite::disable_subsite_filter($origDisableSubsiteFilter);
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user