Skip to content

Commit

Permalink
BUG Use FQN to reference subsite
Browse files Browse the repository at this point in the history
  • Loading branch information
Maxime Rainville committed Sep 3, 2019
1 parent 4d7f663 commit dfb095d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/SimpleStyleguideController.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
use SilverStripe\Forms\RequiredFields;
use SilverStripe\Forms\Form;
use SilverStripe\Assets\File;
use SilverStripe\Subsites\Model\Subsite;

/**
* @package simple-styleguide
Expand Down Expand Up @@ -60,7 +61,7 @@ public function index()
}

// If the subsite module is installed then set the theme based on the current subsite
if (class_exists('Subsite') && Subsite::currentSubsite()) {
if (class_exists(Subsite::class) && Subsite::currentSubsite()) {
Config::inst()->update('SSViewer', 'theme', Subsite::currentSubsite()->Theme);
}

Expand Down

0 comments on commit dfb095d

Please sign in to comment.