mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-08 19:42:15 +09:00
Adds comments for phpDoc
git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@10753 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
86296c899e
commit
455091f7e8
6 changed files with 609 additions and 29 deletions
|
|
@ -1,29 +1,47 @@
|
||||||
<?php
|
<?php
|
||||||
/**
|
|
||||||
* @class autoinstallAdminController
|
|
||||||
* @author NHN (developers@xpressengine.com)
|
|
||||||
* @brief autoinstall module admin controller class
|
|
||||||
**/
|
|
||||||
|
|
||||||
require_once(_XE_PATH_.'modules/autoinstall/autoinstall.lib.php');
|
require_once(_XE_PATH_.'modules/autoinstall/autoinstall.lib.php');
|
||||||
|
|
||||||
|
/**
|
||||||
|
* autoinstall module admin controller class
|
||||||
|
*
|
||||||
|
* @author NHN (developers@xpressengine.com)
|
||||||
|
**/
|
||||||
class autoinstallAdminController extends autoinstall {
|
class autoinstallAdminController extends autoinstall {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Initialization
|
* Initialization
|
||||||
**/
|
**/
|
||||||
function init() {
|
function init() {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 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){
|
function checkFileCheckSum($file, $checksum){
|
||||||
$local_checksum = md5_file(FileHandler::getRealPath($file));
|
$local_checksum = md5_file(FileHandler::getRealPath($file));
|
||||||
return ($local_checksum === $checksum);
|
return ($local_checksum === $checksum);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Clean download file
|
||||||
|
*
|
||||||
|
* @param object $obj
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
function _cleanDownloaded($obj){
|
function _cleanDownloaded($obj){
|
||||||
FileHandler::removeDir($obj->download_path);
|
FileHandler::removeDir($obj->download_path);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Update easy install information
|
||||||
|
*
|
||||||
|
* @return Object
|
||||||
|
*/
|
||||||
function procAutoinstallAdminUpdateinfo()
|
function procAutoinstallAdminUpdateinfo()
|
||||||
{
|
{
|
||||||
$this->_updateinfo();
|
$this->_updateinfo();
|
||||||
|
|
@ -31,6 +49,11 @@
|
||||||
$this->setRedirectUrl(Context::get('error_return_url'));
|
$this->setRedirectUrl(Context::get('error_return_url'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Update easy install information
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
function _updateinfo(){
|
function _updateinfo(){
|
||||||
$oModel = &getModel('autoinstall');
|
$oModel = &getModel('autoinstall');
|
||||||
$item = $oModel->getLatestPackage();
|
$item = $oModel->getLatestPackage();
|
||||||
|
|
@ -49,6 +72,11 @@
|
||||||
$this->checkInstalled();
|
$this->checkInstalled();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Update installed package information
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
function checkInstalled()
|
function checkInstalled()
|
||||||
{
|
{
|
||||||
executeQuery("autoinstall.deleteInstalledPackage");
|
executeQuery("autoinstall.deleteInstalledPackage");
|
||||||
|
|
@ -122,6 +150,11 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Install package
|
||||||
|
*
|
||||||
|
* @return Object
|
||||||
|
*/
|
||||||
function procAutoinstallAdminPackageinstall()
|
function procAutoinstallAdminPackageinstall()
|
||||||
{
|
{
|
||||||
@set_time_limit(0);
|
@set_time_limit(0);
|
||||||
|
|
@ -175,6 +208,12 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Update package informations using recieved data from server
|
||||||
|
*
|
||||||
|
* @param object $xmlDoc Recieved data
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
function updatePackages(&$xmlDoc)
|
function updatePackages(&$xmlDoc)
|
||||||
{
|
{
|
||||||
$oModel =& getModel('autoinstall');
|
$oModel =& getModel('autoinstall');
|
||||||
|
|
@ -207,6 +246,12 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Update category using recived data from server.
|
||||||
|
*
|
||||||
|
* @param object $xmlDoc Recived data
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
function updateCategory(&$xmlDoc)
|
function updateCategory(&$xmlDoc)
|
||||||
{
|
{
|
||||||
executeQuery("autoinstall.deleteCategory");
|
executeQuery("autoinstall.deleteCategory");
|
||||||
|
|
@ -227,6 +272,11 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Uninstall package
|
||||||
|
*
|
||||||
|
* @return Object
|
||||||
|
*/
|
||||||
function procAutoinstallAdminUninstallPackage()
|
function procAutoinstallAdminUninstallPackage()
|
||||||
{
|
{
|
||||||
$package_srl = Context::get('package_srl');
|
$package_srl = Context::get('package_srl');
|
||||||
|
|
|
||||||
|
|
@ -1,16 +1,27 @@
|
||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* @class autoinstallAdminView
|
* Admin view class in the autoinstall module
|
||||||
* @author NHN (developers@xpressengine.com)
|
* @author NHN (developers@xpressengine.com)
|
||||||
* @brief admin view class in the autoinstall module
|
|
||||||
**/
|
**/
|
||||||
|
|
||||||
|
|
||||||
class autoinstallAdminView extends autoinstall {
|
class autoinstallAdminView extends autoinstall {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Category list
|
||||||
|
* @var array
|
||||||
|
*/
|
||||||
var $categories;
|
var $categories;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Is set a ftp information
|
||||||
|
* @var bool
|
||||||
|
*/
|
||||||
var $ftp_set = false;
|
var $ftp_set = false;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* initialize
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
function init() {
|
function init() {
|
||||||
$template_path = sprintf("%stpl/",$this->module_path);
|
$template_path = sprintf("%stpl/",$this->module_path);
|
||||||
Context::set('original_site', _XE_LOCATION_SITE_);
|
Context::set('original_site', _XE_LOCATION_SITE_);
|
||||||
|
|
@ -28,6 +39,45 @@
|
||||||
Context::set('iCount', $oModel->getInstalledPackageCount());
|
Context::set('iCount', $oModel->getInstalledPackageCount());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Rearrange one item
|
||||||
|
*
|
||||||
|
* <pre>
|
||||||
|
* $item:
|
||||||
|
* stdClass Object
|
||||||
|
* (
|
||||||
|
* [category_srl] => stdClass Object
|
||||||
|
* (
|
||||||
|
* [body] => xxx
|
||||||
|
* )
|
||||||
|
* [package_srl] => stdClass Object
|
||||||
|
* (
|
||||||
|
* [body] => xxx
|
||||||
|
* )
|
||||||
|
* ...
|
||||||
|
* [depfrom] => stdClass Object
|
||||||
|
* (
|
||||||
|
* [body] => xxx
|
||||||
|
* )
|
||||||
|
* )
|
||||||
|
*
|
||||||
|
* $targets:
|
||||||
|
* array('category_srl', 'package_srl', 'item_screenshot_url', 'package_voted', 'package_voter', 'package_description', 'package_downloaded', 'item_regdate', 'title', 'item_version', 'package_star', 'depfrom');
|
||||||
|
*
|
||||||
|
* returns:
|
||||||
|
* stdClass Object
|
||||||
|
* (
|
||||||
|
* [category_srl] => xxx
|
||||||
|
* [package_srl] => xxx
|
||||||
|
* ...
|
||||||
|
* [depfrom] => xxx
|
||||||
|
* )
|
||||||
|
* </pre>
|
||||||
|
*
|
||||||
|
* @param object $item
|
||||||
|
* @param object $targets
|
||||||
|
* @return object
|
||||||
|
*/
|
||||||
function rearrange(&$item, &$targets)
|
function rearrange(&$item, &$targets)
|
||||||
{
|
{
|
||||||
$ret = null;
|
$ret = null;
|
||||||
|
|
@ -38,6 +88,76 @@
|
||||||
return $ret;
|
return $ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Rearrage all item
|
||||||
|
*
|
||||||
|
* <pre>
|
||||||
|
* $items:
|
||||||
|
* Array
|
||||||
|
* (
|
||||||
|
* [0] => stdClass Object
|
||||||
|
* (
|
||||||
|
* [category_srl] => stdClass Object
|
||||||
|
* (
|
||||||
|
* [body] => xxx
|
||||||
|
* )
|
||||||
|
* [package_srl] => stdClass Object
|
||||||
|
* (
|
||||||
|
* [body] => xxx
|
||||||
|
* )
|
||||||
|
* ...
|
||||||
|
* [depfrom] => stdClass Object
|
||||||
|
* (
|
||||||
|
* [body] => xxx
|
||||||
|
* )
|
||||||
|
* )
|
||||||
|
* [1] => stdClass Object
|
||||||
|
* (
|
||||||
|
* ...
|
||||||
|
* )
|
||||||
|
* ...
|
||||||
|
* )
|
||||||
|
*
|
||||||
|
* $packages:
|
||||||
|
* Array
|
||||||
|
* (
|
||||||
|
* [<i>package_srl</i>] => stdClass Object
|
||||||
|
* (
|
||||||
|
* [current_version] => xxx
|
||||||
|
* [need_update] => xxx
|
||||||
|
* [path] => xxx
|
||||||
|
* ...
|
||||||
|
* )
|
||||||
|
* ...
|
||||||
|
* )
|
||||||
|
*
|
||||||
|
* return:
|
||||||
|
* Array
|
||||||
|
* (
|
||||||
|
* [<i>package_srl</i>] => stdClass Object
|
||||||
|
* (
|
||||||
|
* [category_srl] => xxx
|
||||||
|
* [package_srl] => xxx
|
||||||
|
* ...
|
||||||
|
* [category] => xxx
|
||||||
|
* [current_version] => xxx
|
||||||
|
* [type] => xxx
|
||||||
|
* [need_update] => xxx
|
||||||
|
* [avail_remove] => xxx
|
||||||
|
* [deps] => Array
|
||||||
|
* (
|
||||||
|
* [0] => xxx
|
||||||
|
* ...
|
||||||
|
* )
|
||||||
|
* )
|
||||||
|
* ...
|
||||||
|
* )
|
||||||
|
* </pre>
|
||||||
|
*
|
||||||
|
* @param object $items Recived data from server
|
||||||
|
* @param object $packages Local data
|
||||||
|
* @return object
|
||||||
|
*/
|
||||||
function rearranges($items, $packages = null)
|
function rearranges($items, $packages = null)
|
||||||
{
|
{
|
||||||
if(!is_array($items)) $items = array($items);
|
if(!is_array($items)) $items = array($items);
|
||||||
|
|
@ -113,6 +233,11 @@
|
||||||
return $item_list;
|
return $item_list;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Display installed packages
|
||||||
|
*
|
||||||
|
* @return Object
|
||||||
|
*/
|
||||||
function dispAutoinstallAdminInstalledPackages()
|
function dispAutoinstallAdminInstalledPackages()
|
||||||
{
|
{
|
||||||
$page = Context::get('page');
|
$page = Context::get('page');
|
||||||
|
|
@ -146,6 +271,11 @@
|
||||||
$security->encodeHTML('item_list..');
|
$security->encodeHTML('item_list..');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Display install package
|
||||||
|
*
|
||||||
|
* @return Object
|
||||||
|
*/
|
||||||
function dispAutoinstallAdminInstall() {
|
function dispAutoinstallAdminInstall() {
|
||||||
$package_srl = Context::get('package_srl');
|
$package_srl = Context::get('package_srl');
|
||||||
if(!$package_srl) return $this->dispAutoinstallAdminIndex();
|
if(!$package_srl) return $this->dispAutoinstallAdminIndex();
|
||||||
|
|
@ -219,6 +349,11 @@
|
||||||
$security->encodeHTML('package.' , 'package.depends..');
|
$security->encodeHTML('package.' , 'package.depends..');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Display package list
|
||||||
|
*
|
||||||
|
* @return Object
|
||||||
|
*/
|
||||||
function dispAutoinstallAdminIndex() {
|
function dispAutoinstallAdminIndex() {
|
||||||
$oModuleModel = &getModel('module');
|
$oModuleModel = &getModel('module');
|
||||||
$config = $oModuleModel->getModuleConfig('autoinstall');
|
$config = $oModuleModel->getModuleConfig('autoinstall');
|
||||||
|
|
@ -254,7 +389,7 @@
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
unset($_SESSION['__XE_EASYiNSTALL_REDIRECT__']);
|
unset($_SESSION['__XE_EASYINSTALL_REDIRECT__']);
|
||||||
|
|
||||||
$page = Context::get('page');
|
$page = Context::get('page');
|
||||||
if(!$page) $page = 1;
|
if(!$page) $page = 1;
|
||||||
|
|
@ -299,6 +434,11 @@
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Display category
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
function dispCategory()
|
function dispCategory()
|
||||||
{
|
{
|
||||||
$oModel = &getModel('autoinstall');
|
$oModel = &getModel('autoinstall');
|
||||||
|
|
@ -306,6 +446,11 @@
|
||||||
Context::set('categories', $this->categories);
|
Context::set('categories', $this->categories);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Display uninstall package
|
||||||
|
*
|
||||||
|
* @return Object
|
||||||
|
*/
|
||||||
function dispAutoinstallAdminUninstall()
|
function dispAutoinstallAdminUninstall()
|
||||||
{
|
{
|
||||||
$package_srl = Context::get('package_srl');
|
$package_srl = Context::get('package_srl');
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,15 @@
|
||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* @class autoinstall
|
* XML Generater
|
||||||
* @author NHN (developers@xpressengine.com)
|
* @author NHN (developers@xpressengine.com)
|
||||||
* @brief high class of the autoinstall module
|
*/
|
||||||
**/
|
|
||||||
|
|
||||||
class XmlGenerater {
|
class XmlGenerater {
|
||||||
|
/**
|
||||||
|
* Generate XML using given data
|
||||||
|
*
|
||||||
|
* @param array $params The data
|
||||||
|
* @return string Returns xml string
|
||||||
|
*/
|
||||||
function generate(&$params)
|
function generate(&$params)
|
||||||
{
|
{
|
||||||
$xmlDoc = '<?xml version="1.0" encoding="utf-8" ?><methodCall><params>';
|
$xmlDoc = '<?xml version="1.0" encoding="utf-8" ?><methodCall><params>';
|
||||||
|
|
@ -19,6 +23,12 @@
|
||||||
return $xmlDoc;
|
return $xmlDoc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Request data to server and returns result
|
||||||
|
*
|
||||||
|
* @param array $params Request data
|
||||||
|
* @return object
|
||||||
|
*/
|
||||||
function getXmlDoc(&$params)
|
function getXmlDoc(&$params)
|
||||||
{
|
{
|
||||||
$body = XmlGenerater::generate($params);
|
$body = XmlGenerater::generate($params);
|
||||||
|
|
@ -30,9 +40,21 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* High class of the autoinstall module
|
||||||
|
* @author NHN (developers@xpressengine.com)
|
||||||
|
**/
|
||||||
class autoinstall extends ModuleObject {
|
class autoinstall extends ModuleObject {
|
||||||
|
/**
|
||||||
|
* Temporary directory path
|
||||||
|
*/
|
||||||
var $tmp_dir = './files/cache/autoinstall/';
|
var $tmp_dir = './files/cache/autoinstall/';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructor
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
function autoinstall()
|
function autoinstall()
|
||||||
{
|
{
|
||||||
$oModuleModel = &getModel('module');
|
$oModuleModel = &getModel('module');
|
||||||
|
|
@ -44,7 +66,9 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief for additional tasks required when installing
|
* For additional tasks required when installing
|
||||||
|
*
|
||||||
|
* @return Object
|
||||||
**/
|
**/
|
||||||
function moduleInstall() {
|
function moduleInstall() {
|
||||||
$oModuleController = &getController('module');
|
$oModuleController = &getController('module');
|
||||||
|
|
@ -54,7 +78,9 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief method to check if installation is succeeded
|
* Method to check if installation is succeeded
|
||||||
|
*
|
||||||
|
* @return bool
|
||||||
**/
|
**/
|
||||||
function checkUpdate() {
|
function checkUpdate() {
|
||||||
$oDB =& DB::getInstance();
|
$oDB =& DB::getInstance();
|
||||||
|
|
@ -82,7 +108,9 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Execute update
|
* Execute update
|
||||||
|
*
|
||||||
|
* @return Object
|
||||||
**/
|
**/
|
||||||
function moduleUpdate() {
|
function moduleUpdate() {
|
||||||
$oDB =& DB::getInstance();
|
$oDB =& DB::getInstance();
|
||||||
|
|
@ -118,7 +146,8 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Re-generate the cache file
|
* Re-generate the cache file
|
||||||
|
* @return Object
|
||||||
**/
|
**/
|
||||||
function recompileCache() {
|
function recompileCache() {
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,21 +1,75 @@
|
||||||
<?php
|
<?php
|
||||||
require_once(_XE_PATH_.'libs/ftp.class.php');
|
require_once(_XE_PATH_.'libs/ftp.class.php');
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Module installer
|
||||||
|
* @author NHN (developers@xpressengine.com)
|
||||||
|
*/
|
||||||
class ModuleInstaller {
|
class ModuleInstaller {
|
||||||
|
/**
|
||||||
|
* Package information
|
||||||
|
* @var object
|
||||||
|
*/
|
||||||
var $package = null;
|
var $package = null;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Server's base url
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
var $base_url;
|
var $base_url;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Temporary directory
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
var $temp_dir = './files/cache/autoinstall/';
|
var $temp_dir = './files/cache/autoinstall/';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Install path
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
var $target_path;
|
var $target_path;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Downloaded file path
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
var $download_file;
|
var $download_file;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ???
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
var $url;
|
var $url;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Download path
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
var $download_path;
|
var $download_path;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* FTP password
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
var $ftp_password;
|
var $ftp_password;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set server's base url
|
||||||
|
*
|
||||||
|
* @param string $url The url to set
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
function setServerUrl($url)
|
function setServerUrl($url)
|
||||||
{
|
{
|
||||||
$this->base_url = $url;
|
$this->base_url = $url;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Uninstall
|
||||||
|
*
|
||||||
|
* @return Object
|
||||||
|
*/
|
||||||
function uninstall()
|
function uninstall()
|
||||||
{
|
{
|
||||||
$oModel =& getModel('autoinstall');
|
$oModel =& getModel('autoinstall');
|
||||||
|
|
@ -33,11 +87,22 @@
|
||||||
return $output;
|
return $output;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set a FTP password
|
||||||
|
*
|
||||||
|
* @param string $ftp_password The password to set.
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
function setPassword($ftp_password)
|
function setPassword($ftp_password)
|
||||||
{
|
{
|
||||||
$this->ftp_password = $ftp_password;
|
$this->ftp_password = $ftp_password;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Download file from server
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
function _download()
|
function _download()
|
||||||
{
|
{
|
||||||
if($this->package->path == ".")
|
if($this->package->path == ".")
|
||||||
|
|
@ -64,6 +129,13 @@
|
||||||
FileHandler::writeFile($this->download_file, $buff);
|
FileHandler::writeFile($this->download_file, $buff);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Uninstall module.
|
||||||
|
*
|
||||||
|
* Call module's moduleUninstall() and drop all tables related module
|
||||||
|
*
|
||||||
|
* @return Object
|
||||||
|
*/
|
||||||
function uninstallModule()
|
function uninstallModule()
|
||||||
{
|
{
|
||||||
$path_array = explode("/", $this->package->path);
|
$path_array = explode("/", $this->package->path);
|
||||||
|
|
@ -87,6 +159,13 @@
|
||||||
return new Object();
|
return new Object();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Install module
|
||||||
|
*
|
||||||
|
* Call module's moduleInstall(), moduleUpdate() and create tables.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
function installModule()
|
function installModule()
|
||||||
{
|
{
|
||||||
$path = $this->package->path;
|
$path = $this->package->path;
|
||||||
|
|
@ -116,6 +195,13 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Install module.
|
||||||
|
*
|
||||||
|
* Download file and install module
|
||||||
|
*
|
||||||
|
* @return Object
|
||||||
|
*/
|
||||||
function install()
|
function install()
|
||||||
{
|
{
|
||||||
$this->_download();
|
$this->_download();
|
||||||
|
|
@ -132,6 +218,11 @@
|
||||||
return new Object();
|
return new Object();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Untar a downloaded tar ball
|
||||||
|
*
|
||||||
|
* @return array Returns file list
|
||||||
|
*/
|
||||||
function _unPack(){
|
function _unPack(){
|
||||||
require_once(_XE_PATH_.'libs/tar.class.php');
|
require_once(_XE_PATH_.'libs/tar.class.php');
|
||||||
|
|
||||||
|
|
@ -150,6 +241,12 @@
|
||||||
return $file_list;
|
return $file_list;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Remove directory
|
||||||
|
*
|
||||||
|
* @param string $path Path to remove
|
||||||
|
* @return Object
|
||||||
|
*/
|
||||||
function _removeDir($path) {
|
function _removeDir($path) {
|
||||||
$real_path = FileHandler::getRealPath($path);
|
$real_path = FileHandler::getRealPath($path);
|
||||||
$oDir = dir($path);
|
$oDir = dir($path);
|
||||||
|
|
@ -179,17 +276,46 @@
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Module installer for SFTP
|
||||||
|
* @author NHN (developers@xpressengine.com)
|
||||||
|
*/
|
||||||
class SFTPModuleInstaller extends ModuleInstaller {
|
class SFTPModuleInstaller extends ModuleInstaller {
|
||||||
|
/**
|
||||||
|
* FTP information
|
||||||
|
* @var object
|
||||||
|
*/
|
||||||
var $ftp_info = null;
|
var $ftp_info = null;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* SFTP connection
|
||||||
|
* @var resource
|
||||||
|
*/
|
||||||
var $connection = null;
|
var $connection = null;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* SFTP resource
|
||||||
|
* @var resource
|
||||||
|
*/
|
||||||
var $sftp = null;
|
var $sftp = null;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructor
|
||||||
|
*
|
||||||
|
* @param object $package Package information
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
function SFTPModuleInstaller(&$package)
|
function SFTPModuleInstaller(&$package)
|
||||||
{
|
{
|
||||||
$this->package =& $package;
|
$this->package =& $package;
|
||||||
$this->ftp_info = Context::getFTPInfo();
|
$this->ftp_info = Context::getFTPInfo();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Connect to SFTP
|
||||||
|
*
|
||||||
|
* @return Object
|
||||||
|
*/
|
||||||
function _connect() {
|
function _connect() {
|
||||||
if(!function_exists('ssh2_connect'))
|
if(!function_exists('ssh2_connect'))
|
||||||
{
|
{
|
||||||
|
|
@ -216,9 +342,20 @@
|
||||||
return new Object();
|
return new Object();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Close
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
function _close() {
|
function _close() {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Remove file
|
||||||
|
*
|
||||||
|
* @param string $path Path to remove
|
||||||
|
* @return Object
|
||||||
|
*/
|
||||||
function _removeFile($path)
|
function _removeFile($path)
|
||||||
{
|
{
|
||||||
if(substr($path, 0, 2) == "./") $path = substr($path, 2);
|
if(substr($path, 0, 2) == "./") $path = substr($path, 2);
|
||||||
|
|
@ -231,6 +368,12 @@
|
||||||
return new Object();
|
return new Object();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Remove Directory
|
||||||
|
*
|
||||||
|
* @param string $path Path to remove
|
||||||
|
* @return Object
|
||||||
|
*/
|
||||||
function _removeDir_real($path)
|
function _removeDir_real($path)
|
||||||
{
|
{
|
||||||
if(substr($path, 0, 2) == "./") $path = substr($path, 2);
|
if(substr($path, 0, 2) == "./") $path = substr($path, 2);
|
||||||
|
|
@ -243,6 +386,12 @@
|
||||||
return new Object();
|
return new Object();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Copy directory
|
||||||
|
*
|
||||||
|
* @param array $file_list File list to copy
|
||||||
|
* @return Object
|
||||||
|
*/
|
||||||
function _copyDir(&$file_list){
|
function _copyDir(&$file_list){
|
||||||
if(!$this->ftp_password) return new Object(-1,'msg_ftp_password_input');
|
if(!$this->ftp_password) return new Object(-1,'msg_ftp_password_input');
|
||||||
|
|
||||||
|
|
@ -270,17 +419,40 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Module installer for PHP FTP
|
||||||
|
* @author NHN (developers@xpressengine.com)
|
||||||
|
*/
|
||||||
class PHPFTPModuleInstaller extends ModuleInstaller {
|
class PHPFTPModuleInstaller extends ModuleInstaller {
|
||||||
|
/**
|
||||||
|
* FTP information
|
||||||
|
* @var object
|
||||||
|
*/
|
||||||
var $ftp_info = null;
|
var $ftp_info = null;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* FTP connection
|
||||||
|
* @var resource
|
||||||
|
*/
|
||||||
var $connection = null;
|
var $connection = null;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructor
|
||||||
|
*
|
||||||
|
* @param object $package Package information
|
||||||
|
* @var void
|
||||||
|
*/
|
||||||
function PHPFTPModuleInstaller(&$package)
|
function PHPFTPModuleInstaller(&$package)
|
||||||
{
|
{
|
||||||
$this->package =& $package;
|
$this->package =& $package;
|
||||||
$this->ftp_info = Context::getFTPInfo();
|
$this->ftp_info = Context::getFTPInfo();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Connect to FTP
|
||||||
|
*
|
||||||
|
* @return Object
|
||||||
|
*/
|
||||||
function _connect()
|
function _connect()
|
||||||
{
|
{
|
||||||
if($this->ftp_info->ftp_host)
|
if($this->ftp_info->ftp_host)
|
||||||
|
|
@ -313,6 +485,12 @@
|
||||||
return new Object();
|
return new Object();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Remove file
|
||||||
|
*
|
||||||
|
* @param string $path Path to remove
|
||||||
|
* @return Object
|
||||||
|
*/
|
||||||
function _removeFile($path)
|
function _removeFile($path)
|
||||||
{
|
{
|
||||||
if(substr($path, 0, 2) == "./") $path = substr($path, 2);
|
if(substr($path, 0, 2) == "./") $path = substr($path, 2);
|
||||||
|
|
@ -325,6 +503,12 @@
|
||||||
return new Object();
|
return new Object();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Remove directory
|
||||||
|
*
|
||||||
|
* @param string $path Path to remove
|
||||||
|
* @return Object
|
||||||
|
*/
|
||||||
function _removeDir_real($path)
|
function _removeDir_real($path)
|
||||||
{
|
{
|
||||||
if(substr($path, 0, 2) == "./") $path = substr($path, 2);
|
if(substr($path, 0, 2) == "./") $path = substr($path, 2);
|
||||||
|
|
@ -338,10 +522,21 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Close
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
function _close() {
|
function _close() {
|
||||||
ftp_close($this->connection);
|
ftp_close($this->connection);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Copy directory
|
||||||
|
*
|
||||||
|
* @param array $file_list File list to copy
|
||||||
|
* @return Object
|
||||||
|
*/
|
||||||
function _copyDir(&$file_list) {
|
function _copyDir(&$file_list) {
|
||||||
if(!$this->ftp_password) return new Object(-1,'msg_ftp_password_input');
|
if(!$this->ftp_password) return new Object(-1,'msg_ftp_password_input');
|
||||||
|
|
||||||
|
|
@ -402,16 +597,39 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Module installer for FTP
|
||||||
|
* @author NHN (developers@xpressengine.com)
|
||||||
|
*/
|
||||||
class FTPModuleInstaller extends ModuleInstaller {
|
class FTPModuleInstaller extends ModuleInstaller {
|
||||||
|
/**
|
||||||
|
* FTP instance
|
||||||
|
* @var FTP
|
||||||
|
*/
|
||||||
var $oFtp = null;
|
var $oFtp = null;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* FTP information
|
||||||
|
* @var object
|
||||||
|
*/
|
||||||
var $ftp_info = null;
|
var $ftp_info = null;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructor
|
||||||
|
*
|
||||||
|
* @param object $package Package information
|
||||||
|
*/
|
||||||
function FTPModuleInstaller(&$package)
|
function FTPModuleInstaller(&$package)
|
||||||
{
|
{
|
||||||
$this->package =& $package;
|
$this->package =& $package;
|
||||||
$this->ftp_info = Context::getFTPInfo();
|
$this->ftp_info = Context::getFTPInfo();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Connect to FTP
|
||||||
|
*
|
||||||
|
* @return Object
|
||||||
|
*/
|
||||||
function _connect() {
|
function _connect() {
|
||||||
if($this->ftp_info->ftp_host)
|
if($this->ftp_info->ftp_host)
|
||||||
{
|
{
|
||||||
|
|
@ -435,6 +653,12 @@
|
||||||
return new Object();
|
return new Object();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Remove file
|
||||||
|
*
|
||||||
|
* @param string $path Path to remove
|
||||||
|
* @return Object
|
||||||
|
*/
|
||||||
function _removeFile($path)
|
function _removeFile($path)
|
||||||
{
|
{
|
||||||
if(substr($path, 0, 2) == "./") $path = substr($path, 2);
|
if(substr($path, 0, 2) == "./") $path = substr($path, 2);
|
||||||
|
|
@ -447,6 +671,11 @@
|
||||||
return new Object();
|
return new Object();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Remove directory
|
||||||
|
* @param string $path Path to remove
|
||||||
|
* @return Object
|
||||||
|
*/
|
||||||
function _removeDir_real($path)
|
function _removeDir_real($path)
|
||||||
{
|
{
|
||||||
if(substr($path, 0, 2) == "./") $path = substr($path, 2);
|
if(substr($path, 0, 2) == "./") $path = substr($path, 2);
|
||||||
|
|
@ -459,10 +688,21 @@
|
||||||
return new Object();
|
return new Object();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Close
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
function _close() {
|
function _close() {
|
||||||
$this->oFtp->ftp_quit();
|
$this->oFtp->ftp_quit();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Copy directory
|
||||||
|
*
|
||||||
|
* @param array $file_list File list to copy
|
||||||
|
* @return Object
|
||||||
|
*/
|
||||||
function _copyDir(&$file_list){
|
function _copyDir(&$file_list){
|
||||||
if(!$this->ftp_password) return new Object(-1,'msg_ftp_password_input');
|
if(!$this->ftp_password) return new Object(-1,'msg_ftp_password_input');
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,16 @@
|
||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* @class autoinstallModel
|
* Model class of the autoinstall module
|
||||||
* @author NHN (developers@xpressengine.com)
|
* @author NHN (developers@xpressengine.com)
|
||||||
* @brief Model class of the autoinstall module
|
|
||||||
**/
|
**/
|
||||||
|
|
||||||
class autoinstallModel extends autoinstall {
|
class autoinstallModel extends autoinstall {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get category information
|
||||||
|
*
|
||||||
|
* @param int $category_srl The sequence of category to get information
|
||||||
|
* @return object
|
||||||
|
*/
|
||||||
function getCategory($category_srl)
|
function getCategory($category_srl)
|
||||||
{
|
{
|
||||||
$args->category_srl = $category_srl;
|
$args->category_srl = $category_srl;
|
||||||
|
|
@ -15,6 +19,11 @@
|
||||||
return array_shift($output->data);
|
return array_shift($output->data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get packages information
|
||||||
|
*
|
||||||
|
* @return array
|
||||||
|
*/
|
||||||
function getPackages()
|
function getPackages()
|
||||||
{
|
{
|
||||||
$output = executeQueryArray("autoinstall.getPackages");
|
$output = executeQueryArray("autoinstall.getPackages");
|
||||||
|
|
@ -22,6 +31,12 @@
|
||||||
return $output->data;
|
return $output->data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get installed packages information
|
||||||
|
*
|
||||||
|
* @param int $package_srl The sequence of package to get information
|
||||||
|
* @return object
|
||||||
|
*/
|
||||||
function getInstalledPackage($package_srl)
|
function getInstalledPackage($package_srl)
|
||||||
{
|
{
|
||||||
$args->package_srl = $package_srl;
|
$args->package_srl = $package_srl;
|
||||||
|
|
@ -30,6 +45,12 @@
|
||||||
return array_shift($output->data);
|
return array_shift($output->data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get one package information
|
||||||
|
*
|
||||||
|
* @param int $package_srl The sequence of package to get information
|
||||||
|
* @return object
|
||||||
|
*/
|
||||||
function getPackage($package_srl)
|
function getPackage($package_srl)
|
||||||
{
|
{
|
||||||
$args->package_srl = $package_srl;
|
$args->package_srl = $package_srl;
|
||||||
|
|
@ -38,6 +59,11 @@
|
||||||
return array_shift($output->data);
|
return array_shift($output->data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get category list
|
||||||
|
*
|
||||||
|
* @return array
|
||||||
|
*/
|
||||||
function getCategoryList()
|
function getCategoryList()
|
||||||
{
|
{
|
||||||
$output = executeQueryArray("autoinstall.getCategories");
|
$output = executeQueryArray("autoinstall.getCategories");
|
||||||
|
|
@ -70,6 +96,12 @@
|
||||||
return $resultList;
|
return $resultList;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get pcakge count in category
|
||||||
|
*
|
||||||
|
* @param int $category_srl The sequence of category to get count
|
||||||
|
* @return int
|
||||||
|
*/
|
||||||
function getPackageCount($category_srl)
|
function getPackageCount($category_srl)
|
||||||
{
|
{
|
||||||
$args->category_srl = $category_srl;
|
$args->category_srl = $category_srl;
|
||||||
|
|
@ -78,6 +110,11 @@
|
||||||
return $output->data->count;
|
return $output->data->count;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get installed package count
|
||||||
|
*
|
||||||
|
* @return int
|
||||||
|
*/
|
||||||
function getInstalledPackageCount()
|
function getInstalledPackageCount()
|
||||||
{
|
{
|
||||||
$output = executeQuery("autoinstall.getInstalledPackageCount", $args);
|
$output = executeQuery("autoinstall.getInstalledPackageCount", $args);
|
||||||
|
|
@ -85,6 +122,15 @@
|
||||||
return $output->data->count;
|
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)
|
function setDepth(&$item, $depth, &$list, &$resultList)
|
||||||
{
|
{
|
||||||
$resultList[$item->category_srl] =& $item;
|
$resultList[$item->category_srl] =& $item;
|
||||||
|
|
@ -102,12 +148,23 @@
|
||||||
return $siblingList;
|
return $siblingList;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get lastest package information
|
||||||
|
*
|
||||||
|
* @return object Returns lastest package information. If no result returns null.
|
||||||
|
*/
|
||||||
function getLatestPackage() {
|
function getLatestPackage() {
|
||||||
$output = executeQueryArray("autoinstall.getLatestPackage");
|
$output = executeQueryArray("autoinstall.getLatestPackage");
|
||||||
if(!$output->data) return null;
|
if(!$output->data) return null;
|
||||||
return array_shift($output->data);
|
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) {
|
function getInstalledPackages($package_list) {
|
||||||
$args->package_list = $package_list;
|
$args->package_list = $package_list;
|
||||||
$output = executeQueryArray("autoinstall.getInstalledPackages", $args);
|
$output = executeQueryArray("autoinstall.getInstalledPackages", $args);
|
||||||
|
|
@ -120,6 +177,12 @@
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get installed package list
|
||||||
|
*
|
||||||
|
* @param int $page
|
||||||
|
* @return Object
|
||||||
|
*/
|
||||||
function getInstalledPackageList($page)
|
function getInstalledPackageList($page)
|
||||||
{
|
{
|
||||||
$args->page = $page;
|
$args->page = $page;
|
||||||
|
|
@ -138,6 +201,12 @@
|
||||||
return $output;
|
return $output;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get type using path
|
||||||
|
*
|
||||||
|
* @param string $path Path to get type
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
function getTypeFromPath($path)
|
function getTypeFromPath($path)
|
||||||
{
|
{
|
||||||
if(!$path) return null;
|
if(!$path) return null;
|
||||||
|
|
@ -148,6 +217,12 @@
|
||||||
return $type;
|
return $type;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get config file path by type
|
||||||
|
*
|
||||||
|
* @param string $type Type to get config file path
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
function getConfigFilePath($type)
|
function getConfigFilePath($type)
|
||||||
{
|
{
|
||||||
$config_file = null;
|
$config_file = null;
|
||||||
|
|
@ -176,6 +251,12 @@
|
||||||
return $config_file;
|
return $config_file;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns target is removable
|
||||||
|
*
|
||||||
|
* @param string $path Path
|
||||||
|
* @return bool
|
||||||
|
*/
|
||||||
function checkRemovable($path)
|
function checkRemovable($path)
|
||||||
{
|
{
|
||||||
$path_array = explode("/", $path);
|
$path_array = explode("/", $path);
|
||||||
|
|
@ -186,6 +267,12 @@
|
||||||
else return false;
|
else return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get sequence of package by path
|
||||||
|
*
|
||||||
|
* @param string $path Path to get sequence
|
||||||
|
* @return int
|
||||||
|
*/
|
||||||
function getPackageSrlByPath($path)
|
function getPackageSrlByPath($path)
|
||||||
{
|
{
|
||||||
if (!$path) return;
|
if (!$path) return;
|
||||||
|
|
@ -203,6 +290,12 @@
|
||||||
return $GLOBLAS['XE_AUTOINSTALL_PACKAGE_SRL_BY_PATH'][$path];
|
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)
|
function getRemoveUrlByPackageSrl($packageSrl)
|
||||||
{
|
{
|
||||||
$ftp_info = Context::getFTPInfo();
|
$ftp_info = Context::getFTPInfo();
|
||||||
|
|
@ -213,6 +306,12 @@
|
||||||
return getNotEncodedUrl('', 'module', 'admin', 'act', 'dispAutoinstallAdminUninstall', 'package_srl', $packageSrl);
|
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)
|
function getRemoveUrlByPath($path)
|
||||||
{
|
{
|
||||||
if (!$path) return;
|
if (!$path) return;
|
||||||
|
|
@ -226,6 +325,12 @@
|
||||||
return getNotEncodedUrl('', 'module', 'admin', 'act', 'dispAutoinstallAdminUninstall', 'package_srl', $packageSrl);
|
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)
|
function getUpdateUrlByPackageSrl($packageSrl)
|
||||||
{
|
{
|
||||||
if (!$packageSrl) return;
|
if (!$packageSrl) return;
|
||||||
|
|
@ -233,6 +338,12 @@
|
||||||
return getNotEncodedUrl('', 'module', 'admin', 'act', 'dispAutoinstallAdminInstall', 'package_srl', $packageSrl);
|
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)
|
function getUpdateUrlByPath($path)
|
||||||
{
|
{
|
||||||
if (!$path) return;
|
if (!$path) return;
|
||||||
|
|
|
||||||
|
|
@ -1,19 +1,24 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @class autoinstallView
|
* View class of the autoinstall module
|
||||||
* @author NHN (developers@xpressengine.com)
|
* @author NHN (developers@xpressengine.com)
|
||||||
* @brief View class of the autoinstall module
|
|
||||||
**/
|
**/
|
||||||
|
|
||||||
class autoinstallView extends autoinstall {
|
class autoinstallView extends autoinstall {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Initialization
|
* Initialization
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
**/
|
**/
|
||||||
function init() {
|
function init() {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Test
|
||||||
|
*
|
||||||
|
* @return Object
|
||||||
|
*/
|
||||||
function dispAutoinstallTest(){
|
function dispAutoinstallTest(){
|
||||||
$file = "modules.test.tar";
|
$file = "modules.test.tar";
|
||||||
$checksum = '549989037bd8401d39b83ca2393d8131';
|
$checksum = '549989037bd8401d39b83ca2393d8131';
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue