Subsite module does not picks up themes

This PR fixed unable to create subsite problm.
 I was unable to create a subsite, because of no themes been shown in Theme dropdown menu.

How to test:

1> Use composer to install a fresh copy of Silverstripe 3.2
2> Use composer to install subsite module.
3> Try to create a subsite. 
4> No themes loaded into Theme dropdown menu.

5> Apply this PR.
6> fresh page / or dev/build,  now, themes loaded into The dropdown menu.
This commit is contained in:
ctx2002 2016-01-25 15:36:20 +13:00
parent 540071c449
commit 598d45aca6

View File

@ -700,8 +700,8 @@ class Subsite extends DataObject
return ArrayLib::valuekey($themes);
} else {
$themes = array();
if (is_dir('../themes/')) {
foreach (scandir('../themes/') as $theme) {
if (is_dir(THEMES_PATH)) {
foreach (scandir(THEMES_PATH) as $theme) {
if ($theme[0] == '.') {
continue;
}