many bug fixes
This commit is contained in:
parent
e9d6c1b4e4
commit
9a57b0df47
11 changed files with 54 additions and 15 deletions
|
|
@ -64,14 +64,17 @@ sub definition {
|
|||
className=>'WebGUI::Asset::File',
|
||||
properties=>{
|
||||
filename=>{
|
||||
noFormPost=>1,
|
||||
fieldType=>'hidden',
|
||||
defaultValue=>undef
|
||||
},
|
||||
storageId=>{
|
||||
noFormPost=>1,
|
||||
fieldType=>'hidden',
|
||||
defaultValue=>undef
|
||||
},
|
||||
olderVersions=>{
|
||||
noFormPost=>1,
|
||||
fieldType=>'hidden',
|
||||
defaultValue=>undef
|
||||
}
|
||||
|
|
|
|||
|
|
@ -89,14 +89,17 @@ sub definition {
|
|||
className=>'WebGUI::Asset::Post',
|
||||
properties=>{
|
||||
storageId => {
|
||||
noFormPost=>1,
|
||||
fieldType=>"hidden",
|
||||
defaultValue=>undef
|
||||
},
|
||||
threadId => {
|
||||
noFormPost=>1,
|
||||
fieldType=>"hidden",
|
||||
defaultValue=>undef
|
||||
},
|
||||
dateSubmitted => {
|
||||
noFormPost=>1,
|
||||
fieldType=>"hidden",
|
||||
defaultValue=>undef
|
||||
},
|
||||
|
|
@ -105,18 +108,22 @@ sub definition {
|
|||
defaultValue=>time()
|
||||
},
|
||||
username => {
|
||||
noFormPost=>1,
|
||||
fieldType=>"hidden",
|
||||
defaultValue=>$session{user}{alias} || $session{user}{username}
|
||||
},
|
||||
status => {
|
||||
noFormPost=>1,
|
||||
fieldType=>"hidden",
|
||||
defaultValue=>undef
|
||||
},
|
||||
rating => {
|
||||
noFormPost=>1,
|
||||
fieldType=>"hidden",
|
||||
defaultValue=>undef
|
||||
},
|
||||
views => {
|
||||
noFormPost=>1,
|
||||
fieldType=>"hidden",
|
||||
defaultValue=>undef
|
||||
},
|
||||
|
|
|
|||
|
|
@ -75,10 +75,12 @@ sub definition {
|
|||
className=>'WebGUI::Asset::Post::Thread',
|
||||
properties=>{
|
||||
subscriptionGroupId => {
|
||||
noFormPost=>1,
|
||||
fieldType=>"hidden",
|
||||
defaultValue=>undef
|
||||
},
|
||||
replies => {
|
||||
noFormPost=>1,
|
||||
fieldType=>"hidden",
|
||||
defaultValue=>undef
|
||||
},
|
||||
|
|
@ -91,10 +93,12 @@ sub definition {
|
|||
defaultValue=>0
|
||||
},
|
||||
lastPostId => {
|
||||
noFormPost=>1,
|
||||
fieldType=>"hidden",
|
||||
defaultValue=>undef
|
||||
},
|
||||
lastPostDate => {
|
||||
noFormPost=>1,
|
||||
fieldType=>"hidden",
|
||||
defaultValue=>undef
|
||||
}
|
||||
|
|
@ -405,6 +409,16 @@ sub lock {
|
|||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub processPropertiesFromFormPost {
|
||||
my $self = shift;
|
||||
$self->SUPER::processPropertiesFromFormPost;
|
||||
if ($self->get("subscriptionGroupId") eq "") {
|
||||
$self->createSubscriptionGroup;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 rate ( rating )
|
||||
|
|
@ -486,9 +500,7 @@ Subscribes the user to this thread.
|
|||
|
||||
sub subscribe {
|
||||
my $self = shift;
|
||||
unless ($self->isSubscribed) {
|
||||
WebGUI::Grouping::addUsersToGroups([$session{user}{userId}],[$self->get("subscriptionGroupId")]);
|
||||
}
|
||||
WebGUI::Grouping::addUsersToGroups([$session{user}{userId}],[$self->get("subscriptionGroupId")]);
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
|
@ -527,9 +539,7 @@ Negates the subscribe method.
|
|||
|
||||
sub unsubscribe {
|
||||
my $self = shift;
|
||||
if ($self->isSubscribed) {
|
||||
WebGUI::Grouping::deleteUsersFromGroups([$session{user}{userId}],[$self->get("subscriptionGroupId")]);
|
||||
}
|
||||
WebGUI::Grouping::deleteUsersFromGroups([$session{user}{userId}],[$self->get("subscriptionGroupId")]);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -29,6 +29,7 @@ sub definition {
|
|||
className=>'WebGUI::Asset::Shortcut',
|
||||
properties=>{
|
||||
shortcutToAssetId=>{
|
||||
noFormPost=>1,
|
||||
fieldType=>"hidden",
|
||||
defaultValue=>undef
|
||||
},
|
||||
|
|
|
|||
|
|
@ -107,10 +107,12 @@ sub definition {
|
|||
defaultValue=>undef
|
||||
},
|
||||
isEditable=>{
|
||||
noFormPost=>1,
|
||||
fieldType=>'hidden',
|
||||
defaultValue=>1
|
||||
},
|
||||
showInForms=>{
|
||||
noFormPost=>1,
|
||||
fieldType=>'yesNo',
|
||||
defaultValue=>1
|
||||
},
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@ package WebGUI::Asset::Wobject::Collaboration;
|
|||
use strict;
|
||||
use Tie::CPHash;
|
||||
use WebGUI::DateTime;
|
||||
use WebGUI::Group;
|
||||
use WebGUI::Grouping;
|
||||
use WebGUI::HTML;
|
||||
use WebGUI::HTTP;
|
||||
|
|
@ -255,30 +256,37 @@ sub definition {
|
|||
defaultValue=>31536000
|
||||
},
|
||||
subscriptionGroupId =>{
|
||||
noFormPost=>1,
|
||||
fieldType=>"hidden",
|
||||
defaultValue=>undef
|
||||
},
|
||||
lastPostDate =>{
|
||||
noFormPost=>1,
|
||||
fieldType=>"hidden",
|
||||
defaultValue=>undef
|
||||
},
|
||||
lastPostId =>{
|
||||
noFormPost=>1,
|
||||
fieldType=>"hidden",
|
||||
defaultValue=>undef
|
||||
},
|
||||
rating =>{
|
||||
noFormPost=>1,
|
||||
fieldType=>"hidden",
|
||||
defaultValue=>undef
|
||||
},
|
||||
replies =>{
|
||||
noFormPost=>1,
|
||||
fieldType=>"hidden",
|
||||
defaultValue=>undef
|
||||
},
|
||||
views =>{
|
||||
noFormPost=>1,
|
||||
fieldType=>"hidden",
|
||||
defaultValue=>undef
|
||||
},
|
||||
threads =>{
|
||||
noFormPost=>1,
|
||||
fieldType=>"hidden",
|
||||
defaultValue=>undef
|
||||
},
|
||||
|
|
@ -681,7 +689,7 @@ sub isSubscribed {
|
|||
sub processPropertiesFromFormPost {
|
||||
my $self = shift;
|
||||
$self->SUPER::processPropertiesFromFormPost;
|
||||
if ($session{form}{func} eq "add") {
|
||||
if ($self->get("subscriptionGroupId") eq "") {
|
||||
$self->createSubscriptionGroup;
|
||||
}
|
||||
}
|
||||
|
|
@ -749,9 +757,7 @@ Subscribes a user to this collaboration system.
|
|||
|
||||
sub subscribe {
|
||||
my $self = shift;
|
||||
unless ($self->isSubscribed) {
|
||||
WebGUI::Grouping::addUsersToGroups([$session{user}{userId}],[$self->get("subscriptionGroupId")]);
|
||||
}
|
||||
WebGUI::Grouping::addUsersToGroups([$session{user}{userId}],[$self->get("subscriptionGroupId")]);
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
|
@ -764,9 +770,7 @@ Unsubscribes a user from this collaboration system
|
|||
|
||||
sub unsubscribe {
|
||||
my $self = shift;
|
||||
if ($self->isSubscribed) {
|
||||
WebGUI::Grouping::deleteUsersFromGroups([$session{user}{userId}],[$self->get("subscriptionGroupId")]);
|
||||
}
|
||||
WebGUI::Grouping::deleteUsersFromGroups([$session{user}{userId}],[$self->get("subscriptionGroupId")]);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -67,6 +67,7 @@ sub definition {
|
|||
defaultValue=>'PBtmpl0000000000000054'
|
||||
},
|
||||
contentPositions => {
|
||||
noFormPost=>1,
|
||||
defaultValue=>undef,
|
||||
fieldType=>"hidden"
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue