merge from 1.7.3.5(r13153:r13167)

git-svn-id: http://xe-core.googlecode.com/svn/trunk@13168 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
ngleader 2013-09-29 23:32:39 +00:00
parent cc47d2b247
commit 2d3f149b5a
2042 changed files with 129266 additions and 126243 deletions

View file

@ -1,308 +1,205 @@
<?php
require_once(_XE_PATH_.'modules/autoinstall/autoinstall.lib.php');
require_once(_XE_PATH_ . 'modules/autoinstall/autoinstall.lib.php');
/**
* autoinstall module admin controller class
/**
* autoinstall module admin controller class
*
* @author NHN (developers@xpressengine.com)
*/
class autoinstallAdminController extends autoinstall
{
/**
* Initialization
*/
function init()
{
}
/**
* Check file checksum is equal
*
* @author NHN (developers@xpressengine.com)
**/
class autoinstallAdminController extends autoinstall {
* @param string $file local file path
* @param string $checksum Recieved checksum from server
* @return bool Returns true on equal local checksum and recieved checksum, otherwise false.
*/
function checkFileCheckSum($file, $checksum)
{
$local_checksum = md5_file(FileHandler::getRealPath($file));
return ($local_checksum === $checksum);
}
/**
* Initialization
**/
function init() {
}
/**
* Clean download file
*
* @param object $obj
* @return void
*/
function _cleanDownloaded($obj)
{
FileHandler::removeDir($obj->download_path);
}
/**
* Check file checksum is equal
*
* @param string $file local file path
* @param string $checksum Recieved checksum from server
* @return bool Returns true on equal local checksum and recieved checksum, otherwise false.
*/
function checkFileCheckSum($file, $checksum){
$local_checksum = md5_file(FileHandler::getRealPath($file));
return ($local_checksum === $checksum);
}
/**
* Update easy install information
*
* @return Object
*/
function procAutoinstallAdminUpdateinfo()
{
$this->_updateinfo();
$this->setMessage("success_updated", 'update');
$this->setRedirectUrl(Context::get('error_return_url'));
}
/**
* Clean download file
*
* @param object $obj
* @return void
*/
function _cleanDownloaded($obj){
FileHandler::removeDir($obj->download_path);
}
/**
* Update easy install information
*
* @return Object
*/
function procAutoinstallAdminUpdateinfo()
{
$this->_updateinfo();
$this->setMessage("success_updated", 'update');
$this->setRedirectUrl(Context::get('error_return_url'));
}
/**
* Update easy install information
*
* @return void
*/
function _updateinfo(){
$oModel = &getModel('autoinstall');
$item = $oModel->getLatestPackage();
if($item)
{
$params["updatedate"] = $item->updatedate;
}
$params["act"] = "getResourceapiUpdate";
$body = XmlGenerater::generate($params);
$buff = FileHandler::getRemoteResource(_XE_DOWNLOAD_SERVER_, $body, 3, "POST", "application/xml");
$xml = new XmlParser();
$xmlDoc = $xml->parse($buff);
$this->updateCategory($xmlDoc);
$this->updatePackages($xmlDoc);
$this->checkInstalled();
$oAdminController = &getAdminController('admin');
$output = $oAdminController->cleanFavorite();
/**
* Update easy install information
*
* @return void
*/
function _updateinfo()
{
$oModel = getModel('autoinstall');
$item = $oModel->getLatestPackage();
if($item)
{
$params["updatedate"] = $item->updatedate;
}
/**
* Update installed package information
*
* @return void
*/
function checkInstalled()
{
executeQuery("autoinstall.deleteInstalledPackage");
$oModel =& getModel('autoinstall');
$packages = $oModel->getPackages();
foreach($packages as $package)
{
$real_path = FileHandler::getRealPath($package->path);
if(!file_exists($real_path)) {
continue;
}
$params["act"] = "getResourceapiUpdate";
$body = XmlGenerater::generate($params);
$buff = FileHandler::getRemoteResource(_XE_DOWNLOAD_SERVER_, $body, 3, "POST", "application/xml");
$xml = new XmlParser();
$xmlDoc = $xml->parse($buff);
$this->updateCategory($xmlDoc);
$this->updatePackages($xmlDoc);
$this->checkInstalled();
$type = $oModel->getTypeFromPath($package->path);
if($type == "core")
{
$version = __ZBXE_VERSION__;
}
else
{
$config_file = null;
switch($type)
{
case "m.layout":
$type = "layout";
case "module":
case "addon":
case "layout":
case "widget":
$config_file = "/conf/info.xml";
break;
case "component":
$config_file = "/info.xml";
break;
case "style":
case "m.skin":
$type = "skin";
case "skin":
case "widgetstyle":
$config_file = "/skin.xml";
break;
case "drcomponent":
$config_file = "/info.xml";
$type = "component";
break;
case "theme":
$config_file = "/conf/info.xml";
$type = "theme";
break;
}
if(!$config_file) continue;
$xml = new XmlParser();
$xmlDoc = $xml->loadXmlFile($real_path.$config_file);
if(!$xmlDoc) continue;
$version = $xmlDoc->{$type}->version->body;
}
$oAdminController = getAdminController('admin');
$output = $oAdminController->cleanFavorite();
}
$args = null;
$args->package_srl = $package->package_srl;
$args->version = $package->version;
$args->current_version = $version;
if(version_compare($args->version, $args->current_version, ">"))
{
$args->need_update="Y";
}
else
{
$args->need_update="N";
}
$output = executeQuery("autoinstall.insertInstalledPackage", $args);
}
}
/**
* Install package
*
* @return Object
*/
function procAutoinstallAdminPackageinstall()
{
@set_time_limit(0);
$package_srls = Context::get('package_srl');
$oModel =& getModel('autoinstall');
$packages = explode(',', $package_srls);
$ftp_info = Context::getFTPInfo();
if(!$_SESSION['ftp_password'])
{
$ftp_password = Context::get('ftp_password');
}
else
{
$ftp_password = $_SESSION['ftp_password'];
}
$isSftpSupported = function_exists(ssh2_sftp);
foreach($packages as $package_srl)
{
$package = $oModel->getPackage($package_srl);
if($ftp_info->sftp && $ftp_info->sftp == 'Y' && $isSftpSupported)
{
$oModuleInstaller = new SFTPModuleInstaller($package);
}
else if(function_exists(ftp_connect))
{
$oModuleInstaller = new PHPFTPModuleInstaller($package);
}
else
{
$oModuleInstaller = new FTPModuleInstaller($package);
}
$oModuleInstaller->setServerUrl(_XE_DOWNLOAD_SERVER_);
$oModuleInstaller->setPassword($ftp_password);
$output = $oModuleInstaller->install();
if(!$output->toBool()) return $output;
}
$this->_updateinfo();
$this->setMessage('success_installed', 'update');
if (Context::get('return_url'))
/**
* Update installed package information
*
* @return void
*/
function checkInstalled()
{
executeQuery("autoinstall.deleteInstalledPackage");
$oModel = getModel('autoinstall');
$packages = $oModel->getPackages();
foreach($packages as $package)
{
$real_path = FileHandler::getRealPath($package->path);
if(!file_exists($real_path))
{
$this->setRedirectUrl(Context::get('return_url'));
continue;
}
$type = $oModel->getTypeFromPath($package->path);
if($type == "core")
{
$version = __XE_VERSION__;
}
else
{
$this->setRedirectUrl(preg_replace('/act=[^&]*/', 'act=dispAutoinstallAdminIndex', Context::get('error_return_url')));
$config_file = NULL;
switch($type)
{
case "m.layout":
$type = "layout";
case "module":
case "addon":
case "layout":
case "widget":
$config_file = "/conf/info.xml";
break;
case "component":
$config_file = "/info.xml";
break;
case "style":
case "m.skin":
$type = "skin";
case "skin":
case "widgetstyle":
$config_file = "/skin.xml";
break;
case "drcomponent":
$config_file = "/info.xml";
$type = "component";
break;
case "theme":
$config_file = "/conf/info.xml";
$type = "theme";
break;
}
if(!$config_file)
{
continue;
}
$xml = new XmlParser();
$xmlDoc = $xml->loadXmlFile($real_path . $config_file);
if(!$xmlDoc)
{
continue;
}
$version = $xmlDoc->{$type}->version->body;
}
}
/**
* Update package informations using recieved data from server
*
* @param object $xmlDoc Recieved data
* @return void
*/
function updatePackages(&$xmlDoc)
{
$oModel =& getModel('autoinstall');
if(!$xmlDoc->response->packages->item) return;
if(!is_array($xmlDoc->response->packages->item))
{
$xmlDoc->response->packages->item = array($xmlDoc->response->packages->item);
}
$targets = array('package_srl', 'updatedate', 'latest_item_srl', 'path', 'version', 'category_srl');
foreach($xmlDoc->response->packages->item as $item)
{
$args = null;
foreach($targets as $target)
{
$args->{$target} = $item->{$target}->body;
}
if($oModel->getPackage($args->package_srl))
{
$output = executeQuery("autoinstall.updatePackage", $args);
}
else
{
$output = executeQuery("autoinstall.insertPackage", $args);
if(!$output->toBool())
{
$output = executeQuery("autoinstall.deletePackage", $args);
$output = executeQuery("autoinstall.insertPackage", $args);
}
}
}
}
$args = new stdClass();
$args->package_srl = $package->package_srl;
$args->version = $package->version;
$args->current_version = $version;
if(version_compare($args->version, $args->current_version, ">"))
{
$args->need_update = "Y";
}
else
{
$args->need_update = "N";
}
/**
* Update category using recived data from server.
*
* @param object $xmlDoc Recived data
* @return void
*/
function updateCategory(&$xmlDoc)
{
executeQuery("autoinstall.deleteCategory");
$oModel =& getModel('autoinstall');
if(!is_array($xmlDoc->response->categorylist->item))
{
$xmlDoc->response->categorylist->item = array($xmlDoc->response->categorylist->item);
}
$list_order = 0;
foreach($xmlDoc->response->categorylist->item as $item)
{
$args = null;
$args->category_srl = $item->category_srl->body;
$args->parent_srl = $item->parent_srl->body;
$args->title = $item->title->body;
$args->list_order = $list_order++;
$output = executeQuery("autoinstall.insertCategory", $args);
}
}
$output = executeQuery("autoinstall.insertInstalledPackage", $args);
}
}
/**
* Uninstall package
*
* @return Object
*/
function procAutoinstallAdminUninstallPackage()
/**
* Install package
*
* @return Object
*/
function procAutoinstallAdminPackageinstall()
{
@set_time_limit(0);
$package_srls = Context::get('package_srl');
$oModel = getModel('autoinstall');
$packages = explode(',', $package_srls);
$ftp_info = Context::getFTPInfo();
if(!$_SESSION['ftp_password'])
{
$ftp_password = Context::get('ftp_password');
}
else
{
$ftp_password = $_SESSION['ftp_password'];
}
$isSftpSupported = function_exists(ssh2_sftp);
foreach($packages as $package_srl)
{
$package_srl = Context::get('package_srl');
$oModel =& getModel('autoinstall');
$package = $oModel->getPackage($package_srl);
$path = $package->path;
if(!$_SESSION['ftp_password'])
{
$ftp_password = Context::get('ftp_password');
}
else
{
$ftp_password = $_SESSION['ftp_password'];
}
$ftp_info = Context::getFTPInfo();
$isSftpSupported = function_exists(ssh2_sftp);
if($ftp_info->sftp && $ftp_info->sftp == 'Y' && $isSftpSupported)
{
$oModuleInstaller = new SFTPModuleInstaller($package);
}
else if(function_exists('ftp_connect'))
else if(function_exists(ftp_connect))
{
$oModuleInstaller = new PHPFTPModuleInstaller($package);
}
@ -312,23 +209,184 @@
}
$oModuleInstaller->setServerUrl(_XE_DOWNLOAD_SERVER_);
$oModuleInstaller->setPassword($ftp_password);
$output = $oModuleInstaller->uninstall();
if(!$output->toBool()) return $output;
$this->_updateinfo();
$this->setMessage('success_deleted', 'update');
if (Context::get('return_url'))
$output = $oModuleInstaller->install();
if(!$output->toBool())
{
$this->setRedirectUrl(Context::get('return_url'));
return $output;
}
}
$this->_updateinfo();
$this->setMessage('success_installed', 'update');
if(Context::get('return_url'))
{
$this->setRedirectUrl(Context::get('return_url'));
}
else
{
$this->setRedirectUrl(preg_replace('/act=[^&]*/', 'act=dispAutoinstallAdminIndex', Context::get('error_return_url')));
}
}
/**
* Update package informations using recieved data from server
*
* @param object $xmlDoc Recieved data
* @return void
*/
function updatePackages(&$xmlDoc)
{
$oModel = getModel('autoinstall');
if(!$xmlDoc->response->packages->item)
{
return;
}
if(!is_array($xmlDoc->response->packages->item))
{
$xmlDoc->response->packages->item = array($xmlDoc->response->packages->item);
}
$targets = array('package_srl', 'updatedate', 'latest_item_srl', 'path', 'version', 'category_srl', 'have_instance');
foreach($xmlDoc->response->packages->item as $item)
{
$args = new stdClass();
foreach($targets as $target)
{
$args->{$target} = $item->{$target}->body;
}
if($oModel->getPackage($args->package_srl))
{
$output = executeQuery("autoinstall.updatePackage", $args);
}
else
{
$this->setRedirectUrl(getNotEncodedUrl('', 'module', 'admin', 'act', 'dispAutoinstallAdminInstalledPackages'));
$output = executeQuery("autoinstall.insertPackage", $args);
if(!$output->toBool())
{
$output = executeQuery("autoinstall.deletePackage", $args);
$output = executeQuery("autoinstall.insertPackage", $args);
}
}
}
}
?>
}
/**
* Update category using recived data from server.
*
* @param object $xmlDoc Recived data
* @return void
*/
function updateCategory(&$xmlDoc)
{
executeQuery("autoinstall.deleteCategory");
$oModel = getModel('autoinstall');
if(!is_array($xmlDoc->response->categorylist->item))
{
$xmlDoc->response->categorylist->item = array($xmlDoc->response->categorylist->item);
}
$list_order = 0;
foreach($xmlDoc->response->categorylist->item as $item)
{
$args = new stdClass();
$args->category_srl = $item->category_srl->body;
$args->parent_srl = $item->parent_srl->body;
$args->title = $item->title->body;
$args->list_order = $list_order++;
$output = executeQuery("autoinstall.insertCategory", $args);
}
}
/**
* Uninstall package
*
* @return Object
*/
function procAutoinstallAdminUninstallPackage()
{
$package_srl = Context::get('package_srl');
$this->uninstallPackageByPackageSrl($package_srl);
if(Context::get('return_url'))
{
$this->setRedirectUrl(Context::get('return_url'));
}
else
{
$this->setRedirectUrl(getNotEncodedUrl('', 'module', 'admin', 'act', 'dispAutoinstallAdminInstalledPackages'));
}
}
/**
* Uninstall package by package serial number
*
* @return Object
*/
function uninstallPackageByPackageSrl($package_srl)
{
$oModel = getModel('autoinstall');
$package = $oModel->getPackage($package_srl);
return $this->_uninstallPackage($package);
}
/**
* Uninstall package by package path
*
* @return Object
*/
function uninstallPackageByPath($path)
{
$package->path = $path;
return $this->_uninstallPackage($package);
}
private function _uninstallPackage($package)
{
$path = $package->path;
if(!$_SESSION['ftp_password'])
{
$ftp_password = Context::get('ftp_password');
}
else
{
$ftp_password = $_SESSION['ftp_password'];
}
$ftp_info = Context::getFTPInfo();
$isSftpSupported = function_exists(ssh2_sftp);
if($ftp_info->sftp && $ftp_info->sftp == 'Y' && $isSftpSupported)
{
$oModuleInstaller = new SFTPModuleInstaller($package);
}
else if(function_exists('ftp_connect'))
{
$oModuleInstaller = new PHPFTPModuleInstaller($package);
}
else
{
$oModuleInstaller = new FTPModuleInstaller($package);
}
$oModuleInstaller->setServerUrl(_XE_DOWNLOAD_SERVER_);
$oModuleInstaller->setPassword($ftp_password);
$output = $oModuleInstaller->uninstall();
if(!$output->toBool())
{
return $output;
}
$this->_updateinfo();
$this->setMessage('success_deleted', 'update');
return new Object();
}
}
/* End of file autoinstall.admin.controller.php */
/* Location: ./modules/autoinstall/autoinstall.admin.controller.php */

View file

@ -0,0 +1,352 @@
<?php
/**
* Model class of the autoinstall module
* @author NHN (developers@xpressengine.com)
*/
class autoinstallAdminModel extends autoinstall
{
var $layout_category_srl = 18322954;
var $mobile_layout_category_srl = 18994172;
var $module_skin_category_srl = 18322943;
var $module_mobile_skin_category_srl = 18994170;
/**
* Pre process parameters
*/
function preProcParam(&$order_target, &$order_type, &$page)
{
$order_target_array = array('newest' => 1, 'download' => 1, 'popular' => 1);
if(!isset($order_target_array[$order_target]))
{
$order_target = 'newest';
}
$order_type_array = array('asc' => 1, 'desc' => 1);
if(!isset($order_type_array[$order_type]))
{
$order_type = 'desc';
}
$page = (int) $page;
if($page < 1)
{
$page = 1;
}
}
/**
* Return list of package that can have instance
*/
function getAutoinstallAdminMenuPackageList()
{
$search_keyword = Context::get('search_keyword');
$order_target = Context::get('order_target');
$order_type = Context::get('order_type');
$page = Context::get('page');
$this->preProcParam($order_target, $order_type, $page);
$this->getPackageList('menu', $order_target, $order_type, $page, $search_keyword);
}
/**
* Return list of layout package
*/
function getAutoinstallAdminLayoutPackageList()
{
$search_keyword = Context::get('search_keyword');
$order_target = Context::get('order_target');
$order_type = Context::get('order_type');
$page = Context::get('page');
$type_array = array('M' => 1, 'P' => 1);
$type = Context::get('type');
if(!isset($type_array[$type]))
{
$type = 'P';
}
if($type == 'P')
{
$category_srl = $this->layout_category_srl;
}
else
{
$category_srl = $this->mobile_layout_category_srl;
}
$this->preProcParam($order_target, $order_type, $page);
$this->getPackageList('layout', $order_target, $order_type, $page, $search_keyword, $category_srl);
}
/**
* Return list of module skin package
*/
function getAutoinstallAdminSkinPackageList()
{
Context::setRequestMethod('JSON');
$search_keyword = Context::get('search_keyword');
$order_target = Context::get('order_target');
$order_type = Context::get('order_type');
$page = Context::get('page');
$parent_program = Context::get('parent_program');
$type_array = array('M' => 1, 'P' => 1);
$type = Context::get('type');
if(!isset($type_array[$type]))
{
$type = 'P';
}
if($type == 'P')
{
$category_srl = $this->module_skin_category_srl;
}
else
{
$category_srl = $this->module_mobile_skin_category_srl;
}
$this->preProcParam($order_target, $order_type, $page);
$this->getPackageList('skin', $order_target, $order_type, $page, $search_keyword, $category_srl, $parent_program);
}
/**
* Get Package List
*/
function getPackageList($type, $order_target = 'newest', $order_type = 'desc', $page = '1', $search_keyword = NULL, $category_srl = NULL, $parent_program = NULL)
{
if($type == 'menu')
{
$params["act"] = "getResourceapiMenuPackageList";
}
elseif($type == 'skin')
{
$params["act"] = "getResourceapiSkinPackageList";
$params['parent_program'] = $parent_program;
}
else
{
$params["act"] = "getResourceapiPackagelist";
}
$oAdminView = getAdminView('autoinstall');
$params["order_target"] = $order_target;
$params["order_type"] = $order_type;
$params["page"] = $page;
if($category_srl)
{
$params["category_srl"] = $category_srl;
}
if($search_keyword)
{
$params["search_keyword"] = $search_keyword;
}
$xmlDoc = XmlGenerater::getXmlDoc($params);
if($xmlDoc && $xmlDoc->response->packagelist->item)
{
$item_list = $oAdminView->rearranges($xmlDoc->response->packagelist->item);
$this->add('item_list', $item_list);
$array = array('total_count', 'total_page', 'cur_page', 'page_count', 'first_page', 'last_page');
$page_nav = $oAdminView->rearrange($xmlDoc->response->page_navigation, $array);
$page_navigation = new PageHandler($page_nav->total_count, $page_nav->total_page, $page_nav->cur_page, 5);
$this->add('page_navigation', $page_navigation);
}
}
/**
* Get is authed ftp
*/
function getAutoinstallAdminIsAuthed()
{
$is_authed = 0;
$ftp_info = Context::getFTPInfo();
if(!$ftp_info->ftp_root_path)
{
$is_authed = -1;
}
else
{
$is_authed = (int) isset($_SESSION['ftp_password']);
}
$this->add('is_authed', $is_authed);
}
/**
* Returns list of need update
*/
public function getNeedUpdateList()
{
$oModel = getModel('autoinstall');
$output = executeQueryArray('autoinstall.getNeedUpdate');
if(!is_array($output->data))
{
return NULL;
}
$result = array();
$xml = new XmlParser();
foreach($output->data as $package)
{
$packageSrl = $package->package_srl;
$packageInfo = new stdClass();
$packageInfo->currentVersion = $package->current_version;
$packageInfo->version = $package->version;
$packageInfo->type = $oModel->getTypeFromPath($package->path);
$packageInfo->url = $oModel->getUpdateUrlByPackageSrl($package->package_srl);
if($packageInfo->type == 'core')
{
$title = 'XpressEngine';
}
else
{
$configFile = $oModel->getConfigFilePath($packageInfo->type);
$xmlDoc = $xml->loadXmlFile(FileHandler::getRealPath($package->path) . $configFile);
if($xmlDoc)
{
$type = $packageInfo->type;
if($type == "drcomponent")
{
$type = "component";
}
if($type == "style" || $type == "m.skin")
{
$type = "skin";
}
if($type == "m.layout")
{
$type = "layout";
}
$title = $xmlDoc->{$type}->title->body;
}
else
{
$pathInfo = explode('/', $package->path);
$title = $pathInfo[count($pathInfo) - 1];
}
}
$packageInfo->title = $title;
$result[] = $packageInfo;
}
return $result;
}
/**
* Get install info
*
* @param int $packageSrl Package sequence to get info
* @return stdClass install info
*/
public function getInstallInfo($packageSrl)
{
$params["act"] = "getResourceapiInstallInfo";
$params["package_srl"] = $packageSrl;
$xmlDoc = XmlGenerater::getXmlDoc($params);
$oModel = getModel('autoinstall');
$targetpackages = array();
if($xmlDoc)
{
$xmlPackage = $xmlDoc->response->package;
$package = new stdClass();
$package->package_srl = $xmlPackage->package_srl->body;
$package->title = $xmlPackage->title->body;
$package->package_description = $xmlPackage->package_description->body;
$package->version = $xmlPackage->version->body;
$package->path = $xmlPackage->path->body;
if($xmlPackage->depends)
{
if(!is_array($xmlPackage->depends->item))
{
$xmlPackage->depends->item = array($xmlPackage->depends->item);
}
$package->depends = array();
foreach($xmlPackage->depends->item as $item)
{
$dep_item = new stdClass();
$dep_item->package_srl = $item->package_srl->body;
$dep_item->title = $item->title->body;
$dep_item->version = $item->version->body;
$dep_item->path = $item->path->body;
$package->depends[] = $dep_item;
$targetpackages[$dep_item->package_srl] = 1;
}
$packages = $oModel->getInstalledPackages(array_keys($targetpackages));
$package->deplist = "";
foreach($package->depends as $key => $dep)
{
if(!$packages[$dep->package_srl])
{
$package->depends[$key]->installed = FALSE;
$package->package_srl .= "," . $dep->package_srl;
}
else
{
$package->depends[$key]->installed = TRUE;
$package->depends[$key]->cur_version = $packages[$dep->package_srl]->current_version;
if(version_compare($dep->version, $packages[$dep->package_srl]->current_version, ">"))
{
$package->depends[$key]->need_update = TRUE;
$package->package_srl .= "," . $dep->package_srl;
if($dep->path === '.')
{
$package->contain_core = TRUE;
}
}
else
{
$package->need_update = FALSE;
}
}
}
}
$installedPackage = $oModel->getInstalledPackage($package_srl);
if($installedPackage)
{
$package->installed = TRUE;
$package->cur_version = $installedPackage->current_version;
$package->need_update = version_compare($package->version, $installedPackage->current_version, ">");
}
if($package->path === '.')
{
$package->contain_core = TRUE;
}
}
return $package;
}
/**
* get install info (act)
*/
public function getAutoInstallAdminInstallInfo()
{
$packageSrl = Context::get('package_srl');
if(!$packageSrl)
{
return new Object(-1, 'msg_invalid_request');
}
$package = $this->getInstallInfo($packageSrl);
$this->add('package', $package);
}
}
/* End of file autoinstall.admin.model.php */
/* Location: ./modules/autoinstall/autoinstall.admin.model.php */

File diff suppressed because it is too large Load diff

View file

@ -1,155 +1,195 @@
<?php
/**
* XML Generater
* @author NHN (developers@xpressengine.com)
*/
class XmlGenerater
{
/**
* XML Generater
* @author NHN (developers@xpressengine.com)
* Generate XML using given data
*
* @param array $params The data
* @return string Returns xml string
*/
class XmlGenerater {
/**
* Generate XML using given data
*
* @param array $params The data
* @return string Returns xml string
*/
function generate(&$params)
{
$xmlDoc = '<?xml version="1.0" encoding="utf-8" ?><methodCall><params>';
if(!is_array($params)) return null;
$params["module"] = "resourceapi";
foreach($params as $key => $val)
{
$xmlDoc .= sprintf("<%s><![CDATA[%s]]></%s>", $key, $val, $key);
}
$xmlDoc .= "</params></methodCall>";
return $xmlDoc;
}
/**
* Request data to server and returns result
*
* @param array $params Request data
* @return object
*/
function getXmlDoc(&$params)
{
$body = XmlGenerater::generate($params);
$buff = FileHandler::getRemoteResource(_XE_DOWNLOAD_SERVER_, $body, 3, "POST", "application/xml");
if(!$buff) return;
$xml = new XmlParser();
$xmlDoc = $xml->parse($buff);
return $xmlDoc;
}
}
/**
* High class of the autoinstall module
* @author NHN (developers@xpressengine.com)
**/
class autoinstall extends ModuleObject {
/**
* Temporary directory path
*/
var $tmp_dir = './files/cache/autoinstall/';
/**
* Constructor
*
* @return void
*/
function autoinstall()
function generate(&$params)
{
$xmlDoc = '<?xml version="1.0" encoding="utf-8" ?><methodCall><params>';
if(!is_array($params))
{
$oModuleModel = &getModel('module');
$config = $oModuleModel->getModuleConfig('autoinstall');
if ($config->downloadServer != _XE_DOWNLOAD_SERVER_)
{
$this->stop('msg_not_match_server');
}
return NULL;
}
/**
* For additional tasks required when installing
*
* @return Object
**/
function moduleInstall() {
$oModuleController = &getController('module');
$params["module"] = "resourceapi";
foreach($params as $key => $val)
{
$xmlDoc .= sprintf("<%s><![CDATA[%s]]></%s>", $key, $val, $key);
}
$xmlDoc .= "</params></methodCall>";
return $xmlDoc;
}
/**
* Request data to server and returns result
*
* @param array $params Request data
* @return object
*/
function getXmlDoc(&$params)
{
$body = XmlGenerater::generate($params);
$buff = FileHandler::getRemoteResource(_XE_DOWNLOAD_SERVER_, $body, 3, "POST", "application/xml");
if(!$buff)
{
return;
}
$xml = new XmlParser();
$xmlDoc = $xml->parse($buff);
return $xmlDoc;
}
}
/**
* High class of the autoinstall module
* @author NHN (developers@xpressengine.com)
*/
class autoinstall extends ModuleObject
{
/**
* Temporary directory path
*/
var $tmp_dir = './files/cache/autoinstall/';
/**
* Constructor
*
* @return void
*/
function autoinstall()
{
$oModuleModel = getModel('module');
$config = $oModuleModel->getModuleConfig('autoinstall');
if($config->downloadServer != _XE_DOWNLOAD_SERVER_)
{
$this->stop('msg_not_match_server');
}
}
/**
* For additional tasks required when installing
*
* @return Object
*/
function moduleInstall()
{
$oModuleController = getController('module');
$config->downloadServer = _XE_DOWNLOAD_SERVER_;
$oModuleController->insertModuleConfig('autoinstall', $config);
}
/**
* Method to check if installation is succeeded
*
* @return bool
*/
function checkUpdate()
{
$oDB = DB::getInstance();
$oModuleModel = getModel('module');
if(!file_exists(FileHandler::getRealPath("./modules/autoinstall/schemas/autoinstall_installed_packages.xml"))
&& $oDB->isTableExists("autoinstall_installed_packages"))
{
return TRUE;
}
if(!file_exists(FileHandler::getRealPath("./modules/autoinstall/schemas/autoinstall_remote_categories.xml"))
&& $oDB->isTableExists("autoinstall_remote_categories"))
{
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;
}
// 2012.11.12 add column 'have_instance' in autoinstall_packages
if(!$oDB->isColumnExists('autoinstall_packages', 'have_instance'))
{
return TRUE;
}
return FALSE;
}
/**
* Execute update
*
* @return Object
*/
function moduleUpdate()
{
$oDB = DB::getInstance();
$oModuleModel = getModel('module');
$oModuleController = getController('module');
if(!file_exists(FileHandler::getRealPath("./modules/autoinstall/schemas/autoinstall_installed_packages.xml"))
&& $oDB->isTableExists("autoinstall_installed_packages"))
{
$oDB->dropTable("autoinstall_installed_packages");
}
if(!file_exists(FileHandler::getRealPath("./modules/autoinstall/schemas/autoinstall_remote_categories.xml"))
&& $oDB->isTableExists("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);
}
}
/**
* Method to check if installation is succeeded
*
* @return bool
**/
function checkUpdate() {
$oDB =& DB::getInstance();
$oModuleModel = &getModel('module');
// 2012.11.12 add column 'have_instance' in autoinstall_packages
if(!$oDB->isColumnExists('autoinstall_packages', 'have_instance'))
{
$oDB->addColumn('autoinstall_packages', 'have_instance', 'char', '1', 'N', TRUE);
}
if(!file_exists(FileHandler::getRealPath("./modules/autoinstall/schemas/autoinstall_installed_packages.xml"))
&& $oDB->isTableExists("autoinstall_installed_packages"))
{
return true;
}
if(!file_exists(FileHandler::getRealPath("./modules/autoinstall/schemas/autoinstall_remote_categories.xml"))
&& $oDB->isTableExists("autoinstall_remote_categories"))
{
return true;
}
return new Object(0, 'success_updated');
}
// 2011.08.08 add column 'list_order' in ai_remote_categories
if (!$oDB->isColumnExists('ai_remote_categories', 'list_order')) return true;
/**
* Re-generate the cache file
* @return Object
*/
function recompileCache()
{
}
// 2011.08.08 set _XE_DOWNLOAD_SERVER_ at module config
$config = $oModuleModel->getModuleConfig('autoinstall');
if (!isset($config->downloadServer)) return true;
return false;
}
/**
* Execute update
*
* @return Object
**/
function moduleUpdate() {
$oDB =& DB::getInstance();
$oModuleModel = &getModel('module');
$oModuleController = &getController('module');
if(!file_exists(FileHandler::getRealPath("./modules/autoinstall/schemas/autoinstall_installed_packages.xml"))
&& $oDB->isTableExists("autoinstall_installed_packages"))
{
$oDB->dropTable("autoinstall_installed_packages");
}
if(!file_exists(FileHandler::getRealPath("./modules/autoinstall/schemas/autoinstall_remote_categories.xml"))
&& $oDB->isTableExists("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');
}
/**
* Re-generate the cache file
* @return Object
**/
function recompileCache() {
}
}
?>
}
/* End of file autoinstall.class.php */
/* Location: ./modules/autoinstall/autoinstall.class.php */

File diff suppressed because it is too large Load diff

View file

@ -1,357 +1,464 @@
<?php
/**
* Model class of the autoinstall module
* @author NHN (developers@xpressengine.com)
**/
class autoinstallModel extends autoinstall {
/**
* Get category information
*
* @param int $category_srl The sequence of category to get information
* @return object
*/
function getCategory($category_srl)
{
$args->category_srl = $category_srl;
$output = executeQueryArray("autoinstall.getCategory", $args);
if(!$output->data) return null;
return array_shift($output->data);
}
/**
* Model class of the autoinstall module
* @author NHN (developers@xpressengine.com)
*/
class autoinstallModel extends autoinstall
{
/**
* Get packages information
*
* @return array
*/
function getPackages()
{
$output = executeQueryArray("autoinstall.getPackages");
if(!$output->data) return array();
return $output->data;
}
/**
* Get category information
*
* @param int $category_srl The sequence of category to get information
* @return object
*/
function getCategory($category_srl)
{
$args = new stdClass();
$args->category_srl = $category_srl;
$output = executeQueryArray("autoinstall.getCategory", $args);
if(!$output->data)
{
return null;
}
return array_shift($output->data);
}
/**
* Get installed packages information
*
* @param int $package_srl The sequence of package to get information
* @return object
*/
function getInstalledPackage($package_srl)
{
$args->package_srl = $package_srl;
$output = executeQueryArray("autoinstall.getInstalledPackage", $args);
if(!$output->data) return null;
return array_shift($output->data);
}
/**
* Get packages information
*
* @return array
*/
function getPackages()
{
$output = executeQueryArray("autoinstall.getPackages");
if(!$output->data)
{
return array();
}
return $output->data;
}
/**
* Get one package information
*
* @param int $package_srl The sequence of package to get information
* @return object
*/
function getPackage($package_srl)
{
$args->package_srl = $package_srl;
$output = executeQueryArray("autoinstall.getPackage", $args);
if(!$output->data) return null;
return array_shift($output->data);
}
/**
* Get installed packages information
*
* @param int $package_srl The sequence of package to get information
* @return object
*/
function getInstalledPackage($package_srl)
{
$args = new stdClass();
$args->package_srl = $package_srl;
$output = executeQueryArray("autoinstall.getInstalledPackage", $args);
if(!$output->data)
{
return null;
}
return array_shift($output->data);
}
/**
* Get category list
*
* @return array
*/
function getCategoryList()
{
$output = executeQueryArray("autoinstall.getCategories");
if(!$output->toBool() || !$output->data) return array();
/**
* Get one package information
*
* @param int $package_srl The sequence of package to get information
* @return object
*/
function getPackage($package_srl)
{
$args = new stdClass();
$args->package_srl = $package_srl;
$output = executeQueryArray("autoinstall.getPackage", $args);
if(!$output->data)
{
return null;
}
return array_shift($output->data);
}
$categoryList = array();
foreach($output->data as $category)
{
$category->children = array();
$categoryList[$category->category_srl] = $category;
}
/**
* Get category list
*
* @return array
*/
function getCategoryList()
{
$output = executeQueryArray("autoinstall.getCategories");
if(!$output->toBool() || !$output->data)
{
return array();
}
$depth0 = array();
foreach($categoryList as $key => $category)
{
if($category->parent_srl)
{
$categoryList[$category->parent_srl]->children[] =& $categoryList[$key];
}
else
{
$depth0[] = $key;
}
}
$resultList = array();
foreach($depth0 as $category_srl)
{
$this->setDepth($categoryList[$category_srl], 0, $categoryList, $resultList);
}
return $resultList;
}
$categoryList = array();
foreach($output->data as $category)
{
$category->children = array();
$categoryList[$category->category_srl] = $category;
}
/**
* Get pcakge count in category
*
* @param int $category_srl The sequence of category to get count
* @return int
*/
function getPackageCount($category_srl)
{
$args->category_srl = $category_srl;
$output = executeQuery("autoinstall.getPackageCount", $args);
if(!$output->data) return 0;
return $output->data->count;
}
/**
* Get installed package count
*
* @return int
*/
function getInstalledPackageCount()
{
$output = executeQuery("autoinstall.getInstalledPackageCount", $args);
if(!$output->data) return 0;
return $output->data->count;
}
/**
* Set depth, children list and package count of category
*
* @param object $item Category information
* @param int $depth Depth of category
* @param array $list Category list
* @param array $resultList Final result list
* @return string $siblingList Comma seperated list
*/
function setDepth(&$item, $depth, &$list, &$resultList)
{
$resultList[$item->category_srl] =& $item;
$item->depth = $depth;
$siblingList = $item->category_srl;
foreach($item->children as $child)
{
$siblingList .= ",".$this->setDepth($list[$child->category_srl], $depth+1, $list, $resultList);
}
if(count($item->children) < 1)
{
$item->nPackages = $this->getPackageCount($item->category_srl);
}
$item->childrenList = $siblingList;
return $siblingList;
}
/**
* Get lastest package information
*
* @return object Returns lastest package information. If no result returns null.
*/
function getLatestPackage() {
$output = executeQueryArray("autoinstall.getLatestPackage");
if(!$output->data) return null;
return array_shift($output->data);
}
/**
* Get installed package informations
*
* @param array $package_list Package sequence list to get information
* @return array Returns array contains pacakge information. If no result returns empty array.
*/
function getInstalledPackages($package_list) {
$args->package_list = $package_list;
$output = executeQueryArray("autoinstall.getInstalledPackages", $args);
$result = array();
if(!$output->data) return $result;
foreach($output->data as $value)
{
$result[$value->package_srl] = $value;
}
return $result;
}
/**
* Get installed package list
*
* @param int $page
* @return Object
*/
function getInstalledPackageList($page)
{
$args->page = $page;
$args->list_count = 10;
$args->page_count = 5;
$output = executeQueryArray("autoinstall.getInstalledPackageList", $args);
$res = array();
if ($output->data)
$depth0 = array();
foreach($categoryList as $key => $category)
{
if($category->parent_srl)
{
foreach($output->data as $val)
{
$res[$val->package_srl] = $val;
}
$categoryList[$category->parent_srl]->children[] = & $categoryList[$key];
}
$output->data = $res;
return $output;
}
/**
* Get type using path
*
* @param string $path Path to get type
* @return string
*/
function getTypeFromPath($path)
{
if(!$path) return null;
if($path == ".") return "core";
$path_array = explode("/", $path);
$target_name = array_pop($path_array);
$type = substr(array_pop($path_array), 0, -1);
return $type;
}
/**
* Get config file path by type
*
* @param string $type Type to get config file path
* @return string
*/
function getConfigFilePath($type)
{
$config_file = null;
switch($type)
else
{
case "m.layout":
case "module":
case "addon":
case "layout":
case "widget":
$config_file = "/conf/info.xml";
break;
case "component":
$config_file = "/info.xml";
break;
case "m.skin":
case "skin":
case "widgetstyle":
case "style":
$config_file = "/skin.xml";
break;
case "drcomponent":
$config_file = "/info.xml";
break;
$depth0[] = $key;
}
return $config_file;
}
/**
* Returns target is removable
*
* @param string $path Path
* @return bool
*/
function checkRemovable($path)
$resultList = array();
foreach($depth0 as $category_srl)
{
$path_array = explode("/", $path);
$target_name = array_pop($path_array);
$oModule =& getModule($target_name, "class");
if(!$oModule) return false;
if(method_exists($oModule, "moduleUninstall")) return true;
else return false;
$this->setDepth($categoryList[$category_srl], 0, $categoryList, $resultList);
}
return $resultList;
}
/**
* Get sequence of package by path
*
* @param string $path Path to get sequence
* @return int
*/
function getPackageSrlByPath($path)
/**
* Get pcakge count in category
*
* @param int $category_srl The sequence of category to get count
* @return int
*/
function getPackageCount($category_srl)
{
$args = new stdClass();
$args->category_srl = $category_srl;
$output = executeQuery("autoinstall.getPackageCount", $args);
if(!$output->data)
{
if (!$path) return;
return 0;
}
return $output->data->count;
}
if(substr($path,-1) == '/') $path = substr($path, 0, strlen($path)-1);
/**
* Get installed package count
*
* @return int
*/
function getInstalledPackageCount()
{
$output = executeQuery("autoinstall.getInstalledPackageCount");
if(!$output->data)
{
return 0;
}
return $output->data->count;
}
if (!$GLOBLAS['XE_AUTOINSTALL_PACKAGE_SRL_BY_PATH'][$path])
/**
* Set depth, children list and package count of category
*
* @param object $item Category information
* @param int $depth Depth of category
* @param array $list Category list
* @param array $resultList Final result list
* @return string $siblingList Comma seperated list
*/
function setDepth(&$item, $depth, &$list, &$resultList)
{
$resultList[$item->category_srl] = &$item;
$item->depth = $depth;
$siblingList = $item->category_srl;
foreach($item->children as $child)
{
$siblingList .= "," . $this->setDepth($list[$child->category_srl], $depth + 1, $list, $resultList);
}
if(count($item->children) < 1)
{
$item->nPackages = $this->getPackageCount($item->category_srl);
}
$item->childrenList = $siblingList;
return $siblingList;
}
/**
* Get lastest package information
*
* @return object Returns lastest package information. If no result returns null.
*/
function getLatestPackage()
{
$output = executeQueryArray("autoinstall.getLatestPackage");
if(!$output->data)
{
return null;
}
return array_shift($output->data);
}
/**
* Get installed package informations
*
* @param array $package_list Package sequence list to get information
* @return array Returns array contains pacakge information. If no result returns empty array.
*/
function getInstalledPackages($package_list)
{
$args = new stdClass();
$args->package_list = $package_list;
$output = executeQueryArray("autoinstall.getInstalledPackages", $args);
$result = array();
if(!$output->data)
{
return $result;
}
foreach($output->data as $value)
{
$result[$value->package_srl] = $value;
}
return $result;
}
/**
* Get installed package list
*
* @param int $page
* @return Object
*/
function getInstalledPackageList($page)
{
$args = new stdClass();
$args->page = $page;
$args->list_count = 10;
$args->page_count = 5;
if(Context::getDBType() == 'mssql')
{
$args->sort_index = 'package_srl';
}
$output = executeQueryArray("autoinstall.getInstalledPackageList", $args);
$res = array();
if($output->data)
{
foreach($output->data as $val)
{
$args->path = $path;
$output = executeQuery('autoinstall.getPackageSrlByPath', $args);
$GLOBLAS['XE_AUTOINSTALL_PACKAGE_SRL_BY_PATH'][$path] = $output->data->package_srl;
$res[$val->package_srl] = $val;
}
return $GLOBLAS['XE_AUTOINSTALL_PACKAGE_SRL_BY_PATH'][$path];
}
$output->data = $res;
return $output;
}
/**
* Get remove url by package srl
*
* @param int $packageSrl Sequence of pakcage to get url
* @return string
*/
function getRemoveUrlByPackageSrl($packageSrl)
/**
* Get type using path
*
* @param string $path Path to get type
* @return string
*/
function getTypeFromPath($path)
{
if(!$path)
{
$ftp_info = Context::getFTPInfo();
if (!$ftp_info->ftp_root_path) return;
if (!$packageSrl) return;
return getNotEncodedUrl('', 'module', 'admin', 'act', 'dispAutoinstallAdminUninstall', 'package_srl', $packageSrl);
return NULL;
}
/**
* Get remove url by path
*
* @param string $path Path to get url
* @return string
*/
function getRemoveUrlByPath($path)
if($path == ".")
{
if (!$path) return;
$ftp_info = Context::getFTPInfo();
if (!$ftp_info->ftp_root_path) return;
$packageSrl = $this->getPackageSrlByPath($path);
if (!$packageSrl) return;
return getNotEncodedUrl('', 'module', 'admin', 'act', 'dispAutoinstallAdminUninstall', 'package_srl', $packageSrl);
return "core";
}
/**
* Get update url by package srl
*
* @param int $packageSrl Sequence to get url
* @return string
*/
function getUpdateUrlByPackageSrl($packageSrl)
$path_array = explode("/", $path);
$target_name = array_pop($path_array);
if(!$target_name)
{
if (!$packageSrl) return;
return getNotEncodedUrl('', 'module', 'admin', 'act', 'dispAutoinstallAdminInstall', 'package_srl', $packageSrl);
$target_name = array_pop($path_array);
}
$type = substr(array_pop($path_array), 0, -1);
return $type;
}
/**
* Get update url by path
*
* @param string $path Path to get url
* @return string
*/
function getUpdateUrlByPath($path)
/**
* Get config file path by type
*
* @param string $type Type to get config file path
* @return string
*/
function getConfigFilePath($type)
{
$config_file = NULL;
switch($type)
{
if (!$path) return;
$packageSrl = $this->getPackageSrlByPath($path);
if (!$packageSrl) return;
return getNotEncodedUrl('', 'module', 'admin', 'act', 'dispAutoinstallAdminInstall', 'package_srl', $packageSrl);
case "m.layout":
case "module":
case "addon":
case "layout":
case "widget":
case 'theme': // for backward compatibility
$config_file = "/conf/info.xml";
break;
case "component":
$config_file = "/info.xml";
break;
case "m.skin":
case "skin":
case "widgetstyle":
case "style":
$config_file = "/skin.xml";
break;
case "drcomponent":
$config_file = "/info.xml";
break;
}
}
?>
return $config_file;
}
/**
* Returns target is removable
*
* @param string $path Path
* @return bool
*/
function checkRemovable($path)
{
$path_array = explode("/", $path);
$target_name = array_pop($path_array);
$oModule = getModule($target_name, "class");
if(!$oModule)
{
return FALSE;
}
if(method_exists($oModule, "moduleUninstall"))
{
return TRUE;
}
else
{
return FALSE;
}
}
/**
* Get sequence of package by path
*
* @param string $path Path to get sequence
* @return int
*/
function getPackageSrlByPath($path)
{
if(!$path)
{
return;
}
if(substr($path, -1) == '/')
{
$path = substr($path, 0, strlen($path) - 1);
}
if(!$GLOBLAS['XE_AUTOINSTALL_PACKAGE_SRL_BY_PATH'][$path])
{
$args = new stdClass();
$args->path = $path;
$output = executeQuery('autoinstall.getPackageSrlByPath', $args);
$GLOBLAS['XE_AUTOINSTALL_PACKAGE_SRL_BY_PATH'][$path] = $output->data->package_srl;
}
return $GLOBLAS['XE_AUTOINSTALL_PACKAGE_SRL_BY_PATH'][$path];
}
/**
* Get remove url by package srl
*
* @param int $packageSrl Sequence of pakcage to get url
* @return string
*/
function getRemoveUrlByPackageSrl($packageSrl)
{
$ftp_info = Context::getFTPInfo();
if(!$ftp_info->ftp_root_path)
{
return;
}
if(!$packageSrl)
{
return;
}
return getNotEncodedUrl('', 'module', 'admin', 'act', 'dispAutoinstallAdminUninstall', 'package_srl', $packageSrl);
}
/**
* Get remove url by path
*
* @param string $path Path to get url
* @return string
*/
function getRemoveUrlByPath($path)
{
if(!$path)
{
return;
}
$ftp_info = Context::getFTPInfo();
if(!$ftp_info->ftp_root_path)
{
return;
}
$packageSrl = $this->getPackageSrlByPath($path);
if(!$packageSrl)
{
return;
}
return getNotEncodedUrl('', 'module', 'admin', 'act', 'dispAutoinstallAdminUninstall', 'package_srl', $packageSrl);
}
/**
* Get update url by package srl
*
* @param int $packageSrl Sequence to get url
* @return string
*/
function getUpdateUrlByPackageSrl($packageSrl)
{
if(!$packageSrl)
{
return;
}
return getNotEncodedUrl('', 'module', 'admin', 'act', 'dispAutoinstallAdminInstall', 'package_srl', $packageSrl);
}
/**
* Get update url by path
*
* @param string $path Path to get url
* @return string
*/
function getUpdateUrlByPath($path)
{
if(!$path)
{
return;
}
$packageSrl = $this->getPackageSrlByPath($path);
if(!$packageSrl)
{
return;
}
return getNotEncodedUrl('', 'module', 'admin', 'act', 'dispAutoinstallAdminInstall', 'package_srl', $packageSrl);
}
function getHaveInstance($columnList = array())
{
$output = executeQueryArray('autoinstall.getHaveInstance', NULL, $columnList);
if(!$output->data)
{
return array();
}
return $output->data;
}
}
/* End of file autoinstall.model.php */
/* Location: ./modules/autoinstall/autoinstall.model.php */

View file

@ -1,31 +0,0 @@
<?php
/**
* View class of the autoinstall module
* @author NHN (developers@xpressengine.com)
**/
class autoinstallView extends autoinstall {
/**
* Initialization
*
* @return void
**/
function init() {
}
/**
* Test
*
* @return Object
*/
function dispAutoinstallTest(){
$file = "modules.test.tar";
$checksum = '549989037bd8401d39b83ca2393d8131';
$file = "modules.test.skins.test.tar";
$oAutoinstallAdminController = &getAdminController('autoinstall');
$output = $oAutoinstallAdminController->install($file, $checksum);
return $output;
}
}
?>

View file

@ -8,6 +8,11 @@
<action name="dispAutoinstallAdminIndex" type="view" standalone="true" admin_index="true" menu_name="easyInstall" menu_index="true" />
<action name="procAutoinstallAdminUpdateinfo" type="controller" standalone="true" />
<action name="procAutoinstallAdminPackageinstall" type="controller" standalone="true" ruleset="ftp" />
<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" />
</actions>
<menus>
<menu name="easyInstall">

View file

@ -154,7 +154,7 @@
<value xml:lang="vi"><![CDATA[Quá trình Cài đặt / Cập nhật này phụ thuộc vào ]]></value>
</item>
<item name="description_download">
<value xml:lang="ko"><![CDATA[FTP를 이용할 수 없는 경우, 직접 다운로드 하여 해당 경로(path)에 설치하셔야 합니다. (한 단계 상위에서 압축을 푸시면 됩니다. ./modules/board의 경우 ./modules에서 묶음(tar)을 푸세요)]]></value>
<value xml:lang="ko"><![CDATA[FTP를 이용할 수 없는 경우, 직접 다운로드 하여 해당 경로(path)에 설치해야 합니다. (한 단계 상위에서 압축을 풀면 됩니다. ./modules/board의 경우 ./modules에서 묶음(tar)을 푸세요)]]></value>
<value xml:lang="en"><![CDATA[If FTP is unavailable, you should manually download and extract it into the target path. (If the target path is ./modules/board, extract it to ./modules)]]></value>
<value xml:lang="jp"><![CDATA[FTPの利用ができない場合は、直接ダウンロードし、サーバー上の該当パスにてインストールしてください。 (一つ上の階層にて解凍します。 ./modules/board の場合 ./modulesに tarを解凍してください。)]]></value>
<value xml:lang="zh-CN"><![CDATA[无法使用FTP时需得自行下载安装到指定路径。]]></value>
@ -183,8 +183,8 @@
<value xml:lang="tr"><![CDATA[İndirme]]></value>
</item>
<item name="description_uninstall">
<value xml:lang="ko"><![CDATA[패키지를 삭제합니다. 모듈의 경우 모든 데이터가 사라집니다.]]></value>
<value xml:lang="en"><![CDATA[Package will be uninstalled. For modules, all data will be deleted.]]></value>
<value xml:lang="ko"><![CDATA[패키지를 삭제합니다. 모든 데이터가 사라집니다.]]></value>
<value xml:lang="en"><![CDATA[Package will be uninstalled. All data will be deleted.]]></value>
<value xml:lang="jp"><![CDATA[パッケージを削除します。モジュールの場合、すべてのデータを失います。]]></value>
<value xml:lang="zh-CN"><![CDATA[确定要删除此数据包吗?如果此数据包为模块,模块中的数据将会全部消失。]]></value>
<value xml:lang="zh-TW"><![CDATA[移除模組,所有資料將會被刪除。]]></value>
@ -259,7 +259,7 @@
<value xml:lang="zh-TW"><![CDATA[本項目有新版本。]]></value>
</item>
<item name="msg_do_you_like_update">
<value xml:lang="ko"><![CDATA[업데이트 하시겠습니까?]]></value>
<value xml:lang="ko"><![CDATA[업데이트하시겠습니까?]]></value>
<value xml:lang="en"><![CDATA[Would you like to update?]]></value>
<value xml:lang="jp"><![CDATA[アップデートしますか?]]></value>
<value xml:lang="zh-TW"><![CDATA[確定要更新嗎?]]></value>
@ -277,7 +277,7 @@
<value xml:lang="zh-TW"><![CDATA[主機設定不正確。]]></value>
</item>
<item name="msg_ftp_invalid_auth_info">
<value xml:lang="ko"><![CDATA[입력하신 FTP 정보로 로그인을 하지 못했습니다. FTP 정보를 확인해주세요.]]></value>
<value xml:lang="ko"><![CDATA[입력 FTP 정보로 로그인을 하지 못했습니다. FTP 정보를 확인해주세요.]]></value>
<value xml:lang="en"><![CDATA[Cannot log in with the FTP password you entered. Please check if it is correct.]]></value>
<value xml:lang="jp"><![CDATA[このFTP情報ではログインできません。FTP情報を確認してください。]]></value>
<value xml:lang="zh-CN"><![CDATA[FTP登录失败。请确认输入的FTP信息。]]></value>
@ -290,7 +290,7 @@
<value xml:lang="mn"><![CDATA[Таны оруулсан FTP мэдээллээр нэвтэрч чадсангvй. FTPмэдээллээ шалгана уу.]]></value>
</item>
<item name="msg_ftp_not_connected">
<value xml:lang="ko"><![CDATA[%s로의 FTP 접속 오류가 발생했습니다. FTP 포트 번호를 확인해주시거나 FTP 서비스가 가능한지 확인해주세요.]]></value>
<value xml:lang="ko"><![CDATA[%s로의 FTP 접속 오류가 발생했습니다. FTP 포트 번호를 확인거나 FTP 서비스가 가능한지 확인해주세요.]]></value>
<value xml:lang="en"><![CDATA[Connection to the %s via FTP failed. Please check the port number and whether the FTP service is available.]]></value>
<value xml:lang="jp"><![CDATA[%sへのFTP接続エラーが発生しました。FTPポート(port)番号をはじめ、FTPサービスが可能であるかを確認してください。]]></value>
<value xml:lang="zh-CN"><![CDATA[发生本地(%s)FTP连接错误。请确认ftp端口号及支持ftp服务与否。]]></value>
@ -328,7 +328,64 @@
<value xml:lang="en"><![CDATA[Cannot delete this package (no moduleUninstall() in the module class).]]></value>
<value xml:lang="jp"><![CDATA[このパッケージは、削除をサポートしません(モジュールクラスにmoduleUninstall()がありません)。]]></value>
</item>
<item name="msg_update_core_title">
<value xml:lang="ko"><![CDATA[XE core가 업데이트 됩니다.]]></value>
</item>
<item name="msg_update_core">
<value xml:lang="ko"><![CDATA[<strong style="color:red">XE core가 업데이트 됩니다.</strong><br />core 업데이트 시 설치된 프로그램의 호환성을 반드시 점검하시기 바랍니다.]]></value>
<value xml:lang="ko"><![CDATA[core 업데이트 시 설치된 프로그램의 호환성을 반드시 점검 바랍니다.]]></value>
</item>
<item name="installed">
<value xml:lang="ko"><![CDATA[설치 됨]]></value>
<value xml:lang="en"><![CDATA[Installed]]></value>
</item>
<item name="typename" type="array">
<item name="core">
<value xml:lang="ko"><![CDATA[코어]]></value>
<value xml:lang="en"><![CDATA[Core]]></value>
</item>
<item name="m.layout">
<value xml:lang="ko"><![CDATA[모바일 레이아웃]]></value>
<value xml:lang="en"><![CDATA[Mobile layout]]></value>
</item>
<item name="module">
<value xml:lang="ko"><![CDATA[모듈]]></value>
<value xml:lang="en"><![CDATA[Module]]></value>
</item>
<item name="addon">
<value xml:lang="ko"><![CDATA[애드온]]></value>
<value xml:lang="en"><![CDATA[Addon]]></value>
</item>
<item name="layout">
<value xml:lang="ko"><![CDATA[레이아웃]]></value>
<value xml:lang="en"><![CDATA[Layout]]></value>
</item>
<item name="widget">
<value xml:lang="ko"><![CDATA[위젯]]></value>
<value xml:lang="en"><![CDATA[Widget]]></value>
</item>
<item name="component">
<value xml:lang="ko"><![CDATA[에디터 콤포넌트]]></value>
<value xml:lang="en"><![CDATA[Editor component]]></value>
</item>
<item name="m.skin">
<value xml:lang="ko"><![CDATA[모바일 스킨]]></value>
<value xml:lang="en"><![CDATA[Mobile Skin]]></value>
</item>
<item name="skin">
<value xml:lang="ko"><![CDATA[스킨]]></value>
<value xml:lang="en"><![CDATA[Skin]]></value>
</item>
<item name="widgetstyle">
<value xml:lang="ko"><![CDATA[위젯스타일]]></value>
<value xml:lang="en"><![CDATA[Widget style]]></value>
</item>
<item name="style">
<value xml:lang="ko"><![CDATA[문서스타일]]></value>
<value xml:lang="en"><![CDATA[Document style]]></value>
</item>
<item name="drcomponent">
<value xml:lang="ko"><![CDATA[단락에디터 콤포넌트]]></value>
<value xml:lang="en"><![CDATA[DrEditor component]]></value>
</item>
</item>
</lang>

View file

@ -0,0 +1,11 @@
<query id="getHaveInstance" action="select">
<tables>
<table name="autoinstall_packages" />
</tables>
<columns>
<column name="*" />
</columns>
<conditions>
<condition operation="equal" column="have_instance" default="Y" />
</conditions>
</query>

View file

@ -0,0 +1,14 @@
<query id="getNeedUpdate" action="select">
<tables>
<table name="ai_installed_packages" alias="i" />
<table name="autoinstall_packages" alias="p" />
</tables>
<columns>
<column name="i.*" />
<column name="p.path" />
</columns>
<conditions>
<condition operation="equal" column="i.package_srl" var="p.package_srl" />
<condition operation="equal" column="i.need_update" default="Y" pipe="and" />
</conditions>
</query>

View file

@ -6,6 +6,7 @@
<column name="package_srl" var="package_srl" filter="number" notnull="notnull" />
<column name="category_srl" var="category_srl" filter="number" />
<column name="path" var="path" notnull="notnull" />
<column name="have_instance" var="have_instance" notnull="notnull" />
<column name="updatedate" var="updatedate" notnull="notnull" />
<column name="latest_item_srl" var="latest_item_srl" notnull="notnull" />
<column name="version" var="version" notnull="notnull" />

View file

@ -4,6 +4,7 @@
</tables>
<columns>
<column name="path" var="path" notnull="notnull" />
<column name="have_instance" var="have_instance" notnull="notnull" />
<column name="updatedate" var="updatedate" notnull="notnull" />
<column name="category_srl" var="category_srl" filter="number" />
<column name="latest_item_srl" var="latest_item_srl" notnull="notnull" />

View file

@ -2,6 +2,7 @@
<column name="package_srl" type="number" size="11" notnull="notnull" default="0" index="idx_package_srl" />
<column name="category_srl" type="number" size="11" default="0" index="idx_category_srl" />
<column name="path" type="varchar" size="250" notnull="notnull" unique="unique_path" />
<column name="have_instance" type="char" size="1" notnull="notnull" default="N" />
<column name="updatedate" type="date" index="idx_regdate" />
<column name="latest_item_srl" type="number" size="11" default="0" notnull="notnull" />
<column name="version" type="varchar" size="255" />

View file

@ -1,21 +1,16 @@
<div class="easyNav">
<div loop="$categories => $category" cond="$category->depth == 0" class="category">
<ul class="x_nav x_nav-tabs">
<li class="x_active"|cond="$act == 'dispAutoinstallAdminIndex'"><a href="{getUrl('', 'module', 'admin', 'act', 'dispAutoinstallAdminIndex')}">All({$tCount})</a></li>
<li class="x_active"|cond="$act == 'dispAutoinstallAdminInstalledPackages'"><a href="{getUrl('', 'module', 'admin', 'act', 'dispAutoinstallAdminInstalledPackages')}">Installed({$iCount})</a></li>
</ul>
<nav cond="$act == 'dispAutoinstallAdminIndex'" class="x_thumbnail x_clearfix category">
<div loop="$categories => $category" cond="$category->depth == 0">
<h2>{$category->title}</h2>
<ul>
<li loop="$category->children => $children">
<block cond="$children->category_srl == $category_srl">
{@$current_category = $children->title}
<strong>{$children->title}({$children->nPackages})</strong>
</block>
<block cond="$children->category_srl != $category_srl"><a href="{getUrl('','module','admin','act','dispAutoinstallAdminIndex','category_srl',$children->category_srl,'childrenList','')}">{$children->title}({$children->nPackages})</a></block>
<li loop="$category->children => $children" class="active"|cond="$children->category_srl == $category_srl">
<a href="{getUrl('','module','admin','act','dispAutoinstallAdminIndex','category_srl',$children->category_srl,'childrenList','')}">{$children->title}({$children->nPackages})</a>
</li>
</ul>
</div>
<p class="filter">
<a cond="$act != 'dispAutoinstallAdminIndex'" href="{getUrl('', 'module', 'admin', 'act', 'dispAutoinstallAdminIndex')}">All({$tCount})</a>
<strong cond="$act == 'dispAutoinstallAdminIndex'">All({$tCount})</strong>
|
<a cond="$act != 'dispAutoinstallAdminInstalledPackages'" href="{getUrl('', 'module', 'admin', 'act', 'dispAutoinstallAdminInstalledPackages')}">Installed({$iCount})</a>
<strong cond="$act == 'dispAutoinstallAdminInstalledPackages'">Installed({$iCount})</strong>
</p>
</div>
</nav>

View file

@ -1,59 +1,31 @@
@charset "utf-8";
/* NHN (developers@xpressengine.com) */
.install{ border-top:1px solid #ddd; *zoom:1;}
.install:after{ content:""; display:block; clear:both;}
.aside { width:180px; float:left; margin-right:30px; padding-bottom:30px; }
.aside .categoryBox { background-color:#F8F8F8; padding:10px; width:160px; overflow:hidden; }
.aside .categoryBox h3 { padding:0 0 10px 0; margin:0 0 10px 0; white-space:nowrap; overflow:hidden; color:#48494E; font-size:11px; font-weight:normal;}
.aside .categoryBox .bottomLine {background:transparent url(../img/hrE1.gif) repeat-x scroll left bottom;}
.aside .categoryBox .topLine {background:transparent url(../img/hrE1.gif) repeat-x scroll left top;}
.aside .categoryBox h3 a { color:#48494E; font-size:12px; font-weight:bold; text-decoration:none; }
.aside .categoryBox ul.category { margin:10px 0 0 0; padding:0; list-style:none; }
.aside .categoryBox ul.category li { margin:0 0 10px 10px; }
.aside .categoryBox ul.category li a.selected { font-weight:bold; color:#2893BB; }
.aside .categoryBox ul.category li a { text-decoration:none; color:#7B7575; }
.aside .categoryBox ul.category li span { font-family:verdana; font-size:10px; color:#999; }
.aside .categoryBox ul.resourceManage { margin:0; padding:10px 0 0 0; list-style:none; background:transparent url(../img/hrE1.gif) repeat-x scroll left top; }
.aside .categoryBox ul.resourceManage li { background:url(../img/btnManage.gif) no-repeat 2px 2px; padding-left:14px; white-space:nowrap; overflow:hidden; margin-bottom:10px; }
.aside .categoryBox ul.resourceManage li a { text-decoration:none; color:#747474; }
.aside .categoryBox ul.resourceManage li a.selected { font-weight:bold; }
.aside .searchBox { padding:10px 0; text-align:center; }
.aside .searchBox input.input { border:1px solid #ddd; width:120px; height:16px;}
.aside .searchBox input.submit { vertical-align:middle; }
.install .content { position:relative; *zoom:1; overflow:hidden; width:auto; float:none; margin:0;}
.updateList,
.updateList th,
.updateList td{ border:0; vertical-align:top; text-align:left; padding:10px 0;}
.updateList {width:100%; height:100px; table-layout:fixed;}
.updateList th,
.updateList td{ border-bottom:1px dotted #ddd;}
.updateList th img { border:1px solid #ccc; padding:2px; overflow:hidden; *zoom:1; }
.updateList td { padding:10px 0 0 0;}
.updateList td .title{ position:relative;}
.updateList td .title h3 { padding:0; margin:0 0 5px 0; font-size:12px;}
.updateList td .title a {text-decoration:none; color:#333 !important; }
.updateList td .title .buttons{ position:absolute; top:0; right:0;}
.updateList td .info p{ margin:0 0 5px 0; line-height:1.5;}
.updateList td .info p.desc{ margin:0 100px 10px 0;}
.updateList td .info p.meta{ font-size:11px;}
.updateList td .info p.meta span{ display:inline-block; line-height:1; padding:0 5px 0 9px;}
.updateList td .info p.meta .reputation{ padding:0 5px 0 0;}
.updateList td .info p.meta .reputation img{ float:left; margin:-1px 0 0 0;}
.updateList td .info p.meta .reputation span{ padding:0 0 0 5px;}
.updateList td .info p.meta .lastUpdate{ border-left:1px solid #ddd;}
.updateList td .info p.meta .download{ border-left:1px solid #ddd;}
ul.listOrder { position:relative; overflow:hidden; margin:0; padding:10px 0; text-align:left; background:transparent url(../img/hrE1.gif) repeat-x scroll left bottom;}
ul.listOrder.asc li.arrow { background:url(../img/arrUp.gif) no-repeat right 2px; padding-right:10px; }
ul.listOrder.desc li.arrow { background:url(../img/arrDown.gif) no-repeat right 2px; padding-right:10px; }
ul.listOrder li { position:relative; left:-1px; display:inline; margin:0; padding:0 5px 0 9px; border-left:1px solid #ddd;}
ul.listOrder li.arrow a { text-decoration:none; font-weight:bold; color:#2893BB; }
ul.listOrder li a { text-decoration:none; color:#7B7575; }
p.caution strong { font-size: 1.2em; font-weight: bold; color: red; }
a>i{opacity:.5;filter:alpha(opacity=50)}
.x_label,
.x_badge{font-weight:normal}
.x .category{padding:15px 20px 0 20px;margin-bottom:20px}
.x .category>div{float:left;width:50%}
.x .category h2{margin:0 0 8px 0;color:#333;font-size:14px}
.x .category ul{margin:0 0 15px 0;padding:0;list-style:none}
.x .category .active>a{font-weight:bold;color:#333}
.list{zoom:1}
.list:after{content:"";display:block;clear:both}
.list>.x_thumbnail{padding:8px 10px; margin-bottom:10px;zoom:1;width:46.5%;box-shadow:1px 1px 3px #eee;overflow:hidden}
.list>.x_thumbnail:after{content:"";display:block; clear:both}
.list>.x_thumbnail.odd{float:left}
.list>.x_thumbnail.even{float:right}
.list .thumb{border-radius:3px;float:left;overflow:hidden;box-shadow:0 0 3px #666 inset;margin:0 15px 0 0;padding:5px}
.list .text>h3{margin:0 0 8px 0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.list .text>h3>a{color:#333}
.starRating,
.starRating span{display:inline-block;height:15px;background:transparent url(../img/starRating.png) no-repeat;overflow:hidden}
.starRating{width:79px;vertical-align:middle}
.starRating span{font-size:0;line-height:0;vertical-align:top;text-indent:-100px;*text-indent:0;background-position:0 -15px}
@media all and (max-width:480px){
.x .category>div{float:none;width:auto}
}
@media all and (max-width:960px){
.list>.x_thumbnail{width:auto}
.list>.x_thumbnail.odd,
.list>.x_thumbnail.even{float:none}
}

View file

@ -1 +1,4 @@
<h1 class="h1">{$lang->autoinstall}</h1>
<load target="./css/autoinstall.css" index="11" />
<div class="x_page-header">
<h1>{$lang->autoinstall} <a class="x_icon-question-sign" href="./admin/help/index.html#UMAN_advanced_easyinstall" target="_blank">{$lang->help}</a></h1>
</div>

Binary file not shown.

After

Width:  |  Height:  |  Size: 1 KiB

View file

@ -1,16 +1,24 @@
<include target="header.html" />
<div cond="$XE_VALIDATOR_MESSAGE" class="message {$XE_VALIDATOR_MESSAGE_TYPE}">
{@
$from_id = array(
'modules/autoinstall/tpl/install/1' => 1,
'modules/autoinstall/tpl/index/1' => 1,
'modules/autoinstall/tpl/uninstall/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="" method="post">
<input type="hidden" name="module" value="autoinstall" />
<input type="hidden" name="act" value="procAutoinstallAdminUpdateinfo" />
<input type="hidden" name="xe_validator_id" value="modules/autoinstall/tpl/index/1" />
<p>
<block cond="$show_ftp_note">
{@$ftp_link = sprintf('<a href="%s">%s</a>', getUrl('', 'module', 'admin', 'act', 'dispAdminConfigFtp'), $lang->ftp_setup)}
{sprintf($lang->description_ftp_note, $ftp_link)}
</block>
{@$btnUpdate = sprintf('<input type="submit" value="%s" class="text" />', $lang->status_update)}
{@$btnUpdate = sprintf('<input type="submit" value="%s" class="x_btn x_btn-link" style="position:relative;top:-1px;text-decoration:underline !important" />', $lang->status_update)}
{sprintf($lang->description_update, $btnUpdate)}
</p>
</form>

View file

@ -1,51 +1,62 @@
<include target="header.html" />
<load target="js/waiting.js" usecdn="true" />
<h2 class="h2">{$package->title} ver. {$package->version}</h2>
<div cond="$contain_core" class="message info">
<h2>{$package->title} ver. {$package->version}</h2>
<div cond="$contain_core" class="x_alert x_alert-block">
<h4>{$lang->msg_update_core_title}</h4>
<p>{$lang->msg_update_core}</p>
</div>
<p cond="$package->installed">{$lang->current_version}: {$package->cur_version} <block cond="$package->need_update">({$lang->require_update})</block></p>
<p cond="!$package->installed">{$lang->require_installation}</p>
<block cond="$package->depends">
<p>{$lang->about_depending_programs}</p>
<ul>
<li loop="$package->depends => $dep">
{$dep->title} ver. {$dep->version} -
<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})
</block>
</li>
</ul>
</block>
<div class="x_well">
<p cond="$package->installed">{$lang->current_version}: {$package->cur_version} <block cond="$package->need_update">({$lang->require_update})</block></p>
<p cond="!$package->installed">{$lang->require_installation}</p>
<block cond="$package->depends">
<p>{$lang->about_depending_programs}</p>
<ul>
<li loop="$package->depends => $dep">
{$dep->title} ver. {$dep->version} -
<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})
</block>
</li>
</ul>
<p>{$lang->description_install}</p>
</block>
</div>
<block cond="!$package->installed || $package->need_update">
<block cond="$show_ftp_note">
<div cond="$show_ftp_note" class="x_well x_clearfix">
<p>{$lang->description_download}. (<a href="{getUrl('', 'module', 'admin', 'act', 'dispAdminConfigFtp')}">FTP Setup</a>)</p>
<p>{$lang->path}: {$package->path}</p>
<p><a href="{_XE_DOWNLOAD_SERVER_}?module=resourceapi&act=procResourceapiDownload&package_srl={$package->package_srl}">{$lang->cmd_download}</a>
</block>
<block cond="!$show_ftp_note">
<p>{$lang->description_install}</p>
<div cond="$XE_VALIDATOR_MESSAGE" class="message {$XE_VALIDATOR_MESSAGE_TYPE}">
<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>
</div>
<div cond="!$show_ftp_note">
<div cond="$XE_VALIDATOR_MESSAGE && $XE_VALIDATOR_ID == 'modules/autoinstall/tpl/install/1'" class="message error">
<p>{$XE_VALIDATOR_MESSAGE}</p>
</div>
<form action="./" class="form" method="post" ruleset="ftp">
<form action="./" class="x_form-horizontal" method="post" ruleset="ftp">
<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" />
<input type="hidden" name="xe_validator_id" value="modules/autoinstall/tpl/install/1" />
<block cond="$need_password">
<p class="q"><label for="ftp_password">FTP {$lang->password}</label></p>
<p class="a"><input type="password" name="ftp_password" id="ftp_password" value="" /> <span class="desc">{$lang->about_ftp_password}</span></p>
<div class="x_control-group">
<label class="x_control-label" for="ftp_password">FTP {$lang->password}</label>
<div class="x_controls">
<input type="password" name="ftp_password" id="ftp_password" value="" />
<p class="x_help-inline">{$lang->about_ftp_password}</p>
</div>
</div>
</block>
<div class="btnArea">
<span class="btn medium"><input type="submit" value="{$package->installed?$lang->update:$lang->install}" /></span>
<div class="x_clearfix btnArea">
<div class="x_pull-right">
<input class="x_btn x_btn-primary" type="submit" value="{$package->installed?$lang->update:$lang->install}" />
</div>
</div>
</form>
</block>
</div>
</block>

View file

@ -1,123 +1,207 @@
<include target="category.html" />
<div class="x_clearfix" style="margin-bottom:10px">
<div cond="$act == 'dispAutoinstallAdminIndex'" class="x_pull-left sort">
<!--@if($order_target == 'newest')-->
<!--@if($order_type == 'desc')-->{@$_newest_order_type = 'asc'}<!--@else-->{@$_newest_order_type = 'desc'}<!--@end-->
<!--@else-->
{@$_newest_order_type = 'desc'}
<!--@end-->
<!--@if($order_target == 'download')-->
<!--@if($order_type == 'desc')-->{@$_download_order_type = 'asc'}<!--@else-->{@$_download_order_type = 'desc'}<!--@end-->
<!--@else-->
{@$_download_order_type = 'desc'}
<!--@end-->
<!--@if($order_target == 'popular')-->
<!--@if($order_type == 'desc')-->{@$_popular_order_type = 'asc'}<!--@else-->{@$_popular_order_type = 'desc'}<!--@end-->
<!--@else-->
{@$_popular_order_type = 'desc'}
<!--@end-->
<a href="{getUrl('order_target','newest','order_type',$_newest_order_type,page,'')}" class="active"|cond="$order_target == 'newest'">{$lang->order_newest} <i cond="$order_target == 'newest'" class="x_icon-circle-arrow-down"|cond="$_newest_order_type == 'asc'" class="x_icon-circle-arrow-up"|cond="$_newest_order_type == 'desc'">{$_newest_order_type}</i></a>
<i>|</i>
<a href="{getUrl('order_target','download','order_type',$_download_order_type,page,'')}" class="active"|cond="$order_target == 'download'">{$lang->order_download} <i cond="$order_target == 'download'" class="x_icon-circle-arrow-down"|cond="$_download_order_type == 'asc'" class="x_icon-circle-arrow-up"|cond="$_download_order_type == 'desc'">{$_download_order_type}</i></a>
<i>|</i>
<a href="{getUrl('order_target','popular','order_type',$_popular_order_type,page,'')}" class="active"|cond="$order_target == 'popular'">{$lang->order_popular} <i cond="$order_target == 'popular'" class="x_icon-circle-arrow-down"|cond="$_popular_order_type == 'asc'" class="x_icon-circle-arrow-up"|cond="$_popular_order_type == 'desc'">{$_popular_order_type}</i></a></li>
</div>
</div>
<div class="table even easyList dsTg">
<table width="100%" border="1" cellspacing="0">
<caption>
<div id="__list_simple">
<div style="overflow:hidden;margin-bottom:10px">
<strong style="position:relative;top:10px">
<block cond="$current_category">{$current_category}</block>
<block cond="!$current_category">All</block>
({sprintf('%d', $page_navigation->total_count)})
<span cond="$act == 'dispAutoinstallAdminIndex'" class="side">
<!--@if($order_target == 'newest')-->
<!--@if($order_type == 'desc')-->{@$_newest_order_type = 'asc'}<!--@else-->{@$_newest_order_type = 'desc'}<!--@end-->
<!--@else-->
{@$_newest_order_type = 'desc'}
<!--@end-->
<!--@if($order_target == 'download')-->
<!--@if($order_type == 'desc')-->{@$_download_order_type = 'asc'}<!--@else-->{@$_download_order_type = 'desc'}<!--@end-->
<!--@else-->
{@$_download_order_type = 'desc'}
<!--@end-->
<!--@if($order_target == 'popular')-->
<!--@if($order_type == 'desc')-->{@$_popular_order_type = 'asc'}<!--@else-->{@$_popular_order_type = 'desc'}<!--@end-->
<!--@else-->
{@$_popular_order_type = 'desc'}
<!--@end-->
Sort by
<a href="{getUrl('order_target','newest','order_type',$_newest_order_type)}">{$lang->order_newest}<!--@if($order_target == 'newest')--><!--@if($_newest_order_type == 'asc')--><!--@else--><!--@end--><!--@end--></a> |
<a href="{getUrl('order_target','download','order_type',$_download_order_type)}">{$lang->order_download}<!--@if($order_target == 'download')--><!--@if($_download_order_type == 'asc')--><!--@else--><!--@end--><!--@end--></a> |
<a href="{getUrl('order_target','popular','order_type',$_popular_order_type)}">{$lang->order_popular}<!--@if($order_target == 'popular')--><!--@if($_popular_order_type == 'asc')--><!--@else--><!--@end--><!--@end--></a>
</span>
<span class="side"><button type="button" class="text"><span class="hide">{$lang->simple_view}</span><span class="show">{$lang->detail_view}</span></button></span>
</caption>
<thead>
<tr>
<th scope="col" class="nowr">{$lang->category}</th>
<th scope="col" class="thumb">{$lang->thumbnail}</th>
<th scope="col" class="title">{$lang->name}</th>
<th scope="col" class="nowr">{$lang->distribute_version}</th>
<th scope="col" class="nowr">{$lang->current_version}</th>
<th scope="col" class="nowr">{$lang->run}</th>
</tr>
</thead>
<tbody>
<tr loop="$item_list => $key, $item">
{@ $target_url = $original_site."?mid=download&package_srl=".$item->package_srl; }
<td class="nowr">{$item->category}</td>
<td class="thumb"><img src="{str_replace('./', $uri, $item->item_screenshot_url)}" alt="" width="100" height="100" /></td>
<td class="title">
<p><a href="{$target_url}">{htmlspecialchars($item->title)}</a></p>
<p>{cut_str(htmlspecialchars($item->package_description),200)}</p>
</strong>
<div class="x_btn-group x_pull-right">
<button class="x_btn x_active __btn_simple">{$lang->simple_view}</button>
<button class="x_btn __btn_detail">{$lang->detail_view}</button>
</div>
</div>
<div class="list">
<block loop="$item_list => $key, $item">
{@ $target_url = $original_site."?mid=download&package_srl=".$item->package_srl; }
<div class="x_thumbnail">
<div class="thumb" style="min-height:80px">
<img src="{str_replace('./', $uri, $item->item_screenshot_url)}" alt="" style="width:80px;height:80px" />
</div>
<div class="text">
<h3><span class="x_label x_label-info">{$item->category}</span> <a href="{$target_url}" title="{$item->title}" target="_blank">{$item->title}</a></h3>
<p>
<block cond="(int)$item->package_voter > 0">
<span class="starRating"><span style="width:{sprintf("%d",$item->package_voted/$item->package_voter*20)}%">{sprintf($lang->rate, $item->package_start)}</span></span>
{sprintf("%0.1f",$item->package_voted/$item->package_voter*2)}/{number_format($item->package_voter)} |
<span class="starRating"><span style="width:{sprintf("%d",$item->package_voted/$item->package_voter*20)}%">{sprintf("%0.1f",$item->package_voted/$item->package_voter*2)}{sprintf($lang->rate, $item->package_start)}</span></span>
<span class="x_badge">{sprintf("%0.1f",$item->package_voted/$item->package_voter*2)}/{number_format($item->package_voter)}</span>
</block>
<block cond="(int)$item->package_voter <= 0">
<span class="starRating"><span style="width:0%">0</span></span>
0/0 |
<span class="x_badge">0/0</span>
</block>
{$lang->package_update} {zdate($item->item_regdate, "Y-m-d H:i")} |
{$lang->package_downloaded_count} : {number_format($item->package_downloaded)}
</p>
<p cond="$item->deps">{$lang->dependant_list}:</p>
<ul cond="$item->deps">
<li loop="$item->deps => $package_srl">{$installed[$package_srl]->title}</li>
</ul>
</td>
<td class="nowr">{htmlspecialchars($item->item_version)}</td>
<td class="nowr">{htmlspecialchars($item->current_version)}</td>
<td class="nowr">
<a cond="!$item->current_version" href="{getUrl('act','dispAutoinstallAdminInstall','package_srl',$item->package_srl)}">{$lang->install}</a>
<a cond="!$show_ftp_note && $item->current_version && $item->avail_remove" href="{getUrl('act','dispAutoinstallAdminUninstall','package_srl',$item->package_srl)}">{$lang->cmd_delete}</a>
<a cond="$item->current_version && $item->need_update == 'Y'" href="{getUrl('act','dispAutoinstallAdminInstall','package_srl',$item->package_srl)}">{$lang->update}</a>
</td>
</tr>
</tbody>
</table>
<p class="x_btn-group" style="text-align:right">
<a cond="$item->current_version && $item->need_update != 'Y'" class="x_btn x_disabled" href="#">{$lang->installed}</a>
<a cond="!$item->current_version" class="x_btn" href="{getUrl('act','dispAutoinstallAdminInstall','package_srl',$item->package_srl)}"><i class="x_icon-download-alt"></i> {$lang->install}</a>
<a cond="!$show_ftp_note && $item->current_version && $item->avail_remove" class="x_btn" href="{getUrl('act','dispAutoinstallAdminUninstall','package_srl',$item->package_srl)}"><i class="x_icon-remove"></i> {$lang->cmd_delete}</a>
<a cond="$item->current_version && $item->need_update == 'Y'" class="x_btn" href="{getUrl('act','dispAutoinstallAdminInstall','package_srl',$item->package_srl)}"><i class="x_icon-refresh"></i> {$lang->update}</a>
</p>
</div>
</div>
</block>
</div>
</div>
<div class="search">
<form action="./" class="pagination" cond="$page_navigation">
<input type="hidden" name="error_return_url" value="" />
<input type="hidden" name="module" value="{$module}" />
<input type="hidden" name="act" value="{$act}" />
<input cond="$order_target" type="hidden" name="order_target" value="{$order_target}" />
<input cond="$order_type" type="hidden" name="order_type" value="{$order_type}" />
<input cond="$category_srl" type="hidden" name="category_srl" value="{$category_srl}" />
<input cond="$childrenList" type="hidden" name="childrenList" value="{$childrenList}" />
<input cond="$search_keyword" type="hidden" name="search_keyword" value="{$search_keyword}" />
<a href="{getUrl('page', '')}" class="direction">&laquo; FIRST</a>
<block cond="$page_navigation->first_page + $page_navigation->page_count > $page_navigation->last_page && $page_navigation->page_count != $page_navigation->total_page">
<table id="__list_detail" class="x_table x_table-striped x_table-hover" style="display:none">
<caption>
<strong>
<block cond="$current_category">{$current_category}</block>
<block cond="!$current_category">All</block>
({sprintf('%d', $page_navigation->total_count)})
</strong>
<div class="x_btn-group x_pull-right">
<button class="x_btn x_active __btn_simple">{$lang->simple_view}</button>
<button class="x_btn __btn_detail">{$lang->detail_view}</button>
</div>
</caption>
<thead>
<tr>
<th scope="col" class="nowr">{$lang->thumbnail}</th>
<th scope="col" class="nowr">{$lang->name}</th>
<th scope="col" class="nowr">{$lang->distribute_version}</th>
<th scope="col" class="nowr">{$lang->current_version}</th>
<th scope="col" class="nowr">{$lang->run}</th>
</tr>
</thead>
<tbody>
<tr loop="$item_list => $key, $item">
{@ $target_url = $original_site."?mid=download&package_srl=".$item->package_srl; }
<td>
<div class="x_thumbnail" style="width:80px;height:80px">
<img src="{str_replace('./', $uri, $item->item_screenshot_url)}" alt="" width="100" height="100" />
</div>
</td>
<td>
<p><span class="x_label x_label-info">{$item->category}</span> <a href="{$target_url}" target="_blank">{$item->title}</a></p>
<p style="margin:5px 0">{cut_str($item->package_description,200)}</p>
<p style="margin:5px 0">
<block cond="(int)$item->package_voter > 0">
<span class="starRating"><span style="width:{sprintf("%d",$item->package_voted/$item->package_voter*20)}%">{sprintf("%0.1f",$item->package_voted/$item->package_voter*2)}{sprintf($lang->rate, $item->package_start)}</span></span>
<span class="x_badge">{sprintf("%0.1f",$item->package_voted/$item->package_voter*2)}/{number_format($item->package_voter)}</span>
</block>
<block cond="(int)$item->package_voter <= 0">
<span class="starRating"><span style="width:0%">0</span></span>
<span class="x_badge">0/0</span>
</block>
{$lang->package_update}: <time title="{zdate($item->item_regdate, "Y-m-d H:i")}">{zdate($item->item_regdate, "Y-m-d")}</time>
<i>|</i>
{$lang->package_downloaded_count}: {number_format($item->package_downloaded)}
<i>|</i>
</p>
<p cond="$item->deps">{$lang->dependant_list}:</p>
<ul cond="$item->deps" class="">
<li loop="$item->deps => $package_srl">{$installed[$package_srl]->title}</li>
</ul>
</td>
<td>{$item->item_version}</td>
<td>{$item->current_version}</td>
<td>
<span class="x_btn-group">
<a cond="$item->current_version && $item->need_update != 'Y'" class="x_btn x_disabled" href="#">{$lang->installed}</a>
<a cond="!$item->current_version" class="x_btn" href="{getUrl('act','dispAutoinstallAdminInstall','package_srl',$item->package_srl)}"><i class="x_icon-download-alt"></i> {$lang->install}</a>
<a cond="!$show_ftp_note && $item->current_version && $item->avail_remove" class="x_btn" href="{getUrl('act','dispAutoinstallAdminUninstall','package_srl',$item->package_srl)}"><i class="x_icon-remove"></i> {$lang->cmd_delete}</a>
<a cond="$item->current_version && $item->need_update == 'Y'" class="x_btn" href="{getUrl('act','dispAutoinstallAdminInstall','package_srl',$item->package_srl)}"><i class="x_icon-refresh"></i> {$lang->update}</a>
</span>
</td>
</tr>
</tbody>
</table>
<div class="x_clearfix" style="margin-top:-10px">
{@
$urlInfo = parse_url(getRequestUriByServerEnviroment());
parse_str($urlInfo['query'], $param);
}
<form cond="$page_navigation" action="./" class="x_pagination x_pull-left" no-error-return-url="true">
<input loop="$param => $key, $val" cond="!in_array($key, array('mid', 'vid', 'act'))" type="hidden" name="{$key}" value="{$val}" />
<ul>
<li class="x_disabled"|cond="!$page || $page == 1"><a href="{getUrl('page', '')}">&laquo; {$lang->first_page}</a></li>
<block cond="$page_navigation->first_page != 1 && $page_navigation->first_page + $page_navigation->page_count > $page_navigation->last_page - 1 && $page_navigation->page_count != $page_navigation->total_page">
{@$isGoTo = true}
<a href="{getUrl('page', '')}">1</a>
<a href="#goTo" class="tgAnchor" title="{$lang->cmd_go_to_page}">...</a>
</block>
<!--@while($page_no = $page_navigation->getNextPage())-->
<li>
<a href="#goTo" data-toggle title="{$lang->cmd_go_to_page}">&hellip;</a>
<span cond="$isGoTo" id="goTo" class="x_input-append">
<input type="number" min="1" max="{$page_navigation->last_page}" required name="page" title="{$lang->cmd_go_to_page}" />
<button type="submit" class="x_add-on">Go</button>
</span>
</li>
</block>
<!--@while($page_no = $page_navigation->getNextPage())-->
{@$last_page = $page_no}
<strong cond="$page_no == $page">{$page_no}</strong>
<a cond="$page_no != $page" href="{getUrl('page', $page_no)}">{$page_no}</a>
<!--@end-->
<block cond="$last_page != $page_navigation->last_page">
<li class="x_active"|cond="$page_no == $page"><a href="{getUrl('page', $page_no)}">{$page_no}</a></li>
<!--@end-->
<block cond="$last_page != $page_navigation->last_page && $last_page + 1 != $page_navigation->last_page">
{@$isGoTo = true}
<a href="#goTo" class="tgAnchor" title="{$lang->cmd_go_to_page}">...</a>
<a href="{getUrl('page', $page_navigation->last_page)}">{$page_navigation->last_page}</a>
</block>
<a href="{getUrl('page', $page_navigation->last_page)}" class="direction">LAST &raquo;</a>
<span cond="$isGoTo" id="goTo" class="tgContent">
<input name="page" title="{$lang->cmd_go_to_page}" />
<button type="submit">Go</button>
</span>
<li>
<a href="#goTo" data-toggle title="{$lang->cmd_go_to_page}">&hellip;</a>
<span cond="$isGoTo" id="goTo" class="x_input-append">
<input type="number" min="1" max="{$page_navigation->last_page}" required name="page" title="{$lang->cmd_go_to_page}" />
<button type="submit" class="x_add-on">Go</button>
</span>
</li>
</block>
<li class="x_disabled"|cond="$page == $page_navigation->last_page"><a href="{getUrl('page', $page_navigation->last_page)}" title="{$page_navigation->last_page}">{$lang->last_page} &raquo;</a></li>
</ul>
</form>
<form cond="$act == 'dispAutoinstallAdminIndex'" action="./">
<input type="hidden" name="error_return_url" value="" />
<input type="hidden" name="module" value="{$module}" />
<input type="hidden" name="act" value="{$act}" />
<input cond="$order_target" type="hidden" name="order_target" value="{$order_target}" />
<input cond="$order_type" type="hidden" name="order_type" value="{$order_type}" />
<input cond="$category_srl" type="hidden" name="category_srl" value="{$category_srl}" />
<input cond="$childrenList" type="hidden" name="childrenList" value="{$childrenList}" />
<input name="search_keyword" title="Search" value="{$search_keyword}" />
<input type="submit" value="Search" />
<form action="./" class="search x_input-append x_pull-right" no-error-return-url="true" cond="$act!=dispAutoinstallAdminInstalledPackages">
<input loop="$param => $key, $val" cond="!in_array($key, array('mid', 'vid', 'act', 'page'))" type="hidden" name="{$key}" value="{$val}" />
<input type="search" name="search_keyword" required title="Search" value="{htmlspecialchars($search_keyword)}">
<button class="x_btn x_btn-inverse" type="submit">{$lang->cmd_search}</button>
<a href="{getUrl('page', '', 'search_keyword', '')}" class="x_btn">{$lang->cmd_cancel}</a>
</form>
</div>
<script>
jQuery(function($){
var $btnSimple = $('.__btn_simple');
var $btnDetail = $('.__btn_detail');
var $listSimple = $('#__list_simple');
var $listDetail = $('#__list_detail');
$btnSimple.click(function(){
$btnSimple.addClass('x_active');
$btnDetail.removeClass('x_active');
$listSimple.show();
$listDetail.hide();
setCookie('__autoinstall_view_type', 'simple');
});
$btnDetail.click(function(){
$btnSimple.removeClass('x_active');
$btnDetail.addClass('x_active');
$listSimple.hide();
$listDetail.show();
setCookie('__autoinstall_view_type', 'detail');
});
var viewType = getCookie('__autoinstall_view_type');
if(viewType == 'detail'){
$btnDetail.trigger('click');
}
$('.list>.x_thumbnail:odd').addClass('even');
$('.list>.x_thumbnail:even').addClass('odd');
});
</script>

View file

@ -1,41 +1,51 @@
<include target="header.html" />
<load target="js/waiting.js" usecdn="true" />
<h2 class="h2">{$package->title}</h2>
<h2>{$package->title}</h2>
<p>{$package->type} ({$package->path})</p>
<block cond="$package->avail_remove">
<div class="message info">
<div class="x_alert x_alert-block">
<p>{$lang->description_uninstall}</p>
</div>
<div cond="$XE_VALIDATOR_MESSAGE" class="message {$XE_VALIDATOR_MESSAGE_TYPE}">
<div cond="$XE_VALIDATOR_MESSAGE && $XE_VALIDATOR_ID == 'modules/autoinstall/tpl/uninstall/1'" class="message error">
<p>{$XE_VALIDATOR_MESSAGE}</p>
</div>
<form action="./" class="form" method="post" ruleset="ftp">
<form action="./" class="x_form-horizontal" method="post" ruleset="ftp">
<input type="hidden" name="module" value="autoinstall" />
<input type="hidden" name="act" value="procAutoinstallAdminUninstallPackage" />
<input type="hidden" name="package_srl" value="{$package_srl}" />
<input type="hidden" name="return_url" value="{$return_url}" />
<input cond="!$need_password" type="hidden" name="ftp_password" value="dummy" />
<input type="hidden" name="xe_validator_id" value="modules/autoinstall/tpl/uninstall/1" />
<block cond="$need_password">
<p class="q"><label for="ftp_password">FTP {$lang->password}</label></p>
<p class="a"><input type="password" name="ftp_password" id="ftp_password" value="" /> <span class="desc">{$lang->about_ftp_password}</span></p>
<div class="x_control-group">
<label class="x_control-label" for="ftp_password">FTP {$lang->password}</label>
<div class="x_controls">
<input type="password" name="ftp_password" id="ftp_password" value="" />
<span class="x_help-block">{$lang->about_ftp_password}</span>
</div>
</div>
</block>
<div class="btnArea">
<span class="btn medium"><input type="submit" value="{$lang->cmd_delete}" /></span>
<div class="x_clearfix btnArea">
<div class="x_pull-right">
<input class="x_btn x_btn-primary" type="submit" value="{$lang->cmd_delete}" />
</div>
</div>
</form>
</block>
<block cond="!$package->avail_remove">
<div class="message error">
<div class="x_alert x_alert-error">
<p cond="$package->deps">{$lang->msg_dependency_package}</p>
<p cond="!$package->deps">{$lang->msg_does_not_support_delete}</p>
</div>
<p cond="$package->deps">{$lang->dependant_list}:</p>
<ul cond="$package->deps">
<li loop="$package->deps => $dep_package_srl">{$installed[$dep_package_srl]->title}</li>
</ul>
<div class="x_well">
<p cond="$package->deps">{$lang->dependant_list}:</p>
<ul cond="$package->deps">
<li loop="$package->deps => $dep_package_srl">{$installed[$dep_package_srl]->title}</li>
</ul>
</div>
</block>