- Timestamp:
- 07/09/08 13:00:01 (5 months ago)
- Location:
- trunk
- Files:
-
- 3 modified
-
plog-admin/plog-admin-functions.php (modified) (6 diffs)
-
plog-content/themes/air/comments.php (modified) (1 diff)
-
plog-content/themes/air/slideshow.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/plog-admin/plog-admin-functions.php
r555 r556 454 454 if (!$collection) { 455 455 return array('errors' => plog_tr('No such collection')); 456 } ;456 } 457 457 458 458 // first delete all albums registered with this album … … 461 461 while ($row = mysql_fetch_assoc($result)) { 462 462 delete_album($row['id']); 463 } ;463 } 464 464 465 465 // XXX: un-register collection … … 473 473 474 474 $collection_directory = realpath($config['basedir'] . 'plog-content/images/'.$source_collection_name); 475 $relative_path = substr($collection_directory,0,strlen($config['basedir'])); 476 $collection_path = explode('/',substr($collection_directory,strlen($config['basedir']))); 477 // it needs to have 2 parts - images and collection name, if it doesn't, then there is something 478 // wrong with collection name and it's probably not safe to try to delete the directory 479 if ($relative_path == $config['basedir'] && sizeof($collection_path) == 2) { 475 // check to see if the collection_directory is a real directory and then try to delete it 476 if (is_dir($collection_directory)){ 480 477 @chmod($collection_directory,0777); 481 478 $delete_result = rmdir($collection_directory); 482 479 if (!$delete_result) { 483 480 return array('errors' => plog_tr('Collection directory still contains files after all albums have been deleted.')); 484 } ;481 } 485 482 486 483 } else { 487 484 return array('errors' => plog_tr('Collection has invalid path, not deleting directory')); 488 } ;485 } 489 486 return array(); 490 487 } … … 718 715 if (!$album) { 719 716 return array('errors' => plog_tr('No such album')); 720 } ;717 } 721 718 722 719 // first delete all pictures registered with this album … … 725 722 while ($row = mysql_fetch_assoc($result)) { 726 723 delete_picture($row['id']); 727 } ;724 } 728 725 729 726 // XXX: un-register album … … 738 735 739 736 $album_directory = realpath($config['basedir'] . 'plog-content/images/'.$source_collection_name."/".$source_album_name); 740 $relative_path = substr($album_directory,0,strlen($config['basedir'])); 741 $album_path = explode('/',substr($album_directory,strlen($config['basedir']))); 742 // it needs to have 3 parts - images, collection name and album name, if it doesn't, then there is something 743 // wrong with either collection or album name and it's probably not safe to try to delete the directory 744 if ($relative_path == $config['basedir'] && sizeof($album_path) == 3) { 737 // check to see if the album_directory is a real directory and then try to delete it 738 if (is_dir($album_directory)){ 745 739 @chmod($album_directory,0777); 746 740 $delete_result = rmdir($album_directory); 747 741 if (!$delete_result) { 748 742 return array('errors' => plog_tr('Album directory still contains files after all pictures have been deleted.')); 749 } ;743 } 750 744 751 745 } else { 752 746 return array('errors' => plog_tr('Album has invalid path, not deleting directory')); 753 } ;747 } 754 748 return array(); 755 749 } -
trunk/plog-content/themes/air/comments.php
r552 r556 1 1 2 2 <?php if (plogger_comments_on()) { ?> 3 <a name="comments"></a><h2 class="comment-heading"> ' . plog_tr('Comments') . ':</h2>';3 <a name="comments"></a><h2 class="comment-heading"><?php echo plog_tr('Comments'); ?>:</h2> 4 4 5 5 <? if (plogger_picture_has_comments()) { ?> -
trunk/plog-content/themes/air/slideshow.php
r552 r556 36 36 37 37 <?php function generate_slideshow_interface() { 38 global $config ;38 global $config, $thumbnail_config; 39 39 $large_link = ' 40 40 <a accesskey="v" title="' . plog_tr('View Large Image') . '" href="javascript:slides.hotlink()"> 41 <img src="'. $config["gallery_url"].'graphics/search.gif" width="16" height="16" alt="'. plog_tr('View Large Image') . '"/>41 <img src="'.THEME_URL.'images/search.gif" width="16" height="16" alt="'. plog_tr('View Large Image') . '"/> 42 42 </a>'; 43 43 44 44 $prev_url = ' 45 45 <a accesskey="," title="' .plog_tr('Previous Image') . '" href="javascript:slides.previous();"> 46 <img src="'. $config["gallery_url"].'graphics/rewind.gif" width="16" height="16" alt="' . plog_tr('Previous Image') . '" />46 <img src="'.THEME_URL.'images/rewind.gif" width="16" height="16" alt="' . plog_tr('Previous Image') . '" /> 47 47 </a>'; 48 48 49 49 $next_url = ' 50 50 <a accesskey="." title="' . plog_tr('Next Image') . '" href="javascript:slides.next();"> 51 <img src="'. $config["gallery_url"].'graphics/fforward.gif" width="16" height="16" alt="' . plog_tr('Next Image') . '" />51 <img src="'.THEME_URL.'images/fforward.gif" width="16" height="16" alt="' . plog_tr('Next Image') . '" /> 52 52 </a>'; 53 53 54 54 $stop_url = ' 55 55 <a accesskey="x" title="'. plog_tr('Stop Slideshow') . '" href="javascript:slides.pause();"> 56 <img src="'. $config["gallery_url"].'graphics/stop.gif" width="16" height="16" alt="' . plog_tr('Stop Slideshow') . '" />56 <img src="'.THEME_URL.'images/stop.gif" width="16" height="16" alt="' . plog_tr('Stop Slideshow') . '" /> 57 57 </a>'; 58 58 59 59 $play_url = ' 60 60 <a accesskey="s" title="'. plog_tr('Start Slideshow') . '" href="javascript:slides.play();"> 61 <img src="'. $config["gallery_url"].'graphics/play.gif" width="16" height="16" alt="' . plog_tr('Start Slideshow') . '" />61 <img src="'.THEME_URL.'images/play.gif" width="16" height="16" alt="' . plog_tr('Start Slideshow') . '" /> 62 62 </a>'; 63 63 64 $output = '<div class="large-thumb-toolbar" style="width:'.$ config["max_display_size"].'">'.$large_link.$prev_url.$stop_url.$play_url.$next_url.'</div>';64 $output = '<div class="large-thumb-toolbar" style="width:'.$thumbnail_config[THUMB_LARGE]["size"].'">'.$large_link.$prev_url.$stop_url.$play_url.$next_url.'</div>'; 65 65 66 66 $imgtag = '<img id="slideshow_image" class="photos-large" src="about:blank" title="" alt="" />';
