db: core/user table has only 'notify' column now (previous was cms_notify, thread_notify)

added: notifications for tickets (not finished yet)


git-svn-id: svn://ttmath.org/publicrep/winix/trunk@688 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
2010-12-06 00:25:46 +00:00
parent b721fb6860
commit ad9d6f4301
29 changed files with 432 additions and 269 deletions

View File

@@ -69,8 +69,6 @@ bool NotifyThread::SignalReceived()
{
if( patterns_changed )
{
// !! usunac
log << log3 << "NotifyThread: copying global patterns to local ones" << logend;
patterns = *pat_global;
patterns_changed = false;
}
@@ -98,7 +96,7 @@ bool res = false;
for(i=users->Begin() ; i != users->End() ; ++i)
{
if( (i->cms_notify & TemplatesNotifyFunctions::notify_msg.code) != 0 ) // !! bedzie jedno pole i->notify
if( (i->notify & TemplatesNotifyFunctions::notify_msg.code) != 0 )
{
msg.name = i->name;
msg.email = i->email;
@@ -168,10 +166,14 @@ void NotifyThread::SendMail()
size_t lang_index = static_cast<size_t>(TemplatesNotifyFunctions::notify_user_msg.lang);
size_t template_index = TemplatesNotifyFunctions::notify_msg.template_index;
if( lang_index >= patterns.size() ||
template_index >= patterns[lang_index].size() )
if( lang_index >= patterns.size() )
return;
if( template_index >= patterns[lang_index].size() )
{
// ops, something wrong
Lock();
log << log1 << "NotifyThread: incorrect template index: " << template_index << logend;
Unlock();
return;
}