some bug fixes and the new group of groups hierarchy viewer in the group manager

This commit is contained in:
JT Smith 2005-03-03 03:33:09 +00:00
parent 8bd4f8274a
commit c29c81be23
5 changed files with 54 additions and 34 deletions

View file

@ -1,12 +1,15 @@
6.3.1
6.4.0
- You can now see the groups of groups hierarchy in the group manager.
- Added an initial configuration wizard which prompts the site owner to
configure a custom admin username and password for better security.
- Added some indicies to increase performance.
- Added all sorts of caching to increase performance.
- Fixed resetting votes on Poll would crash it.
- Fixed not being able to set display title and other yes no questions to no.
- Fixed a bug where URLs would become unreachable when using SSL.
- Added an initial configuration wizard which prompts the site owner to
configure a custom admin username and password for better security.
- Fixed a password timeout bug caused by the change in the interval method.
- Removed the depricated fileSize property from the File asset.
- Fixed a user profile editing bug.
6.3.0

View file

@ -71,10 +71,6 @@ sub definition {
fieldType=>'hidden',
defaultValue=>undef
},
fileSize=>{
fieldType=>'hidden',
defaultValue=>undef
},
olderVersions=>{
fieldType=>'hidden',
defaultValue=>undef

View file

@ -157,7 +157,7 @@ sub definition {
#-------------------------------------------------------------------
sub DESTROY {
my $self = shift;
$self->{_thread}->DESTROY if (exists $self->{_thread});
$self->{_thread}->DESTROY if (exists $self->{_thread} && ref $self->{_thread} =~ /Thread/);
$self->SUPER::DESTROY;
}

View file

@ -135,6 +135,23 @@ sub getGroupSearchForm {
}
#-------------------------------------------------------------------
sub walkGroups {
my $parentId = shift;
my $indent = shift;
my $output;
my $sth = WebGUI::SQL->read("select groups.groupId, groups.groupName from groupGroupings left join groups on groups.groupId=groupGroupings.groupId where groupGroupings.inGroup=".quote($parentId));
while (my ($id, $name) = $sth->array) {
$output .= $indent
.deleteIcon('op=deleteGroupGrouping&gid='.$parentId.'&delete='.$id)
.editIcon('op=editGroup&gid='.$id)
.' '.$name.'<br />';
$output .= walkGroups($id,$indent."&nbsp; &nbsp; ");
}
$sth->finish;
return $output;
}
#-------------------------------------------------------------------
sub www_addGroupsToGroupSave {
return WebGUI::Privilege::adminOnly() unless (WebGUI::Grouping::isInGroup(3));
@ -478,21 +495,23 @@ sub www_manageGroupsInGroup {
);
$f->submit;
$output .= $f->print;
$output .= '<p/><table class="tableData" align="center">';
$output .= '<tr class="tableHeader"><td></td><td>'.WebGUI::International::get(84).'</td></tr>';
$p = WebGUI::Paginator->new(WebGUI::URL::page('op=manageGroupsInGroup&gid='.$session{form}{gid}));
$p->setDataByQuery("select a.groupName as name,a.groupId as id from groups a
left join groupGroupings b on a.groupId=b.groupId
where b.inGroup=".quote($session{form}{gid})." order by a.groupName");
$groups = $p->getPageData;
foreach $group (@$groups) {
$output .= '<tr><td>'
.deleteIcon('op=deleteGroupGrouping&gid='.$session{form}{gid}.'&delete='.$group->{id})
.'</td><td><a href="'.WebGUI::URL::page('op=editGroup&gid='.$group->{id}).'">'
.$group->{name}.'</a></td></tr>';
}
$output .= '</table>';
$output .= $p->getBarTraditional;
$output .= '<p />';
$output .= walkGroups($session{form}{gid});
#<table class="tableData" align="center">';
# $output .= '<tr class="tableHeader"><td></td><td>'.WebGUI::International::get(84).'</td></tr>';
# $p = WebGUI::Paginator->new(WebGUI::URL::page('op=manageGroupsInGroup&gid='.$session{form}{gid}));
# $p->setDataByQuery("select a.groupName as name,a.groupId as id from groups a
# left join groupGroupings b on a.groupId=b.groupId
# where b.inGroup=".quote($session{form}{gid})." order by a.groupName");
# $groups = $p->getPageData;
# foreach $group (@$groups) {
# $output .= '<tr><td>'
# .deleteIcon('op=deleteGroupGrouping&gid='.$session{form}{gid}.'&delete='.$group->{id})
# .'</td><td><a href="'.WebGUI::URL::page('op=editGroup&gid='.$group->{id}).'">'
# .$group->{name}.'</a></td></tr>';
# }
# $output .= '</table>';
# $output .= $p->getBarTraditional;
return _submenu($output,'813');
}

View file

@ -172,7 +172,8 @@ sub www_editProfileField {
$f->fieldType(
-name=>"dataType",
-label=>WebGUI::International::get(486),
-value=>[$data{dataType} || "text"]
-value=>$data{dataType},
-defaultValue=>"text"
);
$f->textarea("dataValues",WebGUI::International::get(487),$data{dataValues});
$f->textarea("dataDefault",WebGUI::International::get(488),$data{dataDefault});
@ -218,16 +219,17 @@ sub www_editProfileFieldSave {
WebGUI::SQL->write("insert into userProfileField (fieldName, sequenceNumber, protected)
values (".quote($session{form}{fid}).", ".($sequenceNumber+1).", 0)");
}
WebGUI::SQL->write("update userProfileField set
fieldLabel=".quote($session{form}{fieldLabel}).",
visible=$session{form}{visible},
required=$session{form}{required},
editable=$session{form}{editable},
dataType=".quote($session{form}{dataType}).",
dataValues=".quote($session{form}{dataValues}).",
dataDefault=".quote($session{form}{dataDefault}).",
profileCategoryId=".quote($session{form}{profileCategoryId})."
where fieldName=".quote($session{form}{fid}));
WebGUI::SQL->setRow("userProfileField","fieldName",{
fieldLabel=>$session{form}{fieldLabel},
visible=>$session{form}{visible},
required=>$session{form}{required},
editable=>$session{form}{editable},
dataType=>$session{form}{dataType},
dataValues=>$session{form}{dataValues},
dataDefault=>$session{form}{dataDefault},
profileCategoryId=>$session{form}{profileCategoryId},
fieldName=>$session{form}{fid}
});
return www_editProfileSettings();
}