Thomas Bruederli wrote:

> The solution you committed seems to solve the issue quite well for now.
>> What we need, in my opinion, is a per-variable row in the session table.
>> And, if possible, reads/writes per variable. Maybe even replace all
>> references to $_SESSION[] with functions like rcube_sess_get() and
>> rcube_sess_set() or something like that.
> 
> I'm not a big fan of this approach. It requires changes to the
> db-schema every time we introduce a new session var and I'm sure


No, just once.


CREATE TABLE `session` (
  `sess_id` varchar(40) NOT NULL,
  `created` datetime NOT NULL default '0000-00-00 00:00:00',
  `changed` datetime NOT NULL default '0000-00-00 00:00:00',
  `ip` varchar(40) default NULL,
  `vars` text NOT NULL,
  PRIMARY KEY  (`sess_id`),
  KEY `changed_index` (`changed`)
)


Would become something like:


CREATE TABLE `session` (
  `sess_id` varchar(40) NOT NULL,
  `created` datetime NOT NULL default '0000-00-00 00:00:00',
  `changed` datetime NOT NULL default '0000-00-00 00:00:00',
  `ip` varchar(40) default NULL,
  `var` text NOT NULL,
  `value` text NOT NULL,
  KEY  `sess_id` (`sess_id`),
  KEY `changed_index` (`changed`)
)


Thus one row per variable.


Robin
Robin
_______________________________________________
List info: http://lists.roundcube.net/dev/

Reply via email to