um, add enough POD to by syntactically correct

This commit is contained in:
Colin Kuskie 2008-02-09 22:52:31 +00:00
parent abdf04659a
commit a21e710c72
5 changed files with 54 additions and 2 deletions

View file

@ -42,6 +42,31 @@ sub canView {
return $user->isInGroup( $session->setting->get("groupIdAdminSpectre") );
}
#----------------------------------------------------------------------------
=head2 getASpectre ( [$session] )
Get a connection to spectre. Encapsulated here so outside code can call
something that's carefully encapsulated.
=head3 $session
A WebGUI session variable so getASpectre can access information in
the config file.
=cut
sub getASpectre {
my $session = shift;
my $remote = create_ikc_client(
port=>$session->config->get("spectrePort"),
ip=>$session->config->get("spectreIp"),
name=>rand(100000),
timeout=>10
);
return $remote;
}
#-------------------------------------------------------------------
=head2 www_spectreGetSiteData ( )

View file

@ -21,6 +21,7 @@ use WebGUI::International;
use WebGUI::VersionTag;
use WebGUI::HTMLForm;
use WebGUI::Paginator;
use WebGUI::Operation::Spectre;
=head1 NAME
@ -206,7 +207,18 @@ sub www_commitVersionTag {
if ($tagId) {
my $tag = WebGUI::VersionTag->new($session, $tagId);
if (defined $tag && $session->user->isInGroup($tag->get("groupToUse"))) {
my $remote = WebGUI::Operation::Spectre::getASpectre($session);
my $i18n = WebGUI::International->new($session, "VersionTag");
if (!defined $remote) {
$session->errorHandler->warn('Unable to connect to spectre. Canceling the commit');
my $output = sprintf qq{<h1>%s</h1>\n<p>%s</p><p><a href="%s">%s</a>},
$i18n->get('broken spectre title', 'WebGUI'),
$i18n->get('broken spectre body', 'WebGUI'),
$session->url->getBackToSiteURL(),
$i18n->get('493', 'WebGUI');
return $session->style->userStyle($output);
}
$remote->disconnect;
my $f = WebGUI::HTMLForm->new($session);
$f->submit;
$f->readOnly(
@ -228,7 +240,7 @@ sub www_commitVersionTag {
hoverHelp=>$i18n->get("comments description commit")
);
$f->submit;
my $ac = WebGUI::AdminConsole->new($session,"versions");
my $ac = WebGUI::AdminConsole->new($session,"versions");
return $ac->render($f->print);
}
}