Ignore:
Timestamp:
Mar 9, 2011, 11:47:08 AM (13 years ago)
Author:
patdenice
Message:

Code optimisation.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/PWG_Stuffs/modules/BestRated/main.inc.php

    r9369 r9581  
    8383
    8484  // template thumbnail initialization
    85   $template->set_filenames( array( 'pwgs_best_rated' => 'thumbnails.tpl',));
    86 
    8785  trigger_action('loc_begin_index_thumbnails', $pictures);
    88   $tpl_thumbnails_var = array();
     86  $block['thumbnails'] = array();
    8987
    9088  foreach ($pictures as $row)
     
    148146    }
    149147
    150     $tpl_thumbnails_var[] = $tpl_var;
     148    $block['thumbnails'][] = $tpl_var;
    151149  }
    152150
    153   $tpl_thumbnails_var = trigger_event('loc_end_index_thumbnails', $tpl_thumbnails_var, $pictures);
    154   $template->assign('thumbnails', $tpl_thumbnails_var);
     151  $block['thumbnails'] = trigger_event('loc_end_index_thumbnails', $block['thumbnails'], $pictures);
    155152
    156   $block['CONTENT'] = $template->parse('pwgs_best_rated', true);
    157   $block['TEMPLATE'] = 'stuffs_bestrated.tpl';
    158 }
    159 else
    160 {
    161   return false;
     153  $block['TEMPLATE'] = 'stuffs_thumbnails.tpl';
    162154}
    163155
Note: See TracChangeset for help on using the changeset viewer.