Skip to content

Commit

Permalink
Developer identifiers static should use the Config:: system instead o…
Browse files Browse the repository at this point in the history
…f a direct static reference. closes symbiote#28
  • Loading branch information
sheadawson committed Aug 1, 2013
1 parent e842b7e commit 5393436
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions code/pages/Site.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ class Site extends Page implements HiddenClass {
'IsDefault' => 'Is Default'
);

public static $developer_identifiers = array();

public static $icon = 'multisites/images/world.png';

Expand Down Expand Up @@ -74,10 +73,12 @@ public function getCMSFields() {
))
)));

if(is_array(Multisites::$developer_identifiers)){
$devIDs = Config::inst()->get('Multisites', 'developer_identifiers');
if(is_array($devIDs)){
if(!ArrayLib::is_associative($devIDs)) $devIDs = ArrayLib::valuekey($devIDs);
$fields->addFieldToTab('Root.Main', DropdownField::create('DevID', _t(
'Multisites.DeveloperIdentifier', 'Developer Identifier'),
Multisites::$developer_identifiers
$devIDs
));
}

Expand Down

0 comments on commit 5393436

Please sign in to comment.