4 require_once(
_XE_PATH_ .
'modules/addon/addon.controller.php');
36 if($site_module_info->site_srl)
38 $site_srl = $site_module_info->site_srl;
51 $mobileOnList = array();
58 if(!is_array($pcOnList))
60 $pcOnList = array($pcOnList);
62 if(!is_array($mobileOnList))
64 $pcOnList = array($mobileOnList);
68 $pcOnList = array($fixed);
73 $currentAddonList = $oModel->getAddonList($site_srl,
'site');
76 $updateList = array();
77 foreach($currentAddonList as $addon)
79 if($addon->activated !== in_array($addon->addon_name, $pcOnList))
81 $updateList[] = $addon->addon_name;
85 if($addon->mactivated !== in_array($addon->addon_name, $mobileOnList))
87 $updateList[] = $addon->addon_name;
91 if($addon->fixed !== in_array($addon->addon_name, $fixed))
93 $updateList[] = $addon->addon_name;
99 foreach($updateList as $targetAddon)
101 $args =
new stdClass();
103 if(in_array($targetAddon, $pcOnList))
105 $args->is_used =
'Y';
109 $args->is_used =
'N';
112 if(in_array($targetAddon, $mobileOnList))
114 $args->is_used_m =
'Y';
118 $args->is_used_m =
'N';
121 if(in_array($targetAddon, $fixed))
130 $args->addon = $targetAddon;
131 $args->site_srl = $site_srl;
140 if(count($updateList))
177 if($oAddonModel->isActivatedAddon($addon, $site_module_info->site_srl, $type))
179 $this->
doDeactivate($addon, $site_module_info->site_srl, $type);
184 $this->
doActivate($addon, $site_module_info->site_srl, $type);
200 $addon_name =
$args->addon_name;
201 unset(
$args->module);
203 unset(
$args->addon_name);
205 unset(
$args->error_return_url);
215 $this->
makeCacheFile($site_module_info->site_srl,
"pc",
'site');
216 $this->
makeCacheFile($site_module_info->site_srl,
"mobile",
'site');
230 function doInsert($addon, $site_srl = 0, $gtype =
'site', $isUsed =
'N')
232 $args =
new stdClass;
233 $args->addon = $addon;
234 $args->is_used = $isUsed;
235 if($gtype ==
'global')
239 $args->site_srl = $site_srl;
252 function doActivate($addon, $site_srl = 0, $type =
"pc", $gtype =
'site')
254 $args =
new stdClass();
255 $args->addon = $addon;
258 $args->is_used =
'Y';
262 $args->is_used_m =
"Y";
264 if($gtype ==
'global')
268 $args->site_srl = $site_srl;
280 function doDeactivate($addon, $site_srl = 0, $type =
"pc", $gtype =
'site')
282 $args =
new stdClass();
283 $args->addon = $addon;
286 $args->is_used =
'N';
290 $args->is_used_m =
'N';
292 if($gtype ==
'global')
296 $args->site_srl = $site_srl;
setMessage($message= 'success', $type=NULL)
doActivate($addon, $site_srl=0, $type="pc", $gtype= 'site')
doSetup($addon, $extra_vars, $site_srl=0, $gtype= 'site')
doDeactivate($addon, $site_srl=0, $type="pc", $gtype= 'site')
procAddonAdminToggleActivate()
setRedirectUrl($url= './', $output=NULL)
doInsert($addon, $site_srl=0, $gtype= 'site', $isUsed= 'N')
makeCacheFile($site_srl=0, $type="pc", $gtype= 'site')
getAdminModel($module_name)
procAddonAdminSaveActivate()
executeQuery($query_id, $args=NULL, $arg_columns=NULL)
$module
Class name of Xe Module that is identified by mid.
procAddonAdminSetupAddon()