- Timestamp:
- Jun 28, 2008, 3:58:35 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/branch-1_7/picture.php
r2326 r2406 29 29 include(PHPWG_ROOT_PATH.'include/section_init.inc.php'); 30 30 include_once(PHPWG_ROOT_PATH.'include/functions_picture.inc.php'); 31 include_once(PHPWG_ROOT_PATH.'include/functions_session.inc.php'); 31 32 32 33 // Check Access and exit when user status is not ok … … 49 50 duplicate_index_url() 50 51 ); 52 } 53 54 // There is cookie, so we must handle it at the beginning 55 if ( isset($_GET['metadata']) ) 56 { 57 if ( pwg_get_session_var('show_metadata') == null ) 58 { 59 pwg_set_session_var('show_metadata', 1, 86400, cookie_path()); 60 } else { 61 pwg_unset_session_var('show_metadata'); 62 63 } 64 51 65 } 52 66 … … 459 473 // metadata 460 474 $url_metadata = duplicate_picture_url(); 475 $url_metadata = add_url_params( $url_metadata, array('metadata'=>null) ); 476 461 477 462 478 // do we have a plugin that can show metadata for something else than images? … … 470 486 ); 471 487 472 if ($metadata_showable) 473 { 474 if ( !isset($_GET['metadata']) ) 475 { 476 $url_metadata = add_url_params( $url_metadata, array('metadata'=>null) ); 477 } 478 else 479 { 480 $page['meta_robots']=array('noindex'=>1, 'nofollow'=>1); 481 } 482 } 488 if ( $metadata_showable and pwg_get_session_var('show_metadata') ) 489 { 490 $page['meta_robots']=array('noindex'=>1, 'nofollow'=>1); 491 } 492 483 493 484 494 $page['body_id'] = 'thePicturePage'; … … 771 781 $template->assign_vars($infos); 772 782 773 774 783 // related categories 775 784 if ( count($related_categories)==1 and … … 778 787 { // no need to go to db, we have all the info 779 788 $template->assign_block_vars( 780 789 'category', 781 790 array('LINE'=>get_cat_display_name( $page['category']['upper_names'] )) 782 791 ); … … 837 846 include(PHPWG_ROOT_PATH.'include/picture_rate.inc.php'); 838 847 include(PHPWG_ROOT_PATH.'include/picture_comment.inc.php'); 839 if ($metadata_showable and isset($_GET['metadata']))848 if ($metadata_showable and pwg_get_session_var('show_metadata') <> null ) 840 849 { 841 850 include(PHPWG_ROOT_PATH.'include/picture_metadata.inc.php');
Note: See TracChangeset
for help on using the changeset viewer.