Merge pull request #9003 from owncloud/fix_liskov_in_admin_mail_template_settings

fix liskov substitution principle in admin mail template settings
This commit is contained in:
Bernhard Posselt 2014-06-12 14:33:13 +02:00
commit 354cace14a
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();