Merge branch 'develop' into pr/editor-frame

This commit is contained in:
Kijin Sung 2018-03-06 20:50:49 +09:00
commit 1728d17867
7 changed files with 381 additions and 381 deletions

File diff suppressed because it is too large Load diff

View file

@ -364,12 +364,9 @@ class FileHandler
}
Rhymix\Framework\Debug::addRemoteRequest($log);
if(count($response->cookies))
foreach($response->cookies as $cookie)
{
foreach($response->cookies as $cookie)
{
$cookies[$host][$cookie->name] = $cookie->value;
}
$cookies[$host][$cookie->name] = $cookie->value;
}
if($response->success)

View file

@ -344,22 +344,27 @@ class TemplateHandler
*/
private function _fetch($filename)
{
$__Context = Context::getInstance();
// Import Context and lang as local variables.
$__Context = Context::getAll();
$__Context->tpl_path = $this->path;
global $lang;
// Start the output buffer.
$__ob_level_before_fetch = ob_get_level();
ob_start();
// Include the compiled template.
include $filename;
// Fetch contents of the output buffer until the buffer level is the same as before.
$contents = '';
while (ob_get_level() > $__ob_level_before_fetch)
{
$contents .= ob_get_clean();
}
// insert template path comment tag
if(config('debug.enabled') && Rhymix\Framework\Debug::isEnabledForCurrentUser())
// Insert template path comment tag.
if(config('debug.enabled') && Rhymix\Framework\Debug::isEnabledForCurrentUser() && !starts_with('<!DOCTYPE', $contents))
{
$sign = PHP_EOL . '<!-- Template %s : ' . $this->web_path . $this->filename . ' -->' . PHP_EOL;
$contents = sprintf($sign, 'start') . $contents . sprintf($sign, 'end');
@ -979,7 +984,7 @@ class TemplateHandler
}
return preg_replace_callback('@(?<!::|\\\\|(?<!eval\()\')\$([a-z_][a-z0-9_]*)@i', function($matches) {
if (preg_match('/^(?:GLOBALS|_SERVER|_COOKIE|_GET|_POST|_REQUEST|__Context|this)$/', $matches[1]))
if (preg_match('/^(?:GLOBALS|_SERVER|_COOKIE|_GET|_POST|_REQUEST|__Context|this|lang)$/', $matches[1]))
{
return '$' . $matches[1];
}

View file

@ -18,4 +18,5 @@ return array(
'ru' => array('name' => 'Русский', 'locale' => 'ru_RU'),
'tr' => array('name' => 'Türkçe', 'locale' => 'tr_TR'),
'vi' => array('name' => 'Tiếng Việt', 'locale' => 'vi_VN'),
'id' => array('name' => 'Bahasa Indonesia', 'locale' => 'id_ID'),
);

View file

@ -43,8 +43,7 @@ require dirname(__FILE__) . '/common/autoload.php';
* @brief Initialize by creating Context object
* Set all Request Argument/Environment variables
**/
$oContext = Context::getInstance();
$oContext->init();
Context::init();
/**
* @brief Initialize and execute Module Handler

View file

@ -12,10 +12,10 @@
<dt>{$lang->member_group}</dt>
<dd>{implode(', ', $memberInfo['group_list'])}</dd>
<dt>{$lang->signup_date}</dt>
<dd>{zdate($memberInfo[regdate],"Y-m-d")}</dd>
<block cond="$memberInfo[member_srl] == $logged_info->member_srl || $logged_info->is_admin == 'Y'">
<dd>{zdate($memberInfo['regdate'],"Y-m-d")}</dd>
<block cond="$memberInfo['member_srl'] == $logged_info->member_srl || $logged_info->is_admin == 'Y'">
<dt>{$lang->last_login}</dt>
<dd>{zdate($memberInfo[last_login],"Y-m-d")}</dd>
<dd>{zdate($memberInfo['last_login'],"Y-m-d")}</dd>
</block>
</dl>
<div class="btnArea btn-group" cond="$memberInfo['member_srl'] == $logged_info->member_srl">

View file

@ -205,7 +205,7 @@ class TemplateHandlerTest extends \Codeception\TestCase\Test
// issue 512 - ignores <marquee>
array(
'<div class="topimgContex"><marquee direction="up" scrollamount="1" height="130" loop="infinity" behavior="lscro">{$lang->sl_show_topimgtext}</marquee></div>',
'?><div class="topimgContex"><marquee direction="up" scrollamount="1" height="130" loop="infinity" behavior="lscro"><?php echo $__Context->lang->sl_show_topimgtext ?></marquee></div>'
'?><div class="topimgContex"><marquee direction="up" scrollamount="1" height="130" loop="infinity" behavior="lscro"><?php echo $lang->sl_show_topimgtext ?></marquee></div>'
),
// issue 584
array(