Merge lp:~giuseppeterrasi-deactivatedaccount/ubuntu-it-ask/sync-with-upstream into lp:~ubuntu-it-ask/ubuntu-it-ask/dev

Proposed by Giuseppe Terrasi
Status: Merged
Merged at revision: 66
Proposed branch: lp:~giuseppeterrasi-deactivatedaccount/ubuntu-it-ask/sync-with-upstream
Merge into: lp:~ubuntu-it-ask/ubuntu-it-ask/dev
Diff against target: 96 lines (+26/-11)
4 files modified
forum/skins/default/media/js/wmd/showdown.js (+4/-1)
forum/skins/default/media/js/wmd/wmd.js (+6/-1)
forum/templatetags/email_tags.py (+1/-1)
forum/utils/mail.py (+15/-8)
To merge this branch: bzr merge lp:~giuseppeterrasi-deactivatedaccount/ubuntu-it-ask/sync-with-upstream
Reviewer Review Type Date Requested Status
Giuseppe Terrasi (community) Approve
Review via email: mp+120265@code.launchpad.net

Description of the change

Questo branch porta la nostra versione dalla revisione 1273 alla revisione 1277 upstream.

Richiede però altri test. Sarebbe utile che anche altri lo provassero.

L'elenco dei cambiamenti è sul sito di prova.

To post a comment you must log in.
67. By Giuseppe Terrasi <email address hidden>

sync with dev

Revision history for this message
Giuseppe Terrasi (giuseppeterrasi-deactivatedaccount) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'forum/skins/default/media/js/wmd/showdown.js'
--- forum/skins/default/media/js/wmd/showdown.js 2012-06-22 20:37:14 +0000
+++ forum/skins/default/media/js/wmd/showdown.js 2012-09-22 14:05:22 +0000
@@ -167,6 +167,9 @@
167 // attacklab: Restore tildes167 // attacklab: Restore tildes
168 text = text.replace(/~T/g,"~");168 text = text.replace(/~T/g,"~");
169169
170 text = text.replace(/&amp;lt;/g,"<");
171 text = text.replace(/&amp;gt;/g,">");
172
170 return text;173 return text;
171}174}
172175
@@ -1328,4 +1331,4 @@
1328// If anyone's interested, tell the world that this file's been loaded1331// If anyone's interested, tell the world that this file's been loaded
1329if (Attacklab.fileLoaded) {1332if (Attacklab.fileLoaded) {
1330 Attacklab.fileLoaded("showdown.js");1333 Attacklab.fileLoaded("showdown.js");
1331}
1332\ No newline at end of file1334\ No newline at end of file
1335}
13331336
=== modified file 'forum/skins/default/media/js/wmd/wmd.js'
--- forum/skins/default/media/js/wmd/wmd.js 2012-07-08 10:55:03 +0000
+++ forum/skins/default/media/js/wmd/wmd.js 2012-09-22 14:05:22 +0000
@@ -28,7 +28,12 @@
28 if(error != ''){28 if(error != ''){
29 alert(error);29 alert(error);
30 }else{30 }else{
31 imageUrl.attr('value', appUrl + fileURL);31 if(fileURL == ''){
32 alert("There was an internal server error uploading your file.\nPermission denied.");
33 }
34 else{
35 imageUrl.attr('value', appUrl + fileURL);
36 }
32 }37 }
3338
34 },39 },
3540
=== modified file 'forum/templatetags/email_tags.py'
--- forum/templatetags/email_tags.py 2012-06-22 20:37:14 +0000
+++ forum/templatetags/email_tags.py 2012-09-22 14:05:22 +0000
@@ -20,7 +20,7 @@
20 self.nodelist.render(context)20 self.nodelist.render(context)
21 messages.append((recipient, context['subject'], context['htmlcontent'], context['textcontent'], context['embeddedmedia']))21 messages.append((recipient, context['subject'], context['htmlcontent'], context['textcontent'], context['embeddedmedia']))
2222
23 create_and_send_mail_messages(messages)23 create_and_send_mail_messages(messages, sender_data=context['sender'], reply_to=context['reply_to'])
2424
25@register.tag25@register.tag
26def email(parser, token):26def email(parser, token):
2727
=== modified file 'forum/utils/mail.py'
--- forum/utils/mail.py 2012-06-22 20:37:14 +0000
+++ forum/utils/mail.py 2012-09-22 14:05:22 +0000
@@ -24,9 +24,9 @@
24from forum.utils.html2text import HTML2Text24from forum.utils.html2text import HTML2Text
25from threading import Thread25from threading import Thread
2626
27def send_template_email(recipients, template, context):27def send_template_email(recipients, template, context, sender=None, reply_to = None):
28 t = loader.get_template(template)28 t = loader.get_template(template)
29 context.update(dict(recipients=recipients, settings=settings))29 context.update(dict(recipients=recipients, settings=settings, sender=sender, reply_to=reply_to))
30 t.render(Context(context))30 t.render(Context(context))
3131
32def create_connection():32def create_connection():
@@ -44,16 +44,23 @@
44 return connection44 return connection
4545
4646
47def create_and_send_mail_messages(messages):47def create_and_send_mail_messages(messages, sender_data=None, reply_to=None):
48 if not settings.EMAIL_HOST:48 if not settings.EMAIL_HOST:
49 return49 return
5050
51 sender = Header(unicode(settings.APP_SHORT_NAME), 'utf-8')51 sender = Header(unicode(settings.APP_SHORT_NAME), 'utf-8')
52 sender.append('<%s>' % unicode(settings.DEFAULT_FROM_EMAIL))52
53 sender = u'%s <%s>' % (unicode(settings.APP_SHORT_NAME), unicode(settings.DEFAULT_FROM_EMAIL))53 if sender_data == None:
5454 sender.append('<%s>' % unicode(settings.DEFAULT_FROM_EMAIL))
55 reply_to = unicode(settings.DEFAULT_REPLY_TO_EMAIL)55 sender = u'%s <%s>' % (unicode(settings.APP_SHORT_NAME), unicode(settings.DEFAULT_FROM_EMAIL))
5656 else:
57 sender.append('<%s>' % unicode(sender_data['email']))
58 sender = u'%s <%s>' % (unicode(sender_data['name']), unicode(sender_data['email']))
59
60 if reply_to == None:
61 reply_to = unicode(settings.DEFAULT_REPLY_TO_EMAIL)
62 else:
63 reply_to = unicode(reply_to)
57 try:64 try:
58 connection = None65 connection = None
5966

Subscribers

No one subscribed via source and target branches