a bunch of bug fixes
This commit is contained in:
parent
85736ac437
commit
594e27d9eb
7 changed files with 16 additions and 32 deletions
|
|
@ -1,4 +1,6 @@
|
|||
6.6.2
|
||||
- fix [ 1220552 ] moderation of postings/threads
|
||||
- fix [ 1218870 ] !! Bugs in Article.pm (old 'Discussion allowed' feature)
|
||||
- Fixed help for LDAP connections.
|
||||
- Internationalized all LDAP error messages
|
||||
- Moved all LDAP help and labels into its own file (AuthLDAP)
|
||||
|
|
|
|||
|
|
@ -2486,7 +2486,7 @@ sub www_copy {
|
|||
my $self = shift;
|
||||
return WebGUI::Privilege::insufficient() unless $self->canEdit;
|
||||
my $newAsset = $self->duplicate;
|
||||
$newAsset->update({ title=>$newAsset->getTitle.' (copy)'});
|
||||
$newAsset->update({ title=>$self->getTitle.' (copy)'});
|
||||
$newAsset->cut;
|
||||
return $self->getContainer->www_view;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -645,8 +645,6 @@ sub processPropertiesFromFormPost {
|
|||
$self->getThread->lock if ($session{form}{'lock'});
|
||||
$self->getThread->stick if ($session{form}{stick});
|
||||
}
|
||||
} else {
|
||||
$data{ownerUserId} = $session{form}{userId};
|
||||
}
|
||||
$data{groupIdView} =$self->getThread->getParent->get("groupIdView");
|
||||
$data{groupIdEdit} = $self->getThread->getParent->get("groupIdEdit");
|
||||
|
|
@ -953,6 +951,10 @@ sub www_edit {
|
|||
.WebGUI::Form::hidden({
|
||||
name=>"userId",
|
||||
value=>$self->getValue("ownerUserId")
|
||||
})
|
||||
.WebGUI::Form::hidden({
|
||||
name=>"username",
|
||||
value=>$self->getValue("username")
|
||||
});
|
||||
$var{isEdit} = 1;
|
||||
$content = $self->getValue("content");
|
||||
|
|
|
|||
|
|
@ -12,8 +12,6 @@ package WebGUI::Asset::Wobject::Article;
|
|||
|
||||
use strict;
|
||||
use WebGUI::DateTime;
|
||||
#use WebGUI::Forum;
|
||||
#use WebGUI::Forum::UI;
|
||||
use WebGUI::International;
|
||||
use WebGUI::Paginator;
|
||||
use WebGUI::Privilege;
|
||||
|
|
@ -188,29 +186,11 @@ sub view {
|
|||
$var{description} = $p->getPage;
|
||||
}
|
||||
$p->appendTemplateVars(\%var);
|
||||
my $callback = $self->getUrl;
|
||||
if ($self->get("allowDiscussion")) {
|
||||
my $forum = WebGUI::Forum->new($self->get("forumId"));
|
||||
$var{"replies.count"} = ($forum->get("replies") + $forum->get("threads"));
|
||||
$var{"replies.URL"} = WebGUI::Forum::UI::formatForumURL($callback,$forum->get("forumId"));
|
||||
$var{"replies.label"} = WebGUI::International::get(28,"Asset_Article");
|
||||
$var{"post.URL"} = WebGUI::Forum::UI::formatNewThreadURL($callback,$forum->get("forumId"));
|
||||
$var{"post.label"} = WebGUI::International::get(24,"Asset_Article");
|
||||
}
|
||||
my $templateId = $self->get("templateId");
|
||||
if ($session{form}{overrideTemplateId} ne "") {
|
||||
$templateId = $session{form}{overrideTemplateId};
|
||||
}
|
||||
if ($session{form}{forumOp}) {
|
||||
return WebGUI::Forum::UI::forumOp({
|
||||
callback=>$callback,
|
||||
title=>$self->get("title"),
|
||||
description=>$self->get("description"),
|
||||
forumId=>$self->get("forumId")
|
||||
});
|
||||
} else {
|
||||
return $self->processTemplate(\%var, $templateId);
|
||||
}
|
||||
return $self->processTemplate(\%var, $templateId);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -213,7 +213,7 @@ sub view {
|
|||
my $self = shift;
|
||||
#define default view month range. Note that this could be different from
|
||||
#the range a user is allowed to view - set by the events calendar limitations.
|
||||
my $monthRangeLength = int($self->getValue("paginateAfter"));
|
||||
my $monthRangeLength = int($self->get("paginateAfter"));
|
||||
# Let's limit the range to 72 for now; later we can make it definable in the calendar itself.
|
||||
$monthRangeLength = 1 if ($monthRangeLength < 0);
|
||||
$monthRangeLength = 72 if ($monthRangeLength > 72);
|
||||
|
|
|
|||
|
|
@ -178,7 +178,7 @@ sub www_addUsersToGroupSecondarySave {
|
|||
|
||||
#-------------------------------------------------------------------
|
||||
sub www_autoAddToGroup {
|
||||
return WebGUI::AdminConsole->new("groups")->render(WebGUI::Privilege::insufficient()) unless ($session{user}{userId} != 1);
|
||||
return WebGUI::AdminConsole->new("groups")->render(WebGUI::Privilege::insufficient()) unless ($session{user}{userId} ne 1);
|
||||
my $group = WebGUI::Group->new($session{form}{groupId});
|
||||
if ($group->autoAdd) {
|
||||
WebGUI::Grouping::addUsersToGroups([$session{user}{userId}],[$session{form}{groupId}]);
|
||||
|
|
@ -188,7 +188,7 @@ sub www_autoAddToGroup {
|
|||
|
||||
#-------------------------------------------------------------------
|
||||
sub www_autoDeleteFromGroup {
|
||||
return WebGUI::AdminConsole->new("groups")->render(WebGUI::Privilege::insufficient()) unless ($session{user}{userId} != 1);
|
||||
return WebGUI::AdminConsole->new("groups")->render(WebGUI::Privilege::insufficient()) unless ($session{user}{userId} ne 1);
|
||||
my $group = WebGUI::Group->new($session{form}{groupId});
|
||||
if ($group->autoDelete) {
|
||||
WebGUI::Grouping::deleteUsersFromGroups([$session{user}{userId}],[$session{form}{groupId}]);
|
||||
|
|
@ -220,7 +220,7 @@ sub www_deleteGroupConfirm {
|
|||
|
||||
#-------------------------------------------------------------------
|
||||
sub www_deleteGroupGrouping {
|
||||
return WebGUI::Privilege::adminOnly() unless (WebGUI::Grouping::isInGroup(3));
|
||||
return WebGUI::Privilege::adminOnly() unless (WebGUI::Grouping::isInGroup('3'));
|
||||
WebGUI::Grouping::deleteGroupsFromGroups([$session{form}{delete}],[$session{form}{gid}]);
|
||||
return www_manageGroupsInGroup();
|
||||
}
|
||||
|
|
@ -228,8 +228,8 @@ sub www_deleteGroupGrouping {
|
|||
#-------------------------------------------------------------------
|
||||
sub www_deleteGrouping {
|
||||
return WebGUI::Privilege::adminOnly() unless (WebGUI::Grouping::isInGroup(3));
|
||||
if (($session{user}{userId} == $session{form}{uid} || $session{form}{uid} == 3) && $session{form}{gid} == 3) {
|
||||
return _submenu(WebGUI::Privilege::vitalComponent());
|
||||
if (($session{user}{userId} eq $session{form}{uid} || $session{form}{uid} eq '3') && $session{form}{gid} eq '3') {
|
||||
return WebGUI::Privilege::vitalComponent();
|
||||
}
|
||||
my @users = $session{cgi}->param('uid');
|
||||
my @groups = $session{cgi}->param("gid");
|
||||
|
|
@ -244,7 +244,7 @@ sub www_deleteGrouping {
|
|||
sub www_deleteGroupingSecondary {
|
||||
return WebGUI::Privilege::adminOnly() unless _hasSecondaryPrivilege($session{form}{gid});
|
||||
if ($session{user}{userId} eq $session{form}{uid}) {
|
||||
return WebGUI::AdminConsole->new("groups")->render(WebGUI::Privilege::vitalComponent());
|
||||
return WebGUI::Privilege::vitalComponent();
|
||||
}
|
||||
WebGUI::Grouping::deleteUsersFromGroups([$session{form}{uid}],[$session{form}{gid}]);
|
||||
return www_manageUsersInGroupSecondary();
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@
|
|||
border-style: solid;
|
||||
}
|
||||
|
||||
.panelButton A {
|
||||
.panelButton A, .panelButton A:visited, .panelButton A:link {
|
||||
text-decoration: none;
|
||||
color: black;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue