Commit cefebd91 authored by Kjartan's avatar Kjartan
Browse files

Reverting code incorrectly included in the previous commit.

parent 18b297ab
...@@ -1064,14 +1064,13 @@ function aggregator_page_category() { ...@@ -1064,14 +1064,13 @@ function aggregator_page_category() {
function aggregator_page_list($sql, $header, $categorize) { function aggregator_page_list($sql, $header, $categorize) {
$form['#base'] = 'aggregator_page_list'; $form['#base'] = 'aggregator_page_list';
$form['header'] = array('#value' => $header); $form['header'] = array('#value' => $header);
$form['#id'] = 'aggregator';
$result = pager_query($sql, 20); $result = pager_query($sql, 20);
$categories = array(); $categories = array();
$done = FALSE; $done = FALSE;
$form['items'] = array(); $form['items'] = array();
while ($item = db_fetch_object($result)) { while ($item = db_fetch_object($result)) {
$form[$item->iid]['items'] = array('#value' => theme('aggregator_page_item', $item)); $form['items'][$item->iid] = array('#value' => theme('aggregator_page_item', $item));
$form[$item->iid]['categories'] = array(); $form['categories'][$item->iid] = array();
if ($categorize) { if ($categorize) {
$categories_result = db_query('SELECT c.cid, c.title, ci.iid FROM {aggregator_category} c LEFT JOIN {aggregator_category_item} ci ON c.cid = ci.cid AND ci.iid = %d', $item->iid); $categories_result = db_query('SELECT c.cid, c.title, ci.iid FROM {aggregator_category} c LEFT JOIN {aggregator_category_item} ci ON c.cid = ci.cid AND ci.iid = %d', $item->iid);
$selected = array(); $selected = array();
...@@ -1084,7 +1083,7 @@ function aggregator_page_list($sql, $header, $categorize) { ...@@ -1084,7 +1083,7 @@ function aggregator_page_list($sql, $header, $categorize) {
} }
} }
$done = TRUE; $done = TRUE;
$form[$item->iid]['categories'] = array( $form['categories'][$item->iid] = array(
'#type' => variable_get('aggregator_category_selector', 'checkboxes'), '#type' => variable_get('aggregator_category_selector', 'checkboxes'),
'#default_value' => $selected, '#options' => $categories, '#default_value' => $selected, '#options' => $categories,
'#size' => 10, '#multiple' => TRUE '#size' => 10, '#multiple' => TRUE
...@@ -1110,8 +1109,8 @@ function _aggregator_page_list($sql, $op, $header = '') { ...@@ -1110,8 +1109,8 @@ function _aggregator_page_list($sql, $op, $header = '') {
else { else {
$output = '<div id="aggregator">'; $output = '<div id="aggregator">';
$output .= $header; $output .= $header;
foreach ($form as $item) { foreach ($form['items'] as $item) {
$output .= $item['items']['#value']; $output .= $item['#value'];
} }
$output .= '</div>'; $output .= '</div>';
$output .= $form['pager']['#value']; $output .= $form['pager']['#value'];
......
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