18 require_once SQ_INCLUDE_PATH.
'/asset_management.inc';
43 'num_events' => Array(
46 'parameters' => Array(
47 'allow_negative' => FALSE,
55 'parameters' => Array(
56 'allow_negative' => FALSE,
61 'root_nodes' => Array(
62 'type' =>
'serialise',
65 'parameter_map' => Array(
67 'type' =>
'parameter_map',
69 'parameters' => Array(
70 'parameters' => Array(
71 'replacement_root_node' =>
'Replacement Event Source',
77 'type' =>
'serialise',
79 'calendar_event_single' => 0,
80 'calendar_event_recurring' => 0,
81 'calendar_event_multi_date' => 0,
100 'event_name' =>
'requestKeywords',
101 'broadcast_type_code' =>
'content_type',
102 'broadcast_strict_type_code' => FALSE,
104 'side_of_link' =>
'major',
106 'is_exclusive' => NULL,
109 'link_type' => SQ_LINK_TYPE_2 | SQ_LINK_TYPE_1,
127 if (!parent::_upgrade($current_version))
return FALSE;
129 $asset_name = strtoupper($this->_pm->getTypeInfo($this->getAssetType(),
'name'));
130 $am =& $GLOBALS[
'SQ_SYSTEM']->am;
132 if (version_compare($current_version,
'0.3',
'<')) {
134 pre_echo(
'STARTING '.$asset_name.
' UPGRADE - FROM VERSION '.$current_version);
137 $pages = $GLOBALS[
'SQ_SYSTEM']->am->getTypeAssetids($this->
getAssetType(), FALSE, TRUE);
138 foreach ($pages as $assetid => $type_code) {
139 $asset = $GLOBALS[
'SQ_SYSTEM']->am->getAsset($assetid, $type_code);
140 if (is_null($asset))
continue;
142 $contents_folder_link = $GLOBALS[
'SQ_SYSTEM']->am->getLink($assetid, SQ_LINK_TYPE_2,
'bodycopy', TRUE,
'',
'major', TRUE);
143 if ($contents_folder_link[
'value'] !=
'page_contents') {
144 $GLOBALS[
'SQ_SYSTEM']->am->updateLink($contents_folder_link[
'linkid'], SQ_LINK_TYPE_2,
'page_contents');
147 $tf_folder_link = $GLOBALS[
'SQ_SYSTEM']->am->getLink($assetid, SQ_LINK_TYPE_2,
'folder', TRUE,
'',
'major', TRUE);
148 if ($tf_folder_link[
'value'] !=
'type_formats') {
149 $GLOBALS[
'SQ_SYSTEM']->am->updateLink($tf_folder_link[
'linkid'], SQ_LINK_TYPE_2,
'type_formats');
152 $GLOBALS[
'SQ_SYSTEM']->am->forgetAsset($asset);
155 pre_echo($asset_name.
' UPGRADE COMPLETE - FROM VERSION 0.2');