|
@@ -9,7 +9,7 @@ discard block |
|
|
block discarded – undo |
|
9
|
9
|
private $pluginMessages; |
|
10
|
10
|
private $languageOrderCache = array(); |
|
11
|
11
|
|
|
12
|
|
- public function __construct($resource, $globalPlugins=array()) |
|
|
12
|
+ public function __construct($resource, $globalPlugins = array()) |
|
13
|
13
|
{ |
|
14
|
14
|
$this->resource = $resource; |
|
15
|
15
|
$plugins = $this->resource->allLiterals('skosmos:usePlugin'); |
|
@@ -23,7 +23,7 @@ discard block |
|
|
block discarded – undo |
|
23
|
23
|
//Get message plugins defined as resources and their respective message literals |
|
24
|
24
|
$pluginResources = $this->resource->allResources('skosmos:useMessagePlugin'); |
|
25
|
25
|
if ($pluginResources) { |
|
26
|
|
- foreach($pluginResources as $pluginResource) { |
|
|
26
|
+ foreach ($pluginResources as $pluginResource) { |
|
27
|
27
|
$pluginName = $pluginResource->getLiteral('skosmos:usePlugin')->getValue(); |
|
28
|
28
|
$pluginMessageLiterals = $pluginResource->allLiterals('skosmos:pluginMessage'); |
|
29
|
29
|
foreach ($pluginMessageLiterals as $message) { |
|
@@ -50,7 +50,7 @@ discard block |
|
|
block discarded – undo |
|
50
|
50
|
$langs = $this->getLanguages(); |
|
51
|
51
|
$deflang = reset($langs); // picking the first one from the list with reset since the keys are not numeric |
|
52
|
52
|
if (sizeof($langs) > 1) { |
|
53
|
|
- trigger_error("Default language for vocabulary '" . $this->getShortName() . "' unknown, choosing '$deflang'.", E_USER_WARNING); |
|
|
53
|
+ trigger_error("Default language for vocabulary '".$this->getShortName()."' unknown, choosing '$deflang'.", E_USER_WARNING); |
|
54
|
54
|
} |
|
55
|
55
|
|
|
56
|
56
|
return $deflang; |