Browse Source

Fixes issue #467: allow view file to be absent as long as the themed version exists.

tags/2.0.0-beta
Qiang Xue 12 years ago
parent
commit
c9a7119b91
  1. 6
      framework/yii/base/View.php

6
framework/yii/base/View.php

@ -235,10 +235,10 @@ class View extends Component
public function renderFile($viewFile, $params = array(), $context = null)
{
$viewFile = Yii::getAlias($viewFile);
if ($this->theme !== null) {
$viewFile = $this->theme->applyTo($viewFile);
}
if (is_file($viewFile)) {
if ($this->theme !== null) {
$viewFile = $this->theme->applyTo($viewFile);
}
$viewFile = FileHelper::localize($viewFile);
} else {
throw new InvalidParamException("The view file does not exist: $viewFile");

Loading…
Cancel
Save