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:
commit
354cace14a
|
@ -12,7 +12,7 @@ $app = new Sharing();
|
||||||
$app->registerRoutes($this, array('routes' => array(
|
$app->registerRoutes($this, array('routes' => array(
|
||||||
|
|
||||||
// mailTemplate settings
|
// 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'),
|
array('name' => 'admin_settings#update', 'url' => '/settings/mailtemplate', 'verb' => 'POST'),
|
||||||
|
|
||||||
|
|
|
@ -17,7 +17,7 @@ class AdminSettingsController extends ApiController {
|
||||||
* @param string $template
|
* @param string $template
|
||||||
* @return \OCA\Files_Sharing\Http\MailTemplateResponse
|
* @return \OCA\Files_Sharing\Http\MailTemplateResponse
|
||||||
*/
|
*/
|
||||||
public function render( $theme, $template ) {
|
public function renderRaw( $theme, $template ) {
|
||||||
try {
|
try {
|
||||||
$template = new \OCA\Files_Sharing\MailTemplate( $theme, $template );
|
$template = new \OCA\Files_Sharing\MailTemplate( $theme, $template );
|
||||||
return $template->getResponse();
|
return $template->getResponse();
|
||||||
|
|
Loading…
Reference in New Issue