- Patch 727548 by andypost: fixed aggregator module administration screen under PostgreSQL.
parent
4717f28975
commit
69384afc33
|
@ -20,14 +20,22 @@ function aggregator_admin_overview() {
|
|||
* The page HTML.
|
||||
*/
|
||||
function aggregator_view() {
|
||||
$result = db_query('SELECT f.*, COUNT(i.iid) AS items FROM {aggregator_feed} f LEFT JOIN {aggregator_item} i ON f.fid = i.fid GROUP BY f.fid, f.title, f.url, f.refresh, f.checked, f.link, f.description, f.hash, f.etag, f.modified, f.image, f.block ORDER BY f.title');
|
||||
$result = db_query('SELECT f.fid, f.title, f.url, f.refresh, f.checked, f.link, f.description, f.hash, f.etag, f.modified, f.image, f.block, COUNT(i.iid) AS items FROM {aggregator_feed} f LEFT JOIN {aggregator_item} i ON f.fid = i.fid GROUP BY f.fid, f.title, f.url, f.refresh, f.checked, f.link, f.description, f.hash, f.etag, f.modified, f.image, f.block ORDER BY f.title');
|
||||
|
||||
$output = '<h3>' . t('Feed overview') . '</h3>';
|
||||
|
||||
$header = array(t('Title'), t('Items'), t('Last update'), t('Next update'), array('data' => t('Operations'), 'colspan' => '3'));
|
||||
$rows = array();
|
||||
foreach ($result as $feed) {
|
||||
$rows[] = array(l($feed->title, "aggregator/sources/$feed->fid"), format_plural($feed->items, '1 item', '@count items'), ($feed->checked ? t('@time ago', array('@time' => format_interval(REQUEST_TIME - $feed->checked))) : t('never')), ($feed->checked && $feed->refresh ? t('%time left', array('%time' => format_interval($feed->checked + $feed->refresh - REQUEST_TIME))) : t('never')), l(t('edit'), "admin/config/services/aggregator/edit/feed/$feed->fid"), l(t('remove items'), "admin/config/services/aggregator/remove/$feed->fid"), l(t('update items'), "admin/config/services/aggregator/update/$feed->fid"));
|
||||
$rows[] = array(
|
||||
l($feed->title, "aggregator/sources/$feed->fid"),
|
||||
format_plural($feed->items, '1 item', '@count items'),
|
||||
($feed->checked ? t('@time ago', array('@time' => format_interval(REQUEST_TIME - $feed->checked))) : t('never')),
|
||||
($feed->checked && $feed->refresh ? t('%time left', array('%time' => format_interval($feed->checked + $feed->refresh - REQUEST_TIME))) : t('never')),
|
||||
l(t('edit'), "admin/config/services/aggregator/edit/feed/$feed->fid"),
|
||||
l(t('remove items'), "admin/config/services/aggregator/remove/$feed->fid"),
|
||||
l(t('update items'), "admin/config/services/aggregator/update/$feed->fid"),
|
||||
);
|
||||
}
|
||||
$output .= theme('table', array('header' => $header, 'rows' => $rows, 'empty' => t('No feeds available. <a href="@link">Add feed</a>.', array('@link' => url('admin/config/services/aggregator/add/feed')))));
|
||||
|
||||
|
|
Loading…
Reference in New Issue