/[webpac2]/Webpacus/lib/Webpacus/Controller/Editor.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 /Webpacus/lib/Webpacus/Controller/Editor.pm

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

revision 241 by dpavlin, Wed Dec 14 18:56:11 2005 UTC revision 242 by dpavlin, Wed Dec 14 18:56:17 2005 UTC
# Line 156  sub record : Local { Line 156  sub record : Local {
156    
157          $c->log->debug('record params '.Dumper($c->req->params));          $c->log->debug('record params '.Dumper($c->req->params));
158    
159          my $mfn = $c->req->params->{mfn};          my $record_uri = $c->req->params->{record_uri};
160    
161          if (! $mfn) {          if (! $record_uri) {
162                  $c->log->warn("no mfn, using 1");                  $c->log->fatal("no record_uri");
163                  $mfn = 1;                  return;
164          }          }
165    
166          my $template_filename = $c->req->params->{template_filename};          my $template_filename = $c->req->params->{template_filename};
# Line 171  sub record : Local { Line 171  sub record : Local {
171    
172          my $webpac = $c->comp('Model::WebPAC');          my $webpac = $c->comp('Model::WebPAC');
173    
174          my $html = $webpac->record( mfn => $mfn, template => $template_filename );          my $html = $webpac->record( record_uri => $record_uri, template => $template_filename );
175    
176          if ($html) {          if ($html) {
177                  $c->log->debug('check html with tidy');                  $c->log->debug('check html with tidy');
# Line 216  __TIDY_CLOSE__ Line 216  __TIDY_CLOSE__
216          } else {          } else {
217                  $html .= qq{<div class="no_results">Can't find record</div>};                  $html .= qq{<div class="no_results">Can't find record</div>};
218          }          }
219                    
                   
220          $c->response->content_type('text/html; charset=utf-8');          $c->response->content_type('text/html; charset=utf-8');
221          $c->response->body( $html );          $c->response->body( $html );
222  }  }

Legend:
Removed from v.241  
changed lines
  Added in v.242

  ViewVC Help
Powered by ViewVC 1.1.26