Saturday, April 18, 2009

Notes on Koha structure

Make sure that get_user_and_template is the first call and no actions are required before it. It is a security risk if any calls are made before that line because the user could run it directly if they know the url without authentication.

#!/usr/bin/perl
use C4::something;
use C4::something else;
user C4::Output;

(_) = get_template_and_user (..)

my $query (or my $input) = new CGI; //allows you to grab params

my $biblionumber = $query->param('biblionumber');

sub functions should follow the naming convention, GetSomethingAndSomething

Get
New
Mod
Del

$op = 'mod(get/new/del)' // often used means operation
output_html_with_http_headers; (nothing executed after)

No comments:

Post a Comment