changed: notification's template

added: notifications in tickets


git-svn-id: svn://ttmath.org/publicrep/winix/trunk@650 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
2010-09-07 23:54:01 +00:00
parent 81dd88d25a
commit f48f08a98b
14 changed files with 109 additions and 60 deletions

View File

@@ -68,7 +68,11 @@ db_itemcolumns.o: dircontainer.h ugcontainer.h ticket.h
dircontainer.o: dircontainer.h item.h log.h
dirs.o: dirs.h item.h dircontainer.h db.h user.h group.h thread.h error.h
dirs.o: log.h ugcontainer.h ticket.h request.h requesttypes.h session.h
dirs.o: plugindata.h rebus.h config.h confparser.h htmlfilter.h
dirs.o: plugindata.h rebus.h config.h confparser.h htmlfilter.h notify.h
dirs.o: ../templatesnotify/templatesnotify.h ../../ezc/src/ezc.h
dirs.o: ../core/mount.h ../core/locale.h ../core/config.h ../templates/misc.h
dirs.o: ../templates/localefilter.h ../core/locale.h system.h mounts.h
dirs.o: mount.h users.h lastcontainer.h groups.h loadavg.h
groups.o: groups.h group.h ugcontainer.h log.h db.h item.h user.h thread.h
groups.o: error.h dircontainer.h ticket.h
htmlfilter.o: htmlfilter.h

View File

@@ -10,6 +10,7 @@
#include "dirs.h"
#include "error.h"
#include "log.h"
#include "notify.h"
@@ -418,6 +419,7 @@ Error Dirs::AddDirectory(Item & item, bool add_to_dir_tab)
if( status == WINIX_ERR_OK )
{
request->notify_code |= WINIX_NOTIFY_DIR_ADD;
Item * pdir = AddDir(item);
if( add_to_dir_tab && request->dir_tab.back()->id == item.parent_id )

View File

@@ -2,7 +2,7 @@
* This file is a part of Winix
* and is not publicly distributed
*
* Copyright (c) 2009, Tomasz Sowa
* Copyright (c) 2009-2010, Tomasz Sowa
* All rights reserved.
*
*/

View File

@@ -2,7 +2,7 @@
* This file is a part of Winix
* and is not publicly distributed
*
* Copyright (c) 2009, Tomasz Sowa
* Copyright (c) 2009-2010, Tomasz Sowa
* All rights reserved.
*
*/

View File

@@ -108,7 +108,7 @@ void Notify::SendEmail(const std::string & email, const std::string & message)
if( !ValidateEmail(email) )
{
nlog << "Notify: email: " << email << " is not correct" << logend;
nlog << log1 << "Notify: email: " << email << " is not correct" << logend;
return;
}
@@ -117,14 +117,14 @@ void Notify::SendEmail(const std::string & email, const std::string & message)
if( !sendmail )
{
nlog << "Notify: can't run sendmail" << logend;
nlog << log1 << "Notify: can't run sendmail" << logend;
return;
}
SendMessage(sendmail, message);
pclose(sendmail);
nlog << "Notify: email to: " << email << " has been sent" << logend;
nlog << log1 << "Notify: email to: " << email << " has been sent" << logend;
nlog << logsave;
}
@@ -252,7 +252,7 @@ Users::Iterator i;
{
sending = false;
if( system->mounts.pmount->type == Mount::thread )
if( system->mounts.pmount->type == Mount::thread || system->mounts.pmount->type == Mount::ticket )
{
if( (i->thread_notify & notify_code) != 0 )
sending = true;