changed: added Cur structure

we have there two pointers: 
 Request * request;
 Session * session;
these are the current request and the current session


the session GC was moved to SessionManager (was in SessionContainer)



git-svn-id: svn://ttmath.org/publicrep/winix/trunk@708 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
2011-01-23 14:15:30 +00:00
parent 61ac29b2de
commit 915cabdf97
171 changed files with 2822 additions and 2650 deletions

View File

@@ -35,7 +35,7 @@ Plugin::Plugin()
db = 0;
config = 0;
request = 0;
cur = 0;
system = 0;
functions = 0;
templates = 0;
@@ -64,9 +64,9 @@ void Plugin::SetConfig(Config * pconfig)
}
void Plugin::SetRequest(Request * prequest)
void Plugin::SetCur(Cur * pcur)
{
request = prequest;
cur = pcur;
}
@@ -105,14 +105,14 @@ void Plugin::SetSessionManager(SessionManager * psession_manager)
bool Plugin::SetPointers(PluginInfo & info)
{
// for safety we call a plugin function only when all our pointers are not null
bool res = (db && config && request && system && functions && templates && synchro && session_manager);
bool res = (db && config && cur && system && functions && templates && synchro && session_manager);
if( !res )
log << log1 << "Plugin: cannot call a function - some of the winix pointers are null" << logend;
info.db = db;
info.config = config;
info.request = request;
info.cur = cur;
info.system = system;
info.functions = functions;
info.templates = templates;
@@ -252,8 +252,8 @@ void Plugin::Call(int message, Slots::iterator & slot)
current_plugin = slot->second.index;
info.plugin_id = current_plugin;
if( request && request->session && current_plugin != -1 )
info.plugin_data_base = request->session->plugin_data.Get(current_plugin);
if( current_plugin != -1 )
info.plugin_data_base = cur->session->plugin_data.Get(current_plugin);
else
info.plugin_data_base = 0;