From 7731a3255901b2321b777fa317641b3d8b007d4a Mon Sep 17 00:00:00 2001 From: JT Smith Date: Tue, 31 Jan 2006 23:10:10 +0000 Subject: [PATCH] fixed some pod errors removed futile inbox attempt --- lib/WebGUI/Session.pm | 2 +- lib/WebGUI/Session/DateTime.pm | 2 +- lib/WebGUI/Session/Env.pm | 2 +- lib/WebGUI/Session/ErrorHandler.pm | 2 +- lib/WebGUI/Session/Form.pm | 2 +- lib/WebGUI/Session/Http.pm | 2 +- lib/WebGUI/Session/Icon.pm | 2 +- lib/WebGUI/Session/Id.pm | 2 +- lib/WebGUI/Session/Os.pm | 2 +- lib/WebGUI/Session/Output.pm | 2 +- lib/WebGUI/Session/Privilege.pm | 2 +- lib/WebGUI/Session/Scratch.pm | 2 +- lib/WebGUI/Session/Setting.pm | 2 +- lib/WebGUI/Session/Stow.pm | 2 +- lib/WebGUI/Session/Style.pm | 2 +- lib/WebGUI/Session/Url.pm | 2 +- lib/WebGUI/Session/Var.pm | 2 +- lib/WebGUI/User.pm | 23 +--- lib/WebGUI/User/Inbox.pm | 121 -------------------- lib/WebGUI/User/Inbox/Message.pm | 173 ----------------------------- 20 files changed, 18 insertions(+), 333 deletions(-) delete mode 100644 lib/WebGUI/User/Inbox.pm delete mode 100644 lib/WebGUI/User/Inbox/Message.pm diff --git a/lib/WebGUI/Session.pm b/lib/WebGUI/Session.pm index 322b24127..f98ced7bb 100644 --- a/lib/WebGUI/Session.pm +++ b/lib/WebGUI/Session.pm @@ -198,7 +198,7 @@ sub dbSlave { #------------------------------------------------------------------- -=head DESTROY ( ) +=head2 DESTROY ( ) Deconstructor. diff --git a/lib/WebGUI/Session/DateTime.pm b/lib/WebGUI/Session/DateTime.pm index db3ddfa6b..5ad9925de 100644 --- a/lib/WebGUI/Session/DateTime.pm +++ b/lib/WebGUI/Session/DateTime.pm @@ -170,7 +170,7 @@ sub dayStartEnd { #------------------------------------------------------------------- -=head DESTROY ( ) +=head2 DESTROY ( ) Deconstructor. diff --git a/lib/WebGUI/Session/Env.pm b/lib/WebGUI/Session/Env.pm index 764dd7ad5..2ac124933 100644 --- a/lib/WebGUI/Session/Env.pm +++ b/lib/WebGUI/Session/Env.pm @@ -38,7 +38,7 @@ These methods are available from this package: #------------------------------------------------------------------- -=head DESTROY ( ) +=head2 DESTROY ( ) Deconstructor. diff --git a/lib/WebGUI/Session/ErrorHandler.pm b/lib/WebGUI/Session/ErrorHandler.pm index 799bfa73d..d9ae8a4e7 100644 --- a/lib/WebGUI/Session/ErrorHandler.pm +++ b/lib/WebGUI/Session/ErrorHandler.pm @@ -143,7 +143,7 @@ sub debug { #------------------------------------------------------------------- -=head DESTROY ( ) +=head2 DESTROY ( ) Deconstructor. diff --git a/lib/WebGUI/Session/Form.pm b/lib/WebGUI/Session/Form.pm index e49af34ae..ef8296e3f 100644 --- a/lib/WebGUI/Session/Form.pm +++ b/lib/WebGUI/Session/Form.pm @@ -71,7 +71,7 @@ sub AUTOLOAD { #------------------------------------------------------------------- -=head DESTROY ( ) +=head2 DESTROY ( ) Deconstructor. diff --git a/lib/WebGUI/Session/Http.pm b/lib/WebGUI/Session/Http.pm index d4e020557..eeedc132f 100644 --- a/lib/WebGUI/Session/Http.pm +++ b/lib/WebGUI/Session/Http.pm @@ -53,7 +53,7 @@ These methods are available from this package: #------------------------------------------------------------------- -=head DESTROY ( ) +=head2 DESTROY ( ) Deconstructor. diff --git a/lib/WebGUI/Session/Icon.pm b/lib/WebGUI/Session/Icon.pm index 83faae8b7..5b81a4bbe 100644 --- a/lib/WebGUI/Session/Icon.pm +++ b/lib/WebGUI/Session/Icon.pm @@ -127,7 +127,7 @@ sub cut { #------------------------------------------------------------------- -=head DESTROY ( ) +=head2 DESTROY ( ) Deconstructor. diff --git a/lib/WebGUI/Session/Id.pm b/lib/WebGUI/Session/Id.pm index 20512176a..b736cfa0a 100644 --- a/lib/WebGUI/Session/Id.pm +++ b/lib/WebGUI/Session/Id.pm @@ -45,7 +45,7 @@ These methods are available from this class: #------------------------------------------------------------------- -=head DESTROY ( ) +=head2 DESTROY ( ) Deconstructor. diff --git a/lib/WebGUI/Session/Os.pm b/lib/WebGUI/Session/Os.pm index 850dd5ff4..b24d7d60b 100644 --- a/lib/WebGUI/Session/Os.pm +++ b/lib/WebGUI/Session/Os.pm @@ -39,7 +39,7 @@ These methods are available from this package: #------------------------------------------------------------------- -=head DESTROY ( ) +=head2 DESTROY ( ) Deconstructor. diff --git a/lib/WebGUI/Session/Output.pm b/lib/WebGUI/Session/Output.pm index daea5825c..5e6fef071 100644 --- a/lib/WebGUI/Session/Output.pm +++ b/lib/WebGUI/Session/Output.pm @@ -38,7 +38,7 @@ These methods are available from this package: #------------------------------------------------------------------- -=head DESTROY ( ) +=head2 DESTROY ( ) Deconstructor. diff --git a/lib/WebGUI/Session/Privilege.pm b/lib/WebGUI/Session/Privilege.pm index 14298790a..b25eccb22 100644 --- a/lib/WebGUI/Session/Privilege.pm +++ b/lib/WebGUI/Session/Privilege.pm @@ -67,7 +67,7 @@ sub adminOnly { #------------------------------------------------------------------- -=head DESTROY ( ) +=head2 DESTROY ( ) Deconstructor. diff --git a/lib/WebGUI/Session/Scratch.pm b/lib/WebGUI/Session/Scratch.pm index 9feca8352..d6f980aeb 100644 --- a/lib/WebGUI/Session/Scratch.pm +++ b/lib/WebGUI/Session/Scratch.pm @@ -103,7 +103,7 @@ sub deleteName { #------------------------------------------------------------------- -=head DESTROY ( ) +=head2 DESTROY ( ) Deconstructor. diff --git a/lib/WebGUI/Session/Setting.pm b/lib/WebGUI/Session/Setting.pm index 8fa5526c6..536c7240c 100644 --- a/lib/WebGUI/Session/Setting.pm +++ b/lib/WebGUI/Session/Setting.pm @@ -72,7 +72,7 @@ sub add { #------------------------------------------------------------------- -=head DESTROY ( ) +=head2 DESTROY ( ) Deconstructor. diff --git a/lib/WebGUI/Session/Stow.pm b/lib/WebGUI/Session/Stow.pm index e6b52eef1..814fac512 100644 --- a/lib/WebGUI/Session/Stow.pm +++ b/lib/WebGUI/Session/Stow.pm @@ -79,7 +79,7 @@ sub deleteAll { #------------------------------------------------------------------- -=head DESTROY ( ) +=head2 DESTROY ( ) Deconstructor. diff --git a/lib/WebGUI/Session/Style.pm b/lib/WebGUI/Session/Style.pm index 9b4eb97ef..f445c9d31 100644 --- a/lib/WebGUI/Session/Style.pm +++ b/lib/WebGUI/Session/Style.pm @@ -54,7 +54,7 @@ These methods are available from this class: #------------------------------------------------------------------- -=head DESTROY ( ) +=head2 DESTROY ( ) Deconstructor. diff --git a/lib/WebGUI/Session/Url.pm b/lib/WebGUI/Session/Url.pm index 9fa128535..fc92ea1db 100644 --- a/lib/WebGUI/Session/Url.pm +++ b/lib/WebGUI/Session/Url.pm @@ -90,7 +90,7 @@ sub append { #------------------------------------------------------------------- -=head DESTROY ( ) +=head2 DESTROY ( ) Deconstructor. diff --git a/lib/WebGUI/Session/Var.pm b/lib/WebGUI/Session/Var.pm index 9a7eeca96..a9f433c8c 100644 --- a/lib/WebGUI/Session/Var.pm +++ b/lib/WebGUI/Session/Var.pm @@ -48,7 +48,7 @@ These methods are available from this package: #------------------------------------------------------------------- -=head DESTROY ( ) +=head2 DESTROY ( ) Deconstructor. diff --git a/lib/WebGUI/User.pm b/lib/WebGUI/User.pm index d2d9edf6a..366ef02ae 100644 --- a/lib/WebGUI/User.pm +++ b/lib/WebGUI/User.pm @@ -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}; -} - #------------------------------------------------------------------- diff --git a/lib/WebGUI/User/Inbox.pm b/lib/WebGUI/User/Inbox.pm deleted file mode 100644 index 6a13e5de2..000000000 --- a/lib/WebGUI/User/Inbox.pm +++ /dev/null @@ -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; - diff --git a/lib/WebGUI/User/Inbox/Message.pm b/lib/WebGUI/User/Inbox/Message.pm deleted file mode 100644 index df3cae6ca..000000000 --- a/lib/WebGUI/User/Inbox/Message.pm +++ /dev/null @@ -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; -