Index: og_files.module =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/og_files/Attic/og_files.module,v retrieving revision 1.1.2.2 diff -u -p -r1.1.2.2 og_files.module --- og_files.module 17 May 2008 13:42:16 -0000 1.1.2.2 +++ og_files.module 28 Nov 2008 01:38:05 -0000 @@ -238,6 +238,7 @@ function og_files_virtual_base_path($gid function og_files_relative_path($gid,$filepath) { return substr($filepath, strlen(og_files_base_path($gid))); } + function og_files_format_path($gid, $filepath) { $patharray = explode('/',$filepath); array_shift($patharray); @@ -274,8 +275,8 @@ function og_files_form_alter($form_id,&$ $form['og_files_enabled'] = array( '#type' => 'checkbox', '#title' => t('Enable OG Files to this group?'), - //'#default_value' => , - '#value' => $enabled, + '#description' => !$enabled ? ('Warning! If you disable it, system will unlink all uploaded files for this group.') : FALSE, + '#default_value' => $enabled, '#weight' => 30 ); @@ -289,8 +290,8 @@ function og_files_nodeapi(&$node, $op, $ case 'update': db_query('DELETE FROM {og_files} WHERE gid = %d',$node->nid); case 'insert': - if(isset($node->og_files_enabled)) { - db_query("INSERT INTO {og_files} VALUES (%d,'%s')",$node->nid, ''); + if ($node->og_files_enabled) { + db_query("INSERT INTO {og_files} VALUES (%d,'%s')", $node->nid, ''); } break; case 'load': @@ -302,4 +303,4 @@ function og_files_nodeapi(&$node, $op, $ db_query('DELETE FROM {og_files} WHERE gid = %d',$node->nid); break; } -} \ No newline at end of file +}