Download & Extend

Doxygen for media_query_media_browser_alter is incorrect

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

Status:active» needs review

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.

AttachmentSizeStatusTest resultOperations
correct-media-query-media-browser-alter-1824304-1.patch785 bytesIdlePASSED: [[SimpleTest]]: [MySQL] 5 pass(es).View details | Re-test

#2

Status:needs review» reviewed & tested by the community

thanks.
not committing it yet, since i dont want to break a patch by accident that people in atlanta might review

#3

Status:reviewed & tested by the community» fixed

thanks commited
http://drupalcode.org/project/media.git/commit/a0d2c0d

#4

Status:fixed» needs work

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

nobody click here