Change getMimeType and setMimeType to response->content_type.

This commit is contained in:
Colin Kuskie 2010-11-21 22:35:26 -08:00
parent e5adc07a05
commit fd8f03a186
52 changed files with 138 additions and 175 deletions

View file

@ -434,10 +434,10 @@ sub www_editSubmission {
if( $params->{asHashRef} ) {
return { text => $content, title => $title, };
} elsif( $session->form->get('asJson') ) {
$session->http->setMimeType( 'application/json' );
$session->response->content_type( 'application/json' );
return JSON->new->encode( { text => $content, title => $title, id => $assetId ne 'new' ? $assetId : 'new' . rand } );
} else {
$session->http->setMimeType( 'text/html' );
$session->response->content_type( 'text/html' );
return $asset->processStyle( $content );
}
}