Home » Projects » Mambo CMS » SVN » Browse repository
Diff of /mambo/branches/4.6/includes/mambolanguage.class.php
Parent Directory
|
Revision Log
|
Patch
| 46 |
if (isset($this->$var)) $this->$var = $value; |
if (isset($this->$var)) $this->$var = $value; |
| 47 |
} |
} |
| 48 |
function save() { |
function save() { |
| 49 |
|
global $page_; |
| 50 |
$this->updateFiles(); |
$this->updateFiles(); |
|
|
|
| 51 |
$xml = $this->toXML(); |
$xml = $this->toXML(); |
| 52 |
|
if($page_ == "addpage"){ |
| 53 |
if (strtolower($this->charset) != 'utf-8') { |
if (strtolower($this->charset) != 'utf-8') { |
| 54 |
if (function_exists('iconv')) { |
if (function_exists('iconv')) { |
| 55 |
$xml = iconv("utf-8", $this->charset, $xml); |
$xml = iconv("utf-8", $this->charset, $xml); |
| 56 |
} |
} |
| 57 |
} |
} |
| 58 |
|
} |
| 59 |
/**/ |
/**/ |
| 60 |
$fp = fopen($this->path . $this->getFileName() . '.xml', 'w+'); |
$fp = fopen($this->path . $this->getFileName() . '.xml', 'w+'); |
| 61 |
fwrite($fp, $xml); |
fwrite($fp, $xml); |
| 176 |
} |
} |
| 177 |
} |
} |
| 178 |
$this->codesets = array_unique($this->codesets); |
$this->codesets = array_unique($this->codesets); |
| 179 |
|
$this->attrEncoding($encoding); |
| 180 |
return true; |
return true; |
| 181 |
} |
} |
| 182 |
return false; |
return false; |
| 183 |
} |
} |
| 184 |
|
function attrEncoding($encoding) |
| 185 |
|
{ |
| 186 |
|
$attrs = get_object_vars($this); |
| 187 |
|
foreach($attrs as $key=>$var) |
| 188 |
|
{ |
| 189 |
|
if(is_array($var)) |
| 190 |
|
{ |
| 191 |
|
$arrs = &$this->$key; |
| 192 |
|
foreach($arrs as $k=>$v) |
| 193 |
|
{ |
| 194 |
|
$arrs[$k] = iconv("utf-8",$encoding,$v); |
| 195 |
|
} |
| 196 |
|
}else |
| 197 |
|
$this->$key = iconv("utf-8",$encoding,$var); |
| 198 |
|
} |
| 199 |
|
} |
| 200 |
|
|
| 201 |
|
|
| 202 |
|
|
| 203 |
|
|
|
|
Legend:
| Removed from v.811 |
|
| changed lines |
| |
Added in v.812 |
|
|

Web Hosting provided by Network
Redux.