We have moved to Github. Please open tickets there.

Opened 5 years ago

Closed 3 years ago

#340 closed Defect (fixed)

should menu_item and make_register_object be deprecated (was: add_submenu_item vs. menu_item)

Reported by: jtgeibel Owned by:
Priority: low Milestone:
Component: Core Version: 1.5
Severity: trivial Keywords:
Cc: brettp Difficulty:

Description

A few extensions call menu_item to create sub menus (opendd, status and apitest). This seems to be an old function as all other plugins call add_submenu_item.

Additionally, menu_item simply passes its parameters onto make_register_object. Searching the codebase there are no other references to this function. It seems both are depreciated and should be removed from elgglib.php

I have attached a patch to fix the necessary plugins as well as a patch to modify elgglib.

Attachments (2)

Change History (7)

comment:1 Changed 5 years ago by jtgeibel

Sorry that the second patch is so noisy. I don't understand why diff seems to think the entire file changed (newlines maybe?). Anyway, I attached it for what it's worth.

comment:2 Changed 4 years ago by marcus

  • Priority changed from major to trivial

Menu systems will be retrofitted

comment:3 Changed 4 years ago by cash

  • Version changed from 1.0 to 1.5

Most of the menu systems have been modified to use add_submenu_item(). Still left are the opendd plugin and the siteinfo plugin. If those plugins are still supported with Elgg 1.5, they could be updated and then menu_item() and make_register_object() could be removed from elgglib.php

comment:4 Changed 4 years ago by cash

  • Summary changed from add_submenu_item vs. menu_item to should menu_item and make_register_object be deprecated (was: add_submenu_item vs. menu_item)

Added some documentation to elgglib.php in [svn:3660] related to the topbar tools menu

menu_item and make_register_object could be deprecated as nothing uses them. They could be used to create a complicated tools dropdown menu with submenus. I'm leaving this for someone else to make the decision.

comment:5 Changed 3 years ago by brettp

  • Resolution set to fixed
  • Status changed from new to closed

(In [svn:3894]) Fixes #340: add_menu() and make_register_object() deprecated.

Note: See TracTickets for help on using tickets.