for (String pageTitle : currentPages) {
addToPages(allowedCatsFull, newPages, pageTitle, includeTree, referenceTree);
// beware: add pageTitle to allowedCatsFull _AFTER_ adding its dependencies
// (otherwise the dependencies won't be added)
allowedCatsFull.add(pageTitle);
stmt.bind(1, pageTitle).stepThrough().reset();
}
stmt.dispose();
println(msgOut, " adding sub-categories of " + currentPages.size() + " categories or templates");
// add all categories the page belongs to