diff --git a/lib/WebGUI/Operation/Replacements.pm b/lib/WebGUI/Operation/Replacements.pm index 268649513..c23eefb34 100644 --- a/lib/WebGUI/Operation/Replacements.pm +++ b/lib/WebGUI/Operation/Replacements.pm @@ -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 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 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; diff --git a/lib/WebGUI/Operation/Settings.pm b/lib/WebGUI/Operation/Settings.pm index e61412fab..3f7f1a983 100644 --- a/lib/WebGUI/Operation/Settings.pm +++ b/lib/WebGUI/Operation/Settings.pm @@ -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; diff --git a/lib/WebGUI/Operation/Shared.pm b/lib/WebGUI/Operation/Shared.pm index 008327636..df3824021 100644 --- a/lib/WebGUI/Operation/Shared.pm +++ b/lib/WebGUI/Operation/Shared.pm @@ -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 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 { diff --git a/lib/WebGUI/Operation/Statistics.pm b/lib/WebGUI/Operation/Statistics.pm index 596221bac..c78e74dec 100644 --- a/lib/WebGUI/Operation/Statistics.pm +++ b/lib/WebGUI/Operation/Statistics.pm @@ -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 {