mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 11:28:25 +00:00
Updating HtmlHelper::charset() to use Configure::read('charset)
Updated core layouts to use $html->charset() git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@4128 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
9283b97f01
commit
c5ec6b0ea1
5 changed files with 19 additions and 7 deletions
|
@ -219,7 +219,14 @@ class HtmlHelper extends AppHelper {
|
|||
* @param string $charset
|
||||
* @return string
|
||||
*/
|
||||
function charset($charset = 'UTF-8') {
|
||||
function charset($charset = null) {
|
||||
if(is_null($charset)){
|
||||
$charset = Configure::read('charset');
|
||||
if(is_null($charset)){
|
||||
$charset = 'utf-8';
|
||||
}
|
||||
}
|
||||
|
||||
return $this->output(sprintf($this->tags['charset'], $charset));
|
||||
}
|
||||
/**
|
||||
|
|
|
@ -28,6 +28,8 @@
|
|||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>CakePHP : <?php echo $title_for_layout;?></title>
|
||||
<?php echo $html->charset(); ?>
|
||||
|
||||
<link rel="icon" href="<?php echo $this->webroot . 'favicon.ico';?>" type="image/x-icon" />
|
||||
<link rel="shortcut icon" href="<?php echo $this->webroot . 'favicon.ico';?>" type="image/x-icon" />
|
||||
<?php echo $html->css('cake.generic');?>
|
||||
|
|
|
@ -28,7 +28,8 @@
|
|||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title><?php echo $page_title?></title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||||
<?php echo $html->charset(); ?>
|
||||
|
||||
<?php if(Configure::read() == 0) { ?>
|
||||
<meta http-equiv="Refresh" content="<?php echo $pause?>;url=<?php echo $url?>"/>
|
||||
<?php } ?>
|
||||
|
|
|
@ -2,7 +2,8 @@
|
|||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>CakePHP: the PHP Rapid Development Framework: <?php echo $title_for_layout;?></title>
|
||||
<?php echo $html->charset('UTF-8');?>
|
||||
<?php echo $html->charset();?>
|
||||
|
||||
<link rel="icon" href="<?php echo $this->webroot;?>favicon.ico" type="image/x-icon" />
|
||||
<link rel="shortcut icon" href="<?php echo $this->webroot;?>favicon.ico" type="image/x-icon" />
|
||||
<?php echo $html->css('cake.generic');?>
|
||||
|
@ -13,14 +14,14 @@
|
|||
<h1>CakePHP: the PHP Rapid Development Framework</h1>
|
||||
</div>
|
||||
<div id="content">
|
||||
<?php
|
||||
<?php
|
||||
if($session->check('Message.flash')):
|
||||
$session->flash();
|
||||
endif;
|
||||
?>
|
||||
|
||||
|
||||
<?php echo $content_for_layout;?>
|
||||
|
||||
|
||||
</div>
|
||||
<div id="footer">
|
||||
<?php echo $html->link(
|
||||
|
|
|
@ -32,7 +32,8 @@
|
|||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title><?php echo $page_title?></title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||||
<?php echo $html->charset();?>
|
||||
|
||||
<?php if(Configure::read() == 0) { ?>
|
||||
<meta http-equiv="Refresh" content="<?php echo $pause?>;url=<?php echo $url?>"/>
|
||||
<?php } ?>
|
||||
|
|
Loading…
Reference in a new issue