Remove trailing whitespace

This commit is contained in:
Kijin Sung 2023-01-30 21:43:21 +09:00
parent c5267b42fd
commit 37b0d3a1e6
71 changed files with 806 additions and 806 deletions

View file

@ -40,7 +40,7 @@ class pageAdminController extends page
$args->browser_title = trim(utf8_normalize_spaces($args->browser_title));
$args->meta_keywords = $args->meta_keywords ? implode(', ', array_map('trim', explode(',', $args->meta_keywords))) : '';
$args->meta_description = trim(utf8_normalize_spaces($args->meta_description));
// Check if an original module exists by using module_srl
if($args->module_srl)
{
@ -328,7 +328,7 @@ class pageAdminController extends page
$target = ($obj->isMobile == 'Y') ? 'mdocument_srl' : 'document_srl';
// 이미 존재하는 경우 수정
if($oDocument->isExists() && $oDocument->document_srl == $obj->document_srl)
if($oDocument->isExists() && $oDocument->document_srl == $obj->document_srl)
{
$output = $oDocumentController->updateDocument($oDocument, $obj);
$msg_code = 'success_updated';

View file

@ -188,10 +188,10 @@ class pageAdminView extends page
{
throw new Rhymix\Framework\Exception(sprintf('%s method is not exists', $method));
}
Context::set('module_info', $this->module_info);
Context::set('page_content', $page_content);
$this->setLayoutFile('');
$this->setTemplateFile('mcontent');
}
@ -258,11 +258,11 @@ class pageAdminView extends page
//Security
$security = new Security();
$security->encodeHTML('widget_list..title','module_info.mid');
// Load admin resources
$oTemplate = TemplateHandler::getInstance();
$oTemplate->compile('modules/admin/tpl', '_admin_common.html');
// Set a template file
$this->setLayoutFile('');
$this->setTemplateFile($templateFile);
@ -289,7 +289,7 @@ class pageAdminView extends page
$document_srl = $this->module_info->{$target};
$oDocument->setDocument($document_srl);
Context::set('document_srl', $document_srl);
}
}
else if(Context::get('document_srl'))
{
$document_srl = Context::get('document_srl');
@ -300,11 +300,11 @@ class pageAdminView extends page
{
$oDocument->add('module_srl', $this->module_info->module_srl);
}
Context::addJsFilter($this->module_path.'tpl/filter', 'insert_article.xml');
Context::set('oDocument', $oDocument);
Context::set('mid', $this->module_info->mid);
$this->setLayoutFile('');
$this->setTemplateFile('article_content_modify');
}

View file

@ -67,7 +67,7 @@ class pageController extends page
}
/**
* @brief Change the value of src, href in the content
* @brief Change the value of src, href in the content
*/
function replaceSrc($content, $path)
{

View file

@ -32,7 +32,7 @@ class pageView extends page
$this instanceof pageMobile ? 'm' : 'pc',
]);
}
if ($this->module_info->page_type === 'OUTSIDE')
{
$this->interval = (int)($this->module_info->page_caching_interval ?? 0);
@ -79,7 +79,7 @@ class pageView extends page
Context::set('module_info', $this->module_info);
Context::set('page_content', $page_content);
// if the page type is the widget or outside, there might be usable GET entities.
$request_vars = Context::getRequestVars();
if (isset($request_vars->document_srl) && intval($request_vars->document_srl) > 0 && $page_type_name == 'article')
@ -104,7 +104,7 @@ class pageView extends page
{
$page_content = $this->module_info->content;
}
if ($this->interval > 0)
{
if (!file_exists($this->cache_file) || !filesize($this->cache_file))
@ -118,7 +118,7 @@ class pageView extends page
if($mtime && $mtime + ($this->interval * 60) > \RX_TIME)
{
$page_content = FileHandler::readFile($this->cache_file);
$page_content = FileHandler::readFile($this->cache_file);
$page_content = str_replace('<!--#Meta:', '<!--Meta:', $page_content);
}
else
@ -135,7 +135,7 @@ class pageView extends page
FileHandler::removeFile($this->cache_file);
}
}
return $page_content;
}
@ -167,7 +167,7 @@ class pageView extends page
{
return;
}
// Kick out anyone who tries to exploit RVE-2022-2.
foreach (Context::getRequestVars() as $key => $val)
{
@ -176,13 +176,13 @@ class pageView extends page
throw new Rhymix\Framework\Exceptions\SecurityViolation();
}
}
// External URL
if (preg_match('!^[a-z]+://!i', $this->path))
{
return $this->getHtmlPage($this->path, $this->interval, $this->cache_file);
}
// Internal PHP document
else
{
@ -205,10 +205,10 @@ class pageView extends page
FileHandler::getRemoteFile($path, $cache_file);
$content = FileHandler::readFile($cache_file);
}
// Create opage controller
$oPageController = getController('page');
// change url of image, css, javascript and so on if the page is from external server
$content = $oPageController->replaceSrc($content, $path);
@ -217,15 +217,15 @@ class pageView extends page
$buff->content = $content;
$buff = Context::convertEncoding($buff);
$content = $buff->content;
// Extract a title
$title = $oPageController->getTitle($content);
if($title) Context::setBrowserTitle($title);
// Extract header script
$head_script = $oPageController->getHeadScript($content);
if($head_script) Context::addHtmlHeader($head_script);
// Extract content from the body
$body_script = $oPageController->getBodyScript($content);
if(!$body_script) $body_script = $content;
@ -250,7 +250,7 @@ class pageView extends page
{
return file_get_contents($cache_file);
}
// Parse as template if enabled.
if ($this->proc_tpl)
{
@ -264,7 +264,7 @@ class pageView extends page
{
return '';
}
// Include template file in an isolated scope.
$content = '';
$include_path = get_include_path();
@ -282,7 +282,7 @@ class pageView extends page
{
$content .= ob_get_clean();
}
// Insert comments for debugging.
if(Rhymix\Framework\Debug::isEnabledForCurrentUser() && Context::getResponseMethod() === 'HTML' && !starts_with('<!DOCTYPE', $content) && !starts_with('<?xml', $content))
{
@ -290,7 +290,7 @@ class pageView extends page
$content = sprintf($sign, 'start') . $content . sprintf($sign, 'end');
}
}
// Parse as PHP if enabled.
elseif ($this->proc_php)
{
@ -300,13 +300,13 @@ class pageView extends page
});
$content = ob_get_clean();
}
// Otherwise, get the raw content of the file.
else
{
$content = file_get_contents($real_target_file);
}
// Convert relative paths to absolute paths.
$this->path = str_replace('\\', '/', dirname($real_target_file)) . '/';
$content = preg_replace_callback('/\b(target=|src=|href=|url\()("|\')?([^"\'\)]+)("|\'\))?/is', array($this, '_replacePath'), $content);
@ -320,7 +320,7 @@ class pageView extends page
function _replacePath($matches)
{
$val = trim($matches[3]);
// Pass if the path is external or starts with /, #, { characters
// /=absolute path, #=hash in a page, {=Template syntax
if(strpos($val, '.') === FALSE || preg_match('@^((?:http|https|ftp|telnet|mms)://|(?:mailto|javascript):|[/#{])@i',$val))