17 require_once SQ_INCLUDE_PATH.
'/asset.inc';
41 $this->_ser_attrs = TRUE;
42 $this->
Asset($assetid);
58 require_once SQ_CORE_PACKAGE_PATH.
'/system/system_asset_fns.inc';
59 if (!system_asset_fns_create_pre_check($this)) {
62 $GLOBALS[
'SQ_SYSTEM']->doTransaction(
'BEGIN');
64 if ($linkid = parent::create($link)) {
65 if (!system_asset_fns_create_cleanup($this)) {
71 $GLOBALS[
'SQ_SYSTEM']->doTransaction(
'COMMIT');
74 $GLOBALS[
'SQ_SYSTEM']->doTransaction(
'ROLLBACK');
93 return $GLOBALS[
'SQ_SYSTEM']->am->getTypeInfo($this->
type(),
'name');
133 $itm_links = parent::_getAllowedLinks();
134 $itm_links[SQ_LINK_TYPE_1][
'import_tool_converter'] = Array(
'card' =>
'M',
'exclusive' => TRUE);
149 $am = $GLOBALS[
'SQ_SYSTEM']->am;
151 $converter_types = $am->getTypeDescendants(
'import_tool_converter');
152 $current_converters = $am->getLinks($this->
id, SQ_LINK_TYPE_1,
'import_tool_converter', FALSE);
154 $converter_types = array_flip($converter_types);
156 foreach ($current_converters as $data) {
157 $installed_type_code = $data[
'minor_type_code'];
158 if (isset($converter_types[$installed_type_code])) {
159 unset($converter_types[$installed_type_code]);
163 foreach ($converter_types as $type_code => $id) {
180 $am = $GLOBALS[
'SQ_SYSTEM']->am;
181 $am->includeAsset($type_code);
183 $import_link = Array(
'asset' => &$this,
'link_type' => SQ_LINK_TYPE_1,
'is_exclusive' => 1);
185 $new_converter =
new $type_code;
188 $new_converter->create($import_link);