Fix a typo in the Template/Parser.pm code.

The SQL table patch for userSessionScratch won't apply if the table contains
duplicate entries in the rows that will be set as keys.  So the table is
emptied before the patch is applied.
This commit is contained in:
Colin Kuskie 2006-04-25 17:38:58 +00:00
parent 79806e417f
commit bc2f54e08c
3 changed files with 4 additions and 1 deletions

View file

@ -124,6 +124,7 @@
- fix [ 1340839 ] If can't use item in adminConsole don't display it
- Added SQL Form and error feedback for asset addition (Martin Kamerbeek/Procolix)
- Added file upload ability to the rich text editor (Wouter van Oijen/ProcoliX)
- fix [ 1473937 ] scratch->set not taking.
6.8.8
- fix [ 1452466 ] File size not set in File asset (Thanks to Eric S)

View file

@ -909,6 +909,8 @@ sub changeDbCacheTimeoutName {
#-------------------------------------------------
sub addScratchKeys {
print "\tClearing user session scratch table to add keys.\n";
$session->db->write("delete from userSessionScratch");
print "\tAssigning keys to userSessionScratch.\n" unless ($quiet);
$session->db->write("alter table userSessionScratch ADD PRIMARY KEY (sessionId, name)");
}