mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-07 10:41:40 +09:00
Fix syntax error when a module is installed in the wrong folder
GitHub에서 다운받은 모듈이 modulename-master 등 잘못된 폴더에 설치된 경우 하이픈 문자 때문에 files/site_design/design_0.php 파일의 문법이 잘못되어 사이트 전체가 먹통이 되어 버리는 문제가 있었음. 해당 캐시파일 작성시 문자열을 제대로 escape 처리하도록 수정함. 관리자가 생성한 폴더명 때문에 발생하는 문제이므로 보안이슈는 아님.
This commit is contained in:
parent
fcd8c2f211
commit
1be8ee18a3
1 changed files with 4 additions and 4 deletions
|
|
@ -220,22 +220,22 @@ class adminAdminController extends admin
|
|||
|
||||
if($designInfo->layout_srl)
|
||||
{
|
||||
$buff[] = sprintf('$designInfo->layout_srl = %s; ', $designInfo->layout_srl);
|
||||
$buff[] = sprintf('$designInfo->layout_srl = %s; ', var_export(intval($designInfo->layout_srl), true));
|
||||
}
|
||||
|
||||
if($designInfo->mlayout_srl)
|
||||
{
|
||||
$buff[] = sprintf('$designInfo->mlayout_srl = %s;', $designInfo->mlayout_srl);
|
||||
$buff[] = sprintf('$designInfo->mlayout_srl = %s;', var_export(intval($designInfo->mlayout_srl), true));
|
||||
}
|
||||
|
||||
$buff[] = '$designInfo->module = new stdClass;';
|
||||
|
||||
foreach($designInfo->module as $moduleName => $skinInfo)
|
||||
{
|
||||
$buff[] = sprintf('$designInfo->module->%s = new stdClass;', $moduleName);
|
||||
$buff[] = sprintf('$designInfo->module->{%s} = new stdClass;', var_export(strval($moduleName), true));
|
||||
foreach($skinInfo as $target => $skinName)
|
||||
{
|
||||
$buff[] = sprintf('$designInfo->module->%s->%s = \'%s\';', $moduleName, $target, $skinName);
|
||||
$buff[] = sprintf('$designInfo->module->{%s}->{%s} = %s;', var_export(strval($moduleName), true), var_export(strval($target), true), var_export(strval($skinName), true));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue