Commit 5f7f59f4 authored by Son Nguyen's avatar Son Nguyen
Browse files

Initilization the property 'artefactplugin' of BlockInstance



This property is used in determine the path of blocktype

Change-Id: Icfeee5399d7899330efaac8fc9a323a1069aadd5
Signed-off-by: default avatarSon Nguyen <son.nguyen@catalyst.net.nz>
parent c2f5a501
...@@ -465,6 +465,7 @@ class BlockInstance { ...@@ -465,6 +465,7 @@ class BlockInstance {
$this->{$field} = $value; $this->{$field} = $value;
} }
} }
$this->artefactplugin = blocktype_artefactplugin($this->blocktype);
} }
public function get($field) { public function get($field) {
......
...@@ -1710,8 +1710,8 @@ class View { ...@@ -1710,8 +1710,8 @@ class View {
foreach($instancejs as &$jsfile) { foreach($instancejs as &$jsfile) {
$jsfile = (is_array($jsfile) && isset($jsfile['file'])) ? $jsfile['file'] : $jsfile; $jsfile = (is_array($jsfile) && isset($jsfile['file'])) ? $jsfile['file'] : $jsfile;
if(strpos($jsfile, 'http://') === false) { if(strpos($jsfile, 'http://') === false) {
if ($artefactplugin = blocktype_artefactplugin($pluginname)) { if ($blockinstance->get('artefactplugin')) {
$jsfile = 'artefact/' . $artefactplugin . '/blocktype/' . $jsfile = 'artefact/' . $blockinstance->get('artefactplugin') . '/blocktype/' .
$pluginname . '/' . $jsfile; $pluginname . '/' . $jsfile;
} }
else { else {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment