#3686 closed defect (bug) (fixed)
PHPWind importer mishandles topic status, reply counts, and forum date defaults
| Reported by: | johnjamesjacoby | Owned by: | johnjamesjacoby |
|---|---|---|---|
| Priority: | normal | Milestone: | 2.6.18 |
| Component: | API - Importers | Version: | trunk |
| Severity: | normal | Keywords: | has-unit-tests |
| Cc: |
Description
While reviewing the PHPWind 9 importer for #3684, I found three adjacent, pre-existing conversion bugs:
callback_topic_status()treatsbbs_threads.tpcstatusas an enumerated value. PHPWind defines it as a bit field: positions 1 and 2 areSTATUS_LOCKEDandSTATUS_CLOSED. The current exact-value switch imports status 2 as published and imports any combined status containing either bit as published.callback_topic_reply_count()subtracts one frombbs_threads.replies. PHPWind already stores the number of replies separately from the topic; its display code adds one when it needs the total number of posts. The importer therefore makes every nonzero reply count one too small.- Four forum date defaults use
to_type => 'bbs_forum'instead of the converter destination typeforum, so the converter never applies those mappings.
Expected behavior:
- Import topics as closed when PHPWind's locked or closed bit is set, including combined bit-field values.
- Preserve the non-negative PHPWind reply count without subtracting the topic.
- Correct or remove the unreachable forum date mappings according to the converter's normal date behavior.
Regression tests should cover individual and combined status bits, zero and nonzero reply counts, and the chosen handling of the forum date defaults.
This should remain separate from the password-import corrections in #3684.
Change History (7)
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
In 7592: