mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-03 08:41:39 +09:00
Compare commits
21 commits
d39d363334
...
e15c8f4e52
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e15c8f4e52 | ||
|
|
9d98e47c53 | ||
|
|
4193edde25 | ||
|
|
1c92b1baf5 | ||
|
|
b5a22b2aa8 | ||
|
|
901f565a81 | ||
|
|
4b26a67ca0 | ||
|
|
bd8de66c78 | ||
|
|
94869286ce | ||
|
|
7ce1f17bea | ||
|
|
b7bb45ca48 | ||
|
|
04b24bb0d1 | ||
|
|
108da2eac3 | ||
|
|
ba12e1b3a4 | ||
|
|
a90f991f6c | ||
|
|
e05e39a32f | ||
|
|
f047e57521 | ||
|
|
47e45c4076 | ||
|
|
6df4d38e04 | ||
|
|
9e453fe102 | ||
|
|
a46217eb7e |
32 changed files with 99 additions and 63 deletions
|
|
@ -349,7 +349,7 @@ class Korea
|
|||
return self::$_domain_cache[$domain] = false;
|
||||
}
|
||||
}
|
||||
foreach (self::_getDNSRecords($domain, \DNS_A) as $mx_ip)
|
||||
foreach (self::_getDNSRecords($mx, \DNS_A) as $mx_ip)
|
||||
{
|
||||
return self::$_domain_cache[$domain] = self::isKoreanIP($mx_ip);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -585,7 +585,7 @@ class Mail
|
|||
// Reset Message-ID in case send() is called multiple times.
|
||||
$random = substr(hash('sha256', mt_rand() . microtime() . getmypid()), 0, 32);
|
||||
$sender = $this->message->getFrom();
|
||||
$sender_email = strval(array_first_key($sender));
|
||||
$sender_email = strval(array_key_first($sender));
|
||||
$id = $random . '@' . (preg_match('/^(.+)@([^@]+)$/', $sender_email, $matches) ? $matches[2] : 'swift.generated');
|
||||
$this->message->getHeaders()->get('Message-ID')->setId($id);
|
||||
|
||||
|
|
|
|||
|
|
@ -112,7 +112,7 @@ class Password
|
|||
{
|
||||
unset($algos['argon2id']);
|
||||
}
|
||||
return array_first_key($algos);
|
||||
return array_key_first($algos);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -608,7 +608,7 @@ class Router
|
|||
return false;
|
||||
}
|
||||
arsort($reordered_routes);
|
||||
$best_route = array_first_key($reordered_routes);
|
||||
$best_route = array_key_first($reordered_routes);
|
||||
return $best_route;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -560,6 +560,7 @@ class Storage
|
|||
return false;
|
||||
}
|
||||
}
|
||||
chmod($destination, 0666 & ~self::getUmask());
|
||||
}
|
||||
elseif ($type === 'move')
|
||||
{
|
||||
|
|
@ -570,6 +571,7 @@ class Storage
|
|||
return false;
|
||||
}
|
||||
}
|
||||
chmod($destination, 0666 & ~self::getUmask());
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
|
|
@ -368,7 +368,10 @@ class Template
|
|||
$content = $this->parse();
|
||||
if (!Storage::write($this->cache_path, $content))
|
||||
{
|
||||
throw new Exception('Cannot write template cache file: ' . $this->cache_path);
|
||||
if (!Storage::write($this->cache_path, $content))
|
||||
{
|
||||
throw new Exception('Cannot write template cache file: ' . $this->cache_path);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -69,7 +69,7 @@ class Brevo extends Base implements \Rhymix\Framework\Drivers\MailInterface
|
|||
$from = $message->message->getFrom();
|
||||
$to = $message->message->getTo();
|
||||
$data = [
|
||||
'sender' => ['email' => array_first_key($from), 'name' => array_first($from)],
|
||||
'sender' => ['email' => array_key_first($from), 'name' => array_first($from)],
|
||||
'to' => array_map($format_callback, array_keys($to), array_values($to)),
|
||||
'subject' => $message->message->getSubject(),
|
||||
'htmlContent' => $message->message->getBody(),
|
||||
|
|
@ -84,7 +84,7 @@ class Brevo extends Base implements \Rhymix\Framework\Drivers\MailInterface
|
|||
}
|
||||
if ($reply_to = $message->message->getReplyTo())
|
||||
{
|
||||
$data['replyTo'] = ['email' => array_first_key($reply_to)];
|
||||
$data['replyTo'] = ['email' => array_key_first($reply_to)];
|
||||
}
|
||||
foreach ($message->getAttachments() as $attachment)
|
||||
{
|
||||
|
|
@ -93,7 +93,7 @@ class Brevo extends Base implements \Rhymix\Framework\Drivers\MailInterface
|
|||
'name' => $attachment->display_filename ?: $attachment->cid,
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
// Prepare headers and options for Requests.
|
||||
$headers = [
|
||||
'api-key' => $this->_config['api_key'],
|
||||
|
|
@ -103,7 +103,7 @@ class Brevo extends Base implements \Rhymix\Framework\Drivers\MailInterface
|
|||
$options = [
|
||||
'timeout' => 8,
|
||||
];
|
||||
|
||||
|
||||
// Send the API request.
|
||||
$request = \Rhymix\Framework\HTTP::post(self::$_url, $data, $headers, [], $options);
|
||||
$status_code = $request->getStatusCode();
|
||||
|
|
|
|||
|
|
@ -108,7 +108,7 @@ class SendGrid extends Base implements \Rhymix\Framework\Drivers\MailInterface
|
|||
$from = $message->message->getFrom();
|
||||
if ($from)
|
||||
{
|
||||
$data['from']['email'] = array_first_key($from);
|
||||
$data['from']['email'] = array_key_first($from);
|
||||
if (array_first($from))
|
||||
{
|
||||
$data['from']['name'] = array_first($from);
|
||||
|
|
@ -119,7 +119,7 @@ class SendGrid extends Base implements \Rhymix\Framework\Drivers\MailInterface
|
|||
$replyTo = $message->message->getReplyTo();
|
||||
if ($replyTo)
|
||||
{
|
||||
$data['reply_to']['email'] = array_first_key($from);
|
||||
$data['reply_to']['email'] = array_key_first($from);
|
||||
}
|
||||
|
||||
// Set the subject.
|
||||
|
|
|
|||
|
|
@ -304,7 +304,13 @@ class DBTableParser extends BaseParser
|
|||
if ($constraint->references)
|
||||
{
|
||||
$ref = explode('.', $constraint->references);
|
||||
$info->refs[] = $ref[0];
|
||||
$reference_table_name = $ref[0];
|
||||
if ($reference_table_name === $table_name)
|
||||
{
|
||||
continue; // Ignore self-references.
|
||||
}
|
||||
|
||||
$info->refs[] = $reference_table_name;
|
||||
}
|
||||
}
|
||||
$ref_list[$table_name] = $info;
|
||||
|
|
@ -328,7 +334,6 @@ class DBTableParser extends BaseParser
|
|||
}
|
||||
}
|
||||
}
|
||||
$k++;
|
||||
}
|
||||
if (!$changed)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -56,9 +56,12 @@ function lang(?string $code, $value = null)
|
|||
* @param array $array The input array
|
||||
* @return mixed
|
||||
*/
|
||||
function array_first(array $array)
|
||||
if (!function_exists('array_first'))
|
||||
{
|
||||
return reset($array);
|
||||
function array_first(array $array)
|
||||
{
|
||||
return reset($array);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -69,8 +72,7 @@ function array_first(array $array)
|
|||
*/
|
||||
function array_first_key(array $array)
|
||||
{
|
||||
reset($array);
|
||||
return key($array);
|
||||
return array_key_first($array);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -79,9 +81,12 @@ function array_first_key(array $array)
|
|||
* @param array $array The input array
|
||||
* @return mixed
|
||||
*/
|
||||
function array_last(array $array)
|
||||
if (!function_exists('array_last'))
|
||||
{
|
||||
return end($array);
|
||||
function array_last(array $array)
|
||||
{
|
||||
return end($array);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -92,8 +97,7 @@ function array_last(array $array)
|
|||
*/
|
||||
function array_last_key(array $array)
|
||||
{
|
||||
end($array);
|
||||
return key($array);
|
||||
return array_key_last($array);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -614,7 +614,7 @@ Rhymix.ajaxForm = function(form, callback_success, callback_error) {
|
|||
} else {
|
||||
callback_success = function(data) {
|
||||
if (data.message && data.message !== 'success') {
|
||||
alert(data.message);
|
||||
rhymix_alert(data.message, data.redirect_url);
|
||||
}
|
||||
if (data.redirect_url) {
|
||||
Rhymix.redirectToUrl(data.redirect_url.replace(/&/g, '&'));
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ use MenuAdminController;
|
|||
use MenuAdminModel;
|
||||
use Rhymix\Framework\Cache;
|
||||
use Rhymix\Framework\Storage;
|
||||
use Rhymix\Framework\Exceptions\TargetNotFound;
|
||||
use Rhymix\Modules\Admin\Models\AdminMenu as AdminMenuModel;
|
||||
use Rhymix\Modules\Admin\Models\Favorite as FavoriteModel;
|
||||
|
||||
|
|
@ -64,6 +65,10 @@ class AdminMenu extends Base
|
|||
{
|
||||
// Check if favorite exists.
|
||||
$module_name = Context::get('module_name');
|
||||
if (!$module_name)
|
||||
{
|
||||
throw new TargetNotFound();
|
||||
}
|
||||
$output = FavoriteModel::isFavorite($module_name);
|
||||
if(!$output->toBool())
|
||||
{
|
||||
|
|
|
|||
|
|
@ -117,7 +117,7 @@
|
|||
<div class="x_control-group">
|
||||
<label class="x_control-label" for="html_header">{$lang->input_header_script}</label>
|
||||
<div class="x_controls">
|
||||
<textarea name="html_header" id="html_header" rows="6" class="x_full-width">{$domain_info ? $domain_info->settings->html_header : ''}</textarea>
|
||||
<textarea name="html_header" id="html_header" rows="6" class="x_full-width x_code-font">{$domain_info ? $domain_info->settings->html_header : ''}</textarea>
|
||||
<div class="x_help-block">{$lang->detail_input_header_script}</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -125,7 +125,7 @@
|
|||
<div class="x_control-group">
|
||||
<label class="x_control-label" for="html_footer">{$lang->input_footer_script}</label>
|
||||
<div class="x_controls">
|
||||
<textarea name="html_footer" id="html_footer" rows="6" class="x_full-width">{$domain_info ? $domain_info->settings->html_footer : ''}</textarea>
|
||||
<textarea name="html_footer" id="html_footer" rows="6" class="x_full-width x_code-font">{$domain_info ? $domain_info->settings->html_footer : ''}</textarea>
|
||||
<div class="x_help-block">{$lang->detail_input_footer_script}</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -220,7 +220,7 @@
|
|||
{@ $conf_exists = config("sms.$driver_name.api_key")}
|
||||
<select type="select" name="sms_{$driver_name}_{$conf_name}" id="sms_{$driver_name}_{$conf_name}">
|
||||
<!--@foreach($driver_definition['api_urls'] as $api_url => $api_url_name)-->
|
||||
<option value="{$api_url}" selected="selected"|cond="$conf_value === $api_url || (!$conf_value && $conf_exists && $api_url === array_last_key($driver_definition['api_urls']))">{$api_url_name}</option>
|
||||
<option value="{$api_url}" selected="selected"|cond="$conf_value === $api_url || (!$conf_value && $conf_exists && $api_url === array_key_last($driver_definition['api_urls']))">{$api_url_name}</option>
|
||||
<!--@endforeach-->
|
||||
</select>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -309,9 +309,10 @@
|
|||
.x .x_uneditable-input{width:206px}
|
||||
.x input.x_full-width,
|
||||
.x textarea.x_full-width,
|
||||
.x .x_uneditable-input.x_full-width{width:calc(100% - 14px)}
|
||||
.x textarea.x_full-width.lang_code{width:calc(100% - 42px)}
|
||||
.x textarea{height:auto;min-height:80px;resize:vertical}
|
||||
.x .x_uneditable-input.x_full-width{width:calc(100% - 14px);resize:vertical}
|
||||
.x textarea.x_full-width.lang_code{width:calc(100% - 42px);resize:vertical}
|
||||
.x textarea.x_full-width + textarea.lang_code{width:calc(100% - 42px);resize:vertical}
|
||||
.x textarea{height:auto;min-height:80px;}
|
||||
.x textarea,
|
||||
.x input[type="text"],
|
||||
.x input[type="password"],
|
||||
|
|
@ -372,6 +373,7 @@
|
|||
.x textarea:-ms-input-placeholder{color:#999999}
|
||||
.x input::-webkit-input-placeholder,
|
||||
.x textarea::-webkit-input-placeholder{color:#999999}
|
||||
.x textarea.x_code-font, .x textarea.x_code-font + textarea.lang_code { font-family: Consolas, SF Mono, monospace !important; }
|
||||
.x .x_radio,
|
||||
.x .x_checkbox{min-height:20px;padding-left:20px}
|
||||
.x .x_radio input[type="radio"],
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ class Advanced_MailerController extends Advanced_Mailer
|
|||
$recipients = $mail->message->getTo() ?: array();
|
||||
if ($recipients)
|
||||
{
|
||||
$first_recipient = array_first_key($recipients);
|
||||
$first_recipient = array_key_first($recipients);
|
||||
if ($exception_driver = $this->getSendingMethodForEmailAddress($first_recipient, $config))
|
||||
{
|
||||
$driver_class = '\\Rhymix\\Framework\\Drivers\Mail\\' . $exception_driver;
|
||||
|
|
@ -51,7 +51,7 @@ class Advanced_MailerController extends Advanced_Mailer
|
|||
else
|
||||
{
|
||||
$sender = $mail->message->getFrom();
|
||||
$original_sender_email = $sender ? array_first_key($sender) : null;
|
||||
$original_sender_email = $sender ? array_key_first($sender) : null;
|
||||
$original_sender_name = $sender ? array_first($sender) : null;
|
||||
list($default_from, $default_name) = $this->getDefaultEmailIdentity();
|
||||
if ($original_sender_email !== $default_from && $default_from)
|
||||
|
|
|
|||
|
|
@ -19,11 +19,12 @@
|
|||
<li>
|
||||
<label for="nCategory">{$lang->category}</label>
|
||||
<select name="category_srl" id="nCategory">
|
||||
<!--@foreach($category_list as $val)-->
|
||||
<option <!--@if(!$val->grant)-->disabled="disabled"<!--@endif--> value="{$val->category_srl}" <!--@if($val->grant&&$val->selected||$val->category_srl==$oDocument->get('category_srl'))-->selected="selected"<!--@endif-->>
|
||||
{str_repeat(" ",$val->depth)} {$val->title} ({$val->document_count})
|
||||
<option value="">{$lang->category}</option>
|
||||
<!--@foreach($category_list as $val)-->
|
||||
<option value="{$val->category_srl}" disabled="disabled"|cond="!$val->grant" selected="selected"|cond="$val->grant && (($val->selected && !$oDocument->get('category_srl')) || $val->category_srl == $oDocument->get('category_srl'))">
|
||||
{str_repeat(' ', $val->depth)} {$val->title} ({$val->document_count})
|
||||
</option>
|
||||
<!--@end-->
|
||||
<!--@endforeach-->
|
||||
</select>
|
||||
</li>
|
||||
<!--@end-->
|
||||
|
|
|
|||
|
|
@ -14,11 +14,12 @@
|
|||
<li>
|
||||
<label for="nCategory" class="db fb">{$lang->category}</label>
|
||||
<select name="category_srl" id="nCategory">
|
||||
<!--@foreach($category_list as $val)-->
|
||||
<option <!--@if(!$val->grant)-->disabled="disabled"<!--@endif--> value="{$val->category_srl}" <!--@if($val->grant&&$val->selected||$val->category_srl==$oDocument->get('category_srl'))-->selected=="selected"<!--@endif-->>
|
||||
{str_repeat(" ",$val->depth)} {$val->title} ({$val->document_count})
|
||||
<option value="">{$lang->category}</option>
|
||||
<!--@foreach($category_list as $val)-->
|
||||
<option value="{$val->category_srl}" disabled="disabled"|cond="!$val->grant" selected="selected"|cond="$val->grant && (($val->selected && !$oDocument->get('category_srl')) || $val->category_srl == $oDocument->get('category_srl'))">
|
||||
{str_repeat(' ', $val->depth)} {$val->title} ({$val->document_count})
|
||||
</option>
|
||||
<!--@end-->
|
||||
<!--@endforeach-->
|
||||
</select>
|
||||
</li>
|
||||
<!--@end-->
|
||||
|
|
|
|||
|
|
@ -6,9 +6,11 @@
|
|||
<div class="write_header">
|
||||
<select name="category_srl" cond="$module_info->use_category=='Y'">
|
||||
<option value="">{$lang->category}</option>
|
||||
<option loop="$category_list => $val" disabled="disabled"|cond="!$val->grant" value="{$val->category_srl}" selected="selected"|cond="$val->grant&&$val->selected||$val->category_srl==$oDocument->get('category_srl')">
|
||||
{str_repeat(" ",$val->depth)} {$val->title} ({$val->document_count})
|
||||
<!--@foreach($category_list as $val)-->
|
||||
<option value="{$val->category_srl}" disabled="disabled"|cond="!$val->grant" selected="selected"|cond="$val->grant && (($val->selected && !$oDocument->get('category_srl')) || $val->category_srl == $oDocument->get('category_srl'))">
|
||||
{str_repeat(' ', $val->depth)} {$val->title} ({$val->document_count})
|
||||
</option>
|
||||
<!--@endforeach-->
|
||||
</select>
|
||||
<input cond="$oDocument->getTitleText()" type="text" name="title" class="iText" title="{$lang->title}" value="{escape($oDocument->getTitleText(), false)}" />
|
||||
<input cond="!$oDocument->getTitleText()" type="text" name="title" class="iText" title="{$lang->title}" />
|
||||
|
|
|
|||
|
|
@ -6,9 +6,11 @@
|
|||
<div class="write_header">
|
||||
<select name="category_srl" cond="$module_info->use_category=='Y'">
|
||||
<option value="">{$lang->category}</option>
|
||||
<option loop="$category_list => $val" disabled="disabled"|cond="!$val->grant" value="{$val->category_srl}" selected="selected"|cond="$val->grant&&$val->selected||$val->category_srl==$oDocument->get('category_srl')">
|
||||
{str_repeat(" ",$val->depth)} {$val->title} ({$val->document_count})
|
||||
<!--@foreach($category_list as $val)-->
|
||||
<option value="{$val->category_srl}" disabled="disabled"|cond="!$val->grant" selected="selected"|cond="$val->grant && (($val->selected && !$oDocument->get('category_srl')) || $val->category_srl == $oDocument->get('category_srl'))">
|
||||
{str_repeat(' ', $val->depth)} {$val->title} ({$val->document_count})
|
||||
</option>
|
||||
<!--@endforeach-->
|
||||
</select>
|
||||
<input cond="$oDocument->getTitleText()" type="text" name="title" class="iText" title="{$lang->title}" value="{escape($oDocument->getTitleText(), false)}" />
|
||||
<input cond="!$oDocument->getTitleText()" type="text" name="title" class="iText" title="{$lang->title}" />
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
<select name="include_modules[]" id="include_modules" size="8" multiple="multiple">
|
||||
<option value="">{$lang->cmd_board_include_modules_none}</option>
|
||||
<!--@foreach($board_list as $board_info)-->
|
||||
<option value="{$board_info->module_srl}" selected="selected"|cond="in_array($board_info->module_srl, $include_modules)">{$board_info->browser_title}</option>
|
||||
<option value="{$board_info->module_srl}" selected="selected"|cond="in_array($board_info->module_srl, $include_modules)">{$board_info->browser_title} ({$board_info->mid})</option>
|
||||
<!--@endforeach-->
|
||||
</select>
|
||||
<p class="x_help-block">{$lang->about_board_combined_board}</p>
|
||||
|
|
|
|||
|
|
@ -104,14 +104,14 @@
|
|||
<div class="x_control-group">
|
||||
<label class="x_control-label" for="lang_header_text">{$lang->header_text}</label>
|
||||
<div class="x_controls">
|
||||
<textarea name="header_text" id="header_text" class="x_full-width lang_code" rows="8" cols="42">{$module_info->header_text}</textarea>
|
||||
<textarea name="header_text" id="header_text" class="x_full-width x_code-font lang_code" rows="8" cols="42">{$module_info->header_text}</textarea>
|
||||
<p id="header_text_help" class="x_help-block">{$lang->about_header_text}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="x_control-group">
|
||||
<label class="x_control-label" for="lang_footer_text">{$lang->footer_text}</label>
|
||||
<div class="x_controls">
|
||||
<textarea name="footer_text" id="footer_text" class="x_full-width lang_code" rows="8" cols="42">{$module_info->footer_text}</textarea>
|
||||
<textarea name="footer_text" id="footer_text" class="x_full-width x_code-font lang_code" rows="8" cols="42">{$module_info->footer_text}</textarea>
|
||||
<p id="footer_text_help" class="x_help-block">{$lang->about_footer_text}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -178,14 +178,14 @@
|
|||
<div class="x_control-group">
|
||||
<label class="x_control-label" for="lang_mobile_header_text">{$lang->mobile_header_text}</label>
|
||||
<div class="x_controls">
|
||||
<textarea name="mobile_header_text" id="mobile_header_text" class="x_full-width lang_code" rows="8" cols="42">{$module_info->mobile_header_text}</textarea>
|
||||
<textarea name="mobile_header_text" id="mobile_header_text" class="x_full-width x_code-font lang_code" rows="8" cols="42">{$module_info->mobile_header_text}</textarea>
|
||||
<p id="mobile_header_text_help" class="x_help-block">{$lang->about_mobile_header_text}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="x_control-group">
|
||||
<label class="x_control-label" for="lang_mobile_footer_text">{$lang->mobile_footer_text}</label>
|
||||
<div class="x_controls">
|
||||
<textarea name="mobile_footer_text" id="mobile_footer_text" class="x_full-width lang_code" rows="8" cols="42">{$module_info->mobile_footer_text}</textarea>
|
||||
<textarea name="mobile_footer_text" id="mobile_footer_text" class="x_full-width x_code-font lang_code" rows="8" cols="42">{$module_info->mobile_footer_text}</textarea>
|
||||
<p id="mobile_footer_text_help" class="x_help-block">{$lang->about_mobile_footer_text}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@
|
|||
<div class="x_control-group">
|
||||
<label class="x_control-label" for="lang_header_text">{$lang->header_text}</label>
|
||||
<div class="x_controls">
|
||||
<textarea name="header_text" id="header_text" class="lang_code" rows="8" cols="42" placeholder="{$lang->about_header_text}">{htmlspecialchars($module_info->header_text)}</textarea>
|
||||
<textarea name="header_text" id="header_text" class="x_code-font lang_code" rows="8" cols="42" placeholder="{$lang->about_header_text}">{htmlspecialchars($module_info->header_text)}</textarea>
|
||||
<a href="#header_text_help" class="x_icon-question-sign" data-toggle style="vertical-align:top;margin-top:6px">{$lang->help}</a>
|
||||
<p id="header_text_help" class="x_help-block" hidden>{$lang->about_header_text}</p>
|
||||
</div>
|
||||
|
|
@ -19,7 +19,7 @@
|
|||
<div class="x_control-group">
|
||||
<label class="x_control-label" for="lang_footer_text">{$lang->footer_text}</label>
|
||||
<div class="x_controls">
|
||||
<textarea name="footer_text" id="footer_text" class="lang_code" rows="8" cols="42" placeholder="{$lang->about_footer_text}">{htmlspecialchars($module_info->footer_text)}</textarea>
|
||||
<textarea name="footer_text" id="footer_text" class="x_code-font lang_code" rows="8" cols="42" placeholder="{$lang->about_footer_text}">{htmlspecialchars($module_info->footer_text)}</textarea>
|
||||
<a href="#footer_text_help" class="x_icon-question-sign" data-toggle style="vertical-align:top;margin-top:6px">{$lang->help}</a>
|
||||
<p id="footer_text_help" class="x_help-block" hidden>{$lang->about_footer_text}</p>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -949,8 +949,8 @@ class DocumentController extends Document
|
|||
{
|
||||
$this->addGrant($obj->document_srl);
|
||||
}
|
||||
$output->add('document_srl',$obj->document_srl);
|
||||
$output->add('category_srl',$obj->category_srl);
|
||||
$output->add('document_srl', $obj->document_srl);
|
||||
$output->add('category_srl', $obj->category_srl);
|
||||
|
||||
return $output;
|
||||
}
|
||||
|
|
@ -1397,7 +1397,8 @@ class DocumentController extends Document
|
|||
// Remove the thumbnail file
|
||||
Rhymix\Framework\Storage::deleteDirectory(RX_BASEDIR . sprintf('files/thumbnails/%s', getNumberingPath($obj->document_srl, 3)));
|
||||
|
||||
$output->add('document_srl',$obj->document_srl);
|
||||
$output->add('document_srl', $obj->document_srl);
|
||||
$output->add('category_srl', $obj->category_srl);
|
||||
|
||||
//remove from cache
|
||||
self::clearDocumentCache($obj->document_srl);
|
||||
|
|
|
|||
|
|
@ -83,7 +83,7 @@
|
|||
<section class="section">
|
||||
<h1>HTML<small> - layout.html</small></h1>
|
||||
<div style="margin-right:14px">
|
||||
<textarea name="code" rows="8" cols="42" style="width:100%;height:300px;font:12px 'DejaVu Sans Mono', monospace;">{$layout_code}</textarea>
|
||||
<textarea name="code" rows="8" cols="42" style="width:100%;height:300px;font-size:12px" class="x_full-width x_code-font">{$layout_code}</textarea>
|
||||
</div>
|
||||
<div>
|
||||
<block loop="$widget_list => $widget"> <i>|</i> <a href="{getUrl('','module','admin','act','dispWidgetAdminGenerateCode','selected_widget',$widget->widget)}" target="_blank">{$widget->title}</a></block>
|
||||
|
|
@ -93,7 +93,7 @@
|
|||
<section class="section">
|
||||
<h1>CSS<small> - layout.css</small></h1>
|
||||
<div style="margin-right:14px">
|
||||
<textarea name="code_css" rows="8" cols="42" style="width:100%;height:300px;font:12px 'DejaVu Sans Mono', monospace;">{$layout_code_css}</textarea>
|
||||
<textarea name="code_css" rows="8" cols="42" style="width:100%;height:300px;font-size:12px" class="x_full-width x_code-font">{$layout_code_css}</textarea>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@
|
|||
<section class="section">
|
||||
<h1>HTML<small> - layout.html</small></h1>
|
||||
<div style="margin-right:14px">
|
||||
<textarea name="code" rows="8" cols="42" style="width:100%; height:300px; font:12px 'DejaVu Sans Mono', monospace;">{$layout_code}</textarea>
|
||||
<textarea name="code" rows="8" cols="42" style="width:100%; height:300px; font-size:12px" class="x_full-width x_code-font">{$layout_code}</textarea>
|
||||
</div>
|
||||
<div>
|
||||
<block loop="$widget_list => $widget"> <i class="vr">|</i> <a href="{getUrl('','module','admin','act','dispWidgetAdminGenerateCode','selected_widget',$widget->widget)}" target="_blank">{$widget->title}</a></block>
|
||||
|
|
@ -84,7 +84,7 @@
|
|||
<section class="section">
|
||||
<h1>CSS<small> - layout.css</small></h1>
|
||||
<div style="margin-right:14px">
|
||||
<textarea name="code_css" rows="8" cols="42" style="width:100%; height:300px; font:12px 'DejaVu Sans Mono', monospace;">{$layout_code_css}</textarea>
|
||||
<textarea name="code_css" rows="8" cols="42" style="width:100%; height:300px; font-size:12px" class="x_full-width x_code-font">{$layout_code_css}</textarea>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@
|
|||
<div class="x_control-group">
|
||||
<label class="x_control-label" for="header_script">{$lang->header_script}</label>
|
||||
<div class="x_controls">
|
||||
<textarea name="header_script" id="header_script" rows="4" cols="42" class="x_full-width">{$selected_layout->header_script}</textarea>
|
||||
<textarea name="header_script" id="header_script" rows="4" cols="42" class="x_full-width x_code-font">{$selected_layout->header_script}</textarea>
|
||||
<span class="x_help-block">{$lang->about_header_script}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -174,11 +174,13 @@ class ModuleAdminModel extends Module
|
|||
|
||||
// Get a permission group granted to the current module
|
||||
$selected_group = array();
|
||||
$default_xml_grant = array();
|
||||
$default_grant = array();
|
||||
foreach ($grant_list as $key => $val)
|
||||
{
|
||||
if (!empty($val->default))
|
||||
{
|
||||
$default_xml_grant[$key] = $val->default;
|
||||
$default_grant[$key] = $val->default;
|
||||
}
|
||||
}
|
||||
|
|
@ -203,6 +205,7 @@ class ModuleAdminModel extends Module
|
|||
}
|
||||
}
|
||||
Context::set('selected_group', $selected_group);
|
||||
Context::set('default_xml_grant', $default_xml_grant);
|
||||
Context::set('default_grant', $default_grant);
|
||||
Context::set('module_srl', $module_srl);
|
||||
// Extract admin ID set in the current module
|
||||
|
|
|
|||
|
|
@ -78,7 +78,7 @@
|
|||
<label class="x_control-label" for="lang_header_text">{$lang->header_text}</label>
|
||||
<div class="x_controls">
|
||||
{@$use_multilang_textarea=true}
|
||||
<textarea id="header_text" name="header_text" class="lang_code" rows="8" cols="42"></textarea>
|
||||
<textarea id="header_text" name="header_text" rows="8" cols="42" class="x_full-width x_code-font lang_code"></textarea>
|
||||
<label class="x_inline" for="header_text_delete"><input name="header_text_delete" id="header_text_delete" type="checkbox" value="Y" /> {$lang->cmd_delete}</label>
|
||||
<p class="x_help-block" style="vertical-align:top">{$lang->about_header_text}</p>
|
||||
</div>
|
||||
|
|
@ -86,7 +86,7 @@
|
|||
<div class="x_control-group">
|
||||
<label class="x_control-label" for="lang_footer_text">{$lang->footer_text}</label>
|
||||
<div class="x_controls">
|
||||
<textarea id="footer_text" name="footer_text" class="lang_code" rows="8" cols="42"></textarea>
|
||||
<textarea id="footer_text" name="footer_text" rows="8" cols="42" class="x_full-width x_code-font lang_code"></textarea>
|
||||
<label class="x_inline" for="footer_text_delete"><input name="footer_text_delete" id="footer_text_delete" type="checkbox" value="Y" /> {$lang->cmd_delete}</label>
|
||||
<p class="x_help-block" style="vertical-align:top">{$lang->about_footer_text}</p>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -58,9 +58,11 @@
|
|||
<label for="{$grant_name}_default" class="x_control-label">{$grant_item->title}</label>
|
||||
<div class="x_controls">
|
||||
<select name="{$grant_name}_default" id="{$grant_name}_default" class="grant_default">
|
||||
<!--@if($default_xml_grant[$grant_name] !== 'manager')-->
|
||||
<option value="0" <!--@if(($default_grant[$grant_name] ?? '') == 'all')-->selected="selected"<!--@end-->>{$lang->grant_to_all}</option>
|
||||
<option value="-1" <!--@if(($default_grant[$grant_name] ?? '') == 'member' || ($default_grant[$grant_name] ?? '') == 'site')-->selected="selected"<!--@end-->>{$lang->grant_to_login_user}</option>
|
||||
<option value="-4" <!--@if(($default_grant[$grant_name] ?? '') == 'not_member')-->selected="selected"<!--@end-->>{$lang->grant_to_non_login_user}</option>
|
||||
<!--@endif-->
|
||||
<option value="-3" <!--@if(($default_grant[$grant_name] ?? '') == 'manager')-->selected="selected"<!--@end-->>{$lang->grant_to_admin}</option>
|
||||
<option value="" <!--@if(($default_grant[$grant_name] ?? '') == 'group')-->selected="selected"<!--@end-->>{$lang->grant_to_group}</option>
|
||||
</select>
|
||||
|
|
|
|||
|
|
@ -46,14 +46,14 @@
|
|||
<div class="x_control-group">
|
||||
<label class="x_control-label" for="header_text">{$lang->header_text}</label>
|
||||
<div class="x_controls">
|
||||
<textarea name="header_text" id="header_text" rows="4" cols="42">{htmlspecialchars($module_info->header_text, ENT_COMPAT | ENT_HTML401, 'UTF-8', false)}</textarea>
|
||||
<textarea name="header_text" id="header_text" rows="4" cols="42" class="x_full-width x_code-font">{htmlspecialchars($module_info->header_text, ENT_COMPAT | ENT_HTML401, 'UTF-8', false)}</textarea>
|
||||
<p class="x_help-block" id="aboutHeaderText">{$lang->about_header_text}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="x_control-group">
|
||||
<label class="x_control-label" for="footer_text">{$lang->footer_text}</label>
|
||||
<div class="x_controls">
|
||||
<textarea name="footer_text" rows="4" cols="42">{htmlspecialchars($module_info->footer_text, ENT_COMPAT | ENT_HTML401, 'UTF-8', false)}</textarea>
|
||||
<textarea name="footer_text" rows="4" cols="42" class="x_full-width x_code-font">{htmlspecialchars($module_info->footer_text, ENT_COMPAT | ENT_HTML401, 'UTF-8', false)}</textarea>
|
||||
<p class="x_help-block" id="aboutFooterText">{$lang->about_footer_text}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -68,5 +68,5 @@
|
|||
<div class="x_modal-footer">
|
||||
<input type="submit" class="x_btn x_btn-primary" value="{$lang->cmd_registration}" />
|
||||
</div>
|
||||
|
||||
|
||||
</form>
|
||||
|
|
|
|||
|
|
@ -296,7 +296,10 @@ class PageAdminView extends Page
|
|||
Context::set('oDocument', $oDocument);
|
||||
Context::set('mid', $this->module_info->mid);
|
||||
|
||||
$this->setLayoutAndTemplatePaths($isMobile ? 'M' : 'P', $this->module_info);
|
||||
if(config('view.manager_layout') !== 'admin')
|
||||
{
|
||||
$this->setLayoutAndTemplatePaths($isMobile ? 'M' : 'P', $this->module_info);
|
||||
}
|
||||
$skin_path = rtrim($this->getTemplatePath(), '/') . '/';
|
||||
if (file_exists($skin_path . 'content_modify.blade.php') || file_exists($skin_path . 'content_modify.html'))
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue