fixed some pod errors

removed futile inbox attempt
This commit is contained in:
JT Smith 2006-01-31 23:10:10 +00:00
parent 518a65df78
commit 7731a32559
20 changed files with 18 additions and 333 deletions

View file

@ -198,7 +198,7 @@ sub dbSlave {
#-------------------------------------------------------------------
=head DESTROY ( )
=head2 DESTROY ( )
Deconstructor.

View file

@ -170,7 +170,7 @@ sub dayStartEnd {
#-------------------------------------------------------------------
=head DESTROY ( )
=head2 DESTROY ( )
Deconstructor.

View file

@ -38,7 +38,7 @@ These methods are available from this package:
#-------------------------------------------------------------------
=head DESTROY ( )
=head2 DESTROY ( )
Deconstructor.

View file

@ -143,7 +143,7 @@ sub debug {
#-------------------------------------------------------------------
=head DESTROY ( )
=head2 DESTROY ( )
Deconstructor.

View file

@ -71,7 +71,7 @@ sub AUTOLOAD {
#-------------------------------------------------------------------
=head DESTROY ( )
=head2 DESTROY ( )
Deconstructor.

View file

@ -53,7 +53,7 @@ These methods are available from this package:
#-------------------------------------------------------------------
=head DESTROY ( )
=head2 DESTROY ( )
Deconstructor.

View file

@ -127,7 +127,7 @@ sub cut {
#-------------------------------------------------------------------
=head DESTROY ( )
=head2 DESTROY ( )
Deconstructor.

View file

@ -45,7 +45,7 @@ These methods are available from this class:
#-------------------------------------------------------------------
=head DESTROY ( )
=head2 DESTROY ( )
Deconstructor.

View file

@ -39,7 +39,7 @@ These methods are available from this package:
#-------------------------------------------------------------------
=head DESTROY ( )
=head2 DESTROY ( )
Deconstructor.

View file

@ -38,7 +38,7 @@ These methods are available from this package:
#-------------------------------------------------------------------
=head DESTROY ( )
=head2 DESTROY ( )
Deconstructor.

View file

@ -67,7 +67,7 @@ sub adminOnly {
#-------------------------------------------------------------------
=head DESTROY ( )
=head2 DESTROY ( )
Deconstructor.

View file

@ -103,7 +103,7 @@ sub deleteName {
#-------------------------------------------------------------------
=head DESTROY ( )
=head2 DESTROY ( )
Deconstructor.

View file

@ -72,7 +72,7 @@ sub add {
#-------------------------------------------------------------------
=head DESTROY ( )
=head2 DESTROY ( )
Deconstructor.

View file

@ -79,7 +79,7 @@ sub deleteAll {
#-------------------------------------------------------------------
=head DESTROY ( )
=head2 DESTROY ( )
Deconstructor.

View file

@ -54,7 +54,7 @@ These methods are available from this class:
#-------------------------------------------------------------------
=head DESTROY ( )
=head2 DESTROY ( )
Deconstructor.

View file

@ -90,7 +90,7 @@ sub append {
#-------------------------------------------------------------------
=head DESTROY ( )
=head2 DESTROY ( )
Deconstructor.

View file

@ -48,7 +48,7 @@ These methods are available from this package:
#-------------------------------------------------------------------
=head DESTROY ( )
=head2 DESTROY ( )
Deconstructor.

View file

@ -17,7 +17,6 @@ package WebGUI::User;
use strict;
use WebGUI::Cache;
use WebGUI::Group;
use WebGUI::User::Inbox;
=head1 NAME
@ -46,8 +45,6 @@ This package provides an object-oriented way of managing WebGUI users as well as
$u->deleteFromGroups(\@arr);
$u->delete;
my $inbox = $u->inbox;
=head1 METHODS
These methods are available from this class:
@ -139,7 +136,6 @@ Deletes this user.
sub delete {
my $self = shift;
$self->uncache;
$self->inbox->delete;
foreach my $groupId (@{$self->getGroups($self->userId)}) {
WebGUI::Group->new($self->session,$groupId)->deleteUsers([$self->userId]);
}
@ -174,7 +170,7 @@ sub deleteFromGroups {
#-------------------------------------------------------------------
=head DESTROY ( )
=head2 DESTROY ( )
Deconstructor.
@ -182,7 +178,6 @@ Deconstructor.
sub DESTROY {
my $self = shift;
$self->{_inbox}->DESTROY if (exists $self->{_inbox});
undef $self;
}
@ -234,22 +229,6 @@ sub identifier {
return $self->{_user}{"identifier"};
}
#-------------------------------------------------------------------
=head2 inbox
Returns the user's WebGUI::User::Inbox object.
=cut
sub inbox {
my $self = shift;
unless ($self->{_inbox}) {
$self->{_inbox} = WebGUI::User::Inbox->new($self);
}
return $self->{_inbox};
}
#-------------------------------------------------------------------

View file

@ -1,121 +0,0 @@
package WebGUI::User::Inbox;
=head1 LEGAL
-------------------------------------------------------------------
WebGUI is Copyright 2001-2006 Plain Black Corporation.
-------------------------------------------------------------------
Please read the legal notices (docs/legal.txt) and the license
(docs/license.txt) that came with this distribution before using
this software.
-------------------------------------------------------------------
http://www.plainblack.com info@plainblack.com
-------------------------------------------------------------------
=cut
use strict;
=head1 NAME
Package WebGUI::User::Inbox;
=head1 DESCRIPTION
This package provides an API for working with a User's inbox.
=head1 SYNOPSIS
my $inbox = $user->inbox;
=head1 METHODS
These methods are available from this class:
=cut
#-------------------------------------------------------------------
=head2 addMessage ( )
=cut
sub addMessage {
my $self = shift;
return WebGUI::User::Inbox::Message->create($self);
}
#-------------------------------------------------------------------
=head2 deleteAllMessages
Deletes all the messages in this user's inbox.
=cut
sub deleteAllMessages {
my $self = shift;
my $sth = $self->session->db->prepare("delete from userInbox where userId=?");
$sth->execute($self->user->userId);
}
#-------------------------------------------------------------------
=head DESTROY ( )
Deconstructor.
=cut
sub DESTROY {
my $self = shift;
undef $self;
}
#-------------------------------------------------------------------
=head2 new ( user )
Constructor.
=head3 user
A reference to the user who's inbox that we'll be manipulating.
=cut
sub new {
my $class = shift;
my $user = shift;
bless {_user=>$user}, $class;
}
#-------------------------------------------------------------------
=head2 session
Returns a reference to the current session.
=cut
sub session {
my $self = shift;
return $self->user->session;
}
#-------------------------------------------------------------------
=head2 user
Returns a reference to the user who owns this inbox.
=cut
sub user {
my $self = shift;
return $self->{_user};
}
1;

View file

@ -1,173 +0,0 @@
package WebGUI::User::Inbox::Message;
=head1 LEGAL
-------------------------------------------------------------------
WebGUI is Copyright 2001-2006 Plain Black Corporation.
-------------------------------------------------------------------
Please read the legal notices (docs/legal.txt) and the license
(docs/license.txt) that came with this distribution before using
this software.
-------------------------------------------------------------------
http://www.plainblack.com info@plainblack.com
-------------------------------------------------------------------
=cut
use strict;
=head1 NAME
Package WebGUI::User::Inbox::Message;
=head1 DESCRIPTION
This package provides an API for working with a User's inbox messages.
=head1 SYNOPSIS
=head1 METHODS
These methods are available from this class:
=cut
#-------------------------------------------------------------------
=head2 create ( )
=cut
sub create {
my $self = shift;
}
#-------------------------------------------------------------------
=head2 delete
Deletes this message from the inbox.
=cut
sub delete {
my $self = shift;
my $sth = $self->session->db->prepare("delete from userInbox where messageId=?");
$sth->execute($self->getId);
}
#-------------------------------------------------------------------
=head DESTROY ( )
Deconstructor.
=cut
sub DESTROY {
my $self = shift;
undef $self;
}
#-------------------------------------------------------------------
=head2 get ( property )
Returns the value of a property.
=head3 property
The name of any property of an inbox message.
=head4 message
=head4 subject
=cut
sub get {
my $self = shift;
unless ($self->{_properties}) {
$self->{_properties} = $self->session->db->getRow("userInbox","messageId",$self->getId);
}
return $self->{_properties}{shift};
}
#-------------------------------------------------------------------
=head2 getId ()
Returns the ID of this message.
=cut
sub getId {
my $self = shift;
return $self->{_messageId};
}
#-------------------------------------------------------------------
=head2 inbox
Returns a reference to the user's inbox.
=cut
sub inbox {
my $self = shift;
return $self->{_inbox};
}
#-------------------------------------------------------------------
=head2 new ( inbox, messageId )
Constructor.
=head3 inbox
A reference to a user's inbox object.
=head3 messageId
=cut
sub new {
my $class = shift;
my $inbox = shift;
my $messageId = shift;
bless {_inbox=>$inbox, _messageId=>$messageId}, $class;
}
#-------------------------------------------------------------------
=head2 session
Returns a reference to the current session.
=cut
sub session {
my $self = shift;
return $self->inbox->session;
}
#-------------------------------------------------------------------
=head2 user
Returns a reference to the user who owns this inbox.
=cut
sub user {
my $self = shift;
return $self->inbox->user;
}
1;