Révision 8fa03d70
Ajouté par Assos Assos il y a plus de 5 ans
drupal7/sites/all/modules/media/media.info | ||
---|---|---|
24 | 24 |
; We have to add a fake version so Git checkouts do not fail Media dependencies |
25 | 25 |
version = 7.x-2.x-dev |
26 | 26 |
|
27 |
; Information added by Drupal.org packaging script on 2018-08-17
|
|
28 |
version = "7.x-2.20"
|
|
27 |
; Information added by Drupal.org packaging script on 2018-10-24
|
|
28 |
version = "7.x-2.21"
|
|
29 | 29 |
core = "7.x" |
30 | 30 |
project = "media" |
31 |
datestamp = "1534544300" |
|
31 |
datestamp = "1540363086" |
drupal7/sites/all/modules/media/media.module | ||
---|---|---|
668 | 668 |
} |
669 | 669 |
|
670 | 670 |
/** |
671 |
* Utility function to recursively run check_plain on an array. |
|
671 |
* Custom implementation of array_walk_recursive() that works around a crash |
|
672 |
* some users have been experiencing with that function in PHP 7. |
|
672 | 673 |
* |
673 |
* @todo There is probably something in core I am not aware of that does this.
|
|
674 |
* @see https://www.drupal.org/project/media/issues/2998097
|
|
674 | 675 |
*/ |
675 |
function media_recursive_check_plain(&$value, $key) { |
|
676 |
$value = check_plain($value); |
|
676 |
function media_array_walk_recursive(&$array) { |
|
677 |
foreach ($array as $key => $value) { |
|
678 |
if (is_array($array[$key])) { |
|
679 |
media_array_walk_recursive($array[$key]); |
|
680 |
} |
|
681 |
else { |
|
682 |
$array[$key] = check_plain($array[$key]); |
|
683 |
} |
|
684 |
} |
|
677 | 685 |
} |
678 | 686 |
|
679 | 687 |
/** |
... | ... | |
1193 | 1201 |
if (!empty($title)) { |
1194 | 1202 |
$file->title = decode_entities(token_replace($title, array('file' => $file), $replace_options)); |
1195 | 1203 |
} |
1204 |
|
|
1205 |
// Reduce memory footprint and response size in media browser. |
|
1206 |
$file->file_contents = ''; |
|
1196 | 1207 |
} |
1197 | 1208 |
|
1198 | 1209 |
/** |
... | ... | |
1260 | 1271 |
} |
1261 | 1272 |
} |
1262 | 1273 |
|
1263 |
array_walk_recursive($params, 'media_recursive_check_plain');
|
|
1274 |
media_array_walk_recursive($params);
|
|
1264 | 1275 |
|
1265 | 1276 |
// Provide some default parameters. |
1266 | 1277 |
$params += array( |
drupal7/sites/all/modules/media/modules/media_bulk_upload/media_bulk_upload.info | ||
---|---|---|
15 | 15 |
files[] = includes/MediaBrowserBulkUpload.inc |
16 | 16 |
files[] = tests/media_bulk_upload.test |
17 | 17 |
|
18 |
; Information added by Drupal.org packaging script on 2018-08-17
|
|
19 |
version = "7.x-2.20"
|
|
18 |
; Information added by Drupal.org packaging script on 2018-10-24
|
|
19 |
version = "7.x-2.21"
|
|
20 | 20 |
core = "7.x" |
21 | 21 |
project = "media" |
22 |
datestamp = "1534544300" |
|
22 |
datestamp = "1540363086" |
drupal7/sites/all/modules/media/modules/media_internet/media_internet.info | ||
---|---|---|
12 | 12 |
files[] = includes/MediaInternetValidationException.inc |
13 | 13 |
files[] = tests/media_internet.test |
14 | 14 |
|
15 |
; Information added by Drupal.org packaging script on 2018-08-17
|
|
16 |
version = "7.x-2.20"
|
|
15 |
; Information added by Drupal.org packaging script on 2018-10-24
|
|
16 |
version = "7.x-2.21"
|
|
17 | 17 |
core = "7.x" |
18 | 18 |
project = "media" |
19 |
datestamp = "1534544300" |
|
19 |
datestamp = "1540363086" |
drupal7/sites/all/modules/media/modules/media_internet/tests/media_internet_test.info | ||
---|---|---|
7 | 7 |
files[] = includes/MediaInternetTestStreamWrapper.inc |
8 | 8 |
files[] = includes/MediaInternetTestHandler.inc |
9 | 9 |
|
10 |
; Information added by Drupal.org packaging script on 2018-08-17
|
|
11 |
version = "7.x-2.20"
|
|
10 |
; Information added by Drupal.org packaging script on 2018-10-24
|
|
11 |
version = "7.x-2.21"
|
|
12 | 12 |
core = "7.x" |
13 | 13 |
project = "media" |
14 |
datestamp = "1534544300" |
|
14 |
datestamp = "1540363086" |
drupal7/sites/all/modules/media/modules/media_migrate_file_types/media_migrate_file_types.info | ||
---|---|---|
8 | 8 |
|
9 | 9 |
configure = admin/structure/file-types/upgrade |
10 | 10 |
|
11 |
; Information added by Drupal.org packaging script on 2018-08-17
|
|
12 |
version = "7.x-2.20"
|
|
11 |
; Information added by Drupal.org packaging script on 2018-10-24
|
|
12 |
version = "7.x-2.21"
|
|
13 | 13 |
core = "7.x" |
14 | 14 |
project = "media" |
15 |
datestamp = "1534544300" |
|
15 |
datestamp = "1540363086" |
drupal7/sites/all/modules/media/modules/media_wysiwyg/media_wysiwyg.info | ||
---|---|---|
16 | 16 |
|
17 | 17 |
configure = admin/config/media/browser |
18 | 18 |
|
19 |
; Information added by Drupal.org packaging script on 2018-08-17
|
|
20 |
version = "7.x-2.20"
|
|
19 |
; Information added by Drupal.org packaging script on 2018-10-24
|
|
20 |
version = "7.x-2.21"
|
|
21 | 21 |
core = "7.x" |
22 | 22 |
project = "media" |
23 |
datestamp = "1534544300" |
|
23 |
datestamp = "1540363086" |
drupal7/sites/all/modules/media/modules/media_wysiwyg_view_mode/media_wysiwyg_view_mode.info | ||
---|---|---|
3 | 3 |
package = Media |
4 | 4 |
core = 7.x |
5 | 5 |
|
6 |
; Information added by Drupal.org packaging script on 2018-08-17
|
|
7 |
version = "7.x-2.20"
|
|
6 |
; Information added by Drupal.org packaging script on 2018-10-24
|
|
7 |
version = "7.x-2.21"
|
|
8 | 8 |
core = "7.x" |
9 | 9 |
project = "media" |
10 |
datestamp = "1534544300" |
|
10 |
datestamp = "1540363086" |
drupal7/sites/all/modules/media/modules/mediafield/mediafield.info | ||
---|---|---|
4 | 4 |
core = 7.x |
5 | 5 |
dependencies[] = media |
6 | 6 |
|
7 |
; Information added by Drupal.org packaging script on 2018-08-17
|
|
8 |
version = "7.x-2.20"
|
|
7 |
; Information added by Drupal.org packaging script on 2018-10-24
|
|
8 |
version = "7.x-2.21"
|
|
9 | 9 |
core = "7.x" |
10 | 10 |
project = "media" |
11 |
datestamp = "1534544300" |
|
11 |
datestamp = "1540363086" |
drupal7/sites/all/modules/media/tests/media_module_test.info | ||
---|---|---|
6 | 6 |
|
7 | 7 |
files[] = includes/MediaModuleTest.inc |
8 | 8 |
|
9 |
; Information added by Drupal.org packaging script on 2018-08-17
|
|
10 |
version = "7.x-2.20"
|
|
9 |
; Information added by Drupal.org packaging script on 2018-10-24
|
|
10 |
version = "7.x-2.21"
|
|
11 | 11 |
core = "7.x" |
12 | 12 |
project = "media" |
13 |
datestamp = "1534544300" |
|
13 |
datestamp = "1540363086" |
drupal7/sites/all/modules/media_ckeditor/js/plugins/media/lang/en.js | ||
---|---|---|
1 |
/* |
|
2 |
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved. |
|
3 |
For licensing, see LICENSE.md or http://ckeditor.com/license |
|
4 |
*/ |
|
5 |
CKEDITOR.plugins.setLang( 'media', 'en', { |
|
6 |
alt: 'Alternative Text', // Inherit from image plugin. |
|
7 |
captioned: 'Captioned image', // NEW property. |
|
8 |
lockRatio: 'Lock Ratio', // Inherit from image plugin. |
|
9 |
menu: 'Image Properties', // Inherit from image plugin. |
|
10 |
resetSize: 'Reset Size', // Inherit from image plugin. |
|
11 |
resizer: 'Click and drag to resize', // NEW property. |
|
12 |
title: 'Image Properties', // Inherit from image plugin. |
|
13 |
urlMissing: 'Image source URL is missing.' // Inherit from image plugin. |
|
14 |
} ); |
drupal7/sites/all/modules/media_ckeditor/js/plugins/media/library.js | ||
---|---|---|
63 | 63 |
} |
64 | 64 |
else { |
65 | 65 |
$alreadyInsertedMedia = jQuery(data.node).find('[data-media-element]'); |
66 |
// For some reason, in MS Edge, data.node is a descendant of what |
|
67 |
// we are looking for, so we should also look "upwards" for media. |
|
68 |
if (!$alreadyInsertedMedia.length) { |
|
69 |
$alreadyInsertedMedia = jQuery(data.node).closest('[data-media-element]'); |
|
70 |
} |
|
66 | 71 |
} |
67 | 72 |
// First check to see if we are using an Insert button. |
68 | 73 |
if (typeof Drupal.ckeditorInstance.mediaInsert !== 'undefined') { |
... | ... | |
178 | 183 |
ckeditorInstance.insertElement(editorElement); |
179 | 184 |
|
180 | 185 |
// Initialize widget on our html if possible. |
181 |
if (parseFloat(CKEDITOR.version) >= 4.3 && hasWidgetSupport) {
|
|
186 |
if (Drupal.settings.ckeditor.plugins['media'].compareVersions(CKEDITOR.version, '4.3') >= 0 && hasWidgetSupport) {
|
|
182 | 187 |
ckeditorInstance.widgets.initOn( editorElement, 'mediabox' ); |
183 | 188 |
|
184 | 189 |
// Also support the image2 plugin. |
... | ... | |
186 | 191 |
} |
187 | 192 |
}, |
188 | 193 |
|
194 |
/** |
|
195 |
* Compare versions of CKEditor to determine if one version |
|
196 |
* is less than, greater than, or equal to another. |
|
197 |
* |
|
198 |
* @param a |
|
199 |
* A first instance of CKEditor. |
|
200 |
* @param b |
|
201 |
* A second instance of CKEditor. |
|
202 |
* @return |
|
203 |
* A number less than, greater than, or equal to zero. |
|
204 |
* - If a < b, a number less than zero is returned. |
|
205 |
* - If a > b, a number greater than zero is return. |
|
206 |
* - If a = b, the value of 0 is returned. |
|
207 |
*/ |
|
208 |
compareVersions: function (a, b) { |
|
209 |
var i, diff; |
|
210 |
var regExStrip0 = /(\.0+)+$/; |
|
211 |
var segmentsA = a.replace(regExStrip0, '').split('.'); |
|
212 |
var segmentsB = b.replace(regExStrip0, '').split('.'); |
|
213 |
var l = Math.min(segmentsA.length, segmentsB.length); |
|
214 |
|
|
215 |
for (i = 0; i < l; i++) { |
|
216 |
diff = parseInt(segmentsA[i], 10) - parseInt(segmentsB[i], 10); |
|
217 |
if (diff) { |
|
218 |
return diff; |
|
219 |
} |
|
220 |
} |
|
221 |
|
|
222 |
return segmentsA.length - segmentsB.length; |
|
223 |
}, |
|
224 |
|
|
189 | 225 |
/** |
190 | 226 |
* Forces custom attributes into the class field of the specified image. |
191 | 227 |
* |
drupal7/sites/all/modules/media_ckeditor/js/plugins/media/plugin.js | ||
---|---|---|
89 | 89 |
|
90 | 90 |
editor.addMenuGroup('mediaGroup'); |
91 | 91 |
editor.addMenuItem('mediaConfigureItem', { |
92 |
label: Drupal.t('Media settings'),
|
|
92 |
label: Drupal.settings.media_ckeditor.labels['settings'],
|
|
93 | 93 |
icon: this.path + 'images/icon.gif', |
94 | 94 |
command: 'mediaConfigure', |
95 | 95 |
group: 'mediaGroup' |
... | ... | |
106 | 106 |
// Add the toolbar button. |
107 | 107 |
editor.ui.addButton( 'Media', |
108 | 108 |
{ |
109 |
label: 'Add media',
|
|
109 |
label: Drupal.settings.media_ckeditor.labels['add'],
|
|
110 | 110 |
command: 'media' |
111 | 111 |
}); |
112 | 112 |
|
drupal7/sites/all/modules/media_ckeditor/media_ckeditor.info | ||
---|---|---|
15 | 15 |
test_dependencies[] = views |
16 | 16 |
test_dependencies[] = ctools |
17 | 17 |
|
18 |
; Information added by Drupal.org packaging script on 2017-08-06
|
|
19 |
version = "7.x-2.5"
|
|
18 |
; Information added by Drupal.org packaging script on 2018-10-22
|
|
19 |
version = "7.x-2.6"
|
|
20 | 20 |
core = "7.x" |
21 | 21 |
project = "media_ckeditor" |
22 |
datestamp = "1502029146" |
|
23 |
|
|
22 |
datestamp = "1540213107" |
drupal7/sites/all/modules/media_ckeditor/media_ckeditor.module | ||
---|---|---|
47 | 47 |
'data' => array( |
48 | 48 |
'media_ckeditor' => array( |
49 | 49 |
'fully_rendered_files' => _media_ckeditor_fully_rendered_files_in_wysiwyg(), |
50 |
'labels' => array( |
|
51 |
'settings' => t('Media settings'), |
|
52 |
'add' => t('Add media'), |
|
53 |
), |
|
50 | 54 |
), |
51 | 55 |
), |
52 | 56 |
'type' => 'setting', |
... | ... | |
84 | 88 |
'document', |
85 | 89 |
)); |
86 | 90 |
} |
91 |
if (empty($stored_params['file_extensions'])) { |
|
92 |
$stored_params['file_extensions'] = variable_get('media_wysiwyg_wysiwyg_allowed_file_extensions', array( |
|
93 |
'jpg jpeg gif png txt doc docx xls xlsx pdf ppt pptx pps ppsx odt ods odp mp3 mov mp4 m4a m4v mpeg avi ogg oga ogv weba webp webm') |
|
94 |
); |
|
95 |
} |
|
87 | 96 |
} |
88 | 97 |
} |
89 | 98 |
|
... | ... | |
110 | 119 |
function media_ckeditor_pre_render_media($element) { |
111 | 120 |
// If the media widget has been configured to have an Insert button, we'll |
112 | 121 |
// communicate that information through javascript settings. |
113 |
if (!isset($element['#entity_type']) && !isset($element['#field_name']) && !isset($element['#bundle'])) {
|
|
114 |
$instance = FALSE;
|
|
122 |
if (isset($element['#entity_type']) && isset($element['#field_name']) && isset($element['#bundle'])) {
|
|
123 |
$instance = field_info_instance($element['#entity_type'], $element['#field_name'], $element['#bundle']);
|
|
115 | 124 |
} |
116 | 125 |
else { |
117 |
$instance = field_info_instance($element['#entity_type'], $element['#field_name'], $element['#bundle']);
|
|
126 |
$instance = FALSE;
|
|
118 | 127 |
} |
119 | 128 |
if (!empty($instance['settings']['wysiwyg_insert'])) { |
120 | 129 |
$element['#attached']['js'][] = array( |
drupal7/sites/all/modules/media_ckeditor/tests/media_ckeditor_test.info | ||
---|---|---|
4 | 4 |
core = 7.x |
5 | 5 |
hidden = FALSE |
6 | 6 |
|
7 |
; Information added by Drupal.org packaging script on 2017-08-06
|
|
8 |
version = "7.x-2.5"
|
|
7 |
; Information added by Drupal.org packaging script on 2018-10-22
|
|
8 |
version = "7.x-2.6"
|
|
9 | 9 |
core = "7.x" |
10 | 10 |
project = "media_ckeditor" |
11 |
datestamp = "1502029146" |
|
12 |
|
|
11 |
datestamp = "1540213107" |
Formats disponibles : Unified diff
Weekly update of contrib modules