Merge branch 'kkigomi/develop' into multiple-params-debugPrint

This commit is contained in:
kkigomi 2024-01-21 00:09:37 +09:00
commit be3205b54e
No known key found for this signature in database
GPG key ID: 99CF0633E78395B9
19 changed files with 77 additions and 44 deletions

View file

@ -261,7 +261,7 @@ class HTMLDisplayHandler
$pattern = '/(action)=(["\'])(["\'])/s'; $pattern = '/(action)=(["\'])(["\'])/s';
$output = preg_replace($pattern, '$1=$2' . \RX_BASEURL . '$3', $output); $output = preg_replace($pattern, '$1=$2' . \RX_BASEURL . '$3', $output);
$pattern = '/(action|src|href)=(["\'])\.\/([^"\']*)(["\'])/s'; $pattern = '/(action|poster|src|href)=(["\'])\.\/([^"\']*)(["\'])/s';
$output = preg_replace($pattern, '$1=$2' . \RX_BASEURL . '$3$4', $output); $output = preg_replace($pattern, '$1=$2' . \RX_BASEURL . '$3$4', $output);
$pattern = '/src=(["\'])((?:files\/(?:attach|cache|faceOff|member_extra_info|thumbnails)|addons|common|(?:m\.)?layouts|modules|widgets|widgetstyle)\/[^"\']+)(["\'])/s'; $pattern = '/src=(["\'])((?:files\/(?:attach|cache|faceOff|member_extra_info|thumbnails)|addons|common|(?:m\.)?layouts|modules|widgets|widgetstyle)\/[^"\']+)(["\'])/s';

View file

@ -601,13 +601,21 @@ class ModuleObject extends BaseObject
if ($type === 'P') if ($type === 'P')
{ {
$layout_srl = $config->layout_srl ?? 0; $layout_srl = $config->layout_srl ?? 0;
if ($layout_srl == -1)
{
$layout_srl = LayoutAdminModel::getInstance()->getSiteDefaultLayout('P');
}
if ($layout_srl > 0) if ($layout_srl > 0)
{ {
$layout_info = LayoutModel::getInstance()->getLayout($layout_srl); $layout_info = LayoutModel::getInstance()->getLayout($layout_srl);
if($layout_info) if($layout_info)
{ {
$this->module_info->layout_srl = $layout_srl;
$this->setLayoutPath($layout_info->path); $this->setLayoutPath($layout_info->path);
if ($config->layout_srl > 0)
{
$this->module_info->layout_srl = $layout_srl;
}
} }
} }
} }
@ -627,11 +635,17 @@ class ModuleObject extends BaseObject
$layout_srl = LayoutAdminModel::getInstance()->getSiteDefaultLayout('M'); $layout_srl = LayoutAdminModel::getInstance()->getSiteDefaultLayout('M');
} }
if ($layout_srl > 0)
{
$layout_info = LayoutModel::getInstance()->getLayout($layout_srl); $layout_info = LayoutModel::getInstance()->getLayout($layout_srl);
if($layout_info) if($layout_info)
{ {
$this->module_info->mlayout_srl = $layout_srl;
$this->setLayoutPath($layout_info->path); $this->setLayoutPath($layout_info->path);
if ($config->mlayout_srl > 0)
{
$this->module_info->mlayout_srl = $layout_srl;
}
}
} }
} }

View file

@ -353,6 +353,8 @@ class HTMLFilter
// Support editor components and widgets. // Support editor components and widgets.
$def->addAttribute('img', 'data-file-srl', 'Number'); $def->addAttribute('img', 'data-file-srl', 'Number');
$def->addAttribute('video', 'data-file-srl', 'Number');
$def->addAttribute('audio', 'data-file-srl', 'Number');
$def->addAttribute('img', 'editor_component', 'Text'); $def->addAttribute('img', 'editor_component', 'Text');
$def->addAttribute('div', 'editor_component', 'Text'); $def->addAttribute('div', 'editor_component', 'Text');
$def->addAttribute('img', 'rx_encoded_properties', 'Text'); $def->addAttribute('img', 'rx_encoded_properties', 'Text');

View file

@ -285,8 +285,15 @@ class TemplateParser_v2
*/ */
protected function _convertVerbatimSections(string $content): string protected function _convertVerbatimSections(string $content): string
{ {
$content = preg_replace_callback('#(@verbatim)\b(.+?)(@endverbatim)\b#s', function($match) { $conversions = [
return preg_replace(['#(?<!@)\{\{#', '#(?<!@)@([a-z]+)#', '#\$#'], ['@{{', '@@$1', '&#x1B;&#x24;'], $match[2]); '#(?<!\{)\{(?!\s)([^{}]+?)\}#' => '&#x1B;&#x7B;$1&#x1B;&#x7D;',
'#(?<!@)\{\{#' => '@{{',
'#(?<!@)@([a-z]+)#' => '@@$1',
'#\$#' => '&#x1B;&#x24;',
];
$content = preg_replace_callback('#(@verbatim)\b(.+?)(@endverbatim)\b#s', function($match) use($conversions) {
return preg_replace(array_keys($conversions), array_values($conversions), $match[2]);
}, $content); }, $content);
return $content; return $content;
} }

View file

@ -380,7 +380,7 @@
form = $(form); form = $(form);
// Get success and error callback functions. // Get success and error callback functions.
if (typeof callback_success === 'undefined') { if (typeof callback_success === 'undefined') {
callback_success = form.data('callback-success'); callback_success = form.data('callbackSuccess');
if (callback_success && window[callback_success] && $.isFunction(window[callback_success])) { if (callback_success && window[callback_success] && $.isFunction(window[callback_success])) {
callback_success = window[callback_success]; callback_success = window[callback_success];
} else { } else {
@ -395,7 +395,7 @@
} }
} }
if (typeof callback_error === 'undefined') { if (typeof callback_error === 'undefined') {
callback_error = form.data('callback-error'); callback_error = form.data('callbackError');
if (callback_error && window[callback_error] && $.isFunction(window[callback_error])) { if (callback_error && window[callback_error] && $.isFunction(window[callback_error])) {
callback_error = window[callback_error]; callback_error = window[callback_error];
} else { } else {

View file

@ -179,7 +179,7 @@
<div class="x_control-group"> <div class="x_control-group">
<label class="x_control-label" for="cache_default_ttl">{$lang->cache_default_ttl}</label> <label class="x_control-label" for="cache_default_ttl">{$lang->cache_default_ttl}</label>
<div class="x_controls"> <div class="x_controls">
<input type="text" name="cache_default_ttl" id="cache_default_ttl" value="{$cache_default_ttl}" /> {$lang->unit_sec} <input type="number" min="1" name="cache_default_ttl" id="cache_default_ttl" value="{$cache_default_ttl}" /> {$lang->unit_sec}
</div> </div>
</div> </div>
<div class="x_control-group"> <div class="x_control-group">

View file

@ -78,21 +78,21 @@
<div class="x_control-group"> <div class="x_control-group">
<label class="x_control-label" for="list_count">{$lang->list_count}</label> <label class="x_control-label" for="list_count">{$lang->list_count}</label>
<div class="x_controls"> <div class="x_controls">
<input type="text" name="list_count" id="list_count" value="{$module_info->list_count?$module_info->list_count:20}" style="width:30px" /> <input type="number" min="1" name="list_count" id="list_count" value="{$module_info->list_count?$module_info->list_count:20}" />
<p class="x_help-inline">{$lang->about_list_count}</p> <p class="x_help-inline">{$lang->about_list_count}</p>
</div> </div>
</div> </div>
<div class="x_control-group"> <div class="x_control-group">
<label class="x_control-label" for="search_list_count">{$lang->search_list_count}</label> <label class="x_control-label" for="search_list_count">{$lang->search_list_count}</label>
<div class="x_controls"> <div class="x_controls">
<input type="text" name="search_list_count" id="search_list_count" value="{$module_info->search_list_count?$module_info->search_list_count:20}" style="width:30px" /> <input type="number" min="1" name="search_list_count" id="search_list_count" value="{$module_info->search_list_count?$module_info->search_list_count:20}" />
<p class="x_help-inline">{$lang->about_search_list_count}</p> <p class="x_help-inline">{$lang->about_search_list_count}</p>
</div> </div>
</div> </div>
<div class="x_control-group"> <div class="x_control-group">
<label class="x_control-label" for="page_count">{$lang->page_count}</label> <label class="x_control-label" for="page_count">{$lang->page_count}</label>
<div class="x_controls"> <div class="x_controls">
<input type="text" name="page_count" id="page_count" value="{$module_info->page_count?$module_info->page_count:10}" style="width:30px" /> <input type="number" min="1" name="page_count" id="page_count" value="{$module_info->page_count?$module_info->page_count:10}" />
<p class="x_help-inline">{$lang->about_page_count}</p> <p class="x_help-inline">{$lang->about_page_count}</p>
</div> </div>
</div> </div>
@ -143,21 +143,21 @@
<div class="x_control-group"> <div class="x_control-group">
<label class="x_control-label" for="mobile_list_count">{$lang->list_count}</label> <label class="x_control-label" for="mobile_list_count">{$lang->list_count}</label>
<div class="x_controls"> <div class="x_controls">
<input type="text" name="mobile_list_count" id="mobile_list_count" value="{$module_info->mobile_list_count?$module_info->mobile_list_count:20}" style="width:30px" /> <input type="number" min="1" name="mobile_list_count" id="mobile_list_count" value="{$module_info->mobile_list_count?$module_info->mobile_list_count:20}" />
<p class="x_help-inline">{$lang->about_list_count}</p> <p class="x_help-inline">{$lang->about_list_count}</p>
</div> </div>
</div> </div>
<div class="x_control-group"> <div class="x_control-group">
<label class="x_control-label" for="mobile_search_list_count">{$lang->search_list_count}</label> <label class="x_control-label" for="mobile_search_list_count">{$lang->search_list_count}</label>
<div class="x_controls"> <div class="x_controls">
<input type="text" name="mobile_search_list_count" id="mobile_search_list_count" value="{$module_info->mobile_search_list_count?$module_info->mobile_search_list_count:20}" style="width:30px" /> <input type="number" min="1" name="mobile_search_list_count" id="mobile_search_list_count" value="{$module_info->mobile_search_list_count?$module_info->mobile_search_list_count:20}" />
<p class="x_help-inline">{$lang->about_search_list_count}</p> <p class="x_help-inline">{$lang->about_search_list_count}</p>
</div> </div>
</div> </div>
<div class="x_control-group"> <div class="x_control-group">
<label class="x_control-label" for="mobile_page_count">{$lang->page_count}</label> <label class="x_control-label" for="mobile_page_count">{$lang->page_count}</label>
<div class="x_controls"> <div class="x_controls">
<input type="text" name="mobile_page_count" id="mobile_page_count" value="{$module_info->mobile_page_count?$module_info->mobile_page_count:5}" style="width:30px" /> <input type="number" min="1" name="mobile_page_count" id="mobile_page_count" value="{$module_info->mobile_page_count?$module_info->mobile_page_count:5}" />
<p class="x_help-inline">{$lang->about_mobile_page_count}</p> <p class="x_help-inline">{$lang->about_mobile_page_count}</p>
</div> </div>
</div> </div>
@ -243,7 +243,7 @@
<input type="checkbox" name="skip_bottom_list_for_olddoc" id="skip_bottom_list_for_olddoc" value="Y" checked="checked"|cond="$module_info->skip_bottom_list_for_olddoc === 'Y'" /> <input type="checkbox" name="skip_bottom_list_for_olddoc" id="skip_bottom_list_for_olddoc" value="Y" checked="checked"|cond="$module_info->skip_bottom_list_for_olddoc === 'Y'" />
{$lang->skip_bottom_list_for_olddoc} {$lang->skip_bottom_list_for_olddoc}
</label> </label>
<input type="number" name="skip_bottom_list_days" value="{$module_info->skip_bottom_list_days ?: 30}" /> {$lang->unit_day} <input type="number" min="1" name="skip_bottom_list_days" value="{$module_info->skip_bottom_list_days ?: 30}" /> {$lang->unit_day}
<br /> <br />
<label for="skip_bottom_list_for_robot"> <label for="skip_bottom_list_for_robot">
<input type="checkbox" name="skip_bottom_list_for_robot" id="skip_bottom_list_for_robot" value="Y" checked="checked"|cond="$module_info->skip_bottom_list_for_robot === 'Y'" /> <input type="checkbox" name="skip_bottom_list_for_robot" id="skip_bottom_list_for_robot" value="Y" checked="checked"|cond="$module_info->skip_bottom_list_for_robot === 'Y'" />
@ -278,14 +278,14 @@
<div class="x_control-group"> <div class="x_control-group">
<label class="x_control-label">{$lang->document_length_limit}</label> <label class="x_control-label">{$lang->document_length_limit}</label>
<div class="x_controls"> <div class="x_controls">
<input type="number" name="document_length_limit" id="document_length_limit" value="{$module_info->document_length_limit ?: 1024}" /> KB <input type="number" min="1" name="document_length_limit" id="document_length_limit" value="{$module_info->document_length_limit ?: 1024}" /> KB
<p class="x_help-block">{$lang->about_document_length_limit}</p> <p class="x_help-block">{$lang->about_document_length_limit}</p>
</div> </div>
</div> </div>
<div class="x_control-group"> <div class="x_control-group">
<label class="x_control-label">{$lang->comment_length_limit}</label> <label class="x_control-label">{$lang->comment_length_limit}</label>
<div class="x_controls"> <div class="x_controls">
<input type="number" name="comment_length_limit" id="comment_length_limit" value="{$module_info->comment_length_limit ?: 128}" /> KB <input type="number" min="1" name="comment_length_limit" id="comment_length_limit" value="{$module_info->comment_length_limit ?: 128}" /> KB
<p class="x_help-block">{$lang->about_comment_length_limit}</p> <p class="x_help-block">{$lang->about_comment_length_limit}</p>
</div> </div>
</div> </div>
@ -367,8 +367,8 @@
<div class="x_control-group"> <div class="x_control-group">
<label class="x_control-label">{$lang->protect_regdate}</label> <label class="x_control-label">{$lang->protect_regdate}</label>
<div class="x_controls"> <div class="x_controls">
{$lang->document} : <input type="number" name="protect_document_regdate" id="protect_document_regdate" value="{$module_info->protect_document_regdate}" /> {$lang->document} : <input type="number" min="0" name="protect_document_regdate" id="protect_document_regdate" value="{$module_info->protect_document_regdate}" />
{$lang->comment} : <input type="number" name="protect_comment_regdate" id="protect_comment_regdate" value="{$module_info->protect_comment_regdate}" /> {$lang->comment} : <input type="number" min="0" name="protect_comment_regdate" id="protect_comment_regdate" value="{$module_info->protect_comment_regdate}" />
<p>{$lang->about_protect_regdate}</p> <p>{$lang->about_protect_regdate}</p>
</div> </div>
</div> </div>

View file

@ -39,7 +39,7 @@
<div class="x_control-group"> <div class="x_control-group">
<label class="x_control-label" for="list_count">{$lang->list_count}</label> <label class="x_control-label" for="list_count">{$lang->list_count}</label>
<div class="x_controls"> <div class="x_controls">
<input type="text" name="list_count" id="list_count" value="{$module_info->list_count?$module_info->list_count:20}" style="width:30px" /> <input type="number" min="1" name="list_count" id="list_count" value="{$module_info->list_count?$module_info->list_count:20}" />
<p class="x_help-inline">{$lang->about_list_count}</p> <p class="x_help-inline">{$lang->about_list_count}</p>
</div> </div>
</div> </div>

View file

@ -829,9 +829,9 @@ class CommentModel extends Comment
// Variables // Variables
$args = new stdClass(); $args = new stdClass();
$args->sort_index = 'comments.list_order'; $args->sort_index = 'comments.list_order';
$args->page = $obj->page ? $obj->page : 1; $args->page = $obj->page ?? 1;
$args->list_count = $obj->list_count ? $obj->list_count : 20; $args->list_count = $obj->list_count ?? 20;
$args->page_count = $obj->page_count ? $obj->page_count : 10; $args->page_count = $obj->page_count ?? 10;
$args->s_member_srl = $obj->member_srl ?? null; $args->s_member_srl = $obj->member_srl ?? null;
$args->s_module_srl = $obj->module_srl ?? null; $args->s_module_srl = $obj->module_srl ?? null;
$args->exclude_module_srl = $obj->exclude_module_srl ?? null; $args->exclude_module_srl = $obj->exclude_module_srl ?? null;
@ -843,8 +843,8 @@ class CommentModel extends Comment
} }
// check if module is using comment validation system // check if module is using comment validation system
$oCommentController = getController("comment"); $oCommentController = CommentController::getInstance();
$is_using_validation = $oCommentController->isModuleUsingPublishValidation($obj->module_srl); $is_using_validation = $oCommentController->isModuleUsingPublishValidation($args->s_module_srl);
if($is_using_validation) if($is_using_validation)
{ {
$args->s_is_published = 1; $args->s_is_published = 1;
@ -1002,8 +1002,8 @@ class CommentModel extends Comment
// Variables // Variables
$args = new stdClass(); $args = new stdClass();
$args->s_module_srl = $obj->module_srl; $args->s_module_srl = $obj->module_srl ?? null;
$args->exclude_module_srl = $obj->exclude_module_srl; $args->exclude_module_srl = $obj->exclude_module_srl ?? null;
$args->statusList = $obj->statusList ?? null; $args->statusList = $obj->statusList ?? null;
if (isset($obj->is_secret) && $obj->is_secret) if (isset($obj->is_secret) && $obj->is_secret)
{ {

View file

@ -1532,7 +1532,7 @@ class DocumentController extends Document
// Get document and user information. // Get document and user information.
$document_srl = $oDocument->document_srl; $document_srl = $oDocument->document_srl;
$member_srl = $oDocument->get('member_srl'); $member_srl = abs($oDocument->get('member_srl'));
$logged_info = Context::get('logged_info'); $logged_info = Context::get('logged_info');
// Option 'some': only count once per session. // Option 'some': only count once per session.

View file

@ -44,7 +44,7 @@
<div class="x_control-group"> <div class="x_control-group">
<label class="x_control-label" for="search_division">{$lang->cmd_search_division}</label> <label class="x_control-label" for="search_division">{$lang->cmd_search_division}</label>
<div class="x_controls"> <div class="x_controls">
<input type="number" name="search_division" value="{$config->search_division ?? 5000}" /> <input type="number" min="0" name="search_division" value="{$config->search_division ?? 5000}" />
<p class="x_help-block">{$lang->about_search_division}</p> <p class="x_help-block">{$lang->about_search_division}</p>
</div> </div>
</div> </div>

View file

@ -1246,7 +1246,7 @@ class importerAdminController extends importer
$buff = '<extra_vars>'.$buff; $buff = '<extra_vars>'.$buff;
$oXmlParser = new XeXmlParser(); $oXmlParser = new XeXmlParser();
$xmlDoc = $this->oXmlParser->parse($buff); $xmlDoc = $this->oXmlParser->parse($buff);
if(!count($xmlDoc->extra_vars->key)) return array(); if(empty($xmlDoc->extra_vars->key)) return array();
$index = 1; $index = 1;
foreach($xmlDoc->extra_vars->key as $k => $v) foreach($xmlDoc->extra_vars->key as $k => $v)

View file

@ -899,7 +899,7 @@ class MemberController extends Member
function procMemberModifyInfoBefore() function procMemberModifyInfoBefore()
{ {
if($_SESSION['rechecked_password_step'] != 'INPUT_PASSWORD') if (!isset($_SESSION['rechecked_password_step']) || $_SESSION['rechecked_password_step'] !== 'INPUT_PASSWORD')
{ {
throw new Rhymix\Framework\Exceptions\InvalidRequest; throw new Rhymix\Framework\Exceptions\InvalidRequest;
} }
@ -952,7 +952,7 @@ class MemberController extends Member
throw new Rhymix\Framework\Exceptions\MustLogin; throw new Rhymix\Framework\Exceptions\MustLogin;
} }
if($_SESSION['rechecked_password_step'] != 'INPUT_DATA') if (!isset($_SESSION['rechecked_password_step']) || $_SESSION['rechecked_password_step'] !== 'INPUT_DATA')
{ {
throw new Rhymix\Framework\Exceptions\InvalidRequest; throw new Rhymix\Framework\Exceptions\InvalidRequest;
} }
@ -1898,7 +1898,7 @@ class MemberController extends Member
} }
else else
{ {
$this->setLayoutAndTemplatePaths(Context::get('m') ? 'P' : 'M', $config); $this->setLayoutAndTemplatePaths(Context::get('m') ? 'M' : 'P', $config);
$tpl_file = sprintf('%s%s', $this->getTemplatePath(), 'reset_password.html'); $tpl_file = sprintf('%s%s', $this->getTemplatePath(), 'reset_password.html');
if (!Rhymix\Framework\Storage::exists($tpl_file)) if (!Rhymix\Framework\Storage::exists($tpl_file))
{ {
@ -3502,7 +3502,7 @@ class MemberController extends Member
{ {
if(!Context::get('is_logged')) throw new Rhymix\Framework\Exceptions\MustLogin; if(!Context::get('is_logged')) throw new Rhymix\Framework\Exceptions\MustLogin;
if($_SESSION['rechecked_password_step'] != 'INPUT_DATA') if (!isset($_SESSION['rechecked_password_step']) || $_SESSION['rechecked_password_step'] !== 'INPUT_DATA')
{ {
throw new Rhymix\Framework\Exceptions\InvalidRequest; throw new Rhymix\Framework\Exceptions\InvalidRequest;
} }

View file

@ -432,7 +432,7 @@ class MemberView extends Member
*/ */
function dispMemberModifyInfo() function dispMemberModifyInfo()
{ {
if($_SESSION['rechecked_password_step'] != 'VALIDATE_PASSWORD' && $_SESSION['rechecked_password_step'] != 'INPUT_DATA') if (!isset($_SESSION['rechecked_password_step']) || !in_array($_SESSION['rechecked_password_step'], ['VALIDATE_PASSWORD', 'INPUT_DATA']))
{ {
$this->dispMemberModifyInfoBefore(); $this->dispMemberModifyInfoBefore();
return; return;
@ -955,7 +955,7 @@ class MemberView extends Member
function dispMemberModifyEmailAddress() function dispMemberModifyEmailAddress()
{ {
if($_SESSION['rechecked_password_step'] != 'VALIDATE_PASSWORD' && $_SESSION['rechecked_password_step'] != 'INPUT_DATA') if (!isset($_SESSION['rechecked_password_step']) || !in_array($_SESSION['rechecked_password_step'], ['VALIDATE_PASSWORD', 'INPUT_DATA']))
{ {
Context::set('success_return_url', getUrl('', 'mid', Context::get('mid'), 'act', 'dispMemberModifyEmailAddress')); Context::set('success_return_url', getUrl('', 'mid', Context::get('mid'), 'act', 'dispMemberModifyEmailAddress'));
$this->dispMemberModifyInfoBefore(); $this->dispMemberModifyInfoBefore();

View file

@ -96,7 +96,7 @@
<div class="x_control-group" cond="$module_info->page_type != 'ARTICLE'"> <div class="x_control-group" cond="$module_info->page_type != 'ARTICLE'">
<label class="x_control-label" for="page_caching_interval">{$lang->page_caching_interval}</label> <label class="x_control-label" for="page_caching_interval">{$lang->page_caching_interval}</label>
<div class="x_controls"> <div class="x_controls">
<input type="text" name="page_caching_interval" id="page_caching_interval" value="{(int)$module_info->page_caching_interval}" /> {$lang->unit_min} <input type="number" min="0" name="page_caching_interval" id="page_caching_interval" value="{(int)$module_info->page_caching_interval}" /> {$lang->unit_min}
<p class="x_help-block" id="aboutCaching">{$lang->about_page_caching_interval}</p> <p class="x_help-block" id="aboutCaching">{$lang->about_page_caching_interval}</p>
</div> </div>
</div> </div>

View file

@ -21,8 +21,8 @@
</label> </label>
</p> </p>
<p> <p>
<input type="number" name="limits_interval" id="limits_interval" value="{intval($config->limits_interval) ?: 10}" /> {$lang->unit_sec} &nbsp; <input type="number" min="1" name="limits_interval" id="limits_interval" value="{intval($config->limits_interval) ?: 10}" /> {$lang->unit_sec} &nbsp;
<input type="number" name="limits_count" id="limits_count" value="{intval($config->limits_count) ?: 3}" /> {$lang->unit_write_count} <input type="number" min="1" name="limits_count" id="limits_count" value="{intval($config->limits_count) ?: 3}" /> {$lang->unit_write_count}
</p> </p>
<p class="x_help-block">{$lang->cmd_interval_help}</p> <p class="x_help-block">{$lang->cmd_interval_help}</p>
</div> </div>

View file

@ -103,8 +103,8 @@ class TagModel extends Tag
$args->module_srl = $obj->module_srl; $args->module_srl = $obj->module_srl;
} }
$args->list_count = $obj->list_count; $args->list_count = $obj->list_count ?? null;
$args->count = $obj->sort_index; $args->count = $obj->sort_index ?? null;
$output = executeQueryArray('tag.getTagList', $args); $output = executeQueryArray('tag.getTagList', $args);
if(!$output->toBool()) return $output; if(!$output->toBool()) return $output;

View file

@ -273,6 +273,14 @@ class HTMLFilterTest extends \Codeception\Test\Unit
$target = '<p><img src="foo.jpg" alt="foobar" /></p>'; $target = '<p><img src="foo.jpg" alt="foobar" /></p>';
$this->assertEquals($target, Rhymix\Framework\Filters\HTMLFilter::clean($source)); $this->assertEquals($target, Rhymix\Framework\Filters\HTMLFilter::clean($source));
$source = '<video src="foo.mp4" poster="foo.jpg" data-file-srl="1234"></video>';
$target = '<video src="foo.mp4" poster="foo.jpg" data-file-srl="1234"></video>';
$this->assertEquals($target, Rhymix\Framework\Filters\HTMLFilter::clean($source));
$source = '<audio src="foo.mp3" invalid="" data-file-srl="1234"></audio>';
$target = '<audio src="foo.mp3" data-file-srl="1234"></audio>';
$this->assertEquals($target, Rhymix\Framework\Filters\HTMLFilter::clean($source));
// Other data-* attribute // Other data-* attribute
$source = '<div data-foo="foobar" data-bar="bazz" style="width:100%;">Hello World</div>'; $source = '<div data-foo="foobar" data-bar="bazz" style="width:100%;">Hello World</div>';
$target = '<div style="width:100%;" data-foo="foobar" data-bar="bazz">Hello World</div>'; $target = '<div style="width:100%;" data-foo="foobar" data-bar="bazz">Hello World</div>';

View file

@ -1015,6 +1015,7 @@ class TemplateParserV2Test extends \Codeception\Test\Unit
'@verbatim', '@verbatim',
'@if (true)', '@if (true)',
'<p>{{ $foobar }}</p>', '<p>{{ $foobar }}</p>',
'<p>{$foobar}</p>',
'@endif', '@endif',
'@endverbatim', '@endverbatim',
]); ]);
@ -1022,6 +1023,7 @@ class TemplateParserV2Test extends \Codeception\Test\Unit
'', '',
'@if (true)', '@if (true)',
'<p>{{ $foobar }}</p>', '<p>{{ $foobar }}</p>',
'<p>{$foobar}</p>',
'@endif', '@endif',
'', '',
]); ]);