Merge branch 'develop' into next

This commit is contained in:
Kijin Sung 2020-08-29 23:53:31 +09:00
commit ffe9cda5e0
37 changed files with 2047 additions and 1931 deletions

View file

@ -9,6 +9,11 @@ class HTMLDisplayHandler
const JQUERY_V1 = '1.12.4';
const JQUERY_V2 = '2.2.4';
/**
* Default viewport setting
*/
const DEFAULT_VIEWPORT = 'width=device-width, initial-scale=1.0, user-scalable=yes';
/**
* Reserved scripts
*/

View file

@ -3,7 +3,7 @@
/**
* RX_VERSION is the version number of the Rhymix CMS.
*/
define('RX_VERSION', '1.9.9.8');
define('RX_VERSION', '1.9.9.9');
/**
* RX_MICROTIME is the startup time of the current script, in microseconds since the Unix epoch.
@ -139,11 +139,6 @@ define('__XE_RECOMMEND_PHP_VERSION__', '7.2.0');
define('__ZBXE__', true);
define('__ZBXE_VERSION__', RX_VERSION);
define('_XE_PATH_', RX_BASEDIR);
define('_XE_PACKAGE_', 'XE');
define('_XE_LOCATION_', 'en');
define('_XE_LOCATION_SITE_', 'https://xe1.xpressengine.com/');
define('_XE_DOWNLOAD_SERVER_', 'https://download.xpressengine.com/');
define('__DEBUG__', 0);
/**
* Status constants for various content types.

View file

@ -234,6 +234,12 @@ a img {
border-bottom-right-radius: 4px;
box-shadow: 0 0 3px 0 rgba(0, 0, 0, 0.18), 0 0 6px 0 rgba(0, 0, 0, 0.12);
z-index: 1073741824;
&.visible {
display: block;
@media print {
display: none;
}
}
&:hover {
background: #dddddd;
background: linear-gradient(to bottom, #e8e8e8 0%, #d9d9d9 100%);

View file

@ -15,7 +15,7 @@ $(function() {
// Find debug panel elements.
var panel = $("#rhymix_debug_panel");
var button = $("#rhymix_debug_button").show();
var button = $("#rhymix_debug_button").addClass('visible');
// Initialize the debug button.
var button_link = $('<a href="#"></a>').text("DEBUG").appendTo(button).click(function(event) {

View file

@ -90,7 +90,7 @@ $lang->password = '비밀번호';
$lang->password1 = '새 비밀번호';
$lang->password2 = '새 비밀번호 확인';
$lang->password3 = '비밀번호 확인';
$lang->admin_id = '관리자ID';
$lang->admin_id = '관리자 ID';
$lang->admin_email_address = '관리자 Email 주소';
$lang->writer = '글쓴이';
$lang->user_name = '이름';

View file

@ -5,7 +5,9 @@
<!-- META -->
<meta charset="utf-8">
<meta name="generator" content="Rhymix">
<meta name="viewport" content="{config('mobile.viewport') ?: 'width=device-width, initial-scale=1.0, user-scalable=yes'}" cond="$m" />
<!--@if(Mobile::isFromMobilePhone() && $__mv = config('mobile.viewport') ?? HTMLDisplayHandler::DEFAULT_VIEWPORT)-->
<meta name="viewport" content="{$__mv}" />
<!--@endif-->
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<block loop="Context::getMetaTag() => $no, $val">
<meta http-equiv="{$val['name']}"|cond="$val['is_http_equiv']" name="{$val['name']}"|cond="!$val['is_http_equiv']" content="{$val['content']}" />

View file

@ -105,11 +105,14 @@ class adminAdminView extends admin
return;
}
$oAutoinstallAdminModel = getAdminModel('autoinstall');
$config = $oAutoinstallAdminModel->getAutoInstallAdminModuleConfig();
$oAutoinstallModel = getModel('autoinstall');
$params = array();
$params["act"] = "getResourceapiLastupdate";
$body = XmlGenerater::generate($params);
$buff = FileHandler::getRemoteResource(_XE_DOWNLOAD_SERVER_, $body, 3, "POST", "application/xml");
$buff = FileHandler::getRemoteResource($config->download_server, $body, 3, "POST", "application/xml");
$xml_lUpdate = new XmlParser();
$lUpdateDoc = $xml_lUpdate->parse($buff);
$updateDate = $lUpdateDoc->response->updatedate->body;
@ -578,7 +581,7 @@ class adminAdminView extends admin
Context::set('use_rewrite', Rhymix\Framework\Router::getRewriteLevel());
Context::set('use_mobile_view', (config('mobile.enabled') !== null ? config('mobile.enabled') : config('use_mobile_view')) ? true : false);
Context::set('tablets_as_mobile', config('mobile.tablets') ? true : false);
Context::set('mobile_viewport', config('mobile.viewport') ?: 'width=device-width, initial-scale=1.0, user-scalable=yes');
Context::set('mobile_viewport', config('mobile.viewport') ?? HTMLDisplayHandler::DEFAULT_VIEWPORT);
Context::set('use_ssl', Rhymix\Framework\Config::get('url.ssl'));
Context::set('delay_session', Rhymix\Framework\Config::get('session.delay'));
Context::set('use_db_session', Rhymix\Framework\Config::get('session.use_db'));

View file

@ -274,6 +274,7 @@ $lang->about_use_mobile_view = 'Show mobile page when visitors access with mobil
$lang->tablets_as_mobile = 'Treat Tablets as Mobile';
$lang->mobile_viewport = 'Mobile viewport Setting';
$lang->about_mobile_viewport = 'The settings entered above will be output in a &lt;meta name=&quot;viewport&quot;&gt; tag for mobile visitors.';
$lang->restore_default_viewport = 'Restore Default';
$lang->thumbnail_target = 'Extract Thumbnail From';
$lang->thumbnail_target_all = 'All images';
$lang->thumbnail_target_attachment = 'Attached images only';

View file

@ -270,6 +270,7 @@ $lang->about_use_mobile_view = '모바일 기기로 접속시 모바일 페이
$lang->tablets_as_mobile = '태블릿도 모바일 취급';
$lang->mobile_viewport = '모바일 viewport 설정';
$lang->about_mobile_viewport = '모바일 접속시 여기 입력한 내용이 &lt;meta name=&quot;viewport&quot;&gt; 태그로 출력됩니다.';
$lang->restore_default_viewport = '기본값 복원';
$lang->thumbnail_target = '썸네일 생성 대상';
$lang->thumbnail_target_all = '모든 이미지 (외부 이미지 포함)';
$lang->thumbnail_target_attachment = '첨부된 이미지';

View file

@ -89,7 +89,7 @@
<label class="x_control-label" for="mobile_viewport">{$lang->mobile_viewport}</label>
<div class="x_controls">
<input type="text" name="mobile_viewport" id="mobile_viewport" value="{$mobile_viewport}" style="min-width: 80%" />
<p class="x_help-block">{$lang->about_mobile_viewport}</p>
<p class="x_help-block">{$lang->about_mobile_viewport} <a href="javascript:restoreDefaultViewport()">{$lang->restore_default_viewport}</a></p>
</div>
</div>
<div class="x_control-group">
@ -224,3 +224,9 @@
</div>
</form>
</section>
<script>
function restoreDefaultViewport() {
$('#mobile_viewport').val({\HTMLDisplayHandler::DEFAULT_VIEWPORT|json|noescape});
}
</script>

View file

@ -31,7 +31,8 @@ class Advanced_MailerController extends Advanced_Mailer
if (!$mail->getFrom())
{
$mail->setFrom(config('mail.default_from'), config('mail.default_name'));
list($default_from, $default_name) = $this->getDefaultEmailIdentity();
$mail->setFrom($default_from, $default_name);
if ($replyTo = config('mail.default_reply_to'))
{
$mail->setReplyTo($replyTo);
@ -48,9 +49,10 @@ class Advanced_MailerController extends Advanced_Mailer
$sender = $mail->message->getFrom();
$original_sender_email = $sender ? array_first_key($sender) : null;
$original_sender_name = $sender ? array_first($sender) : null;
if ($original_sender_email !== config('mail.default_from'))
list($default_from, $default_name) = $this->getDefaultEmailIdentity();
if ($original_sender_email !== $default_from)
{
$mail->setFrom(config('mail.default_from'), $original_sender_name ?: config('mail.default_name'));
$mail->setFrom($default_from, $original_sender_name ?: $default_name);
$mail->setReplyTo($original_sender_email);
}
}
@ -117,6 +119,25 @@ class Advanced_MailerController extends Advanced_Mailer
}
}
/**
* Get the default identity for sending email.
*
* @return array
*/
public function getDefaultEmailIdentity()
{
$email = config('mail.default_from');
$name = config('mail.default_name');
if (!$email)
{
$member_config = getModel('module')->getModuleConfig('member');
$email = $member_config->webmaster_email;
$name = $member_config->webmaster_name ?: 'webmaster';
}
return [$email, $name];
}
/**
* Check if an email address is on a list of exceptions.
*

View file

@ -16,7 +16,6 @@ class autoinstallAdminController extends autoinstall
*/
function init()
{
}
/**
@ -75,7 +74,11 @@ class autoinstallAdminController extends autoinstall
'ssl_verify_peer' => FALSE,
'ssl_verify_host' => FALSE
);
$buff = FileHandler::getRemoteResource(_XE_DOWNLOAD_SERVER_, $body, 3, "POST", "application/xml", array(), array(), array(), $request_config);
$oAdminModel = getAdminModel('autoinstall');
$config = $oAdminModel->getAutoInstallAdminModuleConfig();
$buff = FileHandler::getRemoteResource($config->download_server, $body, 3, "POST", "application/xml", array(), array(), array(), $request_config);
$xml = new XmlParser();
$xmlDoc = $xml->parse($buff);
$this->updateCategory($xmlDoc);
@ -224,7 +227,10 @@ class autoinstallAdminController extends autoinstall
$oModuleInstaller = new FTPModuleInstaller($package);
}
$oModuleInstaller->setServerUrl(_XE_DOWNLOAD_SERVER_);
$oAdminModel = getAdminModel('autoinstall');
$config = $oAdminModel->getAutoInstallAdminModuleConfig();
$oModuleInstaller->setServerUrl($config->download_server);
$oModuleInstaller->setPassword($ftp_password);
$output = $oModuleInstaller->install();
if(!$output->toBool())
@ -397,7 +403,10 @@ class autoinstallAdminController extends autoinstall
$oModuleInstaller = new FTPModuleInstaller($package);
}
$oModuleInstaller->setServerUrl(_XE_DOWNLOAD_SERVER_);
$oAdminModel = getAdminModel('autoinstall');
$config = $oAdminModel->getAutoInstallAdminModuleConfig();
$oModuleInstaller->setServerUrl($config->download_server);
$oModuleInstaller->setPassword($ftp_password);
$output = $oModuleInstaller->uninstall();
@ -413,6 +422,39 @@ class autoinstallAdminController extends autoinstall
return new BaseObject();
}
function procAutoinstallAdminInsertConfig()
{
// if end of string does not have a slash, add it
$_location_site = Context::get('location_site');
if(substr($_location_site, -1) != '/' && strlen($_location_site) > 0)
{
$_location_site .= '/';
}
$_download_server = Context::get('download_server');
if(substr($_download_server, -1) != '/' && strlen($_download_server) > 0)
{
$_download_server .= '/';
}
$args = new stdClass();
$args->location_site = $_location_site;
$args->download_server = $_download_server;
$oModuleController = getController('module');
$output = $oModuleController->updateModuleConfig('autoinstall', $args);
// init. DB tables
executeQuery("autoinstall.deletePackages");
executeQuery("autoinstall.deleteCategory");
executeQuery("autoinstall.deleteInstalledPackage");
// default setting end
$this->setMessage('success_updated');
$returnUrl = Context::get('success_return_url') ? Context::get('success_return_url') : getNotEncodedUrl('', 'module', 'admin', 'act', 'dispAutoinstallAdminConfig');
$this->setRedirectUrl($returnUrl);
}
}
/* End of file autoinstall.admin.controller.php */
/* Location: ./modules/autoinstall/autoinstall.admin.controller.php */

View file

@ -420,6 +420,20 @@ class autoinstallAdminModel extends autoinstall
return new BaseObject();
}
public function getAutoInstallAdminModuleConfig()
{
$oModuleModel = getModel('module');
$config_info = $oModuleModel->getModuleConfig('autoinstall');
$_location_site = 'https://xe1.xpressengine.com/';
$_download_server = 'https://download.xpressengine.com/';
$config = new stdClass();
$config->location_site = $config_info->location_site ? $config_info->location_site : $_location_site;
$config->download_server = $config_info->download_server ? $config_info->download_server : $_download_server;
return $config;
}
}
/* End of file autoinstall.admin.model.php */
/* Location: ./modules/autoinstall/autoinstall.admin.model.php */

View file

@ -27,9 +27,13 @@ class autoinstallAdminView extends autoinstall
*/
function init()
{
$oAdminModel = getAdminModel('autoinstall');
$config = $oAdminModel->getAutoInstallAdminModuleConfig();
Context::set('config', $config);
$template_path = sprintf("%stpl/", $this->module_path);
Context::set('original_site', _XE_LOCATION_SITE_);
Context::set('uri', _XE_DOWNLOAD_SERVER_);
Context::set('original_site', $config->location_site);
Context::set('uri', $config->download_server);
$this->setTemplatePath($template_path);
$ftp_info = Context::getFTPInfo();
@ -192,17 +196,30 @@ class autoinstallAdminView extends autoinstall
$depto = array();
$oAdminModel = getAdminModel('autoinstall');
$config = $oAdminModel->getAutoInstallAdminModuleConfig();
foreach($items as $item)
{
$v = $this->rearrange($item, $targets);
$v->item_screenshot_url = str_replace('./', _XE_DOWNLOAD_SERVER_, $v->item_screenshot_url);
$v->item_screenshot_url = str_replace('./', $config->download_server, $v->item_screenshot_url);
$v->category = $this->categories[$v->category_srl]->title;
$v->url = _XE_LOCATION_SITE_ . '?mid=download&package_srl=' . $v->package_srl;
$v->url = $config->location_site . '?mid=download&package_srl=' . $v->package_srl;
if($packages[$v->package_srl])
{
$v->current_version = $packages[$v->package_srl]->current_version;
$v->need_update = $packages[$v->package_srl]->need_update;
// if version is up
// insert Y
if(version_compare($v->item_version, $v->current_version, '>'))
{
$v->need_update = 'Y';
}
else
{
$v->need_update = 'N';
}
//$v->need_update = $packages[$v->package_srl]->need_update;
$v->type = $oModel->getTypeFromPath($packages[$v->package_srl]->path);
if($this->ftp_set && $v->depfrom)
@ -314,7 +331,11 @@ class autoinstallAdminView extends autoinstall
'ssl_verify_peer' => FALSE,
'ssl_verify_host' => FALSE
);
$buff = FileHandler::getRemoteResource(_XE_DOWNLOAD_SERVER_, $body, 3, "POST", "application/xml", array(), array(), array(), $request_config);
$oAdminModel = getAdminModel('autoinstall');
$config = $oAdminModel->getAutoInstallAdminModuleConfig();
$buff = FileHandler::getRemoteResource($config->download_server, $body, 3, "POST", "application/xml", array(), array(), array(), $request_config);
$xml_lUpdate = new XmlParser();
$xmlDoc = $xml_lUpdate->parse($buff);
if($xmlDoc && $xmlDoc->response->packagelist->item)
@ -366,6 +387,7 @@ class autoinstallAdminView extends autoinstall
Context::set("package", $package);
Context::set('contain_core', $package->contain_core);
Context::set('module_config', $oAdminModel->getAutoInstallAdminModuleConfig());
if(!$_SESSION['ftp_password'])
{
@ -407,7 +429,11 @@ class autoinstallAdminView extends autoinstall
'ssl_verify_peer' => FALSE,
'ssl_verify_host' => FALSE
);
$buff = FileHandler::getRemoteResource(_XE_DOWNLOAD_SERVER_, $body, 3, "POST", "application/xml", array(), array(), array(), $request_config);
$oAdminModel = getAdminModel('autoinstall');
$config = $oAdminModel->getAutoInstallAdminModuleConfig();
$buff = FileHandler::getRemoteResource($config->download_server, $body, 3, "POST", "application/xml", array(), array(), array(), $request_config);
$xml_lUpdate = new XmlParser();
$lUpdateDoc = $xml_lUpdate->parse($buff);
$updateDate = $lUpdateDoc->response->updatedate->body;
@ -558,7 +584,11 @@ class autoinstallAdminView extends autoinstall
'ssl_verify_peer' => FALSE,
'ssl_verify_host' => FALSE
);
$buff = FileHandler::getRemoteResource(_XE_DOWNLOAD_SERVER_, $body, 3, "POST", "application/xml", array(), array(), array(), $request_config);
$oAdminModel = getAdminModel('autoinstall');
$config = $oAdminModel->getAutoInstallAdminModuleConfig();
$buff = FileHandler::getRemoteResource($config->download_server, $body, 3, "POST", "application/xml", array(), array(), array(), $request_config);
$xml_lUpdate = new XmlParser();
$xmlDoc = $xml_lUpdate->parse($buff);
if($xmlDoc && $xmlDoc->response->packagelist->item)
@ -583,6 +613,14 @@ class autoinstallAdminView extends autoinstall
}
}
/**
* Display config
*
*/
function dispAutoinstallAdminConfig()
{
$this->setTemplateFile('config');
}
}
/* End of file autoinstall.admin.view.php */
/* Location: ./modules/autoinstall/autoinstall.admin.view.php */

View file

@ -44,7 +44,13 @@ class XmlGenerater
'ssl_verify_peer' => FALSE,
'ssl_verify_host' => FALSE
);
$buff = FileHandler::getRemoteResource(_XE_DOWNLOAD_SERVER_, $body, 3, "POST", "application/xml", array(), array(), array(), $request_config);
$oModuleModel = getModel('module');
$module_info = $oModuleModel->getModuleConfig('autoinstall');
$location_site = $module_info->location_site;
$download_server = $module_info->download_server;
$buff = FileHandler::getRemoteResource($download_server, $body, 3, "POST", "application/xml", array(), array(), array(), $request_config);
if(!$buff)
{
return;

View file

@ -6,16 +6,20 @@
<action name="dispAutoinstallAdminInstall" type="view" menu_name="easyInstall" />
<action name="dispAutoinstallAdminUninstall" type="view" menu_name="easyInstall" />
<action name="dispAutoinstallAdminInstalledPackages" type="view" menu_name="easyInstall" />
<action name="dispAutoinstallAdminConfig" type="view" menu_name="easyInstall" />
<action name="getAutoinstallAdminMenuPackageList" type="model" />
<action name="getAutoinstallAdminLayoutPackageList" type="model" />
<action name="getAutoinstallAdminSkinPackageList" type="model" />
<action name="getAutoinstallAdminIsAuthed" type="model" />
<action name="getAutoInstallAdminInstallInfo" type="model" />
<action name="getAutoInstallAdminModuleConfig" type="model" />
<action name="procAutoinstallAdminUpdateinfo" type="controller" />
<action name="procAutoinstallAdminPackageinstall" type="controller" ruleset="ftp" />
<action name="procAutoinstallAdminUninstallPackage" type="controller" ruleset="ftp" />
<action name="procAutoinstallAdminInsertConfig" type="controller" />
</actions>
<menus>
<menu name="easyInstall">

View file

@ -53,3 +53,8 @@ $lang->typename['m.skin'] = 'Mobile Skin';
$lang->typename['skin'] = 'Skin';
$lang->typename['widgetstyle'] = 'Widget style';
$lang->typename['style'] = 'Document style';
$lang->location_site = 'Download Homepage';
$lang->about_location_site = 'Please type your download homepage. ex)https://xe1.xpressengine.com/';
$lang->download_server = 'Download Server';
$lang->about_download_server = 'Please type your download server. ex)https://download.xpressengine.com/';

View file

@ -55,3 +55,9 @@ $lang->typename['m.skin'] = '모바일 스킨';
$lang->typename['skin'] = '스킨';
$lang->typename['widgetstyle'] = '위젯스타일';
$lang->typename['style'] = '문서스타일';
$lang->location_site = '다운로드 홈페이지';
$lang->about_location_site = '다운로드 홈페이지를 입력해 주세요. 예)https://xe1.xpressengine.com/';
$lang->download_server = '다운로드 서버';
$lang->about_download_server = '다운로드 서버를 입력해 주세요. 예)https://download.xpressengine.com/';

View file

@ -0,0 +1,5 @@
<query id="deletePackages" action="delete">
<tables>
<table name="autoinstall_packages" />
</tables>
</query>

View file

@ -1,6 +1,7 @@
<ul class="x_nav x_nav-tabs">
<li class="x_active"|cond="$act == 'dispAutoinstallAdminIndex'"><a href="{getUrl('', 'module', 'admin', 'act', 'dispAutoinstallAdminIndex')}">{lang('all')} ({$tCount})</a></li>
<li class="x_active"|cond="$act == 'dispAutoinstallAdminInstalledPackages'"><a href="{getUrl('', 'module', 'admin', 'act', 'dispAutoinstallAdminInstalledPackages')}">Installed({$iCount})</a></li>
<li class="x_active"|cond="$act == 'dispAutoinstallAdminConfig'"><a href="{getUrl('', 'module', 'admin', 'act', 'dispAutoinstallAdminConfig')}">{lang('cmd_setup')}</a></li>
</ul>
<nav cond="$act == 'dispAutoinstallAdminIndex'" class="x_thumbnail x_clearfix category">

View file

@ -0,0 +1,36 @@
<include target="header.html" />
<include target="category.html" />
{@
$from_id = array(
'modules/autoinstall/tpl/config/1' => 1
);
}
<div cond="$XE_VALIDATOR_MESSAGE && isset($from_id[$XE_VALIDATOR_ID])" class="message {$XE_VALIDATOR_MESSAGE_TYPE}">
<p>{$XE_VALIDATOR_MESSAGE}</p>
</div>
<form action="./" class="x_form-horizontal" ruleset="insert_config" method="post">
<input type="hidden" name="module" value="autoinstall" />
<input type="hidden" name="act" value="procAutoinstallAdminInsertConfig" />
<input type="hidden" name="success_return_url" value="{getUrl('', 'module', 'admin', 'act', $act)}" />
<input type="hidden" name="xe_validator_id" value="modules/autoinstall/tpl/config/1" />
<div class="x_control-group">
<label class="x_control-label" for="location_site">{$lang->location_site}</label>
<div class="x_controls">
<input type="url" id="location_site" name="location_site" style="min-width:90%" value="{$config->location_site}" />
<p class="x_help-block">{$lang->about_location_site}</p>
</div>
</div>
<div class="x_control-group">
<label class="x_control-label" for="download_server">{$lang->download_server}</label>
<div class="x_controls">
<input type="url" id="download_server" name="download_server" style="min-width:90%" value="{$config->download_server}" />
<p class="x_help-block">{$lang->about_download_server}</p>
</div>
</div>
<div class="x_clearfix btnArea">
<span class="x_pull-right"><input class="x_btn x_btn-primary" type="submit" value="{$lang->cmd_save}" /></span>
</div>
</form>

View file

@ -1,6 +1,7 @@
<filter name="insert_config" module="autoinstall" act="procAutoinstallAdminInsertConfig" confirm_msg_code="confirm_submit">
<form>
<node target="ftp_root_path" required="true" />
<node target="location_site" required="true" />
<node target="download_server" required="true" />
</form>
<response>
<tag name="error" />

View file

@ -29,7 +29,7 @@
<block cond="$dep->installed">{$lang->current_version}: {$dep->cur_version} <block cond="$dep->need_update">({$lang->require_update})</block></block>
<block cond="!$dep->installed">{$lang->require_installation}</block>
<block cond="$show_ftp_note && ($dep->need_update || !$dep->installed)">
<a href="{_XE_DOWNLOAD_SERVER_}?module=resourceapi&act=procResourceapiDownload&package_srl={$dep->package_srl}">{$lang->cmd_download}</a> ({$lang->path}: {$dep->path})
<a href="{$module_config->download_server}?module=resourceapi&act=procResourceapiDownload&package_srl={$dep->package_srl}">{$lang->cmd_download}</a> ({$lang->path}: {$dep->path})
</block>
</li>
</ul>
@ -46,7 +46,7 @@
<block cond="$show_ftp_note" >
<p>{$lang->description_download}. (<a href="{getUrl('', 'module', 'admin', 'act', 'dispAdminConfigFtp')}">FTP Setup</a>)</p>
<p>{$lang->path}: {$package->path}</p>
<p><a class="x_btn x_btn-primary x_pull-right" href="{_XE_DOWNLOAD_SERVER_}?module=resourceapi&act=procResourceapiDownload&package_srl={$package->package_srl}">{$lang->cmd_download}</a>
<p><a class="x_btn x_btn-primary x_pull-right" href="{$module_config->download_server}?module=resourceapi&act=procResourceapiDownload&package_srl={$package->package_srl}">{$lang->cmd_download}</a>
</block>
</div>
<div cond="!$show_ftp_note">

View file

@ -52,8 +52,12 @@ html {
.light_dark(default);
}
body.cke_editable {
width: unset;
height: unset;
min-width: unset;
min-height: 100vh;
box-sizing: border-box;
margin: 0;
padding: 10px;
.light_dark(@colorset);
}
@ -88,7 +92,7 @@ p.editor_autosaved_message.autosave_message {
}
.xe_content.editable, .rhymix_content.editable {
.xe_content.editable, .rhymix_content.editable, .cke_wysiwyg_div {
.cont_font(@content_font);
.cont_fontsize(@content_font_size);
.cont_lineheight(@content_line_height);

View file

@ -158,6 +158,7 @@ var auto_saved_msg = "{$lang->msg_auto_saved}";
settings.ckeconfig.removePlugins = (settings.ckeconfig.removePlugins ? (settings.ckeconfig.removePlugins + ',') : '') + 'enterkey';
settings.loadXeComponent = false;
var additional_styles = '.cke_wysiwyg_div { padding: 8px !important; }';
additional_styles += 'html { min-width: unset; min-height: unset; width: unset; height: unset; margin: unset; padding: unset; }';
$('head').append('<st' + 'yle>' + additional_styles + String(css_content).replace(/\.xe_content\.editable/g, '.cke_wysiwyg_div') + '</st' + 'yle>');
}

View file

@ -32,9 +32,7 @@ class fileAdminView extends file
$args->module_srl = Context::get('module_srl');
// Get a list
$oFileAdminModel = getAdminModel('file');
$columnList = array('file_srl', 'upload_target_srl', 'upload_target_type', 'sid', 'files.module_srl'
, 'source_filename', 'isvalid', 'file_size', 'download_count', 'files.regdate', 'files.ipaddress', 'member.member_srl', 'member.nick_name', 'uploaded_filename');
$output = $oFileAdminModel->getFileList($args, $columnList);
$output = $oFileAdminModel->getFileList($args);
// Get the document for looping a list
if($output->data)

View file

@ -9,6 +9,7 @@
</tables>
<columns>
<column name="files.*" />
<column name="member.nick_name" />
</columns>
<conditions>
<condition operation="in" column="files.module_srl" var="s_module_srl" />

View file

@ -326,6 +326,9 @@ class menuAdminModel extends menu
Context::loadLang('modules/page/lang');
$oAutoinstallAdminModel = getAdminModel('autoinstall');
$config = $oAutoinstallAdminModel->getAutoInstallAdminModuleConfig();
foreach($_allModules as $module_name)
{
$module = $oModuleModel->getModuleInfoXml($module_name);
@ -345,9 +348,8 @@ class menuAdminModel extends menu
$module->defaultMobileSkin = new stdClass();
$module->defaultMobileSkin->skin = $defaultMobileSkin;
$module->defaultMobileSkin->title = $mobileSkinInfo->title ? $mobileSkinInfo->title : $defaultMobileSkin;
$module->package_srl = $oAutoinstallModel->getPackageSrlByPath('./modules/' . $module_name);
$module->url = _XE_LOCATION_SITE_ . '?mid=download&package_srl=' . $module->package_srl;
$module->url = $config->location_site . '?mid=download&package_srl=' . $module->package_srl;
if($module_name == 'page')
{

View file

@ -93,7 +93,7 @@ $lang->about_list_count = 'You can limit the number of article to show on one pa
$lang->about_search_list_count = 'You may set the number of articles to be exposed when you use search or category function. (default is 20)';
$lang->about_page_count = 'You can set the number of page links to move pages in a bottom of the page. (default is 10)';
$lang->about_mobile_page_count = 'You can set the number of page links to move pages in a bottom of the page. (default is 5)';
$lang->about_admin_id = 'You can grant a manager to have all permissions to the module.';
$lang->about_admin_id = 'You can grant someone permission to manage this module. Please enter the user ID or email address of the person you wish to add.';
$lang->about_grant_deatil = 'Registered users mean users who signed-up to the virtual sites (e.g., cafeXE).';
$lang->about_module = 'Rhymix consists of modules except the basic library. [Module Manage] module will show all installed modules and help you to manage them.';
$lang->about_extra_vars_default_value = 'This is only for select,checkbox and radio button. If multiple default values are needed, you can link them with comma.';

View file

@ -91,7 +91,7 @@ $lang->about_list_count = '한 페이지에 표시될 글 수를 지정할 수
$lang->about_search_list_count = '검색, 카테고리 선택 등을 할 경우 표시될 글 수를 지정할 수 있습니다. (기본 20개)';
$lang->about_page_count = '목록 하단, 페이지를 이동하는 링크 수를 지정할 수 있습니다. (기본 10개)';
$lang->about_mobile_page_count = '목록 하단, 페이지를 이동하는 링크 수를 지정할 수 있습니다. (기본 5개)';
$lang->about_admin_id = '해당 모듈에 대해 최고 권한을 가지는 관리자를 지정할 수 있습니다.';
$lang->about_admin_id = '특정 회원에게 이 모듈의 관리 권한을 부여할 수 있습니다. 권한을 부여할 회원의 아이디 또는 이메일 주소를 입력해 주세요.';
$lang->about_grant_deatil = '가입한 사용자는 cafeXE 등 분양형 가상 사이트에 가입을 한 로그인 사용자를 의미합니다.';
$lang->about_module = 'Rhymix는 기본 라이브러리를 제외한 나머지는 모두 모듈로 구성되어 있습니다. 모듈 관리 모듈은 설치된 모든 모듈을 보여주고 관리를 돕습니다.';
$lang->about_extra_vars_default_value = '다중/단일 선택 등 기본 값이 여러 개가 필요한 경우 , (콤마)로 연결하면 됩니다.';

View file

@ -283,6 +283,10 @@ class moduleAdminController extends module
$columnList = array('module_srl', 'module');
$module_info = $oModuleModel->getModuleInfoByModuleSrl($module_srl, $columnList);
if(!$module_info) throw new Rhymix\Framework\Exceptions\InvalidRequest;
$oDB = DB::getInstance();
$oDB->begin();
// Register Admin ID
$oModuleController->deleteAdminId($module_srl);
$admin_member = Context::get('admin_member');
@ -296,11 +300,10 @@ class moduleAdminController extends module
$oModuleController->insertAdminId($module_srl, $admin_id);
}
}
// List permissions
$xml_info = $oModuleModel->getModuleActionXML($module_info->module);
$grant_list = $xml_info->grant;
$grant_list->access = new stdClass();
$grant_list->access->default = 'guest';
$grant_list->manager = new stdClass();
@ -353,6 +356,8 @@ class moduleAdminController extends module
}
}
$oDB->commit();
Rhymix\Framework\Cache::delete("site_and_module:module_grants:$module_srl");
$this->setMessage('success_registed');
}

View file

@ -795,21 +795,26 @@ class moduleController extends module
*/
function insertAdminId($module_srl, $admin_id)
{
$member_config = MemberModel::getMemberConfig();
if($member_config->identifier == 'email_address')
if (strpos($admin_id, '@') !== false)
{
$member_info = MemberModel::getMemberInfoByEmailAddress($admin_id);
}
else
{
$member_info = MemberModel::getMemberInfoByUserID($admin_id);
if(!$member_info->member_srl) return;
Rhymix\Framework\Cache::delete("site_and_module:module_admins:$module_srl");
}
if (!$member_info || !$member_info->member_srl)
{
return;
}
$args = new stdClass();
$args->module_srl = $module_srl;
$args->module_srl = intval($module_srl);
$args->member_srl = $member_info->member_srl;
return executeQuery('module.insertAdminId', $args);
$output = executeQuery('module.insertAdminId', $args);
Rhymix\Framework\Cache::delete("site_and_module:module_admins:" . intval($module_srl));
return $output;
}
/**
@ -818,17 +823,27 @@ class moduleController extends module
function deleteAdminId($module_srl, $admin_id = '')
{
$args = new stdClass();
$args->module_srl = $module_srl;
$args->module_srl = intval($module_srl);
if($admin_id)
{
$member_info = MemberModel::getMemberInfoByUserID($admin_id);
if($member_info->member_srl) $args->member_srl = $member_info->member_srl;
if (strpos($admin_id, '@') !== false)
{
$member_info = MemberModel::getMemberInfoByEmailAddress($admin_id);
}
else
{
$member_info = MemberModel::getMemberInfoByUserID($admin_id);
}
if ($member_info && $member_info->member_srl)
{
$args->member_srl = $member_info->member_srl;
}
}
Rhymix\Framework\Cache::delete("site_and_module:module_admins:$module_srl");
return executeQuery('module.deleteAdminId', $args);
$output = executeQuery('module.deleteAdminId', $args);
Rhymix\Framework\Cache::delete("site_and_module:module_admins:" . intval($module_srl));
return $output;
}
/**

View file

@ -107,7 +107,7 @@ function doInsertAdmin() {
sel_obj.options[sel_obj.options.length] = opt;
fo_obj.admin_id.value = '';
sel_obj.size = sel_obj.options.length;
sel_obj.size = Math.max(3, sel_obj.options.length);
sel_obj.selectedIndex = -1;
var members = new Array();
@ -125,7 +125,7 @@ function doDeleteAdmin() {
var sel_obj = fo_obj._admin_member;
sel_obj.remove(sel_obj.selectedIndex);
sel_obj.size = sel_obj.options.length;
sel_obj.size = Math.max(3, sel_obj.options.length);
sel_obj.selectedIndex = -1;
var members = new Array();

View file

@ -20,18 +20,17 @@
</label>
<div class="x_controls">
<div class="x_input-append" style="margin-bottom:8px">
<select name="_admin_member" multiple="multiple" size="{count($admin_member)?count($admin_member):1}">
<input type="text" name="admin_id" />
<button class="x_btn" type="button" onclick="doInsertAdmin()">{$lang->cmd_insert}</button>
</div><br />
<div class="x_input-append" style="margin-bottom:8px">
<select name="_admin_member" multiple="multiple" size="{max(3, count($admin_member))}">
<option loop="$admin_member => $key, $val" value="{$val->email_address}"|cond="$member_config->identifier=='email_address'" value="{$val->user_id}"|cond="$member_config->identifier!='email_address'">
{$val->nick_name} (<block cond="$member_config->identifier=='email_address'">{$val->email_address}</block><block cond="$member_config->identifier!='email_address'">{$val->user_id}</block>)
</option>
</select>
<button class="x_btn" type="button" onclick="doDeleteAdmin()">{$lang->cmd_delete}</button>
</div>
<br>
<div class="x_input-append">
<input type="text" name="admin_id" />
<button class="x_btn" type="button" onclick="doInsertAdmin()">{$lang->cmd_insert}</button>
</div>
</div><br />
<p id="adminListHelp" class="x_help-block">{$lang->about_admin_id}</p>
</div>
</div>

View file

@ -920,7 +920,7 @@ class ncenterliteController extends ncenterlite
}
}
}
else if($oModule->act == 'dispBoardContent')
elseif(preg_match('/^disp[A-Z][a-z0-9_]+Content$/', $oModule->act))
{
$document_srl = Context::get('document_srl');
$oDocument = Context::get('oDocument');

View file

@ -184,9 +184,9 @@ class FrontEndFileHandlerTest extends \Codeception\TestCase\Test
$result = $handler->getCssFileList(true);
$this->assertEquals(4, count($result));
$this->assertRegexp('/combined\/[0-9a-f]+\.css\?\d+$/', $result[0]['file']);
$this->assertEquals('http://external.host/style.css', $result[1]['file']);
$this->assertEquals('/rhymix/common/css/bootstrap.css' . $this->_filemtime('common/css/bootstrap.css'), $result[2]['file']);
$this->assertEquals('IE', $result[2]['targetie']);
$this->assertEquals('/rhymix/common/css/bootstrap.css' . $this->_filemtime('common/css/bootstrap.css'), $result[1]['file']);
$this->assertEquals('IE', $result[1]['targetie']);
$this->assertEquals('http://external.host/style.css', $result[2]['file']);
$this->assertRegexp('/combined\/[0-9a-f]+\.css\?\d+$/', $result[3]['file']);
});

File diff suppressed because it is too large Load diff