mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-04 01:01:41 +09:00
Merge branch 'rhymix:master' into master
This commit is contained in:
commit
ef9967fc1d
81 changed files with 923 additions and 726 deletions
|
|
@ -67,26 +67,12 @@ class CommentAdminView extends Comment
|
|||
Context::set('secret_name_list', $secretNameList);
|
||||
|
||||
// Module List
|
||||
$oModuleModel = getModel('module');
|
||||
$module_list = array();
|
||||
$mod_srls = array();
|
||||
foreach($output->data as $val)
|
||||
$module_list = [];
|
||||
$mod_output = executeQueryArray('comment.getModuleList');
|
||||
foreach ($mod_output->data as $item)
|
||||
{
|
||||
$mod_srls[] = $val->module_srl;
|
||||
}
|
||||
$mod_srls = array_unique($mod_srls);
|
||||
$mod_srls_count = count($mod_srls);
|
||||
if($mod_srls_count)
|
||||
{
|
||||
$columnList = array('module_srl', 'mid', 'browser_title');
|
||||
$module_output = $oModuleModel->getModulesInfo($mod_srls, $columnList);
|
||||
if($module_output && is_array($module_output))
|
||||
{
|
||||
foreach($module_output as $module)
|
||||
{
|
||||
$module_list[$module->module_srl] = $module;
|
||||
}
|
||||
}
|
||||
$item->browser_title = Context::replaceUserLang($item->browser_title);
|
||||
$module_list[$item->module_srl] = $item;
|
||||
}
|
||||
Context::set('module_list', $module_list);
|
||||
|
||||
|
|
@ -115,8 +101,9 @@ class CommentAdminView extends Comment
|
|||
}
|
||||
Context::set('member_nick_name', $member_nick_name);
|
||||
|
||||
$security = new Security();
|
||||
$security->encodeHTML('search_target', 'search_keyword');
|
||||
// Other search options
|
||||
Context::set('search_target', escape(Context::get('search_target'), false));
|
||||
Context::set('search_keyword', escape(Context::get('search_keyword'), false));
|
||||
|
||||
// set the template
|
||||
$this->setTemplatePath($this->module_path . 'tpl');
|
||||
|
|
|
|||
|
|
@ -1606,9 +1606,16 @@ class CommentController extends Comment
|
|||
}
|
||||
|
||||
// invalid vote if vote info exists in the session info.
|
||||
if(!empty($_SESSION['voted_comment'][$comment_srl]))
|
||||
if (!empty($_SESSION['voted_comment'][$comment_srl]))
|
||||
{
|
||||
return new BaseObject(-1, $failed_voted . '_already');
|
||||
if ($_SESSION['voted_comment'][$comment_srl] > 0)
|
||||
{
|
||||
return new BaseObject(-1, 'failed_voted_already');
|
||||
}
|
||||
else
|
||||
{
|
||||
return new BaseObject(-1, 'failed_blamed_already');
|
||||
}
|
||||
}
|
||||
|
||||
// Get the original comment
|
||||
|
|
@ -1650,10 +1657,17 @@ class CommentController extends Comment
|
|||
$output = executeQuery('comment.getCommentVotedLogInfo', $args);
|
||||
|
||||
// Pass after registering a session if log information has vote-up logs
|
||||
if($output->data->count)
|
||||
if ($output->data->count)
|
||||
{
|
||||
$_SESSION['voted_comment'][$comment_srl] = false;
|
||||
return new BaseObject(-1, $failed_voted);
|
||||
$_SESSION['voted_comment'][$comment_srl] = intval($output->data->point);
|
||||
if ($output->data->point > 0)
|
||||
{
|
||||
return new BaseObject(-1, 'failed_voted_already');
|
||||
}
|
||||
else
|
||||
{
|
||||
return new BaseObject(-1, 'failed_blamed_already');
|
||||
}
|
||||
}
|
||||
|
||||
// Call a trigger (before)
|
||||
|
|
|
|||
|
|
@ -594,7 +594,7 @@ class CommentItem extends BaseObject
|
|||
|
||||
// Truncate string
|
||||
$content = cut_str($content, $str_size, $tail);
|
||||
$content = escape($content);
|
||||
$content = escape($content, false);
|
||||
|
||||
if ($content === '')
|
||||
{
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@
|
|||
</tables>
|
||||
<columns>
|
||||
<column name="count(*)" alias="count" />
|
||||
<column name="sum(point)" alias="point" />
|
||||
</columns>
|
||||
<conditions>
|
||||
<condition operation="equal" column="comment_srl" var="comment_srl" filter="number" notnull="notnull" />
|
||||
|
|
|
|||
20
modules/comment/queries/getModuleList.xml
Normal file
20
modules/comment/queries/getModuleList.xml
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
<query id="getModuleList" action="select">
|
||||
<tables>
|
||||
<table name="modules" />
|
||||
</tables>
|
||||
<columns>
|
||||
<column name="module_srl" />
|
||||
<column name="mid" />
|
||||
<column name="browser_title" />
|
||||
</columns>
|
||||
<conditions>
|
||||
<query operation="in" column="module_srl">
|
||||
<tables>
|
||||
<table name="comments" />
|
||||
</tables>
|
||||
<columns distinct="distinct">
|
||||
<column name="module_srl" />
|
||||
</columns>
|
||||
</query>
|
||||
</conditions>
|
||||
</query>
|
||||
|
|
@ -124,8 +124,13 @@ xe.lang.msg_empty_search_keyword = '{$lang->msg_empty_search_keyword}';
|
|||
<form action="./" method="get" class="search center x_input-append" onsubmit="return checkSearch(this)">
|
||||
<input type="hidden" name="module" value="{$module}" />
|
||||
<input type="hidden" name="act" value="{$act}" />
|
||||
<input type="hidden" name="module_srl" value="{$module_srl}" />
|
||||
<input type="hidden" name="error_return_url" value="" />
|
||||
<select name="module_srl" style="margin-right:4px">
|
||||
<option value="">{lang('all')}</option>
|
||||
<!--@foreach($module_list as $item)-->
|
||||
<option value="{$item->module_srl}" <!--@if(isset($module_srl) && $module_srl == $item->module_srl)-->selected="selected"<!--@end-->>{$item->browser_title}</option>
|
||||
<!--@endforeach-->
|
||||
</select>
|
||||
<select name="search_target" title="{$lang->search_target}" style="margin-right:4px">
|
||||
<!--@foreach(lang('comment.search_target_list') as $key => $val)-->
|
||||
<option value="{$key}" <!--@if($search_target==$key)-->selected="selected"<!--@end-->>{$val}</option>
|
||||
|
|
|
|||
|
|
@ -82,26 +82,12 @@ class DocumentAdminView extends Document
|
|||
Context::set('search_option', $search_option);
|
||||
|
||||
// Module List
|
||||
$oModuleModel = getModel('module');
|
||||
$module_list = array();
|
||||
$mod_srls = array();
|
||||
foreach($output->data as $oDocument)
|
||||
$module_list = [];
|
||||
$mod_output = executeQueryArray('document.getModuleList');
|
||||
foreach ($mod_output->data as $item)
|
||||
{
|
||||
$mod_srls[] = $oDocument->get('module_srl');
|
||||
}
|
||||
$mod_srls = array_unique($mod_srls);
|
||||
$mod_srls_count = count($mod_srls);
|
||||
if($mod_srls_count)
|
||||
{
|
||||
$columnList = array('module_srl', 'mid', 'browser_title');
|
||||
$module_output = $oModuleModel->getModulesInfo($mod_srls, $columnList);
|
||||
if($module_output && is_array($module_output))
|
||||
{
|
||||
foreach($module_output as $module)
|
||||
{
|
||||
$module_list[$module->module_srl] = $module;
|
||||
}
|
||||
}
|
||||
$item->browser_title = Context::replaceUserLang($item->browser_title);
|
||||
$module_list[$item->module_srl] = $item;
|
||||
}
|
||||
Context::set('module_list', $module_list);
|
||||
|
||||
|
|
@ -130,8 +116,10 @@ class DocumentAdminView extends Document
|
|||
}
|
||||
Context::set('member_nick_name', $member_nick_name);
|
||||
|
||||
$security = new Security();
|
||||
$security->encodeHTML('search_target', 'search_keyword');
|
||||
// Other search options
|
||||
Context::set('search_target', escape(Context::get('search_target'), false));
|
||||
Context::set('search_keyword', escape(Context::get('search_keyword'), false));
|
||||
Context::set('is_secret', Context::get('is_secret') === 'Y' ? 'Y' : 'N');
|
||||
|
||||
// Specify a template
|
||||
$this->setTemplatePath($this->module_path.'tpl');
|
||||
|
|
|
|||
|
|
@ -2032,9 +2032,16 @@ class DocumentController extends Document
|
|||
}
|
||||
|
||||
// Return fail if session already has information about votes
|
||||
if(!empty($_SESSION['voted_document'][$document_srl]))
|
||||
if (!empty($_SESSION['voted_document'][$document_srl]))
|
||||
{
|
||||
return new BaseObject(-1, $failed_voted . '_already');
|
||||
if ($_SESSION['voted_document'][$document_srl] > 0)
|
||||
{
|
||||
return new BaseObject(-1, 'failed_voted_already');
|
||||
}
|
||||
else
|
||||
{
|
||||
return new BaseObject(-1, 'failed_blamed_already');
|
||||
}
|
||||
}
|
||||
|
||||
// Get the original document
|
||||
|
|
@ -2076,10 +2083,17 @@ class DocumentController extends Document
|
|||
$output = executeQuery('document.getDocumentVotedLogInfo', $args);
|
||||
|
||||
// Pass after registering a session if log information has vote-up logs
|
||||
if($output->data->count)
|
||||
if ($output->data->count)
|
||||
{
|
||||
$_SESSION['voted_document'][$document_srl] = false;
|
||||
return new BaseObject(-1, $failed_voted);
|
||||
$_SESSION['voted_document'][$document_srl] = intval($output->data->point);
|
||||
if ($output->data->point > 0)
|
||||
{
|
||||
return new BaseObject(-1, 'failed_voted_already');
|
||||
}
|
||||
else
|
||||
{
|
||||
return new BaseObject(-1, 'failed_blamed_already');
|
||||
}
|
||||
}
|
||||
|
||||
// Call a trigger (before)
|
||||
|
|
|
|||
20
modules/document/queries/getModuleList.xml
Normal file
20
modules/document/queries/getModuleList.xml
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
<query id="getModuleList" action="select">
|
||||
<tables>
|
||||
<table name="modules" />
|
||||
</tables>
|
||||
<columns>
|
||||
<column name="module_srl" />
|
||||
<column name="mid" />
|
||||
<column name="browser_title" />
|
||||
</columns>
|
||||
<conditions>
|
||||
<query operation="in" column="module_srl">
|
||||
<tables>
|
||||
<table name="documents" />
|
||||
</tables>
|
||||
<columns distinct="distinct">
|
||||
<column name="module_srl" />
|
||||
</columns>
|
||||
</query>
|
||||
</conditions>
|
||||
</query>
|
||||
|
|
@ -120,8 +120,13 @@ xe.lang.msg_empty_search_keyword = '{$lang->msg_empty_search_keyword}';
|
|||
<form action="./" method="get" class="search center x_input-append x_clearfix">
|
||||
<input type="hidden" name="module" value="{$module}" />
|
||||
<input type="hidden" name="act" value="{$act}" />
|
||||
<input type="hidden" name="module_srl" value="{$module_srl}" />
|
||||
<input type="hidden" name="error_return_url" value="" />
|
||||
<select name="module_srl" style="margin-right:4px">
|
||||
<option value="">{lang('all')}</option>
|
||||
<!--@foreach($module_list as $item)-->
|
||||
<option value="{$item->module_srl}" <!--@if(isset($module_srl) && $module_srl == $item->module_srl)-->selected="selected"<!--@end-->>{$item->browser_title}</option>
|
||||
<!--@endforeach-->
|
||||
</select>
|
||||
<select name="search_target" title="{$lang->search_target}" style="margin-right:4px">
|
||||
<!--@foreach(lang('document.search_target_list') as $key => $val)-->
|
||||
<option value="{$key}" <!--@if($search_target==$key)-->selected="selected"<!--@end-->>{$val}</option>
|
||||
|
|
|
|||
|
|
@ -136,7 +136,7 @@ class EditorModel extends Editor
|
|||
{
|
||||
if(empty($_SESSION['_editor_sequence_']))
|
||||
{
|
||||
$_SESSION['_editor_sequence_'] = 1;
|
||||
$_SESSION['_editor_sequence_'] = 4;
|
||||
}
|
||||
$option->editor_sequence = $_SESSION['_editor_sequence_']++;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -25,6 +25,9 @@
|
|||
<option value=""></option>
|
||||
@foreach ($countries as $country)
|
||||
@php
|
||||
if (!$country->calling_code) {
|
||||
continue;
|
||||
}
|
||||
$country_name = $lang_type === 'ko' ? $country->name_korean : $country->name_english;
|
||||
if ($selected_iso_code) {
|
||||
$is_selected = $selected_iso_code === $country->iso_3166_1_alpha3;
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ class FileAdminView extends File
|
|||
$file_list = array();
|
||||
$document_list = array();
|
||||
$comment_list = array();
|
||||
$module_list= array();
|
||||
$module_list = array();
|
||||
|
||||
$doc_srls = array();
|
||||
$com_srls = array();
|
||||
|
|
@ -162,20 +162,6 @@ class FileAdminView extends File
|
|||
}
|
||||
}
|
||||
}
|
||||
// Module List
|
||||
$mod_srls_count = count($mod_srls);
|
||||
if($mod_srls_count)
|
||||
{
|
||||
$columnList = array('module_srl', 'mid', 'browser_title');
|
||||
$module_output = $oModuleModel->getModulesInfo($mod_srls, $columnList);
|
||||
if($module_output && is_array($module_output))
|
||||
{
|
||||
foreach($module_output as $module)
|
||||
{
|
||||
$module_list[$module->module_srl] = $module;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
foreach($file_list as $srl => $file)
|
||||
{
|
||||
|
|
@ -186,6 +172,15 @@ class FileAdminView extends File
|
|||
}
|
||||
}
|
||||
|
||||
// Module list
|
||||
$mod_output = executeQueryArray('comment.getModuleList');
|
||||
foreach ($mod_output->data as $item)
|
||||
{
|
||||
$item->browser_title = Context::replaceUserLang($item->browser_title);
|
||||
$module_list[$item->module_srl] = $item;
|
||||
}
|
||||
Context::set('module_list', $module_list);
|
||||
|
||||
Context::set('file_list', $file_list);
|
||||
Context::set('document_list', $document_list);
|
||||
Context::set('comment_list', $comment_list);
|
||||
|
|
|
|||
20
modules/file/queries/getModuleList.xml
Normal file
20
modules/file/queries/getModuleList.xml
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
<query id="getModuleList" action="select">
|
||||
<tables>
|
||||
<table name="modules" />
|
||||
</tables>
|
||||
<columns>
|
||||
<column name="module_srl" />
|
||||
<column name="mid" />
|
||||
<column name="browser_title" />
|
||||
</columns>
|
||||
<conditions>
|
||||
<query operation="in" column="module_srl">
|
||||
<tables>
|
||||
<table name="files" />
|
||||
</tables>
|
||||
<columns distinct="distinct">
|
||||
<column name="module_srl" />
|
||||
</columns>
|
||||
</query>
|
||||
</conditions>
|
||||
</query>
|
||||
|
|
@ -184,8 +184,13 @@ xe.lang.msg_empty_search_keyword = '{$lang->msg_empty_search_keyword}';
|
|||
<form action="./" method="get" onsubmit="return checkSearch(this)" class="search center x_input-append">
|
||||
<input type="hidden" name="module" value="{$module}" />
|
||||
<input type="hidden" name="act" value="{$act}" />
|
||||
<input type="hidden" name="module_srl" value="{$module_srl}" />
|
||||
<input type="hidden" name="error_return_url" value="" />
|
||||
<select name="module_srl" style="margin-right:4px">
|
||||
<option value="">{lang('all')}</option>
|
||||
<!--@foreach($module_list as $item)-->
|
||||
<option value="{$item->module_srl}" <!--@if(isset($module_srl) && $module_srl == $item->module_srl)-->selected="selected"<!--@end-->>{$item->browser_title}</option>
|
||||
<!--@endforeach-->
|
||||
</select>
|
||||
<select name="search_target" title="{$lang->search_target}" style="margin-right:4px">
|
||||
<!--@foreach(lang('file.file_search_target_list') as $key => $val)-->
|
||||
<option value="{$key}" <!--@if($search_target==$key)-->selected="selected"<!--@end-->>{$val}</option>
|
||||
|
|
|
|||
|
|
@ -82,7 +82,7 @@
|
|||
|
||||
<div cond="$var->type == 'textarea'">
|
||||
{@$use_multilang_textarea = true}
|
||||
<textarea name="{$name}" rows="4" cols="42" class="lang_code"><!--@if(strpos($var->value, "$user_lang->") !== false)-->{htmlspecialchars($var->value, ENT_COMPAT | ENT_HTML401, 'UTF-8', false)}<!--@else-->{$var->value}<!--@end--></textarea>
|
||||
<textarea name="{$name}" rows="4" cols="42" class="x_full-width lang_code"><!--@if(strpos($var->value, "$user_lang->") !== false)-->{htmlspecialchars($var->value, ENT_COMPAT | ENT_HTML401, 'UTF-8', false)}<!--@else-->{$var->value}<!--@end--></textarea>
|
||||
</div>
|
||||
|
||||
<block cond="$var->type == 'image'">
|
||||
|
|
|
|||
|
|
@ -80,6 +80,10 @@ class MemberAdminController extends Member
|
|||
{
|
||||
$output = executeQuery('member.getMemberInfoByMemberSrl', ['member_srl' => $args->member_srl], ['extra_vars']);
|
||||
$extra_vars = ($output->data && $output->data->extra_vars) ? unserialize($output->data->extra_vars) : new stdClass;
|
||||
if (!is_object($extra_vars))
|
||||
{
|
||||
$extra_vars = new stdClass;
|
||||
}
|
||||
foreach(self::NOUSE_EXTRA_VARS as $key)
|
||||
{
|
||||
unset($extra_vars->$key);
|
||||
|
|
|
|||
|
|
@ -1820,23 +1820,13 @@ class MemberController extends Member
|
|||
Context::set('auth_args', $args);
|
||||
|
||||
$memberInfo = array();
|
||||
if(is_array($member_config->signupForm))
|
||||
if (in_array('user_id', $member_config->identifiers))
|
||||
{
|
||||
$exceptForm=array('password', 'find_account_question');
|
||||
foreach($member_config->signupForm as $form)
|
||||
{
|
||||
if(!in_array($form->name, $exceptForm) && $form->isDefaultForm && ($form->required || $form->mustRequired))
|
||||
{
|
||||
$memberInfo[$lang->{$form->name}] = $member_info->{$form->name};
|
||||
}
|
||||
}
|
||||
$memberInfo[$lang->user_id] = $member_info->user_id;
|
||||
}
|
||||
else
|
||||
if (in_array('email_address', $member_config->identifiers))
|
||||
{
|
||||
$memberInfo[$lang->user_id] = $args->user_id;
|
||||
$memberInfo[$lang->user_name] = $args->user_name;
|
||||
$memberInfo[$lang->nick_name] = $args->nick_name;
|
||||
$memberInfo[$lang->email_address] = $args->email_address;
|
||||
$memberInfo[$lang->email_address] = $member_info->email_address;
|
||||
}
|
||||
Context::set('memberInfo', $memberInfo);
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +0,0 @@
|
|||
<filter name="logout" module="member" act="procMemberLogout">
|
||||
<form />
|
||||
<response callback_func="completeLogout">
|
||||
<tag name="error" />
|
||||
<tag name="message" />
|
||||
</response>
|
||||
</filter>
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
<include target="./common_header.html" />
|
||||
<import target="filter/logout.xml" />
|
||||
<form action="./" method="get" onsubmit="return procFilter(this, logout)">
|
||||
<input type="hidden" name="mid" value="{$mid}" />
|
||||
<h1>{$lang->cmd_logout}</h1>
|
||||
<p>{$lang->confirm_logout}</p>
|
||||
<p><input type="submit" value="{$lang->cmd_logout}" class="btn btn-inverse" /></p>
|
||||
</form>
|
||||
<include target="./common_footer.html" />
|
||||
|
|
@ -2379,7 +2379,7 @@ jQuery(function($){
|
|||
case 'manager':
|
||||
case 'root':
|
||||
default:
|
||||
$node.find('._group_manager').prop('selected', true);
|
||||
//$node.find('._group_manager').prop('selected', true);
|
||||
$node.find('._group_all').remove();
|
||||
$node.find('._group_loggedin').remove();
|
||||
$node.find('._group_not_loggedin').remove();
|
||||
|
|
|
|||
|
|
@ -7,16 +7,17 @@
|
|||
<action name="dispModuleFileBox" type="view" permission="root" meta-noindex="true" />
|
||||
<action name="dispModuleFileBoxAdd" type="view" permission="root" meta-noindex="true" />
|
||||
<action name="dispModuleChangeLang" type="view" />
|
||||
|
||||
|
||||
<action name="getModuleSkinInfoList" type="model" permission="root" />
|
||||
<action name="getFileBoxListHtml" type="model" permission="root" />
|
||||
<action name="getModuleInfoByMenuItemSrl" type="model" permission="root" />
|
||||
<action name="getLangListByLangcodeForAutoComplete" type="model" permission="manager" />
|
||||
<action name="getLangByLangcode" type="model" />
|
||||
|
||||
|
||||
<action name="procModuleFileBoxAdd" type="controller" permission="root" />
|
||||
<action name="procModuleFileBoxDelete" type="controller" permission="root" />
|
||||
|
||||
<action name="procModuleClearCache" type="controller" check_csrf="false" />
|
||||
|
||||
<action name="dispModuleAdminContent" type="view" menu_name="installedModule" menu_index="true" admin_index="true" />
|
||||
<action name="dispModuleAdminCategory" type="view" menu_name="installedModule" />
|
||||
<action name="dispModuleAdminInfo" type="view" />
|
||||
|
|
@ -26,7 +27,7 @@
|
|||
<action name="dispModuleAdminCopyModule" type="view" />
|
||||
<action name="dispModuleAdminFileBox" type="view" menu_name="filebox" menu_index="true" />
|
||||
<action name="dispModuleAdminLangcode" type="view" menu_name="multilingual" menu_index="true" />
|
||||
|
||||
|
||||
<action name="getModuleAdminModuleList" type="model" />
|
||||
<action name="getModuleAdminModuleInfo" type="model" />
|
||||
<action name="getModuleAdminGrant" type="model" />
|
||||
|
|
@ -36,12 +37,12 @@
|
|||
<action name="getModuleAdminModuleSearcherHtml" type="model" />
|
||||
<action name="getModuleAdminMultilingualHtml" type="model" permission="manager" />
|
||||
<action name="getModuleAdminLangListHtml" type="model" permission="manager" />
|
||||
|
||||
|
||||
<action name="procModuleAdminInsertCategory" type="controller" ruleset="insertCategory" />
|
||||
<action name="procModuleAdminUpdateCategory" type="controller" ruleset="updateCategory" />
|
||||
<action name="procModuleAdminDeleteCategory" type="controller" ruleset="deleteCategory" />
|
||||
<action name="procModuleAdminModuleSetup" type="controller" ruleset="insertModuleSetup" />
|
||||
<action name="procModuleAdminModuleGrantSetup" type="controller" ruleset="insertModulesGrant" />
|
||||
<action name="procModuleAdminModuleGrantSetup" type="controller" ruleset="insertModulesGrant" />
|
||||
<action name="procModuleAdminCopyModule" type="controller" ruleset="copyModule" />
|
||||
<action name="procModuleAdminInsertGrant" type="controller" permission="manager" check_var="module_srl" />
|
||||
<action name="procModuleAdminUpdateSkinInfo" type="controller" permission="manager" check_var="module_srl" />
|
||||
|
|
|
|||
|
|
@ -1266,6 +1266,62 @@ class ModuleController extends Module
|
|||
return executeQuery('module.deleteModuleFileBox', $args);
|
||||
}
|
||||
|
||||
/**
|
||||
* API call to clear cache entries.
|
||||
*
|
||||
* This can be used to clear the APC cache from CLI scripts,
|
||||
* such as async tasks run from crontab.
|
||||
*/
|
||||
public function procModuleClearCache()
|
||||
{
|
||||
// This is a JSON API.
|
||||
Context::setResponseMethod('JSON');
|
||||
if (PHP_SAPI === 'cli')
|
||||
{
|
||||
throw new Rhymix\Framework\Exceptions\InvalidRequest;
|
||||
}
|
||||
|
||||
// Get cache keys to clear.
|
||||
$keys = Context::get('keys');
|
||||
if (!$keys)
|
||||
{
|
||||
throw new Rhymix\Framework\Exceptions\InvalidRequest;
|
||||
}
|
||||
if (!is_array($keys))
|
||||
{
|
||||
$keys = [$keys];
|
||||
}
|
||||
|
||||
// Verify the API signature.
|
||||
$keystring = implode('|', $keys);
|
||||
$signature = Context::get('signature');
|
||||
if (!$signature)
|
||||
{
|
||||
throw new Rhymix\Framework\Exceptions\NotPermitted;
|
||||
}
|
||||
if (!Rhymix\Framework\Security::verifySignature($keystring, $signature))
|
||||
{
|
||||
throw new Rhymix\Framework\Exceptions\NotPermitted;
|
||||
}
|
||||
|
||||
// Clear the requested cache keys.
|
||||
foreach ($keys as $key)
|
||||
{
|
||||
if ($key === '*')
|
||||
{
|
||||
Rhymix\Framework\Cache::clearAll();
|
||||
}
|
||||
elseif (preg_match('/^([^:]+):\*$/', $key, $matches))
|
||||
{
|
||||
Rhymix\Framework\Cache::clearGroup($matches[1]);
|
||||
}
|
||||
else
|
||||
{
|
||||
Rhymix\Framework\Cache::delete($key);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief function of locking (timeout is in seconds)
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -93,7 +93,7 @@
|
|||
<input cond="$val->type == 'text'" type="text" name="{$val->name}" id="{$val->name}" value="<!--@if(strpos($val->value ?? '', '$user_lang->') === false)-->{$val->value}<!--@else-->{htmlspecialchars($val->value, ENT_COMPAT | ENT_HTML401, 'UTF-8', false)}<!--@end-->" class="lang_code" />
|
||||
|
||||
<!--// textarea -->
|
||||
<textarea cond="$val->type == 'textarea'" rows="8" cols="42" name="{$val->name}" id="{$val->name}" class="lang_code"><!--@if(strpos($val->value ?? '', '$user_lang->') === false)-->{$val->value}<!--@else-->{htmlspecialchars($val->value, ENT_COMPAT | ENT_HTML401, 'UTF-8', false)}<!--@end--></textarea>
|
||||
<textarea cond="$val->type == 'textarea'" rows="8" cols="42" name="{$val->name}" id="{$val->name}" class="x_full-width lang_code"><!--@if(strpos($val->value ?? '', '$user_lang->') === false)-->{$val->value}<!--@else-->{htmlspecialchars($val->value, ENT_COMPAT | ENT_HTML401, 'UTF-8', false)}<!--@end--></textarea>
|
||||
|
||||
<!--// select -->
|
||||
<select cond="$val->type == 'select'" name="{$val->name}" id="{$val->name}">
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
{'<?xml version="1.0" encoding="UTF-8" ?>'}
|
||||
<?php echo '<?xml version="1.0" encoding="UTF-8" ?>'; ?>
|
||||
|
||||
<config autoescape="on" />
|
||||
<feed xmlns="http://www.w3.org/2005/Atom">
|
||||
|
|
@ -25,4 +25,4 @@
|
|||
<category cond="$oDocument->get('category_srl') && $category_name = $category_list[$oDocument->get('module_srl')][$oDocument->get('category_srl')]->title" term="{$oDocument->get('category_srl')}" label="{Context::replaceUserLang($category_name)}" />
|
||||
<category loop="$oDocument->get('tag_list')=>$tag" term="{$tag}"/>
|
||||
</entry>
|
||||
</feed>
|
||||
</feed>
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
{'<?xml version="1.0" encoding="UTF-8" ?>'}
|
||||
<?php echo '<?xml version="1.0" encoding="UTF-8" ?>'; ?>
|
||||
|
||||
<config autoescape="on" />
|
||||
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns="http://purl.org/rss/1.0/">
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
{'<?xml version="1.0" encoding="UTF-8" ?>'}
|
||||
<?php echo '<?xml version="1.0" encoding="UTF-8" ?>'; ?>
|
||||
|
||||
<config autoescape="on" />
|
||||
<rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0">
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
{'<?xml version="1.0" encoding="UTF-8" ?>'}
|
||||
<?php echo '<?xml version="1.0" encoding="UTF-8" ?>'; ?>
|
||||
|
||||
<config autoescape="on" />
|
||||
<rss version="1.0">
|
||||
|
|
|
|||
|
|
@ -730,11 +730,6 @@ class WidgetController extends Widget
|
|||
|
||||
// Debug widget creation time information added to the results
|
||||
$elapsed_time = microtime(true) - $start;
|
||||
if (!isset($GLOBALS['__widget_excute_elapsed__']))
|
||||
{
|
||||
$GLOBALS['__widget_excute_elapsed__'] = 0;
|
||||
}
|
||||
$GLOBALS['__widget_excute_elapsed__'] += $elapsed_time;
|
||||
if (Rhymix\Framework\Debug::isEnabledForCurrentUser())
|
||||
{
|
||||
Rhymix\Framework\Debug::addWidget(array(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue