added: notifications to users' emails
(core/notify.h core/notify.cpp)
templatesnotify directory
all notifications are managed by a second thread
git-svn-id: svn://ttmath.org/publicrep/cmslu/trunk@512 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
@@ -48,6 +48,8 @@ emacs.o: ../core/compress.h ../core/error.h ../core/db.h ../core/group.h
|
||||
emacs.o: ../core/dircontainer.h ../core/ugcontainer.h ../core/data.h
|
||||
emacs.o: ../core/dirs.h ../core/users.h ../core/groups.h ../core/functions.h
|
||||
emacs.o: ../core/lastcontainer.h ../core/mounts.h ../core/mount.h
|
||||
emacs.o: ../core/notify.h ../templatesnotify/templatesnotify.h
|
||||
emacs.o: ../core/mount.h
|
||||
last.o: content.h ../core/item.h ../templates/templates.h ../../ezc/src/ezc.h
|
||||
last.o: ../templates/patterncacher.h ../app/templates.h ../core/thread.h
|
||||
login.o: content.h ../core/item.h ../templates/templates.h
|
||||
@@ -84,6 +86,8 @@ mkdir.o: ../core/compress.h ../core/error.h ../core/db.h ../core/group.h
|
||||
mkdir.o: ../core/dircontainer.h ../core/ugcontainer.h ../core/data.h
|
||||
mkdir.o: ../core/dirs.h ../core/users.h ../core/groups.h ../core/functions.h
|
||||
mkdir.o: ../core/lastcontainer.h ../core/mounts.h ../core/mount.h
|
||||
mkdir.o: ../core/notify.h ../templatesnotify/templatesnotify.h
|
||||
mkdir.o: ../core/mount.h
|
||||
node.o: content.h ../core/item.h ../templates/templates.h ../../ezc/src/ezc.h
|
||||
node.o: ../templates/patterncacher.h ../app/templates.h ../core/thread.h
|
||||
node.o: ../core/request.h ../core/requesttypes.h ../core/session.h
|
||||
|
||||
@@ -18,12 +18,13 @@
|
||||
#include "../templates/templates.h"
|
||||
#include "../core/thread.h"
|
||||
|
||||
|
||||
|
||||
class Content
|
||||
{
|
||||
Templates templates;
|
||||
|
||||
|
||||
|
||||
|
||||
void PrepareUrl(Item & item);
|
||||
|
||||
@@ -76,12 +77,14 @@ class Content
|
||||
void RedirectTo(const Item & item);
|
||||
void RedirectTo(long item_id);
|
||||
|
||||
|
||||
public:
|
||||
|
||||
bool Init();
|
||||
|
||||
void ReadAdditionalInfo();
|
||||
void Make();
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
#include "../core/error.h"
|
||||
#include "../core/db.h"
|
||||
#include "../core/data.h"
|
||||
|
||||
#include "../core/notify.h"
|
||||
|
||||
|
||||
|
||||
@@ -47,6 +47,11 @@ void Content::PostFunEmacsAdd()
|
||||
throw Error(Error::permision_denied);
|
||||
|
||||
request.session->done_status = db.AddItem(request.item);
|
||||
|
||||
if( request.session->done_status == Error::ok )
|
||||
{
|
||||
request.notify_code |= CMSLU_NOTIFY_ITEM_ADD;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -64,7 +69,11 @@ void Content::PostFunEmacsEdit(bool with_url)
|
||||
request.session->done_status = db.EditItemById(request.item, with_url);
|
||||
|
||||
if( request.session->done_status == Error::ok )
|
||||
{
|
||||
TemplatesFunctions::pattern_cacher.UpdatePattern(request.item);
|
||||
|
||||
request.notify_code |= CMSLU_NOTIFY_ITEM_EDIT;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -119,6 +128,8 @@ bool adding = true;
|
||||
|
||||
if( request.session->done_status == Error::ok )
|
||||
{
|
||||
request.session->item = request.item;
|
||||
|
||||
if( data.mounts.CurrentMountType() == Mount::thread )
|
||||
{
|
||||
if( adding )
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
#include "../core/error.h"
|
||||
#include "../core/db.h"
|
||||
#include "../core/data.h"
|
||||
#include "../core/notify.h"
|
||||
|
||||
|
||||
|
||||
@@ -70,6 +71,8 @@ void Content::PostFunMkdir(bool add_to_dir_table, int mask)
|
||||
|
||||
request.session->item = item;
|
||||
request.session->done_timer = 2;
|
||||
request.notify_code |= CMSLU_NOTIFY_DIR_ADD;
|
||||
|
||||
RedirectTo(item);
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user