Repository navigation
Phase 1: data model with 13 IPF objects - #2
Merged
Merged
Conversation
- category, forum, moderator, topic, post, attachment, report, suspension, readmark, online, digest, archive and permtemplate, each with a handler; the core builds one table per item from object_items - group permissions on categories and forums with iForum's gperm names (minus polls), forum tree with loop protection - forum and topic counters recounted in handler events; cascading deletes from forum to topic to post to attachment and report; a category with forums cannot be deleted - indexes in imforum_db_upgrade_1(), idempotent; FULLTEXT where the server supports it, the install carries on where it does not - read marks are called readmark: READ is a reserved word and IPF uses the item name as a table alias - time fields default to 0, which strict SQL mode needs - labels and permission captions in English and Dutch - integration tests that install the module with the core's own updater and exercise the handlers, in CI on MySQL 5.5, MySQL 5.7 with MyISAM and MariaDB 10.11 Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MZy45V5RV9nx6Buq8vqKHr
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Phase 1 of the rebuild plan: the full data layer. There are still no admin screens or forum pages; those are phases 2 to 4.
What is in it
src/class/: category, forum, moderator, topic, post, attachment, report, suspension, readmark, online, digest, archive and permtemplate. The core builds one table<prefix>_imforum_<item>per item fromobject_items.category_accesson categories, plus the eight forum permissions with iForum's gperm names (forum_access,forum_view,forum_post,forum_reply,forum_edit,forum_delete,forum_attach,forum_noapprove), so the importer can copy them unchanged. The poll permissions are gone.forum_topics,forum_posts,forum_last_post_id,topic_repliesandtopic_first/last_post_idare recounted bysynchronise()in the handler events after every insert, update and delete. Only approved items count.imforum_db_upgrade_1(), and running it twice is safe. The FULLTEXT index is created where the server supports it; elsewhere the install carries on without it (MySQL 5.5 with InnoDB).Deviations from the plan
READis a reserved word in MySQL, and IPF uses the item name as a table alias (SELECT ... FROM table AS read), so every query on it failed without an error. A unit test now refuses reserved words as item names.Incorrect integer value: '').post_editstores the edit history as JSON instead of a serialised PHP array. That avoidsunserialize()on database content; the importer will convert the old data.Tests
Not in this PR
Generated by Claude Code