From 4e396b0b5d34c589afcba0c56361b926423bd479 Mon Sep 17 00:00:00 2001 From: Fabio Varesano Date: Sun, 16 Jul 2006 09:41:09 +0000 Subject: Patch #70741 comment #2 by khoogheem (http://drupal.org/user/59444) video_image.modue dependent on image module: A check has been added for the image module dependency. If the image module is not installed then the video_image automatically deactivate itself and send the error to the user. --- plugins/video_image/video_image.module | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'plugins') diff --git a/plugins/video_image/video_image.module b/plugins/video_image/video_image.module index 89a9e96..9664523 100644 --- a/plugins/video_image/video_image.module +++ b/plugins/video_image/video_image.module @@ -62,6 +62,12 @@ function video_image_nodeapi(&$node, $op, $teaser) { $node->serial_data['iid'] = $node->iid; break; case 'prepare': + // check that image.module is actived + if ( !module_exist("image")) { + db_query("UPDATE {system} SET status = 0 WHERE name ='video_image' AND type = 'module' LIMIT 1"); + drupal_set_message(t('video_image module requires the %module module.
To prevent system errors video_image module has been disabled.
Please install the image module and then reactivate the video_image module.', array('%module' => l('image', 'http://drupal.org/project/image'))), 'error'); + break; + } $image->title = $_POST['edit']['image_title']; $image->uid = $node->uid; $image->name = $node->name; -- cgit v1.2.3