diff options
author | Mohamed Mujahid <muja_dd@494418.no-reply.drupal.org> | 2010-07-07 06:36:24 +0000 |
---|---|---|
committer | Mohamed Mujahid <muja_dd@494418.no-reply.drupal.org> | 2010-07-07 06:36:24 +0000 |
commit | f5f35a18125846d6e6ddcf4951e1838bf23a883d (patch) | |
tree | be23350354eb68537d107ebe171a890803c048c5 /video.module | |
parent | 0c8e7ae689eed6291bb2061c9c75e3057b230339 (diff) | |
download | video-f5f35a18125846d6e6ddcf4951e1838bf23a883d.tar.gz video-f5f35a18125846d6e6ddcf4951e1838bf23a883d.tar.bz2 |
merging changes from DRUPAL-6--4
Diffstat (limited to 'video.module')
-rw-r--r-- | video.module | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/video.module b/video.module index 1576bee..677404a 100644 --- a/video.module +++ b/video.module @@ -27,7 +27,7 @@ function video_init() { * We cannot use module_invoke() for this, because the arguments need to * be passed by reference. */ -function video_module_invoke($action, &$array, &$video, $other = NULL) { +function video_module_invoke($action, &$array, &$video = NULL, $other = NULL) { foreach (module_list() as $module) { $function = $module . '_video_' . $action; if (function_exists($function)) { @@ -253,6 +253,8 @@ function video_node_update_submit($form, &$form_state) { foreach($form_state['values']['video_id'] as $fid) { //lets update our table to include the nid db_query("UPDATE {video_files} SET nid=%d WHERE fid=%d", $form_state['nid'], $fid); + // Lets other module to know to update + video_module_invoke('update', $form, $form_state); } } } @@ -375,6 +377,8 @@ function video_file_delete($file) { $thumb_folder = file_directory_path(). '/' . $video_thumb_path . '/' . $file->fid; // Recursively delete our folder and files rmdirr($thumb_folder); + // Let other modules to know about the file delete + video_module_invoke('delete', $file); } /** @@ -521,7 +525,7 @@ function video_widget_process($element, &$form_state) { } } // Call hook_video_submit API - video_module_invoke('submit', $element, $form_state); + video_module_invoke('insert', $element, $form_state); // //queue up the file id to update the node id in the video rendering / cdn tables. $form_state['values']['video_id'][] = $item['fid']; @@ -820,4 +824,4 @@ function rmdirr($dir) { } } @rmdir($dir); -}
\ No newline at end of file +} |