[LON-CAPA-cvs] cvs: loncom / lonsql
matthew
lon-capa-cvs@mail.lon-capa.org
Mon, 03 May 2004 16:20:57 -0000
matthew Mon May 3 12:20:57 2004 EDT
Modified files:
/loncom lonsql
Log:
Removed out of date POD. Report database errors using $sth->errstr() when
there is an error, instead of using $@.
Index: loncom/lonsql
diff -u loncom/lonsql:1.57 loncom/lonsql:1.58
--- loncom/lonsql:1.57 Wed Jul 30 12:49:27 2003
+++ loncom/lonsql Mon May 3 12:20:57 2004
@@ -3,7 +3,7 @@
# The LearningOnline Network
# lonsql - LON TCP-MySQL-Server Daemon for handling database requests.
#
-# $Id: lonsql,v 1.57 2003/07/30 16:49:27 www Exp $
+# $Id: lonsql,v 1.58 2004/05/03 16:20:57 matthew Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -41,42 +41,6 @@
=head1 OVERVIEW
-The SQL database in LON-CAPA is used for catalog searches against
-resource metadata only. The authoritative version of the resource
-metadata is an XML-file on the normal file system (same file name as
-resource plus ".meta"). The SQL-database is a cache of these files,
-and can be reconstructed from the XML files at any time.
-
-The current database is implemented assuming a non-adjustable
-architecture involving these data fields (specific to each version of
-a resource).
-
-=over 4
-
-=item * title
-
-=item * author
-
-=item * subject
-
-=item * notes
-
-=item * abstract
-
-=item * mime
-
-=item * language
-
-=item * creationdate
-
-=item * lastrevisiondate
-
-=item * owner
-
-=item * copyright
-
-=back
-
=head2 Purpose within LON-CAPA
LON-CAPA is meant to distribute A LOT of educational content to A LOT
@@ -139,6 +103,7 @@
use lib '/home/httpd/lib/perl/';
use LONCAPA::Configuration;
+use LONCAPA::lonmetadata();
use IO::Socket;
use Symbol;
@@ -511,8 +476,9 @@
#prepare and execute the query
my $sth = $dbh->prepare($query);
unless ($sth->execute()) {
- &logthis("<font color=blue>WARNING: ".
- "Could not retrieve from database: $@</font>");
+ &logthis('<font color=blue>'.
+ 'WARNING: Could not retrieve from database:'.
+ $sth->errstr().'</font>');
} else {
my $aref=$sth->fetchall_arrayref;
foreach my $row (@$aref) {
@@ -970,17 +936,6 @@
exit;
}
-
-
-
-
-
-
-
-
-
-
-# ----------------------------------- POD (plain old documentation, CPAN style)
=pod