18 require_once SQ_LIB_PATH.
'/config/config.inc';
35 var $config_vars = Array(
36 'PRINT_SYSTEM_ASSETS' => Array(
'editable' => 0,
'default' =>
''),
46 parent::__construct();
47 $this->config_file = SQ_DATA_PATH.
'/private/conf/system_assets.inc';
63 function save($vars, $backup_existing=FALSE, $send_message=TRUE)
66 return parent::save(Array(), $backup_existing);
85 case 'PRINT_SYSTEM_ASSETS' :
87 $packages = $GLOBALS[
'SQ_SYSTEM']->getInstalledPackages();
89 $system_assets = Array();
91 foreach ($packages as $data) {
93 $package = $data[
'code_name'];
95 if ($package ==
'__core__') {
96 require_once SQ_CORE_PACKAGE_PATH.
'/package_manager_core.inc';
97 $class =
'package_manager_core';
99 require_once SQ_PACKAGES_PATH.
'/'.$package.
'/package_manager_'.$package.
'.inc';
100 $class =
'package_manager_'.$package;
103 $package_obj =
new $class;
104 $sys_asset_types = $package_obj->getSystemAssetTypes();
107 foreach ($sys_asset_types as $type_code) {
108 $assetids = $GLOBALS[
'SQ_SYSTEM']->am->getTypeAssetids($type_code);
109 if (count($assetids) > 0) {
110 $system_assets[$type_code] = (int) $assetids[0];
114 echo
'$system_assets = ';
115 var_export($system_assets);
119 $GLOBALS[
'SQ_SYSTEM']->am->resetSystemAssetList();
125 return parent::_paintConfigVar($var_name, $value, $var_export);