Updated: Comment #1

Problem/Motivation

The re-use of the {menu_links} table by book module has always been a bit of an awkward implementation. I (pwolanin) wanted to build book on tops of the menu link hierarchy handling and by the end of the 6.x cycle, there wasn't time left to do it better than this.

Proposed resolution

Phase 1 - Copy the hierarchy-related functions from menu.inc into BookManager.php so that we stop calling into menu.inc

Phase 2 -Combine all the book link fields into one table - essentially copying the hierarchy-related elements from {menu_links}

- Simplify the access checking code since we know that all the links will be to nodes.

Phase 3 - Make the BookManager interface more coherent, move more code out of book.module

Phase N - If possible, generalize some of the hierarchy helper functions so that we can re-use them across menu and book.

Remaining tasks

#2100577: Phase 1 - Decouple book module from menu inc
#2084421: Phase 2 - Decouple book module schema from menu links
#2208395: Follow up: Documentation issues with BookManagerInterface
#2209025: Phase 3 - Make the BookManager interface more coherent, move more code out of book.module
#2209029: Follow-up: clean up use statements in book module code
#2209035: Remove remaining/stray menu_link references from book module code

User interface changes

None

API changes

The schema will change, and the book module API should be moved behind an interface for the book manager.

CommentFileSizeAuthor
#7 menu_link-2100575-7.patch519 bytesdawehner

Comments

kgoel’s picture

Issue summary: View changes

Updated issue summary.

kgoel’s picture

Issue summary: View changes

Updated issue summary.

kgoel’s picture

Issue summary: View changes

Updated issue summary.

pwolanin’s picture

Title: Meta - Split book module from menu link » [META] - Split book module from menu link

Any other obvious cleanups needed? please open issues.

pwolanin’s picture

Issue summary: View changes

Updated issue summary.

pwolanin’s picture

Issue summary: View changes

Updated issue summary.

pwolanin’s picture

Issue summary: View changes

Updated issue summary.

pwolanin’s picture

Issue summary: View changes
pwolanin’s picture

pwolanin’s picture

Issue summary: View changes
dsnopek’s picture

Issue summary: View changes

Fix type-o in issue summary.

berdir’s picture

All tasks in the issue summary are done, is it missing some or is this resolved?

dawehner’s picture

Status: Active » Needs review
StatusFileSize
new519 bytes

Let's try.

Status: Needs review » Needs work

The last submitted patch, 7: menu_link-2100575-7.patch, failed testing.

berdir’s picture

Huh, are you sure that is possible, even without book?

dawehner’s picture

Status: Needs work » Fixed

You are probably right.

I cannot find any reference to menu_link anymore in book.module so I am quite convinced that we managed to decouple it totally.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.