function wikitools_page_duplicates in Wikitools 6.2
Same name and namespace in other branches
- 5 wikitools.module \wikitools_page_duplicates()
- 6 wikitools.admin.inc \wikitools_page_duplicates()
- 7 wikitools.admin.inc \wikitools_page_duplicates()
Menu callback for duplicate pages list.
1 string reference to 'wikitools_page_duplicates'
- wikitools_menu in ./
wikitools.module - Implementation of hook_menu().
File
- ./
wikitools.admin.inc, line 120 - Wikitools administration UI.
Code
function wikitools_page_duplicates() {
$output = '';
$found_nodes = FALSE;
list($select_query, $count_query, $arguments) = _wikitools_duplicate_nodes_query();
if ($select_query) {
$nodes_per_page = variable_get('default_nodes_main', 10);
// Grab all nodes that have the same title
$result = pager_query($select_query, $nodes_per_page, 0, $count_query, $arguments);
while ($node = db_fetch_object($result)) {
$output .= node_view(node_load($node->nid), 1);
$found_nodes = TRUE;
}
}
if ($found_nodes) {
$output .= theme('pager', NULL, $nodes_per_page);
}
// Return a nice listing of all the duplicate nodes
return $output;
}