Changeset 16987
- Timestamp:
- Jul 24, 2012, 10:34:52 PM (12 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/category_default.inc.php
r13234 r16987 152 152 } 153 153 154 $derivative_params = trigger_event('get_index_derivative_params', ImageStdParams::get_by_type( pwg_get_session_var('index_deriv', IMG_THUMB) ) );155 156 154 $template->assign( array( 157 'derivative_params' => $derivative_params,155 'derivative_params' => trigger_event('get_index_derivative_params', ImageStdParams::get_by_type( pwg_get_session_var('index_deriv', IMG_THUMB) ) ), 158 156 'SHOW_THUMBNAIL_CAPTION' =>$conf['show_thumbnail_caption'], 159 157 ) ); … … 163 161 $template->assign_var_from_handle('THUMBNAILS', 'index_thumbnails'); 164 162 unset($pictures, $selection, $tpl_thumbnails_var); 165 $template->clear_assign( array('thumbnails', 'derivative_params'));163 $template->clear_assign( 'thumbnails' ); 166 164 pwg_debug('end include/category_default.inc.php'); 167 165 ?> -
trunk/index.php
r16986 r16987 274 274 } 275 275 276 if ( count($page['items']) > 0 ) 277 { 276 // category comment 277 if ($page['start']==0 and !isset($page['chronology_field']) and !empty($page['comment']) ) 278 { 279 $template->assign('CONTENT_DESCRIPTION', $page['comment'] ); 280 } 281 282 // include menubar 283 include( PHPWG_ROOT_PATH.'include/menubar.inc.php'); 284 285 if ( isset($page['category']['count_categories']) and $page['category']['count_categories']==0 ) 286 {// count_categories might be computed by menubar - if the case unassign flat link if no sub albums 287 $template->clear_assign('U_MODE_FLAT'); 288 } 289 290 //------------------------------------------------------ main part : thumbnails 291 if ( 0==$page['start'] 292 and !isset($page['flat']) 293 and !isset($page['chronology_field']) 294 and ('recent_cats'==$page['section'] or 'categories'==$page['section']) 295 and (!isset($page['category']['count_categories']) or $page['category']['count_categories']>0 ) 296 ) 297 { 298 include(PHPWG_ROOT_PATH.'include/category_cats.inc.php'); 299 } 300 if ( !empty($page['items']) ) 301 { 302 include(PHPWG_ROOT_PATH.'include/category_default.inc.php'); 278 303 $url = add_url_params( 279 304 duplicate_index_url(), 280 305 array('display' => '') 281 306 ); 282 $selected_type = trigger_event('get_index_derivative_params', ImageStdParams::get_by_type( pwg_get_session_var('index_deriv', IMG_THUMB) ) )->type; 307 $selected_type = $template->get_template_vars('derivative_params')->type; 308 $template->clear_assign( 'derivative_params' ); 283 309 $type_map = ImageStdParams::get_defined_type_map(); 284 310 unset($type_map[IMG_XXLARGE], $type_map[IMG_XLARGE]); … … 294 320 ); 295 321 } 296 }297 298 // category comment299 if ($page['start']==0 and !isset($page['chronology_field']) and !empty($page['comment']) )300 {301 $template->assign('CONTENT_DESCRIPTION', $page['comment'] );302 }303 304 // include menubar305 include( PHPWG_ROOT_PATH.'include/menubar.inc.php');306 307 if ( isset($page['category']['count_categories']) and $page['category']['count_categories']==0 )308 {// count_categories might be computed by menubar - if the case unassign flat link if no sub albums309 $template->clear_assign('U_MODE_FLAT');310 }311 312 //------------------------------------------------------ main part : thumbnails313 if ( 0==$page['start']314 and !isset($page['flat'])315 and !isset($page['chronology_field'])316 and ('recent_cats'==$page['section'] or 'categories'==$page['section'])317 and (!isset($page['category']['count_categories']) or $page['category']['count_categories']>0 )318 )319 {320 include(PHPWG_ROOT_PATH.'include/category_cats.inc.php');321 }322 if ( !empty($page['items']) )323 {324 include(PHPWG_ROOT_PATH.'include/category_default.inc.php');325 322 } 326 323 //------------------------------------------------------- category informations
Note: See TracChangeset
for help on using the changeset viewer.