Commit 73dfaa55 authored by Chris Graham's avatar Chris Graham
Browse files

Fixed MANTIS-4546 (Sitemap code not maintaining proper order for Wiki+ page tree)

parent 2417a2ff
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -143,7 +143,7 @@ class Hook_sitemap_wiki_page extends Hook_sitemap_content
        }

        // Categories done after node callback, to ensure sensible ordering
        $children = $this->_get_children_nodes($content_id, $longer_page_link, $callback, $valid_node_types, $child_cutoff, $max_recurse_depth, $recurse_level, $options, $zone, $meta_gather, $row);
        $children = $this->_get_children_nodes($content_id, $longer_page_link, $callback, $valid_node_types, $child_cutoff, $max_recurse_depth, $recurse_level, $options, $zone, $meta_gather, $row, '', null, 'the_order');
        if ($recurse_level > 10) {
            $children = array(); // We really need to cutoff loops at some point
        }
+2 −2
Original line number Diff line number Diff line
@@ -861,7 +861,7 @@ function _create_selection_list_wiki_page_tree(&$wiki_seen, $select, $id, $bread

    $sub_breadcrumbs = ($breadcrumbs == '') ? ($title . ' > ') : ($breadcrumbs . $title . ' > ');

    $rows = $GLOBALS['SITE_DB']->query_select('wiki_children', array('*'), array('parent_id' => $id), 'ORDER BY title', intval(get_option('general_safety_listing_limit'))/*reasonable limit*/);
    $rows = $GLOBALS['SITE_DB']->query_select('wiki_children', array('*'), array('parent_id' => $id), 'ORDER BY the_order', intval(get_option('general_safety_listing_limit'))/*reasonable limit*/);
    $compound_list = strval($id) . ',';
    $_below = new Tempcode();
    foreach ($rows as $i => $myrow) {
@@ -953,7 +953,7 @@ function get_wiki_page_tree(&$wiki_seen, $page_id = null, $breadcrumbs = null, $
    }

    // Children of this category
    $rows = $GLOBALS['SITE_DB']->query_select('wiki_children', array('*'), array('parent_id' => $page_id), 'ORDER BY title', intval(get_option('general_safety_listing_limit'))/*reasonable limit*/);
    $rows = $GLOBALS['SITE_DB']->query_select('wiki_children', array('*'), array('parent_id' => $page_id), 'ORDER BY the_order', intval(get_option('general_safety_listing_limit'))/*reasonable limit*/);
    $children[0]['child_count'] = count($rows);
    $child_breadcrumbs = ($breadcrumbs == '') ? '' : ($breadcrumbs . ' > ');
    if (($levels !== 0) || ($use_compound_list)) {