[Pkg-owncloud-commits] [owncloud] 48/273: Fix test mail behaviour

David Prévot taffit at moszumanska.debian.org
Fri Jul 4 03:12:56 UTC 2014


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository owncloud.

commit 6e2aaaaa31afc31b0ed216ded52b3b0ab9eb61ad
Author: Morris Jobke <hey at morrisjobke.de>
Date:   Wed Jun 25 15:32:40 2014 +0200

    Fix test mail behaviour
    
    * ref #8854
    * prevent default of "send test mail" button
    * drop unused form serialization
    * use display name of user for test mail
---
 settings/admin/controller.php | 2 +-
 settings/js/admin.js          | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/settings/admin/controller.php b/settings/admin/controller.php
index d0dcc49..7ced577 100644
--- a/settings/admin/controller.php
+++ b/settings/admin/controller.php
@@ -86,7 +86,7 @@ class Controller {
 			$defaults = new \OC_Defaults();
 
 			try {
-				\OC_Mail::send($email, $_POST['user'],
+				\OC_Mail::send($email, \OC_User::getDisplayName(),
 					$l->t('test email settings'),
 					$l->t('If you received this email, the settings seem to be correct.'),
 					\OCP\Util::getDefaultEmailAddress('no-reply'), $defaults->getName());
diff --git a/settings/js/admin.js b/settings/js/admin.js
index 7036f6d..a202feb 100644
--- a/settings/js/admin.js
+++ b/settings/js/admin.js
@@ -123,10 +123,10 @@ $(document).ready(function(){
 		});
 	});
 
-	$('#sendtestemail').click(function(){
+	$('#sendtestemail').click(function(event){
+		event.preventDefault();
 		OC.msg.startAction('#sendtestmail_msg', t('settings', 'Sending...'));
-		var post = $( "#sendtestemail" ).serialize();
-		$.post(OC.generateUrl('/settings/admin/mailtest'), post, function(data){
+		$.post(OC.generateUrl('/settings/admin/mailtest'), '', function(data){
 			OC.msg.finishedAction('#sendtestmail_msg', data);
 		});
 	});

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git



More information about the Pkg-owncloud-commits mailing list