Skip to content

Commit

Permalink
Merge pull request #14 from maxime-rainville/pulls/correct-subsite-re…
Browse files Browse the repository at this point in the history
…ference

Using FQN Subsite class reference
  • Loading branch information
benmanu authored Feb 14, 2020
2 parents 3cb7f82 + dfb095d commit 5eee71c
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 @@ -24,6 +24,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 @@ -61,7 +62,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 5eee71c

Please sign in to comment.