mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-09 20:12:14 +09:00
fix connection failed when view empty category, add list order column, add detecting change of package.inc.php
git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@8738 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
aa7b7de8f5
commit
b574bdffe9
17 changed files with 99 additions and 32 deletions
|
|
@ -210,12 +210,14 @@
|
||||||
{
|
{
|
||||||
$xmlDoc->response->categorylist->item = array($xmlDoc->response->categorylist->item);
|
$xmlDoc->response->categorylist->item = array($xmlDoc->response->categorylist->item);
|
||||||
}
|
}
|
||||||
|
$list_order = 0;
|
||||||
foreach($xmlDoc->response->categorylist->item as $item)
|
foreach($xmlDoc->response->categorylist->item as $item)
|
||||||
{
|
{
|
||||||
$args = null;
|
$args = null;
|
||||||
$args->category_srl = $item->category_srl->body;
|
$args->category_srl = $item->category_srl->body;
|
||||||
$args->parent_srl = $item->parent_srl->body;
|
$args->parent_srl = $item->parent_srl->body;
|
||||||
$args->title = $item->title->body;
|
$args->title = $item->title->body;
|
||||||
|
$args->list_order = $list_order++;
|
||||||
$output = executeQuery("autoinstall.insertCategory", $args);
|
$output = executeQuery("autoinstall.insertCategory", $args);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -229,6 +229,11 @@
|
||||||
$lUpdateDoc = $xml_lUpdate->parse($buff);
|
$lUpdateDoc = $xml_lUpdate->parse($buff);
|
||||||
$updateDate = $lUpdateDoc->response->updatedate->body;
|
$updateDate = $lUpdateDoc->response->updatedate->body;
|
||||||
|
|
||||||
|
if (!$updateDate)
|
||||||
|
{
|
||||||
|
return $this->stop('msg_connection_fail');
|
||||||
|
}
|
||||||
|
|
||||||
$oModel = &getModel('autoinstall');
|
$oModel = &getModel('autoinstall');
|
||||||
$item = $oModel->getLatestPackage();
|
$item = $oModel->getLatestPackage();
|
||||||
if(!$item || $item->updatedate < $updateDate || count($this->categories) < 1)
|
if(!$item || $item->updatedate < $updateDate || count($this->categories) < 1)
|
||||||
|
|
@ -323,7 +328,7 @@
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
return $this->stop('Connection failed');
|
return $this->stop('msg_connection_fail');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -33,10 +33,24 @@
|
||||||
class autoinstall extends ModuleObject {
|
class autoinstall extends ModuleObject {
|
||||||
var $tmp_dir = './files/cache/autoinstall/';
|
var $tmp_dir = './files/cache/autoinstall/';
|
||||||
|
|
||||||
|
function autoinstall()
|
||||||
|
{
|
||||||
|
$oModuleModel = &getModel('module');
|
||||||
|
$config = $oModuleModel->getModuleConfig('autoinstall');
|
||||||
|
if ($config->downloadServer != _XE_DOWNLOAD_SERVER_)
|
||||||
|
{
|
||||||
|
$this->stop('msg_not_match_server');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief for additional tasks required when installing
|
* @brief for additional tasks required when installing
|
||||||
**/
|
**/
|
||||||
function moduleInstall() {
|
function moduleInstall() {
|
||||||
|
$oModuleController = &getController('module');
|
||||||
|
|
||||||
|
$config->downloadServer = _XE_DOWNLOAD_SERVER_;
|
||||||
|
$oModuleController->insertModuleConfig('autoinstall', $config);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -44,6 +58,8 @@
|
||||||
**/
|
**/
|
||||||
function checkUpdate() {
|
function checkUpdate() {
|
||||||
$oDB =& DB::getInstance();
|
$oDB =& DB::getInstance();
|
||||||
|
$oModuleModel = &getModel('module');
|
||||||
|
|
||||||
if(!file_exists(FileHandler::getRealPath("./modules/autoinstall/schemas/autoinstall_installed_packages.xml"))
|
if(!file_exists(FileHandler::getRealPath("./modules/autoinstall/schemas/autoinstall_installed_packages.xml"))
|
||||||
&& $oDB->isTableExists("autoinstall_installed_packages"))
|
&& $oDB->isTableExists("autoinstall_installed_packages"))
|
||||||
{
|
{
|
||||||
|
|
@ -55,6 +71,13 @@
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 2011.08.08 add column 'list_order' in ai_remote_categories
|
||||||
|
if (!$oDB->isColumnExists('ai_remote_categories', 'list_order')) return true;
|
||||||
|
|
||||||
|
// 2011.08.08 set _XE_DOWNLOAD_SERVER_ at module config
|
||||||
|
$config = $oModuleModel->getModuleConfig('autoinstall');
|
||||||
|
if (!isset($config->downloadServer)) return true;
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -63,6 +86,9 @@
|
||||||
**/
|
**/
|
||||||
function moduleUpdate() {
|
function moduleUpdate() {
|
||||||
$oDB =& DB::getInstance();
|
$oDB =& DB::getInstance();
|
||||||
|
$oModuleModel = &getModel('module');
|
||||||
|
$oModuleController = &getController('module');
|
||||||
|
|
||||||
if(!file_exists(FileHandler::getRealPath("./modules/autoinstall/schemas/autoinstall_installed_packages.xml"))
|
if(!file_exists(FileHandler::getRealPath("./modules/autoinstall/schemas/autoinstall_installed_packages.xml"))
|
||||||
&& $oDB->isTableExists("autoinstall_installed_packages"))
|
&& $oDB->isTableExists("autoinstall_installed_packages"))
|
||||||
{
|
{
|
||||||
|
|
@ -73,6 +99,21 @@
|
||||||
{
|
{
|
||||||
$oDB->dropTable("autoinstall_remote_categories");
|
$oDB->dropTable("autoinstall_remote_categories");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 2011.08.08 add column 'list_order' in 'ai_remote_categories
|
||||||
|
if (!$oDB->isColumnExists('ai_remote_categories', 'list_order'))
|
||||||
|
{
|
||||||
|
$oDB->addColumn('ai_remote_categories', 'list_order', 'number', 11, null, true);
|
||||||
|
$oDB->addIndex('ai_remote_categories', 'idx_list_order', array('list_order'));
|
||||||
|
}
|
||||||
|
|
||||||
|
// 2011. 08. 08 set _XE_DOWNLOAD_SERVER_ at module config
|
||||||
|
$config = $oModuleModel->getModuleConfig('autoinstall');
|
||||||
|
if (!isset($config->downloadServer)){
|
||||||
|
$config->downloadServer = _XE_DOWNLOAD_SERVER_;
|
||||||
|
$oModuleController->insertModuleConfig('autoinstall', $config);
|
||||||
|
}
|
||||||
|
|
||||||
return new Object(0, 'success_updated');
|
return new Object(0, 'success_updated');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -72,7 +72,7 @@
|
||||||
if(!method_exists($oModule, "moduleUninstall")) return new Object(-1, 'msg_invalid_request');
|
if(!method_exists($oModule, "moduleUninstall")) return new Object(-1, 'msg_invalid_request');
|
||||||
|
|
||||||
$output = $oModule->moduleUninstall();
|
$output = $oModule->moduleUninstall();
|
||||||
if(!$output->toBool()) return $output;
|
if(is_subclass_of($output, 'Object') && !$output->toBool()) return $output;
|
||||||
|
|
||||||
$schema_dir = sprintf('%s/schemas/', $this->package->path);
|
$schema_dir = sprintf('%s/schemas/', $this->package->path);
|
||||||
$schema_files = FileHandler::readDir($schema_dir);
|
$schema_files = FileHandler::readDir($schema_dir);
|
||||||
|
|
|
||||||
|
|
@ -37,4 +37,6 @@
|
||||||
$lang->dependant_list = "Dependant package list of the current package";
|
$lang->dependant_list = "Dependant package list of the current package";
|
||||||
$lang->msg_avail_update = 'There is available update for this item.';
|
$lang->msg_avail_update = 'There is available update for this item.';
|
||||||
$lang->msg_do_you_like_update = 'Would you like to update?';
|
$lang->msg_do_you_like_update = 'Would you like to update?';
|
||||||
|
$lang->msg_connection_fail = 'Connection failed.';
|
||||||
|
$lang->msg_not_match_server = 'Server settings are incorrect.';
|
||||||
?>
|
?>
|
||||||
|
|
|
||||||
|
|
@ -36,4 +36,6 @@
|
||||||
$lang->dependant_list = "このパッケージに依存するパッケージのリスト";
|
$lang->dependant_list = "このパッケージに依存するパッケージのリスト";
|
||||||
$lang->msg_avail_update = 'There is available update for this item.';
|
$lang->msg_avail_update = 'There is available update for this item.';
|
||||||
$lang->msg_do_you_like_update = 'Would you like to update?';
|
$lang->msg_do_you_like_update = 'Would you like to update?';
|
||||||
|
$lang->msg_connection_fail = 'Connection failed.';
|
||||||
|
$lang->msg_not_match_server = 'Server settings are incorrect.';
|
||||||
?>
|
?>
|
||||||
|
|
|
||||||
|
|
@ -36,4 +36,6 @@
|
||||||
$lang->dependant_list = "이 패키지에 의존하는 패키지 목록";
|
$lang->dependant_list = "이 패키지에 의존하는 패키지 목록";
|
||||||
$lang->msg_avail_update = '이 항목 업데이트가 가능합니다.';
|
$lang->msg_avail_update = '이 항목 업데이트가 가능합니다.';
|
||||||
$lang->msg_do_you_like_update = '업데이트 하시겠습니까?';
|
$lang->msg_do_you_like_update = '업데이트 하시겠습니까?';
|
||||||
|
$lang->msg_connection_fail = '서버 접속이 원할하지 않습니다.';
|
||||||
|
$lang->msg_not_match_server = '서버 설정이 올바르지 않습니다.';
|
||||||
?>
|
?>
|
||||||
|
|
|
||||||
|
|
@ -36,4 +36,6 @@
|
||||||
$lang->dependant_list = "Dependant package list of the current package";
|
$lang->dependant_list = "Dependant package list of the current package";
|
||||||
$lang->msg_avail_update = 'There is available update for this item.';
|
$lang->msg_avail_update = 'There is available update for this item.';
|
||||||
$lang->msg_do_you_like_update = 'Would you like to update?';
|
$lang->msg_do_you_like_update = 'Would you like to update?';
|
||||||
|
$lang->msg_connection_fail = 'Connection failed.';
|
||||||
|
$lang->msg_not_match_server = 'Server settings are incorrect.';
|
||||||
?>
|
?>
|
||||||
|
|
|
||||||
|
|
@ -36,4 +36,6 @@
|
||||||
$lang->dependant_list = "Mevcut pakete bağlı paket listesi";
|
$lang->dependant_list = "Mevcut pakete bağlı paket listesi";
|
||||||
$lang->msg_avail_update = 'There is available update for this item.';
|
$lang->msg_avail_update = 'There is available update for this item.';
|
||||||
$lang->msg_do_you_like_update = 'Would you like to update?';
|
$lang->msg_do_you_like_update = 'Would you like to update?';
|
||||||
|
$lang->msg_connection_fail = 'Connection failed.';
|
||||||
|
$lang->msg_not_match_server = 'Server settings are incorrect.';
|
||||||
?>
|
?>
|
||||||
|
|
|
||||||
|
|
@ -36,4 +36,6 @@
|
||||||
$lang->dependant_list = "Gói cài đặt này phụ thuộc vào các gói khác trong danh sách";
|
$lang->dependant_list = "Gói cài đặt này phụ thuộc vào các gói khác trong danh sách";
|
||||||
$lang->msg_avail_update = 'There is available update for this item.';
|
$lang->msg_avail_update = 'There is available update for this item.';
|
||||||
$lang->msg_do_you_like_update = 'Would you like to update?';
|
$lang->msg_do_you_like_update = 'Would you like to update?';
|
||||||
|
$lang->msg_connection_fail = 'Connection failed.';
|
||||||
|
$lang->msg_not_match_server = 'Server settings are incorrect.';
|
||||||
?>
|
?>
|
||||||
|
|
|
||||||
|
|
@ -36,4 +36,6 @@
|
||||||
$lang->dependant_list = "联动数据包列表";
|
$lang->dependant_list = "联动数据包列表";
|
||||||
$lang->msg_avail_update = 'There is available update for this item.';
|
$lang->msg_avail_update = 'There is available update for this item.';
|
||||||
$lang->msg_do_you_like_update = 'Would you like to update?';
|
$lang->msg_do_you_like_update = 'Would you like to update?';
|
||||||
|
$lang->msg_connection_fail = 'Connection failed.';
|
||||||
|
$lang->msg_not_match_server = 'Server settings are incorrect.';
|
||||||
?>
|
?>
|
||||||
|
|
|
||||||
|
|
@ -37,4 +37,6 @@
|
||||||
$lang->dependant_list = "與此程式相關程式列表";
|
$lang->dependant_list = "與此程式相關程式列表";
|
||||||
$lang->msg_avail_update = 'There is available update for this item.';
|
$lang->msg_avail_update = 'There is available update for this item.';
|
||||||
$lang->msg_do_you_like_update = 'Would you like to update?';
|
$lang->msg_do_you_like_update = 'Would you like to update?';
|
||||||
|
$lang->msg_connection_fail = 'Connection failed.';
|
||||||
|
$lang->msg_not_match_server = 'Server settings are incorrect.';
|
||||||
?>
|
?>
|
||||||
|
|
|
||||||
|
|
@ -5,4 +5,7 @@
|
||||||
<columns>
|
<columns>
|
||||||
<column name="*" />
|
<column name="*" />
|
||||||
</columns>
|
</columns>
|
||||||
|
<navigation>
|
||||||
|
<index default="list_order" var="list_order" order="asc" />
|
||||||
|
</navigation>
|
||||||
</query>
|
</query>
|
||||||
|
|
|
||||||
|
|
@ -6,5 +6,6 @@
|
||||||
<column name="category_srl" var="category_srl" filter="number" notnull="notnull" />
|
<column name="category_srl" var="category_srl" filter="number" notnull="notnull" />
|
||||||
<column name="parent_srl" var="parent_srl" filter="number" notnull="notnull" />
|
<column name="parent_srl" var="parent_srl" filter="number" notnull="notnull" />
|
||||||
<column name="title" var="title" minlength="1" maxlength="250" />
|
<column name="title" var="title" minlength="1" maxlength="250" />
|
||||||
|
<column name="list_order" var="list_order" filter="number" notnull="notnull" />
|
||||||
</columns>
|
</columns>
|
||||||
</query>
|
</query>
|
||||||
|
|
|
||||||
|
|
@ -2,4 +2,5 @@
|
||||||
<column name="category_srl" type="number" size="11" default="0" notnull="notnull" primary_key="primary_key" />
|
<column name="category_srl" type="number" size="11" default="0" notnull="notnull" primary_key="primary_key" />
|
||||||
<column name="parent_srl" type="number" size="11" default="0" notnull="notnull" index="idx_parent_srl" />
|
<column name="parent_srl" type="number" size="11" default="0" notnull="notnull" index="idx_parent_srl" />
|
||||||
<column name="title" type="varchar" size="250" notnull="notnull" />
|
<column name="title" type="varchar" size="250" notnull="notnull" />
|
||||||
|
<column name="list_order" type="number" size="11" notnull="notnull" index="idx_list_order" />
|
||||||
</table>
|
</table>
|
||||||
|
|
|
||||||
|
|
@ -11,11 +11,9 @@
|
||||||
<form action="" method="post">
|
<form action="" method="post">
|
||||||
<input type="hidden" name="module" value="autoinstall" />
|
<input type="hidden" name="module" value="autoinstall" />
|
||||||
<input type="hidden" name="act" value="procAutoinstallAdminUpdateinfo" />
|
<input type="hidden" name="act" value="procAutoinstallAdminUpdateinfo" />
|
||||||
{@$btnUpdate = sprintf('<input type="submit" value="%s" />', $lang->status_update)}
|
{@$btnUpdate = sprintf('<input type="submit" value="%s" class="text" />', $lang->status_update)}
|
||||||
{sprintf($lang->description_update, $btnUpdate)}
|
{sprintf($lang->description_update, $btnUpdate)}
|
||||||
</form>
|
</form>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<block cond="$item_list">
|
|
||||||
<include target="list.html" />
|
<include target="list.html" />
|
||||||
</block>
|
|
||||||
|
|
|
||||||
|
|
@ -68,7 +68,7 @@
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
<div class="search">
|
<div class="search">
|
||||||
<form action="./" class="pagination">
|
<form action="./" class="pagination" cond="$page_navigation">
|
||||||
<input type="hidden" name="error_return_url" value="" />
|
<input type="hidden" name="error_return_url" value="" />
|
||||||
<input type="hidden" name="module" value="{$module}" />
|
<input type="hidden" name="module" value="{$module}" />
|
||||||
<input type="hidden" name="act" value="{$act}" />
|
<input type="hidden" name="act" value="{$act}" />
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue