Skip to content

Migrate category, report, rate, and digest persistence from Art to IPF#40

Draft
Copilot wants to merge 6 commits into
ipf-refactorfrom
copilot/convert-artobject-to-ipf
Draft

Migrate category, report, rate, and digest persistence from Art to IPF#40
Copilot wants to merge 6 commits into
ipf-refactorfrom
copilot/convert-artobject-to-ipf

Conversation

Copy link
Copy Markdown

Copilot AI commented May 26, 2026

This PR moves the lowest-risk persistence slice off the legacy Art layer: category, report, rate, and digest. It keeps existing module entry points and admin flows intact while removing direct Art dependencies from the migrated classes.

  • IPF persistence migration

    • Convert Category, Report, Nrate, and Digest objects to IPF-backed objects.
    • Convert the corresponding handlers from ArtObjectHandler/custom object handlers to icms_ipf_Handler.
    • Override table/class mapping where needed so existing bb_* tables and public handler names continue to work.
  • Handler compatibility

    • Preserve current call patterns such as create(), get(), insert(), delete(), getAllCats(), getAllReports(), and getAllDigests().
    • Keep category permission templating and cascading deletes in handler logic.
    • Replace Art-specific orphan cleanup with local SQL-based cleanup for migrated handlers.
  • Admin CRUD alignment

    • Update report admin processing to work cleanly with the migrated report handler and sanitized posted IDs.
    • Refactor vote admin listing/deletion to use the rate handler instead of direct SQL, including joined topic title lookup and rating summary helpers.
    • Keep existing category and digest admin pages operating against the migrated handlers without changing their entry points.
  • Regression guardrail

    • Add tools/ipf-migration-smoke.php to exercise the migrated CRUD paths and assert that the migrated class files no longer depend on Art.

Example of the new handler shape:

class IforumRateHandler extends icms_ipf_Handler
{
    function __construct(&$db)
    {
        parent::__construct($db, 'rate', 'ratingid', '', '', basename(dirname(__FILE__, 2)));
        $this->table = $db->prefix('bb_votedata');
        $this->className = 'Nrate';
    }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants