aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabio Varesano <fax8@13637.no-reply.drupal.org>2006-07-16 09:41:09 +0000
committerFabio Varesano <fax8@13637.no-reply.drupal.org>2006-07-16 09:41:09 +0000
commit4e396b0b5d34c589afcba0c56361b926423bd479 (patch)
tree59505723b9e6d425e69f22dd9e4c07741c9d20f0
parent7fbe1c94c6f4bd20f44e3c09db1416995c1dc2c5 (diff)
downloadvideo-4e396b0b5d34c589afcba0c56361b926423bd479.tar.gz
video-4e396b0b5d34c589afcba0c56361b926423bd479.tar.bz2
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.
-rw-r--r--plugins/video_image/video_image.module6
1 files changed, 6 insertions, 0 deletions
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.<br />To prevent system errors video_image module has been disabled.<br />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;