mirror of
https://github.com/yiisoft/yii.git
synced 2026-03-05 07:44:05 +01:00
Update framework/web/CClientScript.php
Сompromise solution. If we has a <head> we use him, else we use <title>
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user