Commit 9f569609 by Alexander Makarov

Fixes #6845: Fixed incorrect implementation of `{registerCssFile` and `{registerJsFile`

parent 360d5a4e
......@@ -4,7 +4,7 @@ Yii Framework 2 smarty extension Change Log
2.0.3 under development
-----------------------
- no changes in this release.
- Bug #6845: Fixed incorrect implementation of `{registerCssFile` and `{registerJsFile` (TomassunGitHub, samdark)
2.0.2 January 11, 2015
......
......@@ -320,11 +320,11 @@ PHP;
$url = ArrayHelper::remove($params, 'url');
$key = ArrayHelper::remove($params, 'key', null);
$depends = ArrayHelper::remove($params, 'depends', null);
$position = ArrayHelper::remove($params, 'position');
if (isset($params['position']))
$params['position'] = $this->getViewConstVal($params['position'], View::POS_END);
$params['position'] = $this->getViewConstVal($position, View::POS_END);
Yii::$app->getView()->registerJsFile($url, $depends, $params, $key);
Yii::$app->getView()->registerJsFile($url, $params, $key);
}
/**
......@@ -380,9 +380,8 @@ PHP;
$url = ArrayHelper::remove($params, 'url');
$key = ArrayHelper::remove($params, 'key', null);
$depends = ArrayHelper::remove($params, 'depends', null);
Yii::$app->getView()->registerCssFile($url, $depends, $params, $key);
Yii::$app->getView()->registerCssFile($url, $params, $key);
}
/**
......
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