Commit 709bb0a1 authored by Dries's avatar Dries

- Patch #480418 by JamesAn: introduces drupal_static().

parent 395713ba
......@@ -991,7 +991,7 @@ function template_preprocess_forum_submitted(&$variables) {
function _forum_user_last_visit($nid) {
global $user;
static $history = array();
$history = &drupal_static(__FUNCTION__, array());
if (empty($history)) {
$result = db_query('SELECT nid, timestamp FROM {history} WHERE uid = %d', $user->uid);
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