/[Arh]/lib/Arh/View.pm
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /lib/Arh/View.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 38 by dpavlin, Fri Apr 4 11:54:04 2008 UTC revision 49 by dpavlin, Sun Apr 6 18:10:29 2008 UTC
# Line 127  template 'toggle_edit' => sub { Line 127  template 'toggle_edit' => sub {
127    
128  };  };
129    
130    template 'raw_pic' => sub {
131            my $filename = get('image') or die "no image?";
132            my $image = Arh::Model::Picture->new;
133            $image->load_by_cols( filename => $filename );
134            if ( $image->id ) {
135                    Jifty->handler->apache->content_type('image/jpg');
136                    Jifty->web->out($image->content);
137            } else {
138                    die "can't find picture $filename";
139            }
140    };
141    
142  1;  1;

Legend:
Removed from v.38  
changed lines
  Added in v.49

  ViewVC Help
Powered by ViewVC 1.1.26