mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-03 16:51:40 +09:00
쉬운설치 개선
This commit is contained in:
parent
c3d40f733d
commit
2e523370d7
9 changed files with 125 additions and 7 deletions
|
|
@ -141,8 +141,8 @@ 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('_XE_LOCATION_SITE_', 'https://xe1.xpressengine.com/');
|
||||
//define('_XE_DOWNLOAD_SERVER_', 'https://download.xpressengine.com/');
|
||||
define('__DEBUG__', 0);
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -16,7 +16,12 @@ class autoinstallAdminController extends autoinstall
|
|||
*/
|
||||
function init()
|
||||
{
|
||||
|
||||
$oModuleModel = getModel('module');
|
||||
$module_info = $oModuleModel->getModuleConfig('autoinstall');
|
||||
$location_site = $module_info->location_site;
|
||||
$download_server = $module_info->download_server;
|
||||
define('_XE_LOCATION_SITE_', $location_site ? $location_site : 'https://xe1.xpressengine.com/');
|
||||
define('_XE_DOWNLOAD_SERVER_', $download_server ? $download_server : 'https://download.xpressengine.com/');
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -413,6 +418,34 @@ class autoinstallAdminController extends autoinstall
|
|||
return new BaseObject();
|
||||
}
|
||||
|
||||
function procAutoinstallAdminInsertConfig()
|
||||
{
|
||||
$args = new stdClass();
|
||||
$args->location_site = Context::get('location_site');
|
||||
$args->download_server = Context::get('download_server');
|
||||
|
||||
$oModuleController = getController('module');
|
||||
$output = $oModuleController->updateModuleConfig('autoinstall', $args);
|
||||
|
||||
// init. autoinstall DB data
|
||||
$oDB = DB::getInstance();
|
||||
// truncate table rx_ai_installed_packages
|
||||
$sql_a = 'truncate table '.$oDB->prefix.'ai_installed_packages';
|
||||
$oDB->_query($sql_a);
|
||||
// truncate table rx_ai_remote_categories
|
||||
$sql_b = 'truncate table '.$oDB->prefix.'ai_remote_categories';
|
||||
$oDB->_query($sql_b);
|
||||
// truncate table rx_autoinstall_packages
|
||||
$sql_c = 'truncate table '.$oDB->prefix.'autoinstall_packages';
|
||||
$oDB->_query($sql_c);
|
||||
|
||||
// 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 */
|
||||
|
|
|
|||
|
|
@ -27,6 +27,13 @@ class autoinstallAdminView extends autoinstall
|
|||
*/
|
||||
function init()
|
||||
{
|
||||
$oModuleModel = getModel('module');
|
||||
$module_info = $oModuleModel->getModuleConfig('autoinstall');
|
||||
$location_site = $module_info->location_site;
|
||||
$download_server = $module_info->download_server;
|
||||
define('_XE_LOCATION_SITE_', $location_site ? $location_site : 'https://xe1.xpressengine.com/');
|
||||
define('_XE_DOWNLOAD_SERVER_', $download_server ? $download_server : 'https://download.xpressengine.com/');
|
||||
|
||||
$template_path = sprintf("%stpl/", $this->module_path);
|
||||
Context::set('original_site', _XE_LOCATION_SITE_);
|
||||
Context::set('uri', _XE_DOWNLOAD_SERVER_);
|
||||
|
|
@ -202,7 +209,17 @@ class autoinstallAdminView extends autoinstall
|
|||
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($v->current_version < $v->item_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)
|
||||
|
|
@ -216,7 +233,11 @@ class autoinstallAdminView extends autoinstall
|
|||
|
||||
if($v->type == "core")
|
||||
{
|
||||
continue;
|
||||
// if default, hide core
|
||||
if(strpos(_XE_DOWNLOAD_SERVER_, 'xpressengine.com')!==false)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
}
|
||||
else if($v->type == "module")
|
||||
{
|
||||
|
|
@ -583,6 +604,17 @@ class autoinstallAdminView extends autoinstall
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Display config
|
||||
*
|
||||
*/
|
||||
function dispAutoinstallAdminConfig()
|
||||
{
|
||||
$oModuleModel = getModel('module');
|
||||
$module_info = $oModuleModel->getModuleConfig('autoinstall');
|
||||
Context::set('config', $module_info);
|
||||
$this->setTemplateFile('config');
|
||||
}
|
||||
}
|
||||
/* End of file autoinstall.admin.view.php */
|
||||
/* Location: ./modules/autoinstall/autoinstall.admin.view.php */
|
||||
|
|
|
|||
|
|
@ -6,7 +6,8 @@
|
|||
<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" />
|
||||
|
|
@ -16,6 +17,8 @@
|
|||
<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">
|
||||
|
|
|
|||
|
|
@ -53,3 +53,9 @@ $lang->typename['m.skin'] = 'Mobile Skin';
|
|||
$lang->typename['skin'] = 'Skin';
|
||||
$lang->typename['widgetstyle'] = 'Widget style';
|
||||
$lang->typename['style'] = 'Document style';
|
||||
|
||||
$lang->config = 'Config';
|
||||
$lang->location_site = 'Location Site';
|
||||
$lang->about_location_site = 'Please type your location site. ex)https://xe1.xpressengine.com/';
|
||||
$lang->download_server = 'Download Server';
|
||||
$lang->about_download_server = 'Please type your download server. ex)https://download.xpressengine.com/';
|
||||
|
|
@ -55,3 +55,9 @@ $lang->typename['m.skin'] = '모바일 스킨';
|
|||
$lang->typename['skin'] = '스킨';
|
||||
$lang->typename['widgetstyle'] = '위젯스타일';
|
||||
$lang->typename['style'] = '문서스타일';
|
||||
|
||||
$lang->config = '설정';
|
||||
$lang->location_site = '로케이션 사이트';
|
||||
$lang->about_location_site = '로케이션 사이트를 입력해 주세요. 예)https://xe1.xpressengine.com/';
|
||||
$lang->download_server = '다운로드 서버';
|
||||
$lang->about_download_server = '다운로드 서버를 입력해 주세요. 예)https://download.xpressengine.com/';
|
||||
|
|
@ -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('config')}</a></li>
|
||||
</ul>
|
||||
|
||||
<nav cond="$act == 'dispAutoinstallAdminIndex'" class="x_thumbnail x_clearfix category">
|
||||
|
|
|
|||
36
modules/autoinstall/tpl/config.html
Normal file
36
modules/autoinstall/tpl/config.html
Normal 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 ? $config->location_site : 'https://xe1.xpressengine.com/'}" />
|
||||
<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 ? $config->download_server : 'https://download.xpressengine.com/'}" />
|
||||
<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>
|
||||
|
||||
|
|
@ -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" />
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue