fix liskov substitution principle in admin mail template settings, fixes #8997

This commit is contained in:
Jörn Friedrich Dreyer 2014-06-12 12:38:34 +02:00
parent 5def2a72dd
commit 72436b68bf
2 changed files with 2 additions and 2 deletions

View file

@ -12,7 +12,7 @@ $app = new Sharing();
$app->registerRoutes($this, array('routes' => array(
// mailTemplate settings
array('name' => 'admin_settings#render', 'url' => '/settings/mailtemplate', 'verb' => 'GET'),
array('name' => 'admin_settings#render_raw', 'url' => '/settings/mailtemplate', 'verb' => 'GET'),
array('name' => 'admin_settings#update', 'url' => '/settings/mailtemplate', 'verb' => 'POST'),

View file

@ -17,7 +17,7 @@ class AdminSettingsController extends ApiController {
* @param string $template
* @return \OCA\Files_Sharing\Http\MailTemplateResponse
*/
public function render( $theme, $template ) {
public function renderRaw( $theme, $template ) {
try {
$template = new \OCA\Files_Sharing\MailTemplate( $theme, $template );
return $template->getResponse();