Submenu item's access control doesn't work for pda and wap

toshiki
14 years, 2 months ago
Hi,

Submenu item's access control works fine for iphone but doesn't for pda and wap. For example, 'Registered' submenu items show up even when the user isn't logged in. Topleve menu items seem to be controlled well.

The following change will fix it for pda.

--- modules/mod_mj_pda_menu/legacy.php.orig     2010-12-06 18:41:05.000000000 +0900
+++ modules/mod_mj_pda_menu/legacy.php 2010-12-09 18:08:53.000000000 +0900
@@ -217,7 +217,7 @@
{
foreach($rows as $row)
{
- if($activeId == $row->parent && !($exclude_menu_ids && in_array($row->id, $exclude_menu_ids)))
+ if($activeId == $row->parent && !($exclude_menu_ids && in_array($row->id, $exclude_menu_ids)) && $row->access <= $user->get('aid', 0))
$sublinks[] = mosGetMenuLink_pda($row, 0, $params);
 
if($row->parent != '0')
 


Similar change will be effective for wap.

For imode, submenu doesn't show up...

Regards,
toshiki
dryabov
14 years, 2 months ago
toshiki, thanks for the patch.

By continuing to use this site you consent to the use of cookies on your device as described in our cookie policy unless you have disabled them. This site will not function correctly without cookies.

I accept cookies from this site.