diff -u b/core/modules/aggregator/aggregator.install b/core/modules/aggregator/aggregator.install --- b/core/modules/aggregator/aggregator.install +++ b/core/modules/aggregator/aggregator.install @@ -9,9 +9,9 @@ * Implements hook_uninstall(). */ function aggregator_uninstall() { - $config = config('aggregator.admin'); - $config->delete(); - $config->save(); + config('aggregator.admin') + ->delete() + ->save(); } /** @@ -268,7 +268,7 @@ } /** - * Moves aggregator settings from variable to config. + * Moves aggregator settings from variables to config. */ function aggregrator_update_8000() { update_variables_to_config('aggregator.admin'); diff -u b/core/modules/aggregator/aggregator.module b/core/modules/aggregator/aggregator.module --- b/core/modules/aggregator/aggregator.module +++ b/core/modules/aggregator/aggregator.module @@ -740,8 +740,7 @@ * The filtered content. */ function aggregator_filter_xss($value) { - $config = config('aggregator.admin'); - return filter_xss($value, preg_split('/\s+|<|>/', $config->get('aggregator_allowed_html_tags'), -1, PREG_SPLIT_NO_EMPTY)); + return filter_xss($value, preg_split('/\s+|<|>/', config('aggregator.admin')->get('aggregator_allowed_html_tags'), -1, PREG_SPLIT_NO_EMPTY)); } /** diff -u b/core/modules/aggregator/aggregator.pages.inc b/core/modules/aggregator/aggregator.pages.inc --- b/core/modules/aggregator/aggregator.pages.inc +++ b/core/modules/aggregator/aggregator.pages.inc @@ -218,10 +218,8 @@ } } $done = TRUE; - - $config = config('aggregator.admin'); $form['categories'][$item->iid] = array( - '#type' => $config->get('aggregator_category_selector'), + '#type' => config('aggregator.admin')->get('aggregator_category_selector'), '#default_value' => $selected, '#options' => $categories, '#size' => 10, @@ -358,9 +356,9 @@ foreach ($result as $feed) { // Most recent items: $summary_items = array(); - $config = config('aggregator.admin'); - if ($config->get('aggregator_summary_items')) { - $items = db_query_range('SELECT i.title, i.timestamp, i.link FROM {aggregator_item} i WHERE i.fid = :fid ORDER BY i.timestamp DESC', 0, $config->get('aggregator_summary_items'), array(':fid' => $feed->fid)); + $aggregator_summary_items = config('aggregator.admin')->get('aggregator_summary_items'); + if ($aggregator_summary_items) { + $items = db_query_range('SELECT i.title, i.timestamp, i.link FROM {aggregator_item} i WHERE i.fid = :fid ORDER BY i.timestamp DESC', 0, $aggregator_summary_items, array(':fid' => $feed->fid)); foreach ($items as $item) { $summary_items[] = theme('aggregator_summary_item', array('item' => $item)); } @@ -383,10 +381,10 @@ $output = ''; foreach ($result as $category) { - $config = config('aggregator.admin'); - if ($config->get('aggregator_summary_items')) { + $aggregator_summary_items = config('aggregator.admin')->get('aggregator_summary_items'); + if ($aggregator_summary_items) { $summary_items = array(); - $items = db_query_range('SELECT i.title, i.timestamp, i.link, f.title as feed_title, f.link as feed_link FROM {aggregator_category_item} ci LEFT JOIN {aggregator_item} i ON i.iid = ci.iid LEFT JOIN {aggregator_feed} f ON i.fid = f.fid WHERE ci.cid = :cid ORDER BY i.timestamp DESC', 0, $config->get('aggregator_summary_items'), array(':cid' => $category->cid)); + $items = db_query_range('SELECT i.title, i.timestamp, i.link, f.title as feed_title, f.link as feed_link FROM {aggregator_category_item} ci LEFT JOIN {aggregator_item} i ON i.iid = ci.iid LEFT JOIN {aggregator_feed} f ON i.fid = f.fid WHERE ci.cid = :cid ORDER BY i.timestamp DESC', 0, $aggregator_summary_items, array(':cid' => $category->cid)); foreach ($items as $item) { $summary_items[] = theme('aggregator_summary_item', array('item' => $item)); } @@ -443,8 +441,7 @@ foreach ($feeds as $feed) { switch ($feed_length) { case 'teaser': - $config = config('aggregator.admin'); - $summary = text_summary($feed->description, NULL, $config->get('aggregator_teaser_length')); + $summary = text_summary($feed->description, NULL, config('aggregator.admin')->get('aggregator_teaser_length')); if ($summary != $feed->description) { $summary .= '

' . t('read more') . "

\n"; } diff -u b/core/modules/aggregator/aggregator.processor.inc b/core/modules/aggregator/aggregator.processor.inc --- b/core/modules/aggregator/aggregator.processor.inc +++ b/core/modules/aggregator/aggregator.processor.inc @@ -186,8 +186,7 @@ * Object describing feed. */ function aggregator_expire($feed) { - $config = config('aggregator.admin'); - $aggregator_clear = $config->get('aggregator_clear'); + $aggregator_clear = config('aggregator.admin')->get('aggregator_clear'); if ($aggregator_clear != AGGREGATOR_CLEAR_NEVER) { // Remove all items that are older than flush item timer. diff -u b/core/modules/aggregator/aggregator.test b/core/modules/aggregator/aggregator.test --- b/core/modules/aggregator/aggregator.test +++ b/core/modules/aggregator/aggregator.test @@ -944,8 +944,9 @@ // Do not remove old aggregator items during these tests, since our sample // feeds have hardcoded dates in them (which may be expired when this test // is run). - $config = config('aggregator.admin'); - $config->set('aggregator_clear', AGGREGATOR_CLEAR_NEVER); + config('aggregator.admin') + ->set('aggregator_clear', AGGREGATOR_CLEAR_NEVER) + ->save(); } /**