*** securepages.module.orig 2009-03-29 06:22:51.000000000 -0600 --- securepages.module 2009-06-17 16:07:33.000000000 -0600 *************** *** 210,222 **** /** * Check to see if the current menu item has a preference and ignore the * secure pages settings */ if (function_exists('menu_get_item')) { ! $item = menu_get_item(menu_get_active_item()); ! if (isset($item['secure'])) { ! return $item['secure']; } } /** * Check to see if the page matches the current settings --- 210,233 ---- /** * Check to see if the current menu item has a preference and ignore the * secure pages settings */ if (function_exists('menu_get_item')) { ! $mid = menu_get_active_item(); ! ! /** ! * Follow the path up to find the first "secure" attribute. ! * Like Drupal's _menu_item_is_accessible() function. ! */ ! $menu = menu_get_menu(); ! $path = isset($menu['items'][$mid]['path']) ? $menu['items'][$mid]['path'] : NULL; ! while ($path && (!isset($menu['path index'][$path]) || !isset($menu['items'][$menu['path index'][$path]]['secure']))) { ! $path = substr($path, 0, strrpos($path, '/')); ! } ! ! if (!empty($path)) { ! return $menu['items'][$menu['path index'][$path]]['secure']; } } /** * Check to see if the page matches the current settings