Changeset 47
- Timestamp:
- 03/24/07 15:12:56 (2 years ago)
- Files:
-
- trunk/Memories/Photo.pm (modified) (4 diffs)
- trunk/Memories/Tag.pm (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/Memories/Photo.pm
r45 r47 1 1 package Memories::Photo; 2 use Apache2::Upload; 2 3 use File::Basename; 3 4 use File::Copy; … … 146 147 }); 147 148 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; 149 151 } 150 152 my ($x, $y) = dim(image_info($photo->path)); … … 160 162 my $tags = $r->{params}{tags}.join " ", map { qq{"$_"} } $photo->tags_exif; 161 163 $photo->add_tags($tags); 164 warn "D"; 162 165 $photo->add_to_imageseek_library; 163 166 Memories->zap_cache(); 167 warn "E"; 164 168 165 169 # Add system tags here … … 347 351 # Make dir if it doesn't exist, save trouble later 348 352 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: $!";} 350 354 if ($scale or $is_url ne "url") { 351 355 $path .= $self->id.".jpg"; trunk/Memories/Tag.pm
r2 r47 29 29 $r->{template_args}{tags} = \@tags; 30 30 } else { 31 if (! $r->objects) {31 if (!@{$r->objects||[]}) { 32 32 $tag = $tags[0]; 33 33 } else {
