NAME

Perlbug::Interface::Web - Web interface to perlbug database.

DESCRIPTION

Methods for web access to perlbug database via Perlbug module.

SYNOPSIS

my $o_web = Perlbug::Interface::Web->new;

print $o_web->top;

print $o_web->request('help');

print $o_web->links;

METHODS

new

Create new Perlbug::Interface::Web object.

my $web = Perlbug::Interface::Web->new;
setup

Setup Perlbug::Interface::Web

$o_web->setup($cgi);
check_user

Access authentication via http, we just prime ourselves with data from the db as well.

Return menu of system, designed for vertical format. Wraps logo, title and links

print $o_web->menus();

Return logo of system

print $o_web->logo();
get_title

Return title of current page

print $o_web->get_title();

Return links of system

print $o_web->links();
index

Display the index results here...

commands

Return command buttons applicable to current request

print $o_web->commands();
editable

Return list of acceptable requests

print "administrative requests: " . $o_web->editable;
switch

Return appropriate method call for request(else index), using internal CGI object

my $method = $o_web->switch([$req]); # set $method=($call|index)
start

Return appropriate start header data for web request.

print $o_web->start();
form

Return form with appropriate name and target etc.

print $o_web->form('menus');
top

Return consistent top of page.

print $o_web->top;
request

Handle all web requests (internal print)

$o_web->request($call);
target2file

Return appropriate dir/file.ext for given target string

my $filename = $o_base->target2file('header'); 

# -> '/home/richard/web/header.html'
finish

Return appropriate finishing html

Varies with framed, includes new hidden request field

print $o_web->finish($req);
overview

Wrapper for doo method

graph

Display pie or mixed graph for groups of bugs etc., mixed to come.

date

Wrapper for search by date access

objectids

Wrapper for object id access

$o_web->objectids($cgi);
xobjects

Wrapper for object create|display|search|template access

print $o_web->xobjects($cgi);
hist

History mechanism for bugs and users.

Move formatting to Formatter::history !!!

headers

Headers for all objects (message, note, ...) by id

$o_web->headers('patch', $id);	
bidmids

Wrapper for bugid and messageid access

administrators

List of administrators

groups

List of groups

spec

Returns specifications for the Perlbug system.

$dynamic =~ s/\</&lt;/g;
$dynamic =~ s/\>/&gt;/g;
$dynamic =~ s/\b(http\:.+?perlbug\.cgi)\b/<a href="$1">$1<\/a>/gi;
$dynamic =~ s/\b([\<\w+\-_\.\>|\&.t\;]+\@.+?\.(?:com|org|net|edu))\b/<a href="mailto:$1">$1<\/a>/gi;
webhelp

Web based help for perlbug.

print $web->webhelp;
mailhelp

Web based mail help for perlbug.

print $web->mailhelp;
delete

Wrapper for delete access

sql

Open field sql query processor

todo

To do list, may be appended to

adminfaq

adminFAQ

web_query

Form bugid search web query results

# results - don't map to query() unless Base::query modified

Construct earch form

with chosen params as defaults...
update

For all application objects

Needs to be migrated to:

my $i_ok = Perlbug::Object->new('patch')->read($pid)->update($h_newdata, [$h_reldata...]); 
foreach my $obj ($self->objects()) { # ...
	my $o_obj = $self->object($obj);
	my @ids = $cgi->param("${obj}ids");
	foreach my $oid (@ids) {
		$o_obj->read($oid)->web_update($cgi);
		foreach my $rel ($o_obj->rels) {
			# my $o_rel = $o_obj->rel($rel)->set_source($o_obj);
			# if ($self->attr('type') eq 'friendly') {
			# 
			# }
			# 
		}
		print $o_obj->format; 
	}
}
current_buttons

Get and set array of relevant buttons by context key

my @buttons = $o_web->current_buttons('search update reset', scalar(@uids), [$colspan]);
help_ref

creates something of the form: <a href="http://bugs.per.org/perlbug.cgi?req=webhelp\#item_note"Note</a>>

my $note = $self->help_ref('note');	
case

Handle case sensitivity from web search form.

format_query

Produce SQL query for bug search from cgi query.

Can be optimised somewhat ...

my $query = $web->format_query;
wildcard

Convert '*' into '%' for sqlquery

my $string = $self->wildcard('5.*');
tenify

Create range of links to split (by tens or more) bugids from web query result.

$self->tenify(\@_bids, 7); # in chunks of 7

AUTHOR

Richard Foley perlbug@rfi.net Oct 1999 2000

2 POD Errors

The following errors were encountered while parsing the POD:

Around line 962:

=pod directives shouldn't be over one line long! Ignoring all 10 lines of content

Around line 1286:

=pod directives shouldn't be over one line long! Ignoring all 12 lines of content