mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-05 17:51:40 +09:00
#18859373 : module uninstall
git-svn-id: http://xe-core.googlecode.com/svn/sandbox@7399 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
258159d0a3
commit
10a9cbf347
19 changed files with 480 additions and 75 deletions
|
|
@ -108,8 +108,8 @@
|
|||
return array_shift($output->data);
|
||||
}
|
||||
|
||||
function getInstalledPackages(&$package_list) {
|
||||
$args->package_list = &$package_list;
|
||||
function getInstalledPackages($package_list) {
|
||||
$args->package_list = $package_list;
|
||||
$output = executeQueryArray("autoinstall.getInstalledPackages", $args);
|
||||
$result = array();
|
||||
if(!$output->data) return $result;
|
||||
|
|
@ -133,5 +133,50 @@
|
|||
return $output;
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
function getConfigFilePath($type)
|
||||
{
|
||||
$config_file = null;
|
||||
switch($type)
|
||||
{
|
||||
case "module":
|
||||
case "addon":
|
||||
case "layout":
|
||||
case "widget":
|
||||
$config_file = "/conf/info.xml";
|
||||
break;
|
||||
case "component":
|
||||
$config_file = "/info.xml";
|
||||
break;
|
||||
case "skin":
|
||||
case "widgetstyle":
|
||||
$config_file = "/skin.xml";
|
||||
break;
|
||||
case "drcomponent":
|
||||
$config_file = "/info.xml";
|
||||
break;
|
||||
}
|
||||
return $config_file;
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue