merging 6.2.10 and 6.2.11 changes

This commit is contained in:
JT Smith 2005-01-28 22:19:39 +00:00
parent 486b96d94d
commit d47830aceb
28 changed files with 139 additions and 59 deletions

View file

@ -114,7 +114,7 @@ sub validateProfileData {
$a = WebGUI::SQL->read("select * from userProfileField,userProfileCategory where userProfileField.profileCategoryId=userProfileCategory.profileCategoryId
and userProfileCategory.editable=1 and userProfileField.editable=1 order by userProfileCategory.sequenceNumber,userProfileField.sequenceNumber");
while (%field = $a->hash) {
$data{$field{fieldName}} = WebGUI::Macro::negate(WebGUI::FormProcessor::process($field{fieldName},$field{dataType}));
$data{$field{fieldName}} = WebGUI::Macro::negate(WebGUI::FormProcessor::process($field{fieldName},$field{dataType},""));
if ($field{required} && $data{$field{fieldName}} eq "") {
$error .= '<li>'.(eval $field{fieldLabel}).' '.WebGUI::International::get(451);
}elsif($field{fieldName} eq "email" && isDuplicateEmail($data{$field{fieldName}})){
@ -150,8 +150,13 @@ sub www_editProfile {
$label = eval $data->{fieldLabel};
$default = eval $data->{dataDefault};
if ($method eq "selectList") {
$values = eval $data->{dataValues};
if ($method eq "selectList" || $method eq "checkList" || $method eq "radioList") {
$values = eval $data->{dataValues};
my $orderedValues = {};
tie %{$orderedValues}, 'Tie::IxHash';
foreach my $ov (sort keys %{$values}) {
$orderedValues->{$ov} = $values->{$ov};
}
# note: this big if statement doesn't look elegant, but doing regular ORs caused problems with the array reference.
if ($session{form}{$data->{fieldName}}) {
$default = [$session{form}{$data->{fieldName}}];

View file

@ -74,7 +74,7 @@ sub www_deleteProfileCategoryConfirm {
return WebGUI::Privilege::adminOnly() unless (WebGUI::Grouping::isInGroup(3));
return WebGUI::Privilege::vitalComponent() if ($session{form}{cid} < 1000 && $session{form}{cid} > 0);
WebGUI::SQL->write("delete from userProfileCategory where profileCategoryId=".quote($session{form}{cid}));
WebGUI::SQL->write("update userProfileField set profileCategoryId=1 where profileCategoryId=".quote($session{form}{cid}));
WebGUI::SQL->write("update userProfileField set profileCategoryId='1' where profileCategoryId=".quote($session{form}{cid}));
return www_editProfileSettings();
}

View file

@ -94,13 +94,13 @@ sub www_viewStatistics {
$version = '<a href="http://files.plainblack.com/downloads/'.$rev[0].'.x.x/webgui-'.$version.'.tar.gz">'.$version.'</a>';
}
$output .= '<tr><td align="right" class="tableHeader">'.WebGUI::International::get(349).':</td><td class="tableData">'.$version.'</td></tr>';
($data) = WebGUI::SQL->quickArray("select count(*) from page where parentId<>3");
($data) = WebGUI::SQL->quickArray("select count(*) from page where parentId<>'3'");
$output .= '<tr><td align="right" class="tableHeader">'.WebGUI::International::get(147).':</td><td class="tableData">'.$data.'</td></tr>';
($data) = WebGUI::SQL->quickArray("select count(*) from page where parentId=0");
($data) = WebGUI::SQL->quickArray("select count(*) from page where parentId='0'");
$output .= '<tr><td align="right" class="tableHeader">'.WebGUI::International::get(795).':</td><td class="tableData">'.$data.'</td></tr>';
($data) = WebGUI::SQL->quickArray("select count(*) from page where parentId=5");
($data) = WebGUI::SQL->quickArray("select count(*) from page where parentId='5'");
$output .= '<tr><td align="right" class="tableHeader">'.WebGUI::International::get(794).':</td><td class="tableData">'.$data.'</td></tr>';
($data) = WebGUI::SQL->quickArray("select count(*) from wobject where pageId<>3");
($data) = WebGUI::SQL->quickArray("select count(*) from wobject where pageId<>'3'");
$output .= '<tr><td align="right" class="tableHeader">'.WebGUI::International::get(148).':</td><td class="tableData">'.$data.'</td></tr>';
($data) = WebGUI::SQL->quickArray("select count(*) from template where namespace='style'");
$output .= '<tr><td align="right" class="tableHeader">'.WebGUI::International::get(427).':</td><td class="tableData">'.$data.'</td></tr>';