From 93b64fc46ffc5b539d3166903a400dee1559ff6b Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Thu, 25 Oct 2007 06:07:26 +0000 Subject: [PATCH] profile field and dashbaord fixes --- docs/changelog/7.x.x.txt | 1 + docs/gotcha.txt | 7 +++++++ docs/upgrades/upgrade_7.4.8-7.4.9.pl | 2 +- lib/WebGUI/ProfileField.pm | 2 +- 4 files changed, 10 insertions(+), 2 deletions(-) diff --git a/docs/changelog/7.x.x.txt b/docs/changelog/7.x.x.txt index a42c66617..f1838f61a 100644 --- a/docs/changelog/7.x.x.txt +++ b/docs/changelog/7.x.x.txt @@ -7,6 +7,7 @@ - fix: Workflow activities don't pick up new default values - safely allow sorting by more fields in collaboration systems - fix: iCal link on calendar doesn't work + - fix: error when deleting profile fields with non-alphanumeric names - add: Friends Network 7.4.10 diff --git a/docs/gotcha.txt b/docs/gotcha.txt index 0bd4a2eca..28d0f6008 100644 --- a/docs/gotcha.txt +++ b/docs/gotcha.txt @@ -7,6 +7,13 @@ upgrading from one version to the next, or even between multiple versions. Be sure to heed the warnings contained herein as they will save you many hours of grief. +7.5.0 +-------------------------------------------------------------------- + * The 7.4.8 upgrade script had an error for sites using Dashboards. + This would prevent the script from completing successfully. The + script has been fixed for future releases. + + 7.4.3 -------------------------------------------------------------------- diff --git a/docs/upgrades/upgrade_7.4.8-7.4.9.pl b/docs/upgrades/upgrade_7.4.8-7.4.9.pl index 7305be52a..fba9fabbe 100644 --- a/docs/upgrades/upgrade_7.4.8-7.4.9.pl +++ b/docs/upgrades/upgrade_7.4.8-7.4.9.pl @@ -65,7 +65,7 @@ sub fixDashboardContentPositions { fieldType=>'textarea' }); my $oldContentPositionId = $dashboardId."contentPositions"; - my $userPositioning = $db->read("select userId, `".$oldContentPositionId."` from userProfileData"); + my $userPositioning = $db->read("select userId, " . $db->dbh->quote_identifier($oldContentPositionId) . " from userProfileData"); while (my ($userId, $positions) = $userPositioning->array) { $db->write("update userProfileData set $newContentPositionId = ? where userId=?", [$positions, $userId]); } diff --git a/lib/WebGUI/ProfileField.pm b/lib/WebGUI/ProfileField.pm index 2e89d7492..3e710b000 100644 --- a/lib/WebGUI/ProfileField.pm +++ b/lib/WebGUI/ProfileField.pm @@ -149,7 +149,7 @@ sub delete { my $db = $self->session->db; # Remove the column from the userProfileData table - $db->write("ALTER TABLE userProfileData DROP " . $self->getId); + $db->write("ALTER TABLE userProfileData DROP " . $db->dbh->quote_identifier($self->getId)); # Remove the record $db->deleteRow("userProfileField","fieldName",$self->getId);