cvs diff: Diffing .
Index: og.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/og/og.module,v
retrieving revision 1.298.2.71
diff -u -p -r1.298.2.71 og.module
--- og.module   9 Jul 2007 14:59:32 -0000       1.298.2.71
+++ og.module   28 Jul 2007 14:42:26 -0000
@@ -1255,15 +1255,14 @@ function og_nodeapi(&$node, $op, $teaser
   switch ($op) {
     case 'view':
       $group_node = og_get_group_context();
-      
       if ($group_node && $page && $node->og_groups) {
-        // set breadcrumb and title on non group nodes
-        $bc[] = array('path' => "og", 'title' => t('Groups'));
+        $bc[] = array('path' => og_url('og'), 'title' => t('Groups'));
         $bc[] = array('path' => "node/$group_node->nid", 'title' => $group_node->title);
         $bc[] = array('path' => "node/$node->nid", 'title' => $node->title);
         menu_set_location($bc);
       }
       if (og_is_group_type($node->type)) {
+        drupal_set_breadcrumb(array(l(t('Home'), ''), l(t('Groups'), og_url('og'))));
         og_view_group($node, $teaser, $page);
       }
       break;
@@ -2574,4 +2573,17 @@ function og_requirements($phase) {
 
 function og_readme() {
   return l('README file', drupal_get_path('module', 'og'). '/README.txt');
-}
\ No newline at end of file
+}
+
+/**
+ * Returns a View's URL, based on the view name.
+ */
+function og_url($view_name, $root_tabs = TRUE) {
+  $view = views_get_view($view_name);
+  if ($view->menu_tab_default && $root_tabs) {
+    $url_parts = explode('/', $view->url);
+    array_pop($url_parts); // lose the last one.
+    $view->url = implode('/', $url_parts);
+  }
+  return $view->url;
+}
cvs diff: Diffing po
cvs diff: Diffing tests