#355265: Patch by jpsalter - Display nodetype names rather than internal type data.
authorZen
Sun, 8 Feb 2009 21:15:49 +0000 (21:15 +0000)
committerZen
Sun, 8 Feb 2009 21:15:49 +0000 (21:15 +0000)
modules/og_notifications/og_notifications.module

index 7670e9a..19794ac 100644 (file)
@@ -331,6 +331,8 @@ function og_notifications_user_page($form_state, $account = NULL) {
     );
 
     $content_types = array_filter(variable_get('og_notifications_content_types', array()));
+    $content_names = node_get_types('names');
+
     foreach ($account->og_groups as $gid => $group) {
       $group_index = 'groups-'. $gid;
 
@@ -340,7 +342,7 @@ function og_notifications_user_page($form_state, $account = NULL) {
         // group is not already subscribed to (for all posts).
         $bool = isset($ngrouptypes[$gid]) && isset($ngrouptypes[$gid][$type]);
         $types[$type] = array(
-          'title' => $title,
+          'title' => check_plain($content_names[$type]),
           'checkbox' => $bool,
           'send_interval' => $bool ? $ngrouptypes[$gid][$type]->send_interval : $grouptype_form['defaults']['#value']['send_interval'],
           'send_method' => $bool ? $ngrouptypes[$gid][$type]->send_method : $grouptype_form['defaults']['#value']['send_method']