Skip to content

Commit 959e5fb

Browse files
committed
Use linktarget table
Following DB changes, cl_to column doesn't exist anymore, but need to use linktarget table.
1 parent 36d5895 commit 959e5fb

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/categoryScan.mjs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,10 @@ function getPages(con, allPages, toDo, depth, namespace) {
88
let promise = con
99
.promise()
1010
.query(
11-
`SELECT DISTINCT page_title, page_namespace FROM page, categorylinks WHERE page_id=cl_from AND cl_to IN ("${categoriesString}")`
11+
`SELECT DISTINCT page_title, page_namespace FROM page, categorylinks, linktarget WHERE
12+
page_id=cl_from AND lt_id=cl_target_id AND lt_namespace=14 AND lt_title IN ("${categoriesString})`
1213
);
14+
1315
promise
1416
.then(([results, fields]) => {
1517
toDo = [];

0 commit comments

Comments
 (0)