merges from rel-1-2. Starting to get a little longer now. Being very
authortonnesen <tonnesen>
Thu, 20 Jun 2002 17:57:11 +0000 (17:57 +0000)
committertonnesen <tonnesen>
Thu, 20 Jun 2002 17:57:11 +0000 (17:57 +0000)
careful.

C4/Database.pm
Hints
modbibitem.pl

index 34ebeb5..da25d4a 100755 (executable)
@@ -10,7 +10,9 @@ use vars qw($VERSION @ISA @EXPORT);
 $VERSION = 0.01;
     
 @ISA = qw(Exporter);
-@EXPORT = qw(&C4Connect);
+@EXPORT = qw(
+       &C4Connect &requireDBI
+);
 
 
 sub C4Connect  {
@@ -38,7 +40,22 @@ 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 { }
diff --git a/Hints b/Hints
index e20fb3a..e697ce7 100644 (file)
--- a/Hints
+++ b/Hints
@@ -1,11 +1,14 @@
 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). 
 
 
 --------------------------------------------------------------------------------
@@ -14,7 +17,9 @@ Koha makes extensive use of Server Side Includes (SSI):
 
 
 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:
 
@@ -87,4 +92,8 @@ 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.
+
+
+
index d9555b0..e0ca8e2 100755 (executable)
@@ -29,7 +29,7 @@ print $input->header;
 #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
@@ -72,7 +72,7 @@ print <<printend
 <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">