Changeset 47

Show
Ignore:
Timestamp:
03/24/07 15:12:56 (2 years ago)
Author:
simon
Message:

A few fixes found on Geoff's install. Check the Apache2 thing though!

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/Memories/Photo.pm

    r45 r47  
    11package Memories::Photo; 
     2use Apache2::Upload; 
    23use File::Basename; 
    34use File::Copy; 
     
    146147    }); 
    147148    if (!copy($filename, $photo->path("file"))) { 
    148         $photo->delete(); die "Couldn't copy photo: $!"; 
     149        warn "Couldn't copy photo to ".$photo->path("file").": $!"; 
     150        $photo->delete(); die; 
    149151    } 
    150152    my ($x, $y) = dim(image_info($photo->path)); 
     
    160162    my $tags = $r->{params}{tags}.join " ", map { qq{"$_"} } $photo->tags_exif; 
    161163    $photo->add_tags($tags); 
     164warn "D"; 
    162165    $photo->add_to_imageseek_library; 
    163166    Memories->zap_cache(); 
     167warn "E"; 
    164168 
    165169    # Add system tags here 
     
    347351    # Make dir if it doesn't exist, save trouble later 
    348352    use File::Path; 
    349     if ($is_url ne "url") {mkpath($path);} 
     353    if ($is_url ne "url" and ! -d $path) {mkpath($path) or die "Couldn't make path $path: $!";} 
    350354    if ($scale or $is_url ne "url") {  
    351355        $path .= $self->id.".jpg"; 
  • trunk/Memories/Tag.pm

    r2 r47  
    2929        $r->{template_args}{tags} = \@tags; 
    3030    } else { 
    31         if (!$r->objects) { 
     31        if (!@{$r->objects||[]}) { 
    3232            $tag = $tags[0]; 
    3333        } else {