Permalink
Browse files

Speedup! get_timezone_record wasn't caching! :-)

  • Loading branch information...
moodler
moodler committed Mar 20, 2006
1 parent eb75983 commit a5a520fdc162ca800552ed34ac7788d57462174d
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/moodlelib.php
View
@@ -1028,8 +1028,8 @@ function get_timezone_record($timezonename) {
return $cache[$timezonename];
}
return get_record_sql('SELECT * FROM '.$CFG->prefix.'timezone
WHERE name = '.$db->qstr($timezonename).' ORDER BY year DESC', true);
return $cache[$timezonename] = get_record_sql('SELECT * FROM '.$CFG->prefix.'timezone
WHERE name = '.$db->qstr($timezonename).' ORDER BY year DESC', true);
}
function calculate_user_dst_table($from_year = NULL, $to_year = NULL) {

0 comments on commit a5a520f

Please sign in to comment.