Posted by Devin Carlson on October 26, 2012 at 5:30pm
2 followers
| Project: | Media |
| Version: | 7.x-2.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Devin Carlson |
| Status: | needs work |
Issue Summary
The function media_query_media_browser_alter() in media.media.inc is incorrect. It states:
<?php
/**
* Implements hook_query_media_browser_alter().
*/
?>but it actually implements hook_query_TAG_alter provided by system.module.
query_media_browser_alter is also listed as a media hook in media_hook_info. I believe this is incorrect and should be removed.
Comments
#1
A patch to correct the documentation and remove the hook from
media_hook_info.Since the function doesn't actually implement a media hook, I think it should be moved out of media.media.inc (probably into media.module), but I'll leave that for a separate issue.
#2
thanks.
not committing it yet, since i dont want to break a patch by accident that people in atlanta might review
#3
thanks commited
http://drupalcode.org/project/media.git/commit/a0d2c0d
#4
i reverted this..removing the hook from hook_hook_info results to media_query_media_browser_alter() never being called..we need to move this function to the .module file
I would say we need tests for this..but i guess we need testbot first