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 {
$this->{$field} = $value;
}
}
$this->artefactplugin = blocktype_artefactplugin($this->blocktype);
}
public function get($field) {
......
......@@ -1710,8 +1710,8 @@ class View {
foreach($instancejs as &$jsfile) {
$jsfile = (is_array($jsfile) && isset($jsfile['file'])) ? $jsfile['file'] : $jsfile;
if(strpos($jsfile, 'http://') === false) {
if ($artefactplugin = blocktype_artefactplugin($pluginname)) {
$jsfile = 'artefact/' . $artefactplugin . '/blocktype/' .
if ($blockinstance->get('artefactplugin')) {
$jsfile = 'artefact/' . $blockinstance->get('artefactplugin') . '/blocktype/' .
$pluginname . '/' . $jsfile;
}
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