29 if(isset($addon_file))
35 $site_srl = $site_module_info->site_srl;
37 $addon_path =
_XE_PATH_ .
'files/cache/addons/';
38 $addon_file = $addon_path . $site_srl . $type .
'.acivated_addons.cache.php';
40 if($this->addon_file_called)
45 $this->addon_file_called = TRUE;
49 if(!file_exists($addon_file))
67 $addon_info = $oAddonAdminModel->getAddonInfoXml($selected_addon, $site_srl);
68 return $addon_info->mid_list;
82 $buff = array(
'<?php if(!defined("__XE__")) exit();',
'$_m = Context::get(\'mid\');');
84 $addon_list = $oAddonModel->getInsertedAddons($site_srl, $gtype);
85 foreach($addon_list as $addon => $val)
87 if($val->addon ==
"smartphone"
88 || ($type ==
"pc" && $val->is_used !=
'Y')
89 || ($type ==
"mobile" && $val->is_used_m !=
'Y')
90 || ($gtype ==
'global' && $val->is_fixed !=
'Y')
91 || !is_dir(
_XE_PATH_ .
'addons/' . $addon))
98 if(!is_array($mid_list) || count($mid_list) < 1)
103 $buff[] =
'$before_time = microtime(true);';
104 $buff[] =
'$rm = \'' .
$extra_vars->xe_run_method .
"';";
105 $buff[] =
'$ml = array(';
108 foreach($mid_list as
$mid)
110 $buff[] =
"'$mid' => 1,";
114 $buff[] = sprintf(
'$addon_file = \'./addons/%s/%s.addon.php\';', $addon, $addon);
121 $addon_include = sprintf(
'unset($addon_info); $addon_info = unserialize(base64_decode(\'%s\')); @include($addon_file);',
$extra_vars);
123 $buff[] =
'if(file_exists($addon_file)){';
124 $buff[] =
'if($rm === \'no_run_selected\'){';
125 $buff[] =
'if(!isset($ml[$_m])){';
126 $buff[] = $addon_include;
128 $buff[] =
'if(isset($ml[$_m]) || count($ml) === 0){';
129 $buff[] = $addon_include;
131 $buff[] =
'$after_time = microtime(true);';
132 $buff[] =
'$addon_time_log = new stdClass();';
133 $buff[] =
'$addon_time_log->caller = $called_position;';
134 $buff[] =
'$addon_time_log->called = "' . $addon .
'";';
135 $buff[] =
'$addon_time_log->called_extension = "' . $addon .
'";';
136 $buff[] =
'writeSlowlog("addon",$after_time-$before_time,$addon_time_log);';
138 $addon_path =
_XE_PATH_ .
'files/cache/addons/';
140 $addon_file = $addon_path . ($gtype ==
'site' ? $site_srl :
'') . $type .
'.acivated_addons.cache.php';
160 $args =
new stdClass();
161 $args->addon = $addon;
163 if($gtype ==
'global')
167 $args->site_srl = $site_srl;
179 $addon_path =
_XE_PATH_ .
'files/cache/addons/';
180 $addon_file = $addon_path . $site_srl .
'.acivated_addons.cache.php';
181 if(file_exists($addon_file))
186 $args =
new stdClass();
187 $args->site_srl = $site_srl;
foreach($sitemap as $id=> &$val) $extra_vars
writeFile($filename, $buff, $mode="w")
doSetup($addon, $extra_vars, $site_srl=0, $gtype= 'site')
removeAddonConfig($site_srl)
$mid
string to represent run-time instance of Module (XE Module)
makeCacheFile($site_srl=0, $type="pc", $gtype= 'site')
getAdminModel($module_name)
executeQuery($query_id, $args=NULL, $arg_columns=NULL)
_getMidList($selected_addon, $site_srl=0)
getCacheFilePath($type="pc")