17 require_once SQ_INCLUDE_PATH.
'/asset_management.inc';
42 'remote_url' => Array(
45 'default' =>
'http://www.squizsuite.net',
48 'load_links' => Array(
52 'parameters' => Array(
'allow_empty' => FALSE),
54 'verify_ssl' => Array(
58 'parameters' => Array(
'allow_empty' => FALSE),
60 'allow_redirect' => Array(
64 'parameters' => Array(
'allow_empty' => FALSE),
76 'include_tags' => Array (
80 'parameters' => Array(
'allow_empty' => FALSE),
92 'multi_occurence' => Array (
96 'parameters' => Array(
'allow_empty' => FALSE),
98 'no_tag_clear' => Array(
102 'parameters' => Array(
'allow_empty' => FALSE),
108 'parameters' => Array(
'allow_negative' => FALSE),
110 'error_message' => Array(
113 'default' =>
'<p>Content cannot be accessed</p>',
114 'is_contextable' => TRUE,
116 'display_error' => Array(
120 'parameters' => Array(
'allow_empty' => FALSE),
122 'binary_message' => Array(
126 The requested document appears to be a binary file.
127 Please click the url to open it in another window.<br />
128 <a href='%remote_url%' target='_blank'>%remote_url%</a>
130 'is_contextable' => TRUE,
132 'strip_images' => Array(
136 'parameters' => Array(
'allow_empty' => FALSE),
138 'tunnel_images' => Array(
142 'parameters' => Array(
'allow_empty' => FALSE),
144 'tunnel_media' => Array(
148 'parameters' => Array(
'allow_empty' => FALSE),
150 'tunnel_scripts' => Array(
154 'parameters' => Array(
'allow_empty' => FALSE),
156 'post_variables' => Array(
158 'type' =>
'serialise',
159 'default' => Array(),
161 'tag_replacements' => Array(
163 'type' =>
'serialise',
164 'default' => Array(),
166 'url_white_list' => Array(
168 'type' =>
'serialise',
169 'default' => Array(),
171 'url_rewriting_options' => Array(
173 'type' =>
'serialise',
176 'remote_url' => FALSE,
177 'remote_domain' => TRUE,
178 'white_list' => FALSE,
196 if (!parent::_upgrade($current_version))
return FALSE;
198 if (version_compare($current_version,
'1.7',
'<')) {
199 pre_echo(
'UPGRADING REMOTE CONTENT FROM v'.$current_version.
' to v1.7');
200 $ids = $GLOBALS[
'SQ_SYSTEM']->am->getTypeAssetids(
'page_remote_content');
201 foreach ($ids as $id) {
202 $asset = $GLOBALS[
'SQ_SYSTEM']->am->getAsset($id);
203 $white_list = $asset->attr(
'url_white_list');
206 'remote_url' => FALSE,
207 'remote_domain' => FALSE,
208 'white_list' => FALSE,
210 if ($asset->attr(
'only_local_links')) {
211 if (empty($white_list)) {
213 $options[
'remote_domain'] = TRUE;
216 $options[
'remote_domain'] = TRUE;
217 $options[
'white_list'] = TRUE;
220 if (empty($white_list)) {
221 $options[
'all'] = TRUE;
223 $options[
'white_list'] = TRUE;
224 $options[
'remote_url'] = TRUE;
227 $asset->setAttrValue(
'url_rewriting_options', $options);
228 $asset->saveAttributes();
230 pre_echo(
'UPGRADE COMPLETE - '.count($ids).
' REMOTE CONTENT PAGES UPGRADED');