add getUpdateUrlBy...(), add process for return url when package install

git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@8647 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
flyskyko 2011-07-26 08:00:00 +00:00
parent 29e7c3b35b
commit 7aebc36fb5
12 changed files with 57 additions and 14 deletions

View file

@ -159,7 +159,15 @@
$this->_updateinfo();
$this->setMessage('success_installed', 'update');
$this->setRedirectUrl(preg_replace('/act=[^&]*/', 'act=dispAutoinstallAdminIndex', Context::get('error_return_url')));
if (Context::get('return_url'))
{
$this->setRedirectUrl(Context::get('return_url'));
}
else
{
$this->setRedirectUrl(preg_replace('/act=[^&]*/', 'act=dispAutoinstallAdminIndex', Context::get('error_return_url')));
}
}
function updatePackages(&$xmlDoc)

View file

@ -303,16 +303,6 @@
$config_file = $oModel->getConfigFilePath($type);
if(!$config_file) return $this->stop("msg_invalid_request");
// $xml = new XmlParser();
// $xmlDoc = $xml->loadXmlFile(FileHandler::getRealPath($path).$config_file);
// if(!$xmlDoc) return $this->stop("msg_invalid_request");
// if($type == "drcomponent") $type = "component";
// if($type == "style") $type = "skin";
// $title = $xmlDoc->{$type}->title->body;
// $installedPackage->title = $title;
// $installedPackage->type = $type;
// Context::set('package', $installedPackage);
$params["act"] = "getResourceapiPackages";
$params["package_srls"] = $package_srl;
$body = XmlGenerater::generate($params);

View file

@ -189,10 +189,22 @@
if(substr($path,-1) == '/') $path = substr($path, 0, strlen($path)-1);
$args->path = $path;
$output = executeQuery('autoinstall.getPackageSrlByPath', $args);
if (!$GLOBLAS['XE_AUTOINSTALL_PACKAGE_SRL_BY_PATH'][$path])
{
$args->path = $path;
$output = executeQuery('autoinstall.getPackageSrlByPath', $args);
return $output->data->package_srl;
$GLOBLAS['XE_AUTOINSTALL_PACKAGE_SRL_BY_PATH'][$path] = $output->data->package_srl;
}
return $GLOBLAS['XE_AUTOINSTALL_PACKAGE_SRL_BY_PATH'][$path];
}
function getRemoveUrlByPackageSrl($packageSrl)
{
if (!$packageSrl) return;
return getUrl('', 'module', 'admin', 'act', 'dispAutoinstallAdminUninstall', 'package_srl', $packageSrl);
}
function getRemoveUrlByPath($path)
@ -205,5 +217,21 @@
return getUrl('', 'module', 'admin', 'act', 'dispAutoinstallAdminUninstall', 'package_srl', $packageSrl);
}
function getUpdateUrlByPackageSrl($packageSrl)
{
if (!$packageSrl) return;
return getUrl('', 'module', 'admin', 'act', 'dispAutoinstallAdminInstall', 'package_srl', $packageSrl);
}
function getUpdateUrlByPath($path)
{
if (!$path) return;
$packageSrl = $this->getPackageSrlByPath($path);
if (!$packageSrl) return;
return getUrl('', 'module', 'admin', 'act', 'dispAutoinstallAdminInstall', 'package_srl', $packageSrl);
}
}
?>

View file

@ -35,4 +35,6 @@
$lang->ftp_password = 'FTP password';
$lang->msg_dependency_package = 'Can not remove this package because there exists another package dependent on this.';
$lang->dependant_list = "Dependant package list of the current package";
$lang->msg_avail_update = 'There is available update for this item.';
$lang->msg_do_you_like_update = 'Would you like to update?';
?>

View file

@ -34,4 +34,6 @@
$lang->ftp_password = 'FTP password';
$lang->msg_dependency_package = 'Can not remove this package because there exists another package dependent on this.';
$lang->dependant_list = "このパッケージに依存するパッケージのリスト";
$lang->msg_avail_update = 'There is available update for this item.';
$lang->msg_do_you_like_update = 'Would you like to update?';
?>

View file

@ -34,4 +34,6 @@
$lang->ftp_password = 'FTP 비밀번호';
$lang->msg_dependency_package = '이 패키지를 의존하고 있는 다른 패키지가 있기 때문에 삭제할 수 없습니다.';
$lang->dependant_list = "이 패키지에 의존하는 패키지 목록";
$lang->msg_avail_update = '이 항목 업데이트가 가능합니다.';
$lang->msg_do_you_like_update = '업데이트 하시겠습니까?';
?>

View file

@ -34,4 +34,6 @@
$lang->ftp_password = 'FTP password';
$lang->msg_dependency_package = 'Can not remove this package because there exists another package dependent on this.';
$lang->dependant_list = "Dependant package list of the current package";
$lang->msg_avail_update = 'There is available update for this item.';
$lang->msg_do_you_like_update = 'Would you like to update?';
?>

View file

@ -34,4 +34,6 @@
$lang->ftp_password = 'FTP password';
$lang->msg_dependency_package = 'Can not remove this package because there exists another package dependent on this.';
$lang->dependant_list = "Mevcut pakete bağlı paket listesi";
$lang->msg_avail_update = 'There is available update for this item.';
$lang->msg_do_you_like_update = 'Would you like to update?';
?>

View file

@ -34,4 +34,6 @@
$lang->ftp_password = 'FTP password';
$lang->msg_dependency_package = 'Can not remove this package because there exists another package dependent on this.';
$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_do_you_like_update = 'Would you like to update?';
?>

View file

@ -34,4 +34,6 @@
$lang->ftp_password = 'FTP password';
$lang->msg_dependency_package = 'Can not remove this package because there exists another package dependent on this.';
$lang->dependant_list = "联动数据包列表";
$lang->msg_avail_update = 'There is available update for this item.';
$lang->msg_do_you_like_update = 'Would you like to update?';
?>

View file

@ -35,4 +35,6 @@
$lang->ftp_password = 'FTP password';
$lang->msg_dependency_package = 'Can not remove this package because there exists another package dependent on this.';
$lang->dependant_list = "與此程式相關程式列表";
$lang->msg_avail_update = 'There is available update for this item.';
$lang->msg_do_you_like_update = 'Would you like to update?';
?>

View file

@ -32,6 +32,7 @@
<input type="hidden" name="module" value="autoinstall" />
<input type="hidden" name="act" value="procAutoinstallAdminPackageinstall" />
<input type="hidden" name="package_srl" value="{$package->package_srl}" />
<input type="hidden" name="return_url" value="{$return_url}" />
<input cond="!$need_password" type="hidden" name="ftp_password" value="dummy" />
<block cond="$need_password">