Browse Source

added newline to end of header and body blocks in View

issue #237
tags/2.0.0-beta
Carsten Brandt 12 years ago
parent
commit
c5d382c68a
  1. 6
      yii/base/View.php

6
yii/base/View.php

@ -771,7 +771,7 @@ class View extends Component
if (!empty($this->js[self::POS_HEAD])) { if (!empty($this->js[self::POS_HEAD])) {
$lines[] = implode("\n", $this->js[self::POS_HEAD]); $lines[] = implode("\n", $this->js[self::POS_HEAD]);
} }
return implode("\n", $lines); return empty($lines) ? '' : implode("\n", $lines) . "\n";
} }
/** /**
@ -788,7 +788,7 @@ class View extends Component
if (!empty($this->js[self::POS_BEGIN])) { if (!empty($this->js[self::POS_BEGIN])) {
$lines[] = implode("\n", $this->js[self::POS_BEGIN]); $lines[] = implode("\n", $this->js[self::POS_BEGIN]);
} }
return implode("\n", $lines); return empty($lines) ? '' : implode("\n", $lines) . "\n";
} }
/** /**
@ -805,6 +805,6 @@ class View extends Component
if (!empty($this->js[self::POS_END])) { if (!empty($this->js[self::POS_END])) {
$lines[] = implode("\n", $this->js[self::POS_END]); $lines[] = implode("\n", $this->js[self::POS_END]);
} }
return implode("\n", $lines); return empty($lines) ? '' : implode("\n", $lines) . "\n";
} }
} }

Loading…
Cancel
Save