? og_promote.patch
Index: og_promote.info
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/og_promote/Attic/og_promote.info,v
retrieving revision 1.1.2.1
diff -u -p -r1.1.2.1 og_promote.info
--- og_promote.info	18 Jun 2007 23:06:55 -0000	1.1.2.1
+++ og_promote.info	7 Feb 2009 03:32:27 -0000
@@ -1,5 +1,7 @@
 ; $Id: og_promote.info,v 1.1.2.1 2007/06/18 23:06:55 dww Exp $
 name = OG promote
 description = "Promote users that join certain groups to a special role."
-dependencies = og
+dependencies[] = og
 package = "Organic groups"
+core = 6.x
+php = 4.x
Index: og_promote.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/og_promote/Attic/og_promote.module,v
retrieving revision 1.5.2.3
diff -u -p -r1.5.2.3 og_promote.module
--- og_promote.module	21 Nov 2008 14:59:19 -0000	1.5.2.3
+++ og_promote.module	7 Feb 2009 03:32:27 -0000
@@ -4,8 +4,8 @@
 /**
  * Implementation of hook_help().
  */
-function og_promote_help($section) {
-  switch ($section) {
+function og_promote_help($path, $arg) {
+  switch ($path) {
     case 'admin/modules#description':
       return t('Promote users that join certain groups to a special role.');
     case 'admin/settings/og_promote':
@@ -16,25 +16,23 @@ function og_promote_help($section) {
 /**
  * Implementation of hook_menu().
  */
-function og_promote_menu($may_cache) {
+function og_promote_menu() {
   $items = array();
-  if ($may_cache) {
-    $items[] = array(
-      'path' => 'admin/og/og_promote',
-      'title' => t('OG promote'),
-      'description' => t('Choose a role to which members of selected groups will be promoted.'),
-      'callback' => 'drupal_get_form',
-      'callback arguments' => array('og_promote_admin_settings'),
-      'access' => user_access('administer site configuration'),
-      'type' => MENU_NORMAL_ITEM,
-    );
-  }
+  $items['admin/og/og_promote'] = array(
+    'title' => 'OG promote',
+    'description' => 'Choose a role to which members of selected groups will be promoted.',
+    'page callback' => 'drupal_get_form',
+    'page arguments' => array('og_promote_admin_settings'),
+    'access arguments' => array('administer site configuration'),
+    'type' => MENU_NORMAL_ITEM,
+  );
   return $items;
 }
 
 /**
  * Implementation of hook_og().
  */
+ //op, $gid, $uid, $args
 function og_promote_og($op, $nid, $uid, $args = array()) {
   if (($role_id = variable_get('og_promote_role', 0)) != 0 && in_array($nid, variable_get('og_promote_groups', array()))) {
     switch ($op) {
@@ -86,17 +84,39 @@ function og_promote_admin_settings() {
     }
   }
   if (count($role_names)) {
-    $form['og_promote_role'] = array('#type' => 'radios', '#title' => t('Roles'), '#options' => $role_names, '#default_value' => variable_get('og_promote_role', 0), '#description' => t('Choose a role that users which become members of the groups below should be promoted to. If the member gets unsubscribed, it will be removed from the role.'));
+    $form['og_promote_role'] = array(
+      '#type' => 'radios', 
+      '#title' => t('Roles'), 
+      '#options' => $role_names, 
+      '#default_value' => variable_get('og_promote_role', 0), 
+      '#description' => t('Choose a role that users which become members of the groups below should be promoted to. If the member gets unsubscribed, it will be removed from the role.')
+    );
   }
   else {
-    $form['og_promote_role'] = array('#type' => 'item', '#title' => t('No roles'), '#description' => t('You need to define some additional roles to use this module.'));
+    $form['og_promote_role'] = array(
+      '#type' => 'item', 
+      '#title' => t('No roles'), 
+      '#description' => t('You need to define some additional roles to use this module.')
+    );
   }
   $options = og_all_groups_options();
   if (count($options)) {
-    $form['og_promote_groups'] = array('#type' => 'checkboxes', '#title' => t('Groups'), '#options' => $options, '#default_value' => variable_get('og_promote_groups', array()), '#description' => t('The groups that are defined for this site.'));
+    $form['og_promote_groups'] = array(
+      '#type' => 'checkboxes', 
+      '#title' => t('Groups'), 
+      '#options' => $options, 
+      '#default_value' => variable_get('og_promote_groups', array()), 
+      '#description' => t('The groups that are defined for this site.')
+    );
   }
   else {
-    $form['og_promote_groups'] = array('#type' => 'item', '#title' => t('No groups'), '#options' => $options, '#default_value' => variable_get('og_promote_groups', array()), '#description' => t('You need to create some groups.'));
+    $form['og_promote_groups'] = array(
+      '#type' => 'item', 
+      '#title' => t('No groups'), 
+      '#options' => $options, 
+      '#default_value' => variable_get('og_promote_groups', array()), 
+      '#description' => t('You need to create some groups.')
+    );
   }
   return system_settings_form($form);
 }
