Ver código fonte

Added recipient list to the backup download available message so that user can check that email.

version-14
Anand Doshi 14 anos atrás
pai
commit
d28c12be3a
1 arquivos alterados com 7 adições e 4 exclusões
  1. +7
    -4
      cgi-bin/webnotes/utils/backups.py

+ 7
- 4
cgi-bin/webnotes/utils/backups.py Ver arquivo

@@ -84,7 +84,7 @@ class BackupGenerator:
subject = datetime_str.strftime("%d/%m/%Y %H:%M:%S") + """ - Backup ready to be downloaded"""
sendmail(recipients=recipient_list, msg=msg, subject=subject)
return recipient_list
def get_backup(self):
@@ -103,7 +103,9 @@ class BackupGenerator:
backup_file = self.copy_to_backup_link()

#Email Link
self.send_email(backup_file)
recipient_list = self.send_email(backup_file)
return recipient_list
#-------------------------------------------------------------------------------
def get_backup():
@@ -114,10 +116,11 @@ def get_backup():
#if verbose: print webnotes.conn.cur_db_name + " " + webnotes.defs.db_password
odb = BackupGenerator(webnotes.conn.cur_db_name, webnotes.conn.cur_db_name,\
webnotes.defs.db_password)
odb.get_backup()
recipient_list = odb.get_backup()
delete_temp_backups()
webnotes.msgprint("""A download link to your backup will be emailed \
to you shortly.""")
to you shortly on the following email address:
%s""" % (str(recipient_list),))


def delete_temp_backups():


Carregando…
Cancelar
Salvar