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 some indicies to increase performance.
- Added all sorts of caching to increase performance. - Added all sorts of caching to increase performance.
- Fixed resetting votes on Poll would crash it. - Fixed resetting votes on Poll would crash it.
- Fixed not being able to set display title and other yes no questions to no. - 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. - 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. - 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 6.3.0

View file

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

View file

@ -157,7 +157,7 @@ sub definition {
#------------------------------------------------------------------- #-------------------------------------------------------------------
sub DESTROY { sub DESTROY {
my $self = shift; my $self = shift;
$self->{_thread}->DESTROY if (exists $self->{_thread}); $self->{_thread}->DESTROY if (exists $self->{_thread} && ref $self->{_thread} =~ /Thread/);
$self->SUPER::DESTROY; $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 { sub www_addGroupsToGroupSave {
return WebGUI::Privilege::adminOnly() unless (WebGUI::Grouping::isInGroup(3)); return WebGUI::Privilege::adminOnly() unless (WebGUI::Grouping::isInGroup(3));
@ -478,21 +495,23 @@ sub www_manageGroupsInGroup {
); );
$f->submit; $f->submit;
$output .= $f->print; $output .= $f->print;
$output .= '<p/><table class="tableData" align="center">'; $output .= '<p />';
$output .= '<tr class="tableHeader"><td></td><td>'.WebGUI::International::get(84).'</td></tr>'; $output .= walkGroups($session{form}{gid});
$p = WebGUI::Paginator->new(WebGUI::URL::page('op=manageGroupsInGroup&gid='.$session{form}{gid})); #<table class="tableData" align="center">';
$p->setDataByQuery("select a.groupName as name,a.groupId as id from groups a # $output .= '<tr class="tableHeader"><td></td><td>'.WebGUI::International::get(84).'</td></tr>';
left join groupGroupings b on a.groupId=b.groupId # $p = WebGUI::Paginator->new(WebGUI::URL::page('op=manageGroupsInGroup&gid='.$session{form}{gid}));
where b.inGroup=".quote($session{form}{gid})." order by a.groupName"); # $p->setDataByQuery("select a.groupName as name,a.groupId as id from groups a
$groups = $p->getPageData; # left join groupGroupings b on a.groupId=b.groupId
foreach $group (@$groups) { # where b.inGroup=".quote($session{form}{gid})." order by a.groupName");
$output .= '<tr><td>' # $groups = $p->getPageData;
.deleteIcon('op=deleteGroupGrouping&gid='.$session{form}{gid}.'&delete='.$group->{id}) # foreach $group (@$groups) {
.'</td><td><a href="'.WebGUI::URL::page('op=editGroup&gid='.$group->{id}).'">' # $output .= '<tr><td>'
.$group->{name}.'</a></td></tr>'; # .deleteIcon('op=deleteGroupGrouping&gid='.$session{form}{gid}.'&delete='.$group->{id})
} # .'</td><td><a href="'.WebGUI::URL::page('op=editGroup&gid='.$group->{id}).'">'
$output .= '</table>'; # .$group->{name}.'</a></td></tr>';
$output .= $p->getBarTraditional; # }
# $output .= '</table>';
# $output .= $p->getBarTraditional;
return _submenu($output,'813'); return _submenu($output,'813');
} }

View file

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