Changeset 1090 for trunk/picture.php
- Timestamp:
- Mar 21, 2006, 2:27:21 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/picture.php
r1086 r1090 277 277 $file_wo_ext = get_filename_wo_extension($row['file']); 278 278 279 $icon = get_themeconf('mime_icon_dir');280 $icon.= strtolower(get_extension($row['file'])).'.png';281 282 279 if (isset($row['representative_ext']) and $row['representative_ext'] != '') 283 280 { … … 288 285 else 289 286 { 287 $icon = get_themeconf('mime_icon_dir'); 288 $icon.= strtolower(get_extension($row['file'])).'.png'; 290 289 $picture[$i]['src'] = $icon; 291 290 } … … 301 300 { 302 301 $url_high=$cat_directory.'/pwg_high/'.$row['file']; 303 $picture[$i]['high'] = $url_high; 302 $picture[$i]['high_file_system'] = $picture[$i]['high'] = $url_high; 303 if ( ! url_is_remote($picture[$i]['high']) ) 304 { 305 $picture[$i]['high'] = get_root_url().$picture[$i]['high']; 306 } 304 307 } 305 308 } 309 } 310 $picture[$i]['src_file_system'] = $picture[$i]['src']; 311 if ( ! url_is_remote($picture[$i]['src']) ) 312 { 313 $picture[$i]['src'] = get_root_url(). $picture[$i]['src']; 306 314 } 307 315 … … 309 317 if (!$picture[$i]['is_picture']) 310 318 { 311 $picture[$i]['download'] = $row['path']; 319 $picture[$i]['download'] = url_is_remote($row['path']) ? '' : get_root_url(); 320 $picture[$i]['download'].= $row['path']; 312 321 } 313 322 … … 326 335 array( 327 336 'image_id' => $row['id'], 337 'image_file' => $row['file'], 328 338 ), 329 339 array( … … 343 353 344 354 $url_admin = 345 PHPWG_ROOT_PATH.'admin.php?page=picture_modify'355 get_root_url().'admin.php?page=picture_modify' 346 356 .'&cat_id='.(isset($page['category']) ? $page['category'] : '') 347 357 .'&image_id='.$page['image_id'] 348 358 ; 349 359 350 $url_slide = 351 $picture['current']['url'] 352 .'&slideshow='.$conf['slideshow_period'] 353 ; 360 $url_slide = add_url_param( 361 $picture['current']['url'], 362 'slideshow='.$conf['slideshow_period'] ); 354 363 355 364 $title = $picture['current']['name']; … … 358 367 { 359 368 $refresh= $_GET['slideshow']; 360 $url_link = $picture['next']['url'].'&slideshow='.$refresh;369 $url_link = add_url_param($picture['next']['url'], 'slideshow='.$refresh); 361 370 } 362 371 … … 378 387 if (empty($picture['current']['width'])) 379 388 { 380 $taille_image = @getimagesize($picture['current']['src ']);389 $taille_image = @getimagesize($picture['current']['src_file_system']); 381 390 $original_width = $taille_image[0]; 382 391 $original_height = $taille_image[1]; … … 511 520 'download', 512 521 array( 513 'U_DOWNLOAD' => PHPWG_ROOT_PATH.'action.php?dwn='514 .$picture['current']['high ']522 'U_DOWNLOAD' => get_root_url().'action.php?dwn=' 523 .$picture['current']['high_file_system'] 515 524 ) 516 525 ); … … 523 532 'representative', 524 533 array( 525 'URL' => $url_self.'&action=set_as_representative'534 'URL' => add_url_param($url_self, 'action=set_as_representative') 526 535 ) 527 536 ); … … 534 543 'caddie', 535 544 array( 536 'URL' => $url_self.'&action=add_to_caddie'545 'URL' => add_url_param($url_self, 'action=add_to_caddie') 537 546 ) 538 547 ); … … 554 563 if ($row['nb_fav'] == 0) 555 564 { 556 $url = $url_self.'&action=add_to_favorites';557 558 565 $template->assign_block_vars( 559 566 'favorite', 560 567 array( 561 'FAVORITE_IMG' => get_ themeconf('icon_dir').'/favorite.png',568 'FAVORITE_IMG' => get_root_url().get_themeconf('icon_dir').'/favorite.png', 562 569 'FAVORITE_HINT' => $lang['add_favorites_hint'], 563 570 'FAVORITE_ALT' => $lang['add_favorites_alt'], 564 'U_FAVORITE' => $url_self.'&action=add_to_favorites',571 'U_FAVORITE' => add_url_param($url_self, 'action=add_to_favorites'), 565 572 ) 566 573 ); … … 571 578 'favorite', 572 579 array( 573 'FAVORITE_IMG' => get_ themeconf('icon_dir').'/del_favorite.png',580 'FAVORITE_IMG' => get_root_url().get_themeconf('icon_dir').'/del_favorite.png', 574 581 'FAVORITE_HINT' => $lang['del_favorites_hint'], 575 582 'FAVORITE_ALT' => $lang['del_favorites_alt'], 576 'U_FAVORITE' => $url_self.'&action=remove_from_favorites',583 'U_FAVORITE' => add_url_param($url_self, 'action=remove_from_favorites'), 577 584 ) 578 585 ); … … 622 629 $val = format_date($picture['current']['date_creation']); 623 630 $url = make_index_URL( 624 array( 625 'chronology' => 626 array( 627 'field'=>'created', 628 'style'=>'monthly', 629 'view'=>'list', 630 ), 631 'chronology_date' => explode('-', $picture['current']['date_creation']) 632 ) 633 ); 631 array( 632 'chronology_field'=>'created', 633 'chronology_style'=>'monthly', 634 'chronology_view'=>'list', 635 'chronology_date' => explode('-', $picture['current']['date_creation']) 636 ) 637 ); 634 638 $infos['INFO_CREATION_DATE'] = '<a href="'.$url.'">'.$val.'</a>'; 635 639 } … … 642 646 $val = format_date($picture['current']['date_available'], 'mysql_datetime'); 643 647 $url = make_index_URL( 644 array( 645 'chronology' => 646 array( 647 'field'=>'posted', 648 'style'=>'monthly', 649 'view'=>'list', 650 ), 651 'chronology_date' => explode('-', substr($picture['current']['date_available'],0,10)) 652 ) 653 ); 648 array( 649 'chronology_field'=>'posted', 650 'chronology_style'=>'monthly', 651 'chronology_view'=>'list', 652 'chronology_date'=>explode('-', substr($picture['current']['date_available'],0,10)) 653 ) 654 ); 654 655 $infos['INFO_POSTED_DATE'] = '<a href="'.$url.'">'.$val.'</a>'; 655 656
Note: See TracChangeset
for help on using the changeset viewer.