18 require_once SQ_INCLUDE_PATH.
'/asset_management.inc';
43 'display_settings' => Array(
45 'type' =>
'serialise',
50 'type' =>
'selection',
52 'parameters' => Array(
54 'allow_empty' => FALSE,
56 'none' =>
'No Action',
57 'new_window' =>
'Open Image in New Window',
58 'current_window' =>
'Open Image in Current Window',
59 'inline' =>
'Open Inline Image Preview',
79 if (!parent::_upgrade($current_version))
return FALSE;
81 if (version_compare($current_version,
'0.2',
'<')) {
82 pre_echo(
'UPGRADING FILE ASSETS - FROM VERSION '.$current_version);
83 $preferences = Array();
84 if (is_file(SQ_DATA_PATH.
'/private/conf/preferences.inc')) {
85 include SQ_DATA_PATH.
'/private/conf/preferences.inc';
88 $preferences[$type_code][
'SQ_CONTENT_TYPE_IMAGE_DEFAULTS'][
'default'][
'html_layout'] =
'table';
89 $preferences[$type_code][
'SQ_CONTENT_TYPE_IMAGE_FIELDS'][
'default'][
'html_layout'] = TRUE;
90 $preferences[$type_code][
'SQ_CONTENT_TYPE_IMAGE_CLASSES'][
'default'][
'image_div'] =
'image_div';
91 $preferences[$type_code][
'SQ_CONTENT_TYPE_IMAGE_CLASSES'][
'default'][
'caption_div'] =
'caption_div';
92 $preferences[$type_code][
'SQ_CONTENT_TYPE_IMAGE_PREVIEW'][
'default'][
'image_div'] =
'preview_image_div';
93 $preferences[$type_code][
'SQ_CONTENT_TYPE_IMAGE_PREVIEW'][
'default'][
'close_preview_div'] =
'close_preview_div';
96 $str =
'<'.
'?php $preferences = '.var_export($preferences, TRUE).
'; ?'.
'>';
97 if (!string_to_file($str, SQ_DATA_PATH.
'/private/conf/preferences.inc')) {