mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-07 10:41:40 +09:00
issue 3644, php5대응 file_put_contents 함수 적용
git-svn-id: http://xe-core.googlecode.com/svn/branches/maserati@13199 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
4f4c63ed3d
commit
d9f001266c
7 changed files with 17 additions and 49 deletions
|
|
@ -894,19 +894,15 @@ class moduleAdminController extends module
|
|||
$langMap[$langCode] += $langMap[$targetLangCode];
|
||||
}
|
||||
|
||||
$fp = fopen(sprintf('%s/%d.%s.php', $cache_path, $args->site_srl, $langCode), 'w');
|
||||
if(!$fp)
|
||||
$str = "<?php if(!defined('__XE__')) exit(); \r\n");
|
||||
foreach($langMap[$langCode] as $code => $value)
|
||||
{
|
||||
$str = sprintf('$lang[\'%s\'] = \'%s\';', $code, addcslashes($value, "'"));
|
||||
}
|
||||
if (!@file_put_contents(sprintf('%s/%d.%s.php', $cache_path, $args->site_srl, $langCode), $str))
|
||||
{
|
||||
return;
|
||||
}
|
||||
fwrite($fp, "<?php if(!defined('__XE__')) exit(); \r\n");
|
||||
|
||||
foreach($langMap[$langCode] as $code => $value)
|
||||
{
|
||||
fwrite($fp, sprintf('$lang[\'%s\'] = \'%s\';', $code, addcslashes($value, "'")));
|
||||
}
|
||||
|
||||
fwrite($fp, '?>');
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue