Changeset 9
- Timestamp:
- 02/07/07 23:17:57 (2 years ago)
- Files:
-
- trunk/Memories/Photo.pm (modified) (3 diffs)
- trunk/memories.sql (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/Memories/Photo.pm
r6 r9 6 6 use Image::Seek; 7 7 use constant PAGER_SYNTAX => "LimitXY"; 8 __PACKAGE__->columns(Essential => qw(id title uploader uploaded x y ));8 __PACKAGE__->columns(Essential => qw(id title uploader uploaded x y rating rated hit_count)); 9 9 __PACKAGE__->untaint_columns(printable => [qw/title/]); 10 10 __PACKAGE__->columns(TEMP => qw/exif_object/); … … 31 31 uploader => $r->user, 32 32 uploaded => Time::Piece->new(), 33 title => $r->params->{title} 33 title => $r->params->{title}, 34 hit_count => 0, 35 rating => 0, 36 rated => 0, # Oh, the potential for divide by zero errors... 34 37 }); 35 38 … … 72 75 sub view :Exported { 73 76 my ($self, $r) = @_; 77 my $photo = $r->{objects}[0]; 78 $photo->hit_count($photo->hit_count()+1); 74 79 if ($r->{session}{last_search}) { 75 my $photo = $r->{objects}[0];76 80 # This is slightly inefficient 77 81 my @search = split/,/, $r->{session}{last_search}; trunk/memories.sql
r2 r9 5 5 uploaded datetime, 6 6 x integer, 7 y integer 7 y integer, 8 hit_count integer, 9 rating integer, 10 rated integer 8 11 ); 9 12
