18 require_once SQ_INCLUDE_PATH.
'/asset_management.inc';
55 if (version_compare($current_version,
'0.2',
'<')) {
56 $user_group_ids = $GLOBALS[
'SQ_SYSTEM']->am->getTypeAssetids(
'user_group');
57 $user_group_assets = Array();
58 for ($i=0; $i < count($user_group_ids); $i++) {
59 if (file_exists(SQ_DATA_PATH.
'/private/assets/user_group/'.$user_group_ids[$i].
'/.preferences.inc')) {
60 $this->
_updatePreferences(SQ_DATA_PATH.
'/private/assets/user_group/'.$user_group_ids[$i].
'/.preferences.inc');
63 if (file_exists(SQ_DATA_PATH.
'/private/conf/preferences.inc')) {
67 return parent::_upgrade($current_version);
83 if (!empty($preferences[
'content_type_raw_html'][
'SQ_RAW_HTML_SIZE'][
'default'])) {
84 $width = (int) $preferences[
'content_type_raw_html'][
'SQ_RAW_HTML_SIZE'][
'default'][
'width'];
85 $preferences[
'content_type_raw_html'][
'SQ_RAW_HTML_SIZE'][
'default'][
'width'] = ($width * 1.5).
'ex';
87 $height = (int) $preferences[
'content_type_raw_html'][
'SQ_RAW_HTML_SIZE'][
'default'][
'height'];
88 $preferences[
'content_type_raw_html'][
'SQ_RAW_HTML_SIZE'][
'default'][
'height'] = ($height * 2).
'ex';
90 $fp = fopen($file_name,
'w');
93 fwrite($fp,
'<?php $preferences = ');
95 var_export($preferences);
96 $preferences = ob_get_contents();
98 fwrite($fp, $preferences);