Ignore:
Timestamp:
03/09/11 11:47:08 (9 years ago)
Author:
patdenice
Message:

Code optimisation.

File:
1 edited

Legend:

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

    r9369 r9581  
    8383 
    8484  // template thumbnail initialization 
    85   $template->set_filenames( array( 'pwgs_most_visited' => '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) 
     
    153151    } 
    154152 
    155     $tpl_thumbnails_var[] = $tpl_var; 
     153    $block['thumbnails'][] = $tpl_var; 
    156154  } 
    157155 
    158   $tpl_thumbnails_var = trigger_event('loc_end_index_thumbnails', $tpl_thumbnails_var, $pictures); 
    159   $template->assign('thumbnails', $tpl_thumbnails_var); 
     156  $block['thumbnails'] = trigger_event('loc_end_index_thumbnails', $block['thumbnails'], $pictures); 
    160157 
    161   $block['CONTENT'] = $template->parse('pwgs_most_visited', true); 
    162   $block['TEMPLATE'] = 'stuffs_mostvisited.tpl'; 
     158  $block['TEMPLATE'] = 'stuffs_thumbnails.tpl'; 
    163159} 
    164160 
Note: See TracChangeset for help on using the changeset viewer.