Index: trunk/kernel/units/general/inp_ses_storage.php =================================================================== diff -u -r3330 -r3508 --- trunk/kernel/units/general/inp_ses_storage.php (.../inp_ses_storage.php) (revision 3330) +++ trunk/kernel/units/general/inp_ses_storage.php (.../inp_ses_storage.php) (revision 3508) @@ -1,6 +1,6 @@ Application->IsAdmin() ) $path = rtrim($path, '/').'/admin'; $this->SetCookiePath($path); - + $cookie_name = $this->Application->ConfigValue('SessionCookieName'); $this->SetCookieName($cookie_name ? $cookie_name : 'sid'); - + $this->SetCookieDomain(SERVER_NAME); - + if( $this->Application->IsAdmin() ) { $mode = constOn('IS_INSTALL') ? smCOOKIES_ONLY : smAUTO; @@ -27,7 +27,7 @@ if ($ses_mode == 0) $mode = smGET_ONLY; } $this->SetMode($mode); - + parent::Init($prefix,$special); if( !$this->Application->IsAdmin() && $this->GetField('PortalUserId') <= 0 ) @@ -80,7 +80,9 @@ { $query = ' SELECT '.$this->IDField.' FROM '.$this->TableName.' WHERE '.adodb_mktime().' - '.$this->TimestampField.' > '.$this->SessionTimeout; $ret = $this->Conn->GetCol($query); - if($ret) $this->DeleteEditTables(); + if($ret) { + $this->DeleteEditTables(); + } return $ret; } @@ -89,7 +91,7 @@ { $tables = $this->Conn->GetCol('SHOW TABLES'); $mask_edit_table = '/'.TABLE_PREFIX.'ses_(.*)_edit_(.*)/'; - $mask_search_table = '/'.TABLE_PREFIX.'ses_(.*)_(.*)/'; + $mask_search_table = '/'.TABLE_PREFIX.'ses_(.*?)_(.*)/'; $sql='SELECT COUNT(*) FROM '.$this->TableName.' WHERE '.$this->IDField.' = \'%s\''; foreach($tables as $table)