From e07344417cc2222e743897d539b70d260b5bc14a Mon Sep 17 00:00:00 2001 From: JT Smith Date: Thu, 8 Dec 2005 03:50:58 +0000 Subject: [PATCH] fixed iob --- docs/changelog/6.x.x.txt | 1 + docs/upgrades/upgrade_6.8.0-6.8.1.pl | 7 +++++++ lib/WebGUI/Asset/Wobject/InOutBoard.pm | 9 ++++++--- 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/docs/changelog/6.x.x.txt b/docs/changelog/6.x.x.txt index 1650b05d9..149925b2e 100644 --- a/docs/changelog/6.x.x.txt +++ b/docs/changelog/6.x.x.txt @@ -28,6 +28,7 @@ - The upgrade script now wipes out the file cache in case it would cause any conflicts. - fix [ 1373319 ] archive + - Fixed the In/Out Board so it doesn't produce fatal errors on add. - fix [ 1373493 ] Upgrade script fails because parameters are not quoted - Upgrade now uses --results-file parameter on mysqldump because some operating system don't handle UTF-8 characters through their pipes. diff --git a/docs/upgrades/upgrade_6.8.0-6.8.1.pl b/docs/upgrades/upgrade_6.8.0-6.8.1.pl index b4b7c3408..86b4d054d 100644 --- a/docs/upgrades/upgrade_6.8.0-6.8.1.pl +++ b/docs/upgrades/upgrade_6.8.0-6.8.1.pl @@ -27,10 +27,17 @@ fixCSFaqTemplateAnchors(); updateProfileSystem(); convertDashboardPrefs(); fixPosts(); +fixIOB(); finish(); # this line required +#------------------------------------------------- +sub fixIOB { + print "\tFixing IOB.\n" unless ($quiet); + WebGUI::SQL->write("alter table InOutBoard_statusLog add column createdBy varchar(22) binary"); +} + #------------------------------------------------- sub fixPosts { print "\tFixing posts.\n" unless ($quiet); diff --git a/lib/WebGUI/Asset/Wobject/InOutBoard.pm b/lib/WebGUI/Asset/Wobject/InOutBoard.pm index 3224a35ef..725768117 100644 --- a/lib/WebGUI/Asset/Wobject/InOutBoard.pm +++ b/lib/WebGUI/Asset/Wobject/InOutBoard.pm @@ -229,12 +229,14 @@ InOutBoard_status.status, InOutBoard_status.dateStamp, c.fieldData as department, groupings.groupId -from users, InOutBoard, groupings +from users +left join groupings on groupings.userId=users.userId +left join InOutBoard on groupings.groupId=InOutBoard.inOutGroup left join userProfileData a on users.userId=a.userId and a.fieldName='firstName' left join userProfileData b on users.userId=b.userId and b.fieldName='lastName' left join userProfileData c on users.userId=c.userId and c.fieldName='department' left join InOutBoard_status on users.userId=InOutBoard_status.userId and InOutBoard_status.assetId=".quote($self->getId())." -where users.userId<>'1' and groupings.groupId=InOutBoard.inOutGroup and groupings.userId=users.userId and InOutBoard.inOutGroup=".quote($self->get("inOutGroup"))." +where users.userId<>'1' and InOutBoard.inOutGroup=".quote($self->get("inOutGroup"))." group by userId order by department, lastName, firstName"; @@ -447,7 +449,8 @@ InOutBoard_statusLog.dateStamp, InOutBoard_statusLog.createdBy, c.fieldData as department, groupings.groupId -from users, InOutBoard, groupings +from users +left join groupings on groupings.userId=users.userId left join userProfileData a on users.userId=a.userId and a.fieldName='firstName' left join userProfileData b on users.userId=b.userId and b.fieldName='lastName' left join userProfileData c on users.userId=c.userId and c.fieldName='department'