Commit ea9f54e4 authored by Stefan Kudwien's avatar Stefan Kudwien
Browse files

by smk-ka: Fixed database hit multiple times if term_display table is empty.

parent a9fd0e74
Loading
Loading
Loading
Loading
+1 −0
Changes for CHANGELOG.txt: 1 added line, 0 removed lines.
Original line number Diff line number Diff line
@@ -2,6 +2,7 @@

Term Display 6.x-1.x, xxxx-xx-xx
--------------------------------
by smk-ka: Fixed database hit multiple times if term_display table is empty.
#637416 by sun: Added Panels/CTools support.
by smk-ka: Removed t() from hook_schema() descriptions.
#416840 by Ralf: Fixed PHP notice.
+2 −1
Changes for term_display.module: 2 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -130,7 +130,8 @@ function term_display_taxonomy($op, $type, $object = NULL) {
function term_display_data($vid) {
  static $term_display_data;

  if (empty($term_display_data)) {
  if (!isset($term_display_data)) {
    $term_display_data = array();
    $result = db_query('SELECT vid, style, weight FROM {term_display}');
    while ($vocabulary = db_fetch_array($result)) {
      $term_display_data[$vocabulary['vid']] = $vocabulary;