Merge branch 'rhymix:develop' into develop

This commit is contained in:
Lastorder 2024-08-15 20:22:18 +09:00 committed by GitHub
commit 10e2116dd9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
13 changed files with 350 additions and 296 deletions

View file

@ -437,7 +437,7 @@ class Validator
*/
function arrayTrim($array)
{
if(!is_array($array))
if(!is_array($array) && !is_object($array))
{
return trim($array);
}

View file

@ -3,7 +3,7 @@
/**
* RX_VERSION is the version number of the Rhymix CMS.
*/
define('RX_VERSION', '2.1.16');
define('RX_VERSION', '2.1.17');
/**
* RX_MICROTIME is the startup time of the current script, in microseconds since the Unix epoch.

View file

@ -1,49 +1,46 @@
# [XEIcon v2.0.0](http://xpressengine.github.io/XEIcon/)
[한글 문서 바로가기 →](https://github.com/xpressengine/XEIcon/blob/2.0.0-wip/README_kor.md)
# [XEIcon v1.0.4](http://xpressengine.github.io/XEIcon/)
> [Korean](https://github.com/xpressengine/XEIcon/blob/1.0.4-wip/README_kor.md)
### The iconic font and CSS toolkit
XEIcon is a full shite of 820 pictographic icons for easy scalable vector graphics on websites,
created by designer, [Lee Junha](https://github.com/junnaa), and maintained by [XpressEngine](http://www.xpressengine.com).
XEIcon is a full shite of 680 pictographic icons for easy scalable vector graphics on websites,
created by [Junha,Lee](https://www.facebook.com/juna.junhalee), and maintained by [XpressEngine](http://www.xpressengine.com).
To get stared, check out [http://xpressengine.github.io/XEIcon](http://xpressengine.github.io/XEIcon)!
## Getting icons
- [Download the latest release](https://github.com/xpressengine/XEIcon/archive/v2.0.0.zip).
- Clone the repo:
```
$ git clone https://github.com/xpressengine/XEIcon.git
```
## Quick start
- [Download the latest release](https://github.com/xpressengine/XEIcon/archive/v1.0.4.zip).
- Clone the repo: `git clone https://github.com/xpressengine/XEIcon.git`.
- Install with [Bower](http://bower.io): `bower install xeicon`.
- CDN by [jsDelivr](http://www.jsdelivr.com/#!xeicon): `<link rel="stylesheet" href="//cdn.jsdelivr.net/xeicon/1.0.4/xeicon.min.css">`
- Install with [Bower](http://bower.io):
```
$ bower install XEIcon
```
- CDN by [jsDelivr](http://www.jsdelivr.com/#!xeicon):
```html
<link href="//cdn.jsdelivr.net/xeicon/2.0.0/xeicon.min.css"
rel="stylesheet">
```
Read the [Get started page](http://xpressengine.github.io/XEIcon/started.html) for information on the contents and examples, and more.
Read the [Get started page](#) for information on the contents and examples, and more.
## Changelog
- v1.0 - Basic icons added, optimized for 24px default.
- v1.0.1 - Detail fix.
- v1.0.2 - Added 78 icons.
## License
- The XEIcon font is licensed under SIL OFL 1.1 :
- http://scripts.sil.org/OFL
- XEIcon CSS, LESS, and SASS files are licensed under the MIT License :
- http://opensource.org/licenses/mit-license.html
- The XEIcon documentation is licensed under the CC BY 4.0 License :
- http://creativecommons.org/licenses/by-sa/4.0
- Full detail : http://xpressengine.github.io/XEIcon/xe_icon_license.html
## Changelog
- v1.0 - Basic icons added, optimized for 24px default
- v1.0.1 - detail fix
- v1.0.2 - Added 78 icons
- [v1.0.3 GitHub milestone](https://github.com/xpressengine/XEIcon/issues?q=milestone%3A%22XEIcon+1.0.3%22)
- [v1.0.4 GitHub milestone](https://github.com/xpressengine/XEIcon/milestones/XEIcon%201.0.4)
- [v2.0.0 Github milestone](https://github.com/xpressengine/XEIcon/milestones/XEIcon%202.1) - Change all icons style.
## Contributing
Please read through our [contributing guidelines](https://github.com/xpressengine/XEIcon/blob/master/CONTRIBUTING.md). Included are directions for opening issues, coding standards, and notes on development.
## Versioning
XEIcon library will be maintained under the Semantic Versioning guidelines as much as possible. Releases will be numbered with the following format:
## Versioning
XEIcon will be maintained under the Semantic Versioning guidelines as much as possible. Releases will be numbered with the following format:
`<major>.<minor>.<patch>`
@ -51,24 +48,19 @@ for more information on SemVer, please visit http://semver.org/
## Maintainors
[@juna](https://github.com/junnaa), [@gunil](http://github.com/gunil), [@bnu](https://github.com/bnu).
[@juna](https://www.facebook.com/juna.junhalee), [@gunil](http://github.com/gunil), [@marob](http://www.facebook.com/marob.99)
## Contributors
[@LeeYoonGu](https://github.com/LeeYoonGu), [@marob](https://www.facebook.com/marob.99).
[@may](https://www.facebook.com/rabbitgirl80), [@daze](http://www.facebook.com/daze325.), [@pretty758](https://www.facebook.com/haneul.kim.79656), [@LeeYoonGu](https://github.com/LeeYoonGu), [@niizguy](https://github.com/niizguy), [@jihyeok](https://www.facebook.com/jihyeok.lee.3?fref=ts)
## Authors
- Email : lee_junha@xpressengine.com
- Facebook : https://www.facebook.com/juna.junhalee
- GitHub : https://github.com/junnaa
- XpressEngine : http://www.xpressengine.com
- Email : contact@xpressengine.com
- Facebook : https://www.facebook.com/xehub?fref=ts
- GitHub : https://github.com/xpressengine
## License
- The XEIcon font is licensed under SIL OFL 1.1 :
- http://scripts.sil.org/OFL
- XEIcon CSS, LESS, and SASS files are licensed under the MIT License :
- http://opensource.org/licenses/mit-license.html
- The XEIcon documentation is licensed under the CC BY 4.0 License :
- http://creativecommons.org/licenses/by-sa/4.0
- Full detail : http://xpressengine.github.io/XEIcon/xe_icon_license.html
## Copyright
Copyright [ⓒNAVER Corp.](http://www.navercorp.com/ko/index.nhn) Supported by [D2 Program.](https://www.facebook.com/naverd2?fref=ts)

View file

@ -1,13 +1,17 @@
<?php
namespace Rhymix\Framework\Drivers\SMS;
use Rhymix\Framework\HTTP;
use Rhymix\Framework\Security;
/**
* The Solapi SMS driver.
*/
class SolAPI extends Base implements \Rhymix\Framework\Drivers\SMSInterface
{
const appId = 'PAOe9c8ftH8R';
const BASEURL = 'https://api.solapi.com';
const TIMEOUT = 5;
const APPID = 'PAOe9c8ftH8R';
/**
* API specifications.
@ -30,7 +34,7 @@ class SolAPI extends Base implements \Rhymix\Framework\Drivers\SMSInterface
'mms_subject_max_length' => 40,
'image_allowed_types' => array('jpg', 'gif', 'png'),
'image_max_dimensions' => array(2048, 2048),
'image_max_filesize' => 300000,
'image_max_filesize' => 200000,
'delay_supported' => true,
);
@ -38,7 +42,7 @@ class SolAPI extends Base implements \Rhymix\Framework\Drivers\SMSInterface
* Config keys used by this driver are stored here.
*/
protected static $_required_config = array('api_key', 'api_secret');
protected static $_optional_config = array('sender_key');
protected static $_optional_config = array();
/**
* Check if the current SMS driver is supported on this server.
@ -63,166 +67,141 @@ class SolAPI extends Base implements \Rhymix\Framework\Drivers\SMSInterface
*/
public function send(array $messages, \Rhymix\Framework\SMS $original)
{
$groupArray = array();
$groupMessage = false;
if(count($messages) > 1)
{
$groupMessage = true;
}
$data = [
'messages' => [],
'agent' => [
'appId' => self::APPID,
]
];
$images = [];
$schedule = null;
$status = true;
foreach ($messages as $i => $message)
{
if (count($message->to) > 1 && !$groupMessage)
{
$groupMessage = true;
}
$options = new \stdClass;
if ($this->_config['sender_key'])
{
$options->sender_key = $this->_config['sender_key'];
$options->type = 'CTA';
}
else
foreach ($message->to as $recipient)
{
$options = new \stdClass;
$options->to = $recipient;
$options->from = $message->from;
$options->text = $message->content ?: $message->type;
$options->type = $message->type;
}
$options->from = $message->from;
$options->to = $message->to;
$options->text = $message->content ?: $message->type;
if ($message->delay && $message->delay > time())
{
$options->datetime = gmdate('YmdHis', $message->delay + (3600 * 9));
}
if ($message->country && $message->country != 82)
{
$options->country = $message->country;
}
if ($message->subject)
{
$options->subject = $message->subject;
}
else
{
if($message->type != 'SMS')
if ($message->delay && $message->delay > time())
{
$schedule = date('c', $message->delay);
}
if ($message->country && $message->country != 82)
{
$options->country = $message->country;
}
if ($message->subject)
{
$options->subject = $message->subject;
}
elseif ($message->type != 'SMS')
{
// 문자 전송 타입이 SMS이 아닐경우 subjext가 필수
$options->subject = cut_str($message->content, 20);
}
if ($message->image)
{
if (isset($images[$message->image]))
{
$imageId = $images[$message->image];
}
else
{
$output = $this->_uploadImage($message->image, $message->type);
if (!empty($output->fileId))
{
$imageId = $images[$message->image] = $output->fileId;
}
else
{
$imageId = null;
}
}
if ($imageId)
{
$options->imageId = $imageId;
}
}
$data['messages'][] = $options;
}
if ($message->image)
{
$output = $this->uploadImage($message->image, $message->type);
$options->imageId = $output->fileId;
}
$groupArray[] = $options;
}
if($groupMessage)
if ($schedule)
{
$jsonObject = new \stdClass();
$jsonObject->messages = json_encode($groupArray);
$groupId = $this->createGroup();
if(!$groupId)
{
return false;
}
$result = json_decode($this->request("PUT", "messages/v4/groups/{$groupId}/messages", $jsonObject));
if(!$result || $result->errorCode)
{
return false;
}
$result = json_decode($this->request("POST", "messages/v4/groups/{$groupId}/send"));
if (!$result || $result->status != 'SENDING')
{
return false;
}
$data['scheduledDate'] = $schedule;
}
else
// Send all messages, and record failed messages.
$result = json_decode($this->_request('POST', '/messages/v4/send-many/detail', $data));
if (isset($result->failedMessageList) && is_array($result->failedMessageList) && count($result->failedMessageList))
{
// simpleMessage 를 사용 할 경우 to가 array 타입이면 문자 전송이 되지 않아 string 으로 요청
$groupArray[0]->to = $groupArray[0]->to[0];
$simpleObject = new \stdClass();
$simpleObject->message = $groupArray[0];
$simpleObject->agent = new \stdClass();
$simpleObject->agent->appId = self::appId;
$result = json_decode($this->request("POST", "messages/v4/send", $simpleObject));
if(!$result || $result->errorCode)
foreach ($result->failedMessageList as $fail)
{
return false;
$original->addError('Error while sending message to ' . $fail->to . ': ' . trim($fail->statusCode . ' ' . $fail->statusMessage));
}
$status = false;
}
return true;
return $status;
}
/**
* Create header string for http protocol
* Create header string for authorization.
*
* @param $config
* @return string
*/
private function getHeader()
protected function _getHeader()
{
date_default_timezone_set('Asia/Seoul');
$date = date('Y-m-d\TH:i:s.Z\Z', time());
$salt = uniqid();
$date = gmdate('Y-m-d\TH:i:s\Z');
$salt = Security::getRandom(32);
$signature = hash_hmac('sha256', $date . $salt, $this->_config['api_secret']);
return "HMAC-SHA256 apiKey={$this->_config['api_key']}, date={$date}, salt={$salt}, signature={$signature}";
}
/**
* Create message group
* @return string : group id
*/
private function createGroup()
{
$args = new \stdClass();
$args->appId = self::appId;
$result = $this->request("POST", 'messages/v4/groups', $args);
$groupId = json_decode($result)->groupId;
return $groupId;
}
/**
* Upload to image for MMS message.
* @param $imageDir
* Upload an image for MMS message.
*
* @param $path
* @param $type
* @return mixed
*/
private function uploadImage($imageDir, $type)
protected function _uploadImage($path, $type)
{
$path = $imageDir;
$data = file_get_contents($path);
$imageData = base64_encode($data);
$jsonData = new \stdClass();
$jsonData->file = $imageData;
$jsonData = new \stdClass;
$jsonData->file = base64_encode(file_get_contents($path));
$jsonData->type = $type;
$url = "storage/v1/files";
return json_decode($this->request('POST', $url, $jsonData));
$url = '/storage/v1/files';
return json_decode($this->_request('POST', $url, $jsonData));
}
/**
* Request string message.
* @param $method
* @param $url
* @param bool $data
* @return bool|string
* @param array|object|null $data
* @return string
*/
private function request($method, $url, $data = false)
protected function _request($method, $url, $data = null)
{
$url = 'https://api.solapi.com/' . $url;
$url = self::BASEURL . $url;
$data = $data ? json_encode($data) : null;
$headers = [
'Authorization' => $this->_getHeader(),
'Content-Type' => 'application/json',
];
if(!$data)
{
$data = null;
}
else
{
$data = json_encode($data);
}
$result = \FileHandler::getRemoteResource($url, $data, 3, $method, 'application/json', array('Authorization' => $this->getHeader()));
return $result;
$result = HTTP::request($url, $method, $data, $headers, [], ['timeout' => self::TIMEOUT]);
return $result->getBody()->getContents();
}
}

View file

@ -0,0 +1,130 @@
<?php
namespace Rhymix\Framework\Drivers\SMS;
use Rhymix\Framework\HTTP;
use Rhymix\Framework\Storage;
use RHymix\Framework\URL;
/**
* The Twilio SMS driver.
*/
class Twilio extends Base implements \Rhymix\Framework\Drivers\SMSInterface
{
/**
* API Base URL.
*/
const BASEURL = 'https://api.twilio.com/2010-04-01';
/**
* API specifications.
*/
protected static $_spec = array(
'max_recipients' => 100,
'sms_max_length' => 70,
'sms_max_length_in_charset' => 'UTF-16LE',
'lms_supported' => true,
'lms_supported_country_codes' => array(),
'lms_max_length' => 1600,
'lms_max_length_in_charset' => 'UTF-16LE',
'lms_subject_supported' => false,
'lms_subject_max_length' => 0,
'mms_supported' => true,
'mms_supported_country_codes' => array(),
'mms_max_length' => 1600,
'mms_max_length_in_charset' => 'UTF-16LE',
'mms_subject_supported' => false,
'mms_subject_max_length' => 0,
'image_allowed_types' => array('jpg', 'gif', 'png'),
'image_max_dimensions' => array(2048, 2048),
'image_max_filesize' => 5000000,
'delay_supported' => true,
);
/**
* Config keys used by this driver are stored here.
*/
protected static $_required_config = ['account_sid', 'auth_token'];
protected static $_optional_config = [];
/**
* Check if the current SMS driver is supported on this server.
*
* This method returns true on success and false on failure.
*
* @return bool
*/
public static function isSupported()
{
return true;
}
/**
* Send a message.
*
* This method returns true on success and false on failure.
*
* @param array $messages
* @param object $original
* @return bool
*/
public function send(array $messages, \Rhymix\Framework\SMS $original)
{
$status = true;
$url = sprintf('%s/Accounts/%s/Messages.json', self::BASEURL, $this->_config['account_sid']);
$settings = [
'auth' => [$this->_config['account_sid'], $this->_config['auth_token']],
'timeout => 10',
];
foreach ($messages as $i => $message)
{
$from = '+' . preg_replace('/[^0-9]/', '', $message->from);
foreach ($message->to as $recipient)
{
$data = [];
$data['To'] = sprintf('+%s%s', $message->country ?: 82, preg_replace('/[^0-9]/', '', $recipient));
$data['From'] = $from;
$data['Body'] = $message->content;
if ($message->delay && $message->delay > time())
{
$data['SendAt'] = gmdate('Y-m-d\TH:i:s\Z', $message->delay);
}
if ($message->type === 'MMS')
{
$data['SendAsMms'] = true;
}
if ($message->image && Storage::isFile($message->image))
{
$media_url = URL::fromServerPath($message->image);
if ($media_url)
{
$data['MediaUrl'][] = $media_url;
}
}
$request = HTTP::request($url, 'POST', $data, [], [], $settings);
$status_code = $request->getStatusCode();
if ($status_code < 200 || $status_code >= 400)
{
$response = $request->getBody()->getContents();
if ($response)
{
$response = json_decode($response);
$error_code = $response->error_code;
$error_message = $response->error_message;
}
else
{
$error_code = null;
$error_message = null;
}
$original->addError('Error (' . $status_code . ') while sending message ' . ($i + 1) . ' of ' . count($messages) .
' to ' . $data['To'] . ': ' . trim($error_code . ' ' . $error_message));
$status = false;
}
}
}
return $status;
}
}

View file

@ -75,6 +75,8 @@
<!--@foreach($driver_definition['required'] as $conf_name)-->
{@ $conf_value = escape(config("mail.$driver_name.$conf_name"))}
{@ $text_keys = ['api_domain', 'api_user', 'api_key', 'api_token']}
{@ $password_keys = ['api_pass', 'api_secret']}
<!--@if($conf_name === 'smtp_host')-->
<div class="x_control-group hidden-by-default show-for-{$driver_name}">
@ -134,9 +136,9 @@
<!--@if($conf_name === 'api_type')-->
<div class="x_control-group hidden-by-default show-for-{$driver_name}">
<label class="x_control-label" for="mail_{$driver_name}_api_type">{$lang->cmd_advanced_mailer_api_type}</label>
<label class="x_control-label" for="mail_{$driver_name}_{$conf_name}">{$lang->cmd_advanced_mailer_config_keys['api_type']}</label>
<div class="x_controls">
<select id="mail_{$driver_name}_api_type" name="mail_{$driver_name}_api_type">
<select id="mail_{$driver_name}_{$conf_name}" name="mail_{$driver_name}_{$conf_name}">
<!--@foreach($driver_definition['api_types'] as $api_type)-->
<option value="{$api_type}" selected="selected"|cond="$api_type === $conf_value">{$api_type}</option>
<!--@end-->
@ -145,56 +147,20 @@
</div>
<!--@end-->
<!--@if($conf_name === 'api_domain')-->
<!--@if(in_array($conf_name, $text_keys))-->
<div class="x_control-group hidden-by-default show-for-{$driver_name}">
<label class="x_control-label" for="mail_{$driver_name}_api_domain">{$lang->cmd_advanced_mailer_api_domain}</label>
<label class="x_control-label" for="mail_{$driver_name}_{$conf_name}">{$lang->cmd_advanced_mailer_config_keys[$conf_name]}</label>
<div class="x_controls">
<input type="text" name="mail_{$driver_name}_api_domain" id="mail_{$driver_name}_api_domain" value="{$conf_value}" />
<input type="text" name="mail_{$driver_name}_{$conf_name}" id="mail_{$driver_name}_{$conf_name}" value="{$conf_value}" />
</div>
</div>
<!--@end-->
<!--@if($conf_name === 'api_user')-->
<!--@if(in_array($conf_name, $password_keys))-->
<div class="x_control-group hidden-by-default show-for-{$driver_name}">
<label class="x_control-label" for="mail_{$driver_name}_api_user">{$lang->cmd_advanced_mailer_api_user}</label>
<label class="x_control-label" for="mail_{$driver_name}_{$conf_name}">{$lang->cmd_advanced_mailer_config_keys[$conf_name]}</label>
<div class="x_controls">
<input type="text" name="mail_{$driver_name}_api_user" id="mail_{$driver_name}_api_user" value="{$conf_value}" />
</div>
</div>
<!--@end-->
<!--@if($conf_name === 'api_pass')-->
<div class="x_control-group hidden-by-default show-for-{$driver_name}">
<label class="x_control-label" for="mail_{$driver_name}_api_pass">{$lang->cmd_advanced_mailer_api_pass}</label>
<div class="x_controls full-width">
<input type="password" name="mail_{$driver_name}_api_pass" id="mail_{$driver_name}_api_pass" value="{$conf_value}" autocomplete="new-password" />
</div>
</div>
<!--@end-->
<!--@if($conf_name === 'api_token')-->
<div class="x_control-group hidden-by-default show-for-{$driver_name}">
<label class="x_control-label" for="mail_{$driver_name}_api_token">{$lang->cmd_advanced_mailer_api_token}</label>
<div class="x_controls full-width">
<input type="text" name="mail_{$driver_name}_api_token" id="mail_{$driver_name}_api_token" value="{$conf_value}" />
</div>
</div>
<!--@end-->
<!--@if($conf_name === 'api_key')-->
<div class="x_control-group hidden-by-default show-for-{$driver_name}">
<label class="x_control-label" for="mail_{$driver_name}_api_key">{$lang->cmd_advanced_mailer_api_key}</label>
<div class="x_controls">
<input type="text" name="mail_{$driver_name}_api_key" id="mail_{$driver_name}_api_key" value="{$conf_value}" />
</div>
</div>
<!--@end-->
<!--@if($conf_name === 'api_secret')-->
<div class="x_control-group hidden-by-default show-for-{$driver_name}">
<label class="x_control-label" for="mail_{$driver_name}_api_secret">{$lang->cmd_advanced_mailer_api_secret}</label>
<div class="x_controls">
<input type="password" name="mail_{$driver_name}_api_secret" id="mail_{$driver_name}_api_secret" value="{$conf_value}" autocomplete="new-password" />
<input type="password" name="mail_{$driver_name}_{$conf_name}" id="mail_{$driver_name}_{$conf_name}" value="{$conf_value}" autocomplete="new-password" />
</div>
</div>
<!--@end-->
@ -244,22 +210,15 @@
<!--@foreach($conf_names as $conf_name)-->
{@ $conf_value = escape(config("sms.$driver_name.$conf_name"))}
<!--@if($conf_name === 'service_id')-->
<div class="x_control-group hidden-by-default show-for-{$driver_name}">
<label class="x_control-label" for="sms_{$driver_name}_service_id">{$lang->cmd_advanced_mailer_service_id}</label>
<div class="x_controls">
<input type="text" name="sms_{$driver_name}_service_id" id="sms_{$driver_name}_service_id" value="{$conf_value}" />
</div>
</div>
<!--@end-->
{@ $text_keys = ['service_id', 'account_sid', 'api_user', 'api_key', 'api_token']}
{@ $password_keys = ['api_pass', 'api_secret', 'auth_token']}
<!--@if($conf_name === 'api_url')-->
<div class="x_control-group hidden-by-default show-for-{$driver_name}">
<label class="x_control-label" for="sms_{$driver_name}_api_key">{$lang->cmd_advanced_mailer_api_url}</label>
<label class="x_control-label" for="sms_{$driver_name}_{$conf_name}">{$lang->cmd_advanced_mailer_config_keys['api_url']}</label>
<div class="x_controls">
{@ $conf_exists = config("sms.$driver_name.api_key")}
<select type="select" name="sms_{$driver_name}_api_url" id="sms_{$driver_name}_api_url">
<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>
<!--@endforeach-->
@ -268,56 +227,29 @@
</div>
<!--@end-->
<!--@if($conf_name === 'api_user')-->
<!--@if(in_array($conf_name, $text_keys))-->
<div class="x_control-group hidden-by-default show-for-{$driver_name}">
<label class="x_control-label" for="sms_{$driver_name}_api_user">{$lang->cmd_advanced_mailer_api_user}</label>
<label class="x_control-label" for="sms_{$driver_name}_{$conf_name}">{$lang->cmd_advanced_mailer_config_keys[$conf_name]}</label>
<div class="x_controls">
<input type="text" name="sms_{$driver_name}_api_user" id="sms_{$driver_name}_api_user" value="{$conf_value}" />
<input type="text" name="sms_{$driver_name}_{$conf_name}" id="sms_{$driver_name}_{$conf_name}" value="{$conf_value}" />
</div>
</div>
<!--@end-->
<!--@if($conf_name === 'api_pass')-->
<!--@if(in_array($conf_name, $password_keys))-->
<div class="x_control-group hidden-by-default show-for-{$driver_name}">
<label class="x_control-label" for="sms_{$driver_name}_api_pass">{$lang->cmd_advanced_mailer_api_pass}</label>
<div class="x_controls full-width">
<input type="password" name="sms_{$driver_name}_api_pass" id="sms_{$driver_name}_api_pass" value="{$conf_value}" autocomplete="new-password" />
</div>
</div>
<!--@end-->
<!--@if($conf_name === 'api_token')-->
<div class="x_control-group hidden-by-default show-for-{$driver_name}">
<label class="x_control-label" for="sms_{$driver_name}_api_token">{$lang->cmd_advanced_mailer_api_token}</label>
<div class="x_controls full-width">
<input type="text" name="sms_{$driver_name}_api_token" id="sms_{$driver_name}_api_token" value="{$conf_value}" />
</div>
</div>
<!--@end-->
<!--@if($conf_name === 'api_key')-->
<div class="x_control-group hidden-by-default show-for-{$driver_name}">
<label class="x_control-label" for="sms_{$driver_name}_api_key">{$lang->cmd_advanced_mailer_api_key}</label>
<label class="x_control-label" for="sms_{$driver_name}_{$conf_name}">{$lang->cmd_advanced_mailer_config_keys[$conf_name]}</label>
<div class="x_controls">
<input type="text" name="sms_{$driver_name}_api_key" id="sms_{$driver_name}_api_key" value="{$conf_value}" />
</div>
</div>
<!--@end-->
<!--@if($conf_name === 'api_secret')-->
<div class="x_control-group hidden-by-default show-for-{$driver_name}">
<label class="x_control-label" for="sms_{$driver_name}_api_secret">{$lang->cmd_advanced_mailer_api_secret}</label>
<div class="x_controls">
<input type="password" name="sms_{$driver_name}_api_secret" id="sms_{$driver_name}_api_secret" value="{$conf_value}" autocomplete="new-password" />
<input type="password" name="sms_{$driver_name}_{$conf_name}" id="sms_{$driver_name}_{$conf_name}" value="{$conf_value}" autocomplete="new-password" />
</div>
</div>
<!--@end-->
<!--@if($conf_name === 'sender_key')-->
<div class="x_control-group hidden-by-default show-for-{$driver_name}">
<label class="x_control-label" for="sms_{$driver_name}_sender_key">{$lang->cmd_advanced_mailer_sender_key}</label>
<label class="x_control-label" for="sms_{$driver_name}_{$conf_name}">{$lang->cmd_advanced_mailer_config_keys['sender_key']}</label>
<div class="x_controls">
<input type="password" name="sms_{$driver_name}_sender_key" id="sms_{$driver_name}_sender_key" value="{$conf_value}" autocomplete="new-password" />
<input type="password" name="sms_{$driver_name}_{$conf_name}" id="sms_{$driver_name}_{$conf_name}" value="{$conf_value}" autocomplete="new-password" />
<p class="x_help-block">{$lang->cmd_admin_sms_sender_key_help}</p>
</div>
</div>
@ -446,6 +378,10 @@
</section>
<div class="x_clearfix btnArea">
<div class="x_pull-left">
<a class="x_btn" href="{getUrl(['module' => 'admin', 'act' => 'dispAdvanced_mailerAdminMailTest'])}" target="_blank">{$lang->cmd_advanced_mailer_mail_test}</a>
<a class="x_btn" href="{getUrl(['module' => 'admin', 'act' => 'dispAdvanced_mailerAdminSMSTest'])}" target="_blank">{$lang->cmd_advanced_mailer_sms_test}</a>
</div>
<div class="x_pull-right">
<button type="submit" class="x_btn x_btn-primary">{$lang->cmd_save}</button>
</div>

View file

@ -28,24 +28,26 @@ $lang->cmd_advanced_mailer_smtp_security_tls = 'TLS (STARTTLS)';
$lang->cmd_advanced_mailer_smtp_security_none = 'None';
$lang->cmd_advanced_mailer_smtp_user = 'Username';
$lang->cmd_advanced_mailer_smtp_pass = 'Password';
$lang->cmd_advanced_mailer_service_id = 'Service ID';
$lang->cmd_advanced_mailer_api_url = 'API URL';
$lang->cmd_advanced_mailer_api_key = 'API key';
$lang->cmd_advanced_mailer_api_secret = 'API secret';
$lang->cmd_advanced_mailer_api_domain = 'Domain';
$lang->cmd_advanced_mailer_api_token = 'API token';
$lang->cmd_advanced_mailer_api_type = 'API type';
$lang->cmd_advanced_mailer_api_type_free = 'Free account';
$lang->cmd_advanced_mailer_api_type_paid = 'Paid account';
$lang->cmd_advanced_mailer_api_user = 'Username';
$lang->cmd_advanced_mailer_api_pass = 'Password';
$lang->cmd_advanced_mailer_config_keys['service_id'] = 'Service ID';
$lang->cmd_advanced_mailer_config_keys['account_sid'] = 'Account SID';
$lang->cmd_advanced_mailer_config_keys['auth_token'] = 'Auth token';
$lang->cmd_advanced_mailer_config_keys['api_url'] = 'API URL';
$lang->cmd_advanced_mailer_config_keys['api_key'] = 'API key';
$lang->cmd_advanced_mailer_config_keys['api_secret'] = 'API secret';
$lang->cmd_advanced_mailer_config_keys['api_domain'] = 'Domain';
$lang->cmd_advanced_mailer_config_keys['api_token'] = 'API token';
$lang->cmd_advanced_mailer_config_keys['api_type'] = 'API type';
$lang->cmd_advanced_mailer_config_keys['api_type_free'] = 'Free account';
$lang->cmd_advanced_mailer_config_keys['api_type_paid'] = 'Paid account';
$lang->cmd_advanced_mailer_config_keys['api_user'] = 'Username';
$lang->cmd_advanced_mailer_config_keys['api_pass'] = 'Password';
$lang->cmd_advanced_mailer_config_keys['sender_key'] = 'Sender key';
$lang->cmd_advanced_mailer_fcm_api_key = 'FCM Legacy API key';
$lang->cmd_advanced_mailer_fcm_service_account = 'FCM service account file';
$lang->cmd_advanced_mailer_apns_certificate = 'APNs certificate file';
$lang->cmd_advanced_mailer_apns_passphrase = 'APNs certificate passphrase';
$lang->cmd_advanced_mailer_allow_guest_device = 'Register Guest Devices';
$lang->cmd_advanced_mailer_about_allow_guest_device = 'Accept device registrations from users who are not logged in.';
$lang->cmd_advanced_mailer_sender_key = 'Sender key';
$lang->cmd_advanced_mailer_sender_identity = 'Sender Identity';
$lang->cmd_advanced_mailer_about_sender_identity = 'You can change the sender\'s name and e-mail address in the <a href="' . \RX_BASEURL . 'index.php?module=admin&act=dispAdminConfigNotification" target="_blank">Notification Settings</a> screen.';
$lang->cmd_advanced_mailer_sender_name = 'Sender\'s name';

View file

@ -28,24 +28,26 @@ $lang->cmd_advanced_mailer_smtp_security_tls = 'TLS (STARTTLS)';
$lang->cmd_advanced_mailer_smtp_security_none = '사용하지 않음';
$lang->cmd_advanced_mailer_smtp_user = '아이디';
$lang->cmd_advanced_mailer_smtp_pass = '비밀번호';
$lang->cmd_advanced_mailer_service_id = '서비스 ID';
$lang->cmd_advanced_mailer_api_url = 'API URL';
$lang->cmd_advanced_mailer_api_key = 'API 키';
$lang->cmd_advanced_mailer_api_secret = 'API 비밀';
$lang->cmd_advanced_mailer_api_domain = '도메인';
$lang->cmd_advanced_mailer_api_token = 'API 토큰';
$lang->cmd_advanced_mailer_api_type = 'API 구분';
$lang->cmd_advanced_mailer_api_type_free = '무료';
$lang->cmd_advanced_mailer_api_type_paid = '유료';
$lang->cmd_advanced_mailer_api_user = '아이디';
$lang->cmd_advanced_mailer_api_pass = '비밀번호';
$lang->cmd_advanced_mailer_config_keys['service_id'] = '서비스 ID';
$lang->cmd_advanced_mailer_config_keys['account_sid'] = '계정 SID';
$lang->cmd_advanced_mailer_config_keys['auth_token'] = '인증 토큰';
$lang->cmd_advanced_mailer_config_keys['api_url'] = 'API URL';
$lang->cmd_advanced_mailer_config_keys['api_key'] = 'API 키';
$lang->cmd_advanced_mailer_config_keys['api_secret'] = 'API 비밀';
$lang->cmd_advanced_mailer_config_keys['api_domain'] = '도메인';
$lang->cmd_advanced_mailer_config_keys['api_token'] = 'API 토큰';
$lang->cmd_advanced_mailer_config_keys['api_type'] = 'API 구분';
$lang->cmd_advanced_mailer_config_keys['api_type_free'] = '무료';
$lang->cmd_advanced_mailer_config_keys['api_type_paid'] = '유료';
$lang->cmd_advanced_mailer_config_keys['api_user'] = '아이디';
$lang->cmd_advanced_mailer_config_keys['api_pass'] = '비밀번호';
$lang->cmd_advanced_mailer_config_keys['sender_key'] = '센더 키';
$lang->cmd_advanced_mailer_fcm_api_key = 'FCM Legacy API 키';
$lang->cmd_advanced_mailer_fcm_service_account = 'FCM 서비스 계정 파일';
$lang->cmd_advanced_mailer_apns_certificate = 'APNs 인증서 파일';
$lang->cmd_advanced_mailer_apns_passphrase = 'APNs 인증서 암호';
$lang->cmd_advanced_mailer_allow_guest_device = '비회원 기기 등록';
$lang->cmd_advanced_mailer_about_allow_guest_device = '로그인하지 않은 사용자도 기기를 등록할 수 있도록 허용합니다.';
$lang->cmd_advanced_mailer_sender_key = '센더 키';
$lang->cmd_advanced_mailer_sender_identity = '보낸이 설정';
$lang->cmd_advanced_mailer_about_sender_identity = '보낸이의 이름과 메일 주소는 <a href="' . \RX_BASEURL . 'index.php?module=admin&act=dispAdminConfigNotification" target="_blank">알림 설정</a> 화면에서 변경할 수 있습니다.';
$lang->cmd_advanced_mailer_sender_name = '보낸이 이름';

View file

@ -716,9 +716,16 @@ class BoardView extends Board
}
$obj = new stdClass;
$obj->mid = $this->module_info->mid;
if (empty($this->include_modules))
{
$obj->module_srl = $this->module_info->module_srl;
}
else
{
$obj->module_srl = $this->include_modules;
}
$obj->list_count = 10000;
$output = TagModel::getInstance()->getTagList($obj);
$output = TagModel::getTagList($obj);
// automatically order
if(count($output->data))

View file

@ -7,6 +7,7 @@
<tr>
<block loop="$list_config=>$key,$val">
<th scope="col" cond="$val->type=='no' && $val->idx==-1"><span>{$lang->no}</span></th>
<th scope="col" cond="$val->type=='module_title' && $val->idx==-1"><span>{$lang->module_title}</span></th>
<th scope="col" class="title" cond="$val->type=='title' && $val->idx==-1"><span>{$lang->title}</span></th>
<th scope="col" cond="$val->type=='nick_name' && $val->idx==-1"><span>{$lang->writer}</span></th>
<th scope="col" cond="$val->type=='user_id' && $val->idx==-1"><span>{$lang->user_id}</span></th>

View file

@ -249,7 +249,18 @@ class LayoutModel extends Layout
$path = $pathPrefix . $layout;
}
return is_readable($path . '/layout.html');
if (file_exists($path . '/layout.html') && is_readable($path . '/layout.html'))
{
return true;
}
elseif (file_exists($path . '/layout.blade.php') && is_readable($path . '/layout.blade.php'))
{
return true;
}
else
{
return false;
}
}
/**
@ -539,6 +550,7 @@ class LayoutModel extends Layout
if(file_exists($cache_file) && filemtime($cache_file) > filemtime($xml_file))
{
$layout_info = new stdClass;
include($cache_file);
if($layout_info->extra_var && $vars)

View file

@ -13,7 +13,8 @@
<condition operation="in" column="T.module_srl" var="module_srl" pipe="and" />
</conditions>
<navigation>
<index var="count" default="count" order="desc" />
<index var="sort_index" default="count" order="order_type" order-default="desc" />
<index var="count" order="desc" comment="For backward compatibility only" />
<list_count var="list_count" default="20" />
</navigation>
<groups>

View file

@ -83,28 +83,20 @@ class TagModel extends Tag
* @brief Imported Tag List
* Many of the specified module in order to extract the number of tags
*/
function getTagList($obj)
public static function getTagList($obj)
{
if($obj->mid)
if(!empty($obj->mid))
{
$oModuleModel = getModel('module');
$obj->module_srl = $oModuleModel->getModuleSrlByMid($obj->mid);
$obj->module_srl = ModuleModel::getModuleSrlByMid($obj->mid);
unset($obj->mid);
}
// Module_srl passed the array may be a check whether the array
$args = new stdClass;
if(is_array($obj->module_srl))
{
$args->module_srl = implode(',', $obj->module_srl);
}
else
{
$args->module_srl = $obj->module_srl;
}
$args->module_srl = $obj->module_srl;
$args->list_count = $obj->list_count ?? null;
$args->count = $obj->sort_index ?? null;
$args->sort_index = $obj->sort_index ?? null;
$args->order_type = $obj->order_type ?? null;
$output = executeQueryArray('tag.getTagList', $args);
if(!$output->toBool()) return $output;