mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-11 21:12:15 +09:00
Convert PHP_EOL to \n for consistency
adf067e 보완
- classes 내에서 사용하는 PHP_EOL을 \n으로 교체
- common/framework/debug.php, common/scripts 내의 스크립트들은
OS에 맞춰야 하므로 수정하지 않음
This commit is contained in:
parent
adf067e557
commit
a6bb44bf88
5 changed files with 9 additions and 9 deletions
|
|
@ -2459,7 +2459,7 @@ class Context
|
||||||
*/
|
*/
|
||||||
public static function addHtmlHeader($header)
|
public static function addHtmlHeader($header)
|
||||||
{
|
{
|
||||||
self::$_instance->html_header .= (self::$_instance->html_header ? PHP_EOL : '') . $header;
|
self::$_instance->html_header .= (self::$_instance->html_header ? "\n" : '') . $header;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function clearHtmlHeader()
|
public static function clearHtmlHeader()
|
||||||
|
|
@ -2506,7 +2506,7 @@ class Context
|
||||||
*/
|
*/
|
||||||
public static function addBodyHeader($header)
|
public static function addBodyHeader($header)
|
||||||
{
|
{
|
||||||
self::$_instance->body_header .= (self::$_instance->body_header ? PHP_EOL : '') . $header;
|
self::$_instance->body_header .= (self::$_instance->body_header ? "\n" : '') . $header;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -2526,7 +2526,7 @@ class Context
|
||||||
*/
|
*/
|
||||||
public static function addHtmlFooter($footer)
|
public static function addHtmlFooter($footer)
|
||||||
{
|
{
|
||||||
self::$_instance->html_footer .= (self::$_instance->html_footer ? PHP_EOL : '') . $footer;
|
self::$_instance->html_footer .= (self::$_instance->html_footer ? "\n" : '') . $footer;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -274,7 +274,7 @@ class DisplayHandler extends Handler
|
||||||
$data = Rhymix\Framework\Debug::getDebugData();
|
$data = Rhymix\Framework\Debug::getDebugData();
|
||||||
$display_content = array_fill_keys(config('debug.display_content'), true);
|
$display_content = array_fill_keys(config('debug.display_content'), true);
|
||||||
include RX_BASEDIR . 'common/tpl/debug_comment.html';
|
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')
|
if ($display_type === 'file')
|
||||||
{
|
{
|
||||||
$log_filename = config('debug.log_filename') ?: 'files/debug/YYYYMMDD.php';
|
$log_filename = config('debug.log_filename') ?: 'files/debug/YYYYMMDD.php';
|
||||||
|
|
@ -293,12 +293,12 @@ class DisplayHandler extends Handler
|
||||||
{
|
{
|
||||||
$phpheader = '';
|
$phpheader = '';
|
||||||
}
|
}
|
||||||
FileHandler::writeFile($log_filename, $phpheader . $content . PHP_EOL, 'a');
|
FileHandler::writeFile($log_filename, $phpheader . $content . "\n", 'a');
|
||||||
$debug_output .= '';
|
$debug_output .= '';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$debug_output .= '<!--' . PHP_EOL . $content . PHP_EOL . '-->' . PHP_EOL;
|
$debug_output .= '<!--' . "\n" . $content . "\n" . '-->' . "\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -61,7 +61,7 @@ class VirtualXMLDisplayHandler
|
||||||
$html[] = '</script>';
|
$html[] = '</script>';
|
||||||
$html[] = '</head><body></body></html>';
|
$html[] = '</head><body></body></html>';
|
||||||
|
|
||||||
return join(PHP_EOL, $html);
|
return join("\n", $html);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -488,7 +488,7 @@ class ExtraItem
|
||||||
$buff[] = '<p>' . escape($this->desc, false) . '</p>';
|
$buff[] = '<p>' . escape($this->desc, false) . '</p>';
|
||||||
}
|
}
|
||||||
|
|
||||||
return join(PHP_EOL, $buff);
|
return join("\n", $buff);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -367,7 +367,7 @@ class TemplateHandler
|
||||||
// Insert template path comment tag.
|
// Insert template path comment tag.
|
||||||
if(Rhymix\Framework\Debug::isEnabledForCurrentUser() && Context::getResponseMethod() === 'HTML' && !starts_with('<!DOCTYPE', $contents) && !starts_with('<?xml', $contents))
|
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');
|
$contents = sprintf($sign, 'start') . $contents . sprintf($sign, 'end');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue