array_sort($output, 'timestamp');
                    } else {
                        if ($sortby == 'category') {
                        }
                    }
                }
            }
        }
    }
}
$printlist = '';
$taburls = array();
foreach ($output as $page) {
    $t = str_replace("_", " ", $page['title']);
    $old_id = $page['stable_id'];
    $url = get_wikipedia_url($language, $t) . "&diffonly={$diff_only}&oldid={$old_id}&diff=cur";
    $timediff = get_time_diff($page['timestamp'], 'D');
    //size
    $diff = $page['diff'];
    if (abs($diff) > $show_color_at) {
        $bg = '#AAAAAA';
    } else {
        $bg = '#FFFFFF';
    }
    if ($diff > 0) {
        $diff_display = "<span style='color:green;background:{$bg}'>+{$diff}</span>";
    } else {
        if ($diff < 0) {
            $diff_display = "<span style='color:red;background:{$bg}'>{$diff}</span>";
        } else {
            $diff_display = "<span style='background:{$bg}'>{$diff}</span>";
            $out .= myenc($t) . "</a>{$len}</li>";
            $had_that[$t] = 1;
        }
        $out .= '</ol>';
        $guid = myenc("{$language}:{$d}:" . md5($out));
        print "<guid>{$guid}</guid>";
        print "<description>" . htmlspecialchars($out) . "</description>";
        print '</item>';
    } else {
        $list = '<ol>';
        foreach ($oos as $k2 => $t) {
            $len = ' (' . bytes($page_len[$k2]) . ')';
            if ($page_is_redirect[$k2]) {
                $len .= ' [REDIRECT]';
            }
            $list .= '<li><a target="_blank" href="' . get_wikipedia_url($language, 'Kategorie:' . $t) . '&redirect=no">';
            $list .= $t . "</a>{$len}</li>";
            $had_that[$t] = 1;
        }
        $list .= '</ol>';
        print "<li><a href=\"{$url}\" target='_blank'>{$catname}:{$d}</a>{$list}</li>";
        //	myflush () ;
    }
}
if ($mode == 'rss') {
    print '</channel></rss>';
} else {
    print '</ol><hr/>';
    $cht = count($had_that);
    if ($language == 'pl') {
        print "Znaleziono {$cht} " . pluralPl($cht, array('nieprzejrzany artykuł', 'nieprzejrzane artykuły', 'nieprzejrzanych artykułów')) . '.';