Closed (fixed)
Project:
Exif
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
14 Nov 2012 at 19:15 UTC
Updated:
16 Nov 2012 at 11:25 UTC
Jump to comment: Most recent file
I use Exif module (not actively maintained). And I get the following error opening the EXif admin page:
Fatal error: Call to undefined function media_type_get_types() in /home/vhosts/bioscene/dev1/sites/all/modules/exif/exif.admin.inc on line 127
Since I was unable to find media.types.inc (that should include media_type_get_types) I guess this is a version issue. Can anyone tell how should I modify Exif module code to make it work:
if (module_exists("media")) {
$all_mt = array();
// Setup media types
$types = media_type_get_types();
foreach ($types as $key) {
$all_mt[$key->name] = $key->name;
}
$forms['exif_mediatypes'] = array(
'#type' => 'checkboxes',
'#title' => t('Mediatypes'),
'#options' => $all_mt,
'#default_value' => variable_get('exif_mediatypes', array()),
'#description' => t('Select mediatypes which should be checked for itpc & exif data.'),
);
}| Comment | File | Size | Author |
|---|---|---|---|
| #2 | exif-media_type_get_types-1840900-2.patch | 878 bytes | markisatacomputer |
Comments
Comment #1
devin carlson commentedAll file types functionality is now part of the File Entity module.
You'll most likely want to use
file_type_get_enabled_types()in place ofmedia_type_get_types().Comment #2
markisatacomputer commentedHere's a patch do just that. I'm using exif 7.x-1.2
Comment #3
Thithi32 commentedThank you both very much. markisatacomputer patch works perfectly.