aboutsummaryrefslogtreecommitdiff
path: root/plugins/video_upload
diff options
context:
space:
mode:
authorFabio Varesano <fax8@13637.no-reply.drupal.org>2006-06-19 22:49:16 +0000
committerFabio Varesano <fax8@13637.no-reply.drupal.org>2006-06-19 22:49:16 +0000
commit38373b18497493630ba298df1ec638655d09f8db (patch)
tree56d48a2888f761b0c63479d6f2acc11966dd5018 /plugins/video_upload
parent512d567e3b66002127eb4fb96040d7979050e97b (diff)
downloadvideo-38373b18497493630ba298df1ec638655d09f8db.tar.gz
video-38373b18497493630ba298df1ec638655d09f8db.tar.bz2
Some debugging for plugins.
Patch #69330 by geodan (http://drupal.org/user/37266) Allow users to edit own videos: This patch adds an 'edit own videos' permission to allow users to edit their own video nodes without having the 'administer nodes' privelage.
Diffstat (limited to 'plugins/video_upload')
-rw-r--r--plugins/video_upload/video_upload.module11
1 files changed, 8 insertions, 3 deletions
diff --git a/plugins/video_upload/video_upload.module b/plugins/video_upload/video_upload.module
index 1f82b2a..832cf3f 100644
--- a/plugins/video_upload/video_upload.module
+++ b/plugins/video_upload/video_upload.module
@@ -68,8 +68,13 @@ function video_upload_nodeapi(&$node, $op, $teaser) {
case 'load':
$output['video_upload_file'] = _video_upload_load($node);
- $output['vidfile'] = file_create_url($output['video_upload_file']->filepath);
- return $output;
+ if($node->vidfile == '') { // we will disable uploaded file if a path is already live
+ $output['vidfile'] = file_create_url($output['video_upload_file']->filepath);
+ return $output;
+ }
+ else {
+ return NULL;
+ }
case 'prepare':
_video_upload_prepare($node);
break;
@@ -133,7 +138,7 @@ function video_upload_form_alter($form_id, &$form) {
'#title' => t('Upload video'),
'#weight' => -19,
'#collapsible' => TRUE,
- '#collapsed' => TRUE,
+ '#collapsed' => (isset($node->video_upload_file) ? TRUE : FALSE ),
);
$form['video']['video_upload'] += _video_upload_form($node);