Changeset 606 for trunk/tools
- Timestamp:
- Nov 17, 2004, 12:38:34 AM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/create_listing_file.php
r593 r606 311 311 function get_pictures($dir, $indent) 312 312 { 313 global $conf ;313 global $conf, $page; 314 314 315 315 // fs means FileSystem : $fs_files contains files in the filesystem found … … 322 322 323 323 $elements = array(); 324 325 $print_dir = preg_replace('/^\.\//', '', $dir); 326 $print_dir = preg_replace('/\/*$/', '/', $print_dir); 324 327 325 328 foreach ($fs_files as $fs_file) … … 327 330 $element = array(); 328 331 $element['file'] = $fs_file; 332 $element['path'] = $page['url'].$print_dir.$fs_file; 329 333 $element['filesize'] = floor(filesize($dir.'/'.$fs_file) / 1024); 330 334 … … 421 425 $attributes = array('file','tn_ext','representative_ext','filesize', 422 426 'width','height','date_creation','author','keywords', 423 'name','comment' );427 'name','comment','path'); 424 428 foreach ($elements as $element) 425 429 { … … 464 468 $end = strrpos($_SERVER['PHP_SELF'], '/') + 1; 465 469 $local_folder = substr($_SERVER['PHP_SELF'], 0, $end); 466 $ url= 'http://'.$_SERVER['HTTP_HOST'].$local_folder;470 $page['url'] = 'http://'.$_SERVER['HTTP_HOST'].$local_folder; 467 471 468 $listing.= ' url="'.$ url.'"';472 $listing.= ' url="'.$page['url'].'"'; 469 473 $listing.= '/>'."\n"; 470 474
Note: See TracChangeset
for help on using the changeset viewer.