Merge branch 'develop' into next

This commit is contained in:
Kijin Sung 2020-08-19 15:41:14 +09:00
commit 9782c30654
14 changed files with 42 additions and 18 deletions

View file

@ -2395,7 +2395,7 @@ class Context
*/
public static function addHtmlHeader($header)
{
self::$_instance->html_header .= "\n" . $header;
self::$_instance->html_header .= (self::$_instance->html_header ? "\n" : '') . $header;
}
public static function clearHtmlHeader()
@ -2442,7 +2442,7 @@ class Context
*/
public static function addBodyHeader($header)
{
self::$_instance->body_header .= "\n" . $header;
self::$_instance->body_header .= (self::$_instance->body_header ? "\n" : '') . $header;
}
/**
@ -2462,7 +2462,7 @@ class Context
*/
public static function addHtmlFooter($footer)
{
self::$_instance->html_footer .= (self::$_instance->Htmlfooter ? "\n" : '') . $footer;
self::$_instance->html_footer .= (self::$_instance->html_footer ? "\n" : '') . $footer;
}
/**

View file

@ -274,7 +274,7 @@ class DisplayHandler extends Handler
$data = Rhymix\Framework\Debug::getDebugData();
$display_content = array_fill_keys(config('debug.display_content'), true);
include RX_BASEDIR . 'common/tpl/debug_comment.html';
$content = preg_replace('/\n{2,}/', "\n\n", trim(ob_get_clean())) . PHP_EOL;
$content = preg_replace('/\n{2,}/', "\n\n", trim(ob_get_clean())) . "\n";
if ($display_type === 'file')
{
$log_filename = config('debug.log_filename') ?: 'files/debug/YYYYMMDD.php';
@ -293,12 +293,12 @@ class DisplayHandler extends Handler
{
$phpheader = '';
}
FileHandler::writeFile($log_filename, $phpheader . $content . PHP_EOL, 'a');
FileHandler::writeFile($log_filename, $phpheader . $content . "\n", 'a');
$debug_output .= '';
}
else
{
$debug_output .= '<!--' . PHP_EOL . $content . PHP_EOL . '-->' . PHP_EOL;
$debug_output .= '<!--' . "\n" . $content . "\n" . '-->' . "\n";
}
}
}

View file

@ -61,7 +61,7 @@ class VirtualXMLDisplayHandler
$html[] = '</script>';
$html[] = '</head><body></body></html>';
return join(PHP_EOL, $html);
return join("\n", $html);
}
}

View file

@ -488,7 +488,7 @@ class ExtraItem
$buff[] = '<p>' . escape($this->desc, false) . '</p>';
}
return join(PHP_EOL, $buff);
return join("\n", $buff);
}
}

View file

@ -688,7 +688,7 @@ class FrontEndFileHandler extends Handler
$tmp = array_first(explode('/', strtr($dirname, '\\.', '//')));
$cssSortList = array('common' => -100000, 'layouts' => -90000, 'modules' => -80000, 'widgets' => -70000, 'addons' => -60000);
$file->index = $cssSortList[$tmp[0]];
$file->index = $cssSortList[$tmp];
}
/**

View file

@ -367,7 +367,7 @@ class TemplateHandler
// Insert template path comment tag.
if(Rhymix\Framework\Debug::isEnabledForCurrentUser() && Context::getResponseMethod() === 'HTML' && !starts_with('<!DOCTYPE', $contents) && !starts_with('<?xml', $contents))
{
$sign = PHP_EOL . '<!-- Template %s : ' . $this->web_path . $this->filename . ' -->' . PHP_EOL;
$sign = "\n" . '<!-- Template %s : ' . $this->web_path . $this->filename . ' -->' . "\n";
$contents = sprintf($sign, 'start') . $contents . sprintf($sign, 'end');
}