Function media_mover_api_config_files_clear in media_mover_api.module was non-functional. This patch makes it work.

In addition, we were getting some errors like this when listing files:

* user warning: Unknown column 'cat_digital_multimeter_wizard' in 'where clause' query: SELECT COUNT(*) FROM media_mover_files WHERE cid = cat_digital_multimeter_wizard in /web01/drupal-6.22/sites/all/modules/media_mover/media_mover_api.module on line 2712.
* user warning: Unknown column 'cat_digital_multimeter_wizard' in 'where clause' query: SELECT * FROM media_mover_files WHERE cid = cat_digital_multimeter_wizard ORDER BY date DESC LIMIT 0, 10 in /web01/drupal-6.22/sites/all/modules/media_mover/media_mover_api.module on line 2712.

This patch fixes that by parameterizing the SQL statement.

Lastly, function media_mover_api_file_delete_confirm_form_submit contained functionality already handled by function media_mover_api_file_delete_call, so I replaced the redundant code with a call to media_mover_api_file_delete_call.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

bwinett’s picture

Is anyone maintaining this module?

arthurf’s picture

Do you mind resubmitting this patch with drupal's coding standard- http://drupal.org/coding-standards? I know it's is somewhat of a pain but it makes things easier in the long run. Also is this against the dev branch or beta9?

bwinett’s picture

This was done against beta9.

I'd be glad to follow the coding standards, but I'd appreciate your help in understanding what I've done that doesn't match them. I notice the comments were not proper sentences, so I've fixed that.

I think the db_query starting on line 9 follows standards (http://drupal.org/node/2497).

No tabs, indentation is 2 characters, no spaces at the end of the lines...