Skip to content

Conversation

@hexmode
Copy link
Contributor

@hexmode hexmode commented Jan 3, 2026

MediaWiki 1.45+ has migrated the categorylinks table schema, replacing
the cl_to column with a reference to the linktarget table. This commit
updates all queries to use the new schema.

Changes:

  • Query.php: Updated all category-related queries to join linktarget
    table and use lt_title instead of cl_to. Affected functions:

    • Goal categories query
    • _addcategories()
    • _articlecategory()
    • _category() (both AND and OR operators)
    • _notcategory()
    • _ordermethod() (category case)
    • getSubcategories()
  • CreateView.php: Updated dpl_clview VIEW definition to include
    linktarget table joins and expose lt_title, lt_namespace fields

  • Parse.php: Updated processQueryResults() to use lt_title for
    goal='categories' queries

  • Article.php: Updated category heading code to use lt_title from
    linktarget table instead of cl_to

All joins now include proper namespace checks (lt_namespace = NS_CATEGORY)
to ensure correct category matching.

Fixes #505

🤖 Generated with Claude Code

Co-Authored-By: Claude [email protected]

MediaWiki 1.45+ has migrated the categorylinks table schema, replacing
the cl_to column with a reference to the linktarget table. This commit
updates all queries to use the new schema.

Changes:
- Query.php: Updated all category-related queries to join linktarget
  table and use lt_title instead of cl_to. Affected functions:
  * Goal categories query
  * _addcategories()
  * _articlecategory()
  * _category() (both AND and OR operators)
  * _notcategory()
  * _ordermethod() (category case)
  * getSubcategories()

- CreateView.php: Updated dpl_clview VIEW definition to include
  linktarget table joins and expose lt_title, lt_namespace fields

- Parse.php: Updated processQueryResults() to use lt_title for
  goal='categories' queries

- Article.php: Updated category heading code to use lt_title from
  linktarget table instead of cl_to

All joins now include proper namespace checks (lt_namespace = NS_CATEGORY)
to ensure correct category matching.

Fixes Universal-Omega#505

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
@coderabbitai
Copy link

coderabbitai bot commented Jan 3, 2026

Important

Review skipped

Auto reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@Universal-Omega
Copy link
Owner

I very much appreciate this PR its extremely helpful, however DPL3 (the current main branch) is unmaintained and not tested enough. I plan to merge pre-release (DPL4) into main within a day or two. Any chance you could do it again then?

@hexmode hexmode closed this Jan 4, 2026
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.

Not compatible with Mediawiki 1.45+

2 participants