Commit 0837cb0e authored by Richard Mansfield's avatar Richard Mansfield
Browse files

Fix test for internal js files in block javascript



The test for whether a blocktype plugin's js file was internal (and
needed a wwwroot added) is case sensitive, and ignored https.

Change-Id: Idc81123d0367df739a698ab688b4d4a59e023da0
Signed-off-by: default avatarRichard Mansfield <richard.mansfield@catalyst.net.nz>
parent 7103c383
...@@ -1269,7 +1269,7 @@ class BlockInstance { ...@@ -1269,7 +1269,7 @@ class BlockInstance {
*/ */
public function get_get_javascript_javascript($jsfiles) { public function get_get_javascript_javascript($jsfiles) {
foreach ($jsfiles as &$jsfile) { foreach ($jsfiles as &$jsfile) {
if (strpos($jsfile, 'http://') === false) { if (stripos($jsfile, 'http://') === false && stripos($jsfile, 'https://') === false) {
if ($this->artefactplugin) { if ($this->artefactplugin) {
$jsfile = 'artefact/' . $this->artefactplugin . '/blocktype/' . $jsfile = 'artefact/' . $this->artefactplugin . '/blocktype/' .
$this->blocktype . '/' . $jsfile; $this->blocktype . '/' . $jsfile;
......
Supports Markdown
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