Commit 739bb8a8 authored by Dries's avatar Dries

- Patch #9261 by drumm: made the aggregator overview tables more consistent by adding a items column to the categories table which acts like the same column in the feeds table.
parent 2c9b5e31
......@@ -666,14 +666,14 @@ function aggregator_view() {
}
$output .= theme('table', $header, $rows);
$result = db_query('SELECT * FROM {aggregator_category} ORDER BY title');
$result = db_query('SELECT c.cid, c.title, count(ci.iid) as items FROM {aggregator_category} c LEFT JOIN {aggregator_category_item} ci ON c.cid = ci.cid GROUP BY c.cid ORDER BY title');
$output .= '<h3>'. t('Category overview') .'</h3>';
$header = array(t('title'), t('operations'));
$header = array(t('title'), t('items'), t('operations'));
$rows = array();
while ($category = db_fetch_object($result)) {
$rows[] = array(l($category->title, "aggregator/categories/$category->cid"), l(t('edit category'), "admin/aggregator/edit/category/$category->cid"));
$rows[] = array(l($category->title, "aggregator/categories/$category->cid"), format_plural($category->items, '1 item', '%count items'), l(t('edit category'), "admin/aggregator/edit/category/$category->cid"));
}
$output .= theme('table', $header, $rows);
......
......@@ -666,14 +666,14 @@ function aggregator_view() {
}
$output .= theme('table', $header, $rows);
$result = db_query('SELECT * FROM {aggregator_category} ORDER BY title');
$result = db_query('SELECT c.cid, c.title, count(ci.iid) as items FROM {aggregator_category} c LEFT JOIN {aggregator_category_item} ci ON c.cid = ci.cid GROUP BY c.cid ORDER BY title');
$output .= '<h3>'. t('Category overview') .'</h3>';
$header = array(t('title'), t('operations'));
$header = array(t('title'), t('items'), t('operations'));
$rows = array();
while ($category = db_fetch_object($result)) {
$rows[] = array(l($category->title, "aggregator/categories/$category->cid"), l(t('edit category'), "admin/aggregator/edit/category/$category->cid"));
$rows[] = array(l($category->title, "aggregator/categories/$category->cid"), format_plural($category->items, '1 item', '%count items'), l(t('edit category'), "admin/aggregator/edit/category/$category->cid"));
}
$output .= theme('table', $header, $rows);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment