public function uninstallAddons($name)
{
if (empty($name)) {
return false;
}
$this->_getFileAddons();
if (!isset($this->fileAddons[$name])) {
return false;
// throw new ThinkException("插件".$name."不存在");
}
$addonObject = $this->fileAddons[$name];
$addonObject->uninstall();
$map['name'] = $name;
$result = $this->where($map)->delete() ? true : false;
if ($result) {
$addonCacheList = $this->resetAddonCache();
S('system_addons_list', $addonCacheList);
}
return $result;
}