Commit c5f4624f authored by Dries's avatar Dries

- Patch #480102 by JamesAn: converted to drupal_static().

parent 709bb0a1
...@@ -569,7 +569,7 @@ function aggregator_refresh($feed) { ...@@ -569,7 +569,7 @@ function aggregator_refresh($feed) {
* An object describing the feed. * An object describing the feed.
*/ */
function aggregator_feed_load($fid) { function aggregator_feed_load($fid) {
static $feeds; $feeds = &drupal_static(__FUNCTION__);
if (!isset($feeds[$fid])) { if (!isset($feeds[$fid])) {
$feeds[$fid] = db_query('SELECT * FROM {aggregator_feed} WHERE fid = :fid', array(':fid' => $fid))->fetchObject(); $feeds[$fid] = db_query('SELECT * FROM {aggregator_feed} WHERE fid = :fid', array(':fid' => $fid))->fetchObject();
} }
...@@ -586,7 +586,7 @@ function aggregator_feed_load($fid) { ...@@ -586,7 +586,7 @@ function aggregator_feed_load($fid) {
* An associative array describing the category. * An associative array describing the category.
*/ */
function aggregator_category_load($cid) { function aggregator_category_load($cid) {
static $categories; $categories = &drupal_static(__FUNCTION__);
if (!isset($categories[$cid])) { if (!isset($categories[$cid])) {
$categories[$cid] = db_query('SELECT * FROM {aggregator_category} WHERE cid = :cid', array(':cid' => $cid))->fetchAssoc(); $categories[$cid] = db_query('SELECT * FROM {aggregator_category} WHERE cid = :cid', array(':cid' => $cid))->fetchAssoc();
} }
......
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