Update framework/web/CClientScript.php

Сompromise solution. If we has a <head> we use him, else we use <title>
This commit is contained in:
Artem
2012-12-18 17:17:44 +02:00
parent 28c198a112
commit 802939eea7

View File

@@ -371,8 +371,11 @@ class CClientScript extends CApplicationComponent
if($html!=='')
{
$count=0;
$output=preg_replace('/<\\/title\s*>/is','$1<###head###>',$output,1,$count);
$count=0;
$output=preg_replace('/<\\/head\s*>/is','<###head###>$1',$output,1,$count);
if(!$count)
$output=preg_replace('/<\\/title\s*>/is','$1<###head###>',$output,1,$count);
if($count)
$output=str_replace('<###head###>',$html,$output);
else