모두 lang() 함수로 변경

This commit is contained in:
conory 2016-03-06 17:01:15 +09:00
parent fc09ea0d47
commit 90400e2b5f
82 changed files with 234 additions and 234 deletions

View file

@ -927,13 +927,13 @@ class layoutAdminController extends layout
if(!$img['tmp_name'] || !is_uploaded_file($img['tmp_name']) || !checkUploadedFile($img['tmp_name']))
{
Context::set('msg', Context::getLang('upload failed'));
Context::set('msg', lang('upload failed'));
return;
}
if(!preg_match('/\.(jpg|jpeg|gif|png|swf)$/i', $img['name']))
{
Context::set('msg', Context::getLang('msg_layout_image_target'));
Context::set('msg', lang('msg_layout_image_target'));
return;
}
@ -941,7 +941,7 @@ class layoutAdminController extends layout
$tmpPath = $path . 'tmp/';
if(!FileHandler::makeDir($tmpPath))
{
Context::set('msg', Context::getLang('make directory failed'));
Context::set('msg', lang('make directory failed'));
return;
}
@ -952,7 +952,7 @@ class layoutAdminController extends layout
if(!move_uploaded_file($img['tmp_name'], $tmpFileName))
{
Context::set('msg', Context::getLang('move file failed'));
Context::set('msg', lang('move file failed'));
return;
}
@ -990,7 +990,7 @@ class layoutAdminController extends layout
$output = $this->updateLayout($args);
if(!$output->toBool())
{
Context::set('msg', Context::getLang($output->getMessage()));
Context::set('msg', lang($output->getMessage()));
return $output;
}

View file

@ -324,7 +324,7 @@ class layoutAdminView extends layout
}
Context::set('layout_info', $layout_info);
Context::set('content', Context::getLang('layout_preview_content'));
Context::set('content', lang('layout_preview_content'));
// Temporary save the codes
$edited_layout_file = sprintf('./files/cache/layout/tmp.tpl');
FileHandler::writeFile($edited_layout_file, $code);

View file

@ -58,7 +58,7 @@ class layoutModel extends layout
$siteDefaultLayoutInfo = $this->getlayout($siteDefaultLayoutSrl);
$newLayout = sprintf('%s, %s', $siteDefaultLayoutInfo->title, $siteDefaultLayoutInfo->layout);
$siteDefaultLayoutInfo->layout_srl = -1;
$siteDefaultLayoutInfo->title = Context::getLang('use_site_default_layout');
$siteDefaultLayoutInfo->title = lang('use_site_default_layout');
$siteDefaultLayoutInfo->layout = $newLayout;
array_unshift($output->data, $siteDefaultLayoutInfo);
@ -1030,7 +1030,7 @@ class layoutModel extends layout
// Display edit button for faceoff layout
if(Context::get('module')!='admin' && strpos(Context::get('act'),'Admin')===false && ($logged_info->is_admin == 'Y' || $logged_info->is_site_admin))
{
Context::addHtmlFooter('<div class="faceOffManager" style="height: 23px; position: fixed; right: 3px; top: 3px;"><a href="'.getUrl('','mid',Context::get('mid'),'act','dispLayoutAdminLayoutModify','delete_tmp','Y').'">'.Context::getLang('cmd_layout_edit').'</a></div>');
Context::addHtmlFooter('<div class="faceOffManager" style="height: 23px; position: fixed; right: 3px; top: 3px;"><a href="'.getUrl('','mid',Context::get('mid'),'act','dispLayoutAdminLayoutModify','delete_tmp','Y').'">'.lang('cmd_layout_edit').'</a></div>');
}
// Display menu when editing the faceOff page
if(Context::get('act')=='dispLayoutAdminLayoutModify' && ($logged_info->is_admin == 'Y' || $logged_info->is_site_admin))

View file

@ -55,7 +55,7 @@ class layoutView extends layout
$logged_info = Context::get('logged_info');
if($logged_info->is_admin != 'Y')
{
throw new Exception(Context::getLang('msg_invalid_request'));
throw new Exception(lang('msg_invalid_request'));
}
// if module is 'ARTiCLE' and from site design setting, make content directly
@ -64,7 +64,7 @@ class layoutView extends layout
$oDocumentModel = getModel('document');
$oDocument = $oDocumentModel->getDocument(0, true);
$t = Context::getLang('article_preview_title');
$t = lang('article_preview_title');
$c = '';
for($i = 0; $i < 4; $i++)
@ -72,7 +72,7 @@ class layoutView extends layout
$c .= '<p>';
for($j = 0; $j < 20; $j++)
{
$c .= Context::getLang('article_preview_content') . ' ';
$c .= lang('article_preview_content') . ' ';
}
$c .= '</p>';
}
@ -259,7 +259,7 @@ class layoutView extends layout
// if there is no module instance, error...
if(!$output->data)
{
throw new Exception(Context::getLang('msg_unabled_preview'));
throw new Exception(lang('msg_unabled_preview'));
}
$mid = current($output->data)->mid;
@ -301,7 +301,7 @@ class layoutView extends layout
$oModule = $oModuleHandler->procModule();
if(!$oModule->toBool())
{
throw new Exception(Context::getLang('not_support_layout_preview'));
throw new Exception(lang('not_support_layout_preview'));
}
// get module html
@ -361,7 +361,7 @@ class layoutView extends layout
}
Context::set('layout_info', $layout_info);
Context::set('content', Context::getLang('layout_preview_content'));
Context::set('content', lang('layout_preview_content'));
// Temporary save the codes
$edited_layout_file = _XE_PATH_ . 'files/cache/layout/tmp.tpl';
FileHandler::writeFile($edited_layout_file, $code);