/[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 178 by dpavlin, Sun Nov 27 01:42:33 2005 UTC revision 179 by dpavlin, Sun Nov 27 15:14:54 2005 UTC
# Line 65  sub template : Local { Line 65  sub template : Local {
65          my $template_full_path = "$template_path/$template_filename";          my $template_full_path = "$template_path/$template_filename";
66    
67          if ($c->req->params->{save_template}) {          if ($c->req->params->{save_template}) {
68    
69                    $c->response->content_type('text/html; charset=utf-8');
70    
71                  my $t = $c->req->params->{template_content};                  my $t = $c->req->params->{template_content};
72                  my $size = length($t);                  my $size = length($t);
73                  $c->log->debug("saving $template_full_path, $size bytes");                  $c->log->debug("saving $template_full_path, $size bytes");
# Line 80  sub template : Local { Line 83  sub template : Local {
83    
84          if (! -r $template_full_path) {          if (! -r $template_full_path) {
85                  $c->log->warn("can't find '$template_full_path': $!");                  $c->log->warn("can't find '$template_full_path': $!");
86                    $c->response->content_type('text/html; charset=utf-8');
87                  $c->res->output("can't find template '$template_full_path'");                  $c->res->output("can't find template '$template_full_path'");
88                  return;                  return;
89          }          }
# Line 117  sub css : Local { Line 121  sub css : Local {
121          my $css_full_path = "$css_path/$css_filename";          my $css_full_path = "$css_path/$css_filename";
122    
123          if ($c->req->params->{save_css}) {          if ($c->req->params->{save_css}) {
124    
125                    $c->response->content_type('text/html; charset=utf-8');
126    
127                  my $t = $c->req->params->{css_content};                  my $t = $c->req->params->{css_content};
128                  my $size = length($t);                  my $size = length($t);
129                  $c->log->debug("saving $css_full_path, $size bytes");                  $c->log->debug("saving $css_full_path, $size bytes");
# Line 161  sub record : Local { Line 168  sub record : Local {
168    
169          my $webpac = $c->comp('Model::WebPAC');          my $webpac = $c->comp('Model::WebPAC');
170    
171            $c->response->content_type('text/html; charset=utf-8');
172          $c->res->output(          $c->res->output(
173                  $webpac->record( mfn => $mfn, template => $template_filename )                  $webpac->record( mfn => $mfn, template => $template_filename )
174          );          );

Legend:
Removed from v.178  
changed lines
  Added in v.179

  ViewVC Help
Powered by ViewVC 1.1.26