Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/categoryScan.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,10 @@ function getPages(con, allPages, toDo, depth, namespace) {
let promise = con
.promise()
.query(
`SELECT DISTINCT page_title, page_namespace FROM page, categorylinks WHERE page_id=cl_from AND cl_to IN ("${categoriesString}")`
`SELECT DISTINCT page_title, page_namespace FROM page, categorylinks, linktarget WHERE
page_id=cl_from AND lt_id=cl_target_id AND lt_namespace=14 AND lt_title IN ("${categoriesString}")`
);

promise
.then(([results, fields]) => {
toDo = [];
Expand Down