POD for four more files

This commit is contained in:
Colin Kuskie 2006-03-03 21:37:24 +00:00
parent 8a86fea5f0
commit 0b02edaea5
4 changed files with 187 additions and 0 deletions

View file

@ -16,6 +16,39 @@ use WebGUI::HTMLForm;
use WebGUI::International;
use WebGUI::SQL;
=head1 NAME
Package WebGUI::Operation::Replacements
=head1 DESCRIPTION
Operation handler for conditional editing of submitted WebGUI content, similar to
a search and replace function in word processors.
=head2 _submenu ( $session, $workarea, $title, $help )
Utility routine for creating the AdminConsole for DatabaseLink functions.
=head3 $session
The current WebGUI session variable.
=head3 $workarea
The content to display to the user.
=head3 $title
The title of the Admin Console. This should be an entry in the i18n
table in the WebGUI namespace.
=head3 $help
An entry in the Help system in the WebGUI namespace. This will be shown
as a link to the user.
=cut
#-------------------------------------------------------------------
sub _submenu {
my $session = shift;
@ -34,6 +67,13 @@ sub _submenu {
}
=head2 www_deleteReplacement ( $session )
Delete a replacement specified by the form variable C<replacementId> if the user is in group Admin (3). Returns the
user to the List Replacements screen, www_listReplacements.
=cut
#-------------------------------------------------------------------
sub www_deleteReplacement {
my $session = shift;
@ -42,6 +82,16 @@ sub www_deleteReplacement {
return www_listReplacements();
}
=head2 www_editReplacement ( $session )
Add a new, or edit an existing specified by the form variable
C<replacementId> if the user is in group Admin (3). Allows the user
to enter in a string to search for and the text to replace it with.
Calls www_editReplacementSave on submission.
=cut
#-------------------------------------------------------------------
sub www_editReplacement {
my $session = shift;
@ -77,6 +127,15 @@ sub www_editReplacement {
return _submenu($session,$f->print,"1052",'replacements edit');
}
=head2 www_editReplacementSave ( $session )
Form post processor for www_editReplacement. You must be in group Admin (3) to
execute this function.
Returns the user to www_listReplacements.
=cut
#-------------------------------------------------------------------
sub www_editReplacementSave {
my $session = shift;
@ -89,6 +148,13 @@ sub www_editReplacementSave {
return www_listReplacements();
}
=head2 www_listReplacements ( $session )
List all replacements if the user is in group Admin (3) and provides URls for replacements
to be added or deleted.
=cut
#-------------------------------------------------------------------
sub www_listReplacements {
my $session = shift;

View file

@ -17,6 +17,20 @@ use WebGUI::TabForm;
use WebGUI::International;
use WebGUI::SQL;
=head1 NAME
Package WebGUI::Operation::Settings
=head1 DESCRIPTION
Operation handler for sitewide settings for content, messaging, authentication, etc.
=head2 www_editSettings ( $session )
Display a form for sitewide settings, if the user is in group Admin (3).
=cut
#-------------------------------------------------------------------
sub www_editSettings {
my $session = shift;
@ -287,6 +301,13 @@ sub www_editSettings {
return $ac->render($tabform->print);
}
=head2 www_saveSettings ( $session )
Form postprocessor for www_editSettings. Returns adminOnly() unless the user
is in group Admin (3). Returns the user to the Edit Settings screen, www_editSettings.
=cut
#-------------------------------------------------------------------
sub www_saveSettings {
my $session = shift;

View file

@ -15,6 +15,20 @@ use strict;
use WebGUI::International;
use Safe;
=head1 NAME
Package WebGUI::Operation::Shared
=head1 DESCRIPTION
Shared routines for WebGUI Operations.
=head2 accountOptions ( $session )
Copies the requested database link in the form variable C<dlid> if the user
is in group Admin (3). Returns the user to the List Database Links screen.
=cut
#-------------------------------------------------------------------
sub accountOptions {
@ -66,6 +80,14 @@ use Safe;
}
=head2 secureEval ( $session, $code )
Eval $code inside of a Safe compartment to prevent sneaky attacks, mainly for use with
the Profile system, where internationalized labels are stored as perl code inside
the database.
=cut
#-------------------------------------------------------------------
# This function is here to replace the dangerous eval calls in the User Profile System.
sub secureEval {

View file

@ -16,6 +16,40 @@ use WebGUI::Cache;
use WebGUI::International;
use WebGUI::SQL;
=head1 NAME
Package WebGUI::Operation::Statistics
=head1 DESCRIPTION
Handles displaying statistics about WebGUI. This isn't page count, but rather information
about the number of assets, users, groups, etc.
=head2 _submenu ( $session, $workarea, $title, $help )
Utility routine for creating the AdminConsole for Statistics functions.
=head3 $session
The current WebGUI session variable.
=head3 $workarea
The content to display to the user.
=head3 $title
The title of the Admin Console. This should be an entry in the i18n
table in the WebGUI namespace.
=head3 $help
An entry in the Help system in the WebGUI namespace. This will be shown
as a link to the user.
=cut
#-------------------------------------------------------------------
sub _submenu {
my $session = shift;
@ -30,6 +64,50 @@ sub _submenu {
return $ac->render($workarea, $title);
}
=head2 www_viewStatistics ( $session )
Displays information to the user about WebGUI statistics if they are
in group Admin (3).
=head3 Displayed information
=over 4
=item *
Newest WebGUI version.
=item *
Current WebGUI version, if different from newest.
=item *
Number of published assets.
=item *
Number of assets set to be packages.
=item *
Number of templates
=item *
Number of sessions
=item *
Number of users.
=item *
Number of groups.
=back
=cut
#-------------------------------------------------------------------
sub www_viewStatistics {