? panels_page_disabled.patch
Index: panels_page/panels_page.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/panels/panels_page/Attic/panels_page.module,v
retrieving revision 1.1.2.41
diff -p -u -r1.1.2.41 panels_page.module
--- panels_page/panels_page.module	21 Feb 2008 01:24:30 -0000	1.1.2.41
+++ panels_page/panels_page.module	5 Mar 2008 15:44:09 -0000
@@ -153,49 +153,53 @@ function panels_page_menu($may_cache) {
     // argument filled URLs
     $urls = array();
     foreach ($panels as $panel_page) {
-      $url[$panel_page->path] = TRUE;
+      if (empty($panel_page->disabled)) {
+        $url[$panel_page->path] = TRUE;
+      }
     }
 
     $plugins_loaded = FALSE;
     foreach ($panels as $panel_page) {
-      if (strpos($panel_page->path, '%') !== FALSE) {
-        $path = explode('/', $panel_page->path);
-        $match = TRUE;
-        foreach ($path as $id => $chunk) {
-          if ($chunk != '%' && $chunk != arg($id)) {
-            $match = FALSE;
-            break;
-          }
-        }
-        // It's a MATCH! Construct the URL
-        if ($match) {
-          $args = array($panel_page, FALSE);
-          reset($panel_page->arguments);
+      if (empty($panel_page->disabled)) {
+        if (strpos($panel_page->path, '%') !== FALSE) {
+          $path = explode('/', $panel_page->path);
+          $match = TRUE;
           foreach ($path as $id => $chunk) {
-            if ($chunk != '%') {
-              continue;
+            if ($chunk != '%' && $chunk != arg($id)) {
+              $match = FALSE;
+              break;
             }
-            // For arguments that are embedded in the URL, we require the
-            // argument handler to return a context, if there is an argument handler.
-            $argument = current($panel_page->arguments);
-            if ($argument) {
-              // Try to avoid loading the plugins code unless necessary.
-              if (!$plugins_loaded) {
-                panels_load_include('plugins');
-                $plugins_loaded = TRUE;
+          }
+          // It's a MATCH! Construct the URL
+          if ($match) {
+            $args = array($panel_page, FALSE);
+            reset($panel_page->arguments);
+            foreach ($path as $id => $chunk) {
+              if ($chunk != '%') {
+                continue;
               }
-              $context = panels_argument_get_context($argument, arg($id));
-              if (!$context) {
-                break;
+              // For arguments that are embedded in the URL, we require the
+              // argument handler to return a context, if there is an argument handler.
+              $argument = current($panel_page->arguments);
+              if ($argument) {
+                // Try to avoid loading the plugins code unless necessary.
+                if (!$plugins_loaded) {
+                  panels_load_include('plugins');
+                  $plugins_loaded = TRUE;
+                }
+                $context = panels_argument_get_context($argument, arg($id));
+                if (!$context) {
+                  break;
+                }
+                $panel_page->context[panels_argument_context_id($argument)] = $context;
               }
-              $panel_page->context[panels_argument_context_id($argument)] = $context;
+              $path[$id] = arg($id);
+              $args[] = arg($id);
+              next($panel_page->arguments);
             }
-            $path[$id] = arg($id);
-            $args[] = arg($id);
-            next($panel_page->arguments);
+            _panels_page_create_menu_item($items, $panel_page, implode('/', $path), $args);
+            // DEBUG: Above is now creating only the basic menu item, not the admin items.
           }
-          _panels_page_create_menu_item($items, $panel_page, implode('/', $path), $args);
-          // DEBUG: Above is now creating only the basic menu item, not the admin items.
         }
       }
     }
