issue 160 fixed a bug for addon

git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@9148 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
flyskyko 2011-09-15 05:04:33 +00:00
parent ead9eceded
commit 865e88c47b
4 changed files with 11 additions and 11 deletions

View file

@ -77,15 +77,16 @@
$args->fixed = 'N';
$args->addon = $targetAddon;
$args->site_srl = 0;
$output = executeQuery('addon.updateAddon', $args);
$output = executeQuery('addon.updateSiteAddon', $args);
if (!$output->toBool()) return $output;
}
if (count($updateList))
{
$this->makeCacheFile(0, 'pc', 'global');
$this->makeCacheFile(0, 'mobile', 'global');
$this->makeCacheFile(0, 'pc', 'site');
$this->makeCacheFile(0, 'mobile', 'site');
}
$this->setRedirectUrl(getNotEncodedUrl('', 'module', 'admin', 'act', 'dispAddonAdminIndex'));
@ -126,11 +127,11 @@
$site_module_info = Context::get('site_module_info');
$output = $this->doSetup($addon_name, $args, $site_module_info->site_srl, 'global');
$output = $this->doSetup($addon_name, $args, $site_module_info->site_srl, 'site');
if (!$output->toBool()) return $output;
$this->makeCacheFile($site_module_info->site_srl, "pc", 'global');
$this->makeCacheFile($site_module_info->site_srl, "mobile", 'global');
$this->makeCacheFile($site_module_info->site_srl, "pc", 'site');
$this->makeCacheFile($site_module_info->site_srl, "mobile", 'site');
$this->setRedirectUrl(getNotEncodedUrl('', 'module', 'admin', 'act', 'dispAddonAdminSetup', 'selected_addon', $addon_name));
}

View file

@ -27,7 +27,7 @@
**/
function getAddonListForSuperAdmin()
{
$addonList = $this->getAddonList(0, 'global');
$addonList = $this->getAddonList(0, 'site');
$oAutoinstallModel = &getModel('autoinstall');
foreach($addonList as $key => $addon)

View file

@ -47,7 +47,7 @@
$selected_addon = Context::get('selected_addon');
// Wanted to add the requested information
$oAddonModel = &getAdminModel('addon');
$addon_info = $oAddonModel->getAddonInfoXml($selected_addon, $site_module_info->site_srl, 'global');
$addon_info = $oAddonModel->getAddonInfoXml($selected_addon, $site_module_info->site_srl, 'site');
Context::set('addon_info', $addon_info);
// Get a mid list
$oModuleModel = &getModel('module');

View file

@ -23,8 +23,7 @@
$addon_path = _XE_PATH_.'files/cache/addons/';
if($site_srl) $addon_file = $addon_path.$site_srl.$type.'.acivated_addons.cache.php';
else $addon_file = $addon_path.$type.'acivated_addons.cache.php';
$addon_file = $addon_path.$site_srl.$type.'.acivated_addons.cache.php';
if($this->addon_file_called) return $addon_file;
$this->addon_file_called = true;
@ -147,7 +146,7 @@
if(!is_dir($addon_path)) FileHandler::makeDir($addon_path);
if($gtype == 'site') $addon_file = $addon_path.$site_srl.$type.'.acivated_addons.cache.php';
else $addon_file = $addon_path.$type.'acivated_addons.cache.php';
else $addon_file = $addon_path.$type.'.acivated_addons.cache.php';
FileHandler::writeFile($addon_file, $buff);
}