careful.
$VERSION = 0.01;
@ISA = qw(Exporter);
-@EXPORT = qw(&C4Connect);
+@EXPORT = qw(
+ &C4Connect &requireDBI
+);
sub C4Connect {
my $dbh=DBI->connect("DBI:mysql:$database:$hostname",$user,$pass);
return $dbh;
-}
+} # sub C4Connect
+
+#------------------
+# Helper subroutine to make sure database handle was passed properly
+sub requireDBI {
+ my (
+ $dbh,
+ $subrname, # name of calling subroutine
+ )=@_;
+
+ unless ( ref($dbh) =~ /DBI::db/ ) {
+ print "<pre>\nERROR: Subroutine $subrname called without proper DBI handle.\n" .
+ "Please contact system administrator.\n</pre>\n";
+ die "ERROR: Subroutine $subrname called without proper DBI handle.\n";
+ }
+} # sub requireDBI
END { }
Example /etc/koha.conf file entries
-
+
database=Koha
hostname=localhost
user=Koha
pass=xxxxxx
includes=/usr/local/www/koha/htdocs/includes
-Please note the final line (includes=path) - The path entry can be used as an alternative to manually editing the path in Output.pm file (see INSTALL manual).
+
+Please note the final line (includes=path) - The path entry can be
+used as an alternative to manually editing the path in Output.pm file
+(see INSTALL manual).
--------------------------------------------------------------------------------
http://httpd.apache.org/docs/mod/mod_include.html
-If your page headers and footers do not show, then you may need to re-configure your web server.
+
+If your page headers and footers do not show, then you may need to
+re-configure your web server.
Here is an example of entries suitable for Apache httpd.conf:
</VirtualHost>
-Read your web server docs for more information about how Server Side Includes work.
+Read your web server docs for more information about how Server Side
+Includes work.
+
+
+
#my ($analytictitle)=analytic($biblionumber,'t');
#my ($analyticauthor)=analytic($biblionumber,'a');
print startpage();
-print startmenu();
+print startmenu('catalogue');
my %inputs;
#hash is set up with input name being the key then
<BLOCKQUOTE><FONT SIZE=6>
<em><a href=/cgi-bin/koha/detail.pl?bib=$data->{'biblionumber'}&type=intra>$data->{'title'} ($data->{'author'})</a><br>
Modify Group - $data->{'description'}</em></FONT><br>
-<form action="updatebibitem.pl" method="post">
+<form action="updatebibitem.pl" method=post>
<table border=0 cellspacing=0 cellpadding=5 align=left>
<TR VALIGN=TOP bgcolor="99cc33">