Compare commits

...

21 commits

Author SHA1 Message Date
Lastorder
e15c8f4e52
Merge branch 'rhymix:master' into master 2025-07-15 10:09:11 +09:00
Kijin Sung
9d98e47c53 Try one more time before throwing error on template cache file write 2025-07-12 20:30:15 +09:00
Kijin Sung
4193edde25 Replce array_first_key() with array_key_first(), etc. 2025-07-12 12:24:20 +09:00
Kijin Sung
1c92b1baf5 Use array_key_first() and array_key_last() internally 2025-07-12 12:20:20 +09:00
Kijin Sung
b5a22b2aa8 Prepare for array_first() and array_last() becoming available in PHP 8.5
https://wiki.php.net/rfc/array_first_last
2025-07-12 12:18:45 +09:00
Kijin Sung
901f565a81 Restore backward compatible behavior when an ajax form submission returns both a message and a redirect URL 2025-07-06 17:31:13 +09:00
Kijin Sung
4b26a67ca0 Fix blank screen when editing article page with admin layout #2577 2025-07-06 17:28:10 +09:00
Kijin Sung
bd8de66c78 Fix incorrect category selected by default when editing a document and a default category is set 2025-07-06 17:16:19 +09:00
Kijin Sung
94869286ce Fix missing category_srl in updateDocument return value #2575 2025-07-06 17:06:52 +09:00
Kijin Sung
7ce1f17bea
Merge pull request #2578 from Waterticket/fk-issue
Fix #2576 자신을 참조하는 외래키는 생성 순서에 영향을 주지 않도록 변경
2025-07-06 16:39:28 +09:00
Kijin Sung
b7bb45ca48
Merge pull request #2580 from Waterticket/mx_record_fix
Fix: 한국 MX 레코드 검증시 도메인이 아닌 MX 레코드의 아이피로 검증하도록 수정 #2579
2025-07-06 16:37:41 +09:00
Waterticket
04b24bb0d1 Fix: 한국 MX 레코드 검증시 도메인이 아닌 MX 레코드의 아이피로 검증하도록 수정 2025-07-06 02:49:25 +09:00
Waterticket
108da2eac3 자신을 참조하는 외래키는 생성 순서에 영향을 주지 않도록 변경 #2576 2025-07-04 18:44:01 +09:00
Kijin Sung
ba12e1b3a4 Disable unsafe selections when the default value for a grant is manager 2025-06-28 11:00:51 +09:00
Kijin Sung
a90f991f6c Also apply monospace font to legacy layout edit screen 2025-06-28 10:54:33 +09:00
Kijin Sung
e05e39a32f Apply monospace font to header/footer script textarea for better readability 2025-06-28 10:52:42 +09:00
Kijin Sung
f047e57521 Fix unresizable textarea that isn't x_full-width 2025-06-28 10:39:07 +09:00
Kijin Sung
47e45c4076 Fix type error when module_name is null 2025-06-28 10:33:13 +09:00
Kijin Sung
6df4d38e04 Set permissions properly after copying or moving a custom file 2025-06-28 10:20:16 +09:00
Kijin Sung
9e453fe102
Merge pull request #2574 from Lastorder-DC/patch-1
Fix #2572 포함할 게시판 설정에 mid도 표시
2025-06-28 10:13:27 +09:00
Lastorder
a46217eb7e
Fix #2572 Also show mid at Include Boards setting 2025-06-27 14:28:55 +09:00
32 changed files with 99 additions and 63 deletions

View file

@ -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);
}

View file

@ -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);

View file

@ -112,7 +112,7 @@ class Password
{
unset($algos['argon2id']);
}
return array_first_key($algos);
return array_key_first($algos);
}
/**

View file

@ -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;
}
}

View file

@ -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
{

View file

@ -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);
}
}
}

View file

@ -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();

View file

@ -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.

View file

@ -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)
{

View file

@ -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);
}
/**

View file

@ -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, '&'));

View file

@ -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())
{

View file

@ -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>

View file

@ -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>

View file

@ -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"],

View file

@ -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)

View file

@ -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("&nbsp;&nbsp;",$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('&nbsp;&nbsp;', $val->depth)} {$val->title} ({$val->document_count})
</option>
<!--@end-->
<!--@endforeach-->
</select>
</li>
<!--@end-->

View file

@ -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("&nbsp;&nbsp;",$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('&nbsp;&nbsp;', $val->depth)} {$val->title} ({$val->document_count})
</option>
<!--@end-->
<!--@endforeach-->
</select>
</li>
<!--@end-->

View file

@ -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("&nbsp;&nbsp;",$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('&nbsp;&nbsp;', $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}" />

View file

@ -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("&nbsp;&nbsp;",$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('&nbsp;&nbsp;', $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}" />

View file

@ -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>

View file

@ -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>

View file

@ -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>

View file

@ -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);

View file

@ -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>

View file

@ -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>

View file

@ -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>

View file

@ -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

View file

@ -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>

View file

@ -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>

View file

@ -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>

View file

@ -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'))
{