Michael,

On Tuesday 15 April 2003 12:41, Michael Bell wrote:
> Chris Covell wrote:
> > PS there seem to be quite a few changes in the misc-utils.lib will they
> > affect anything else ?
>
> I have found only some minimal changes between head and openca_0_9_1
> branch. Which changes do you have on your installation (diff -u)?
>


here is the output of diff -u.

Chris...
--- misc-utils.lib	Tue Apr 15 12:35:26 2003
+++ misc-utils.lib.old	Fri Apr 11 15:31:14 2003
@@ -1,5 +1,3 @@
-
-
 ## Misc Utilities.
 
 ## only for testing the library
@@ -147,7 +145,7 @@
 		$cnf = $config;
 	}
 
-	if( not defined ($tmp = $cnf->getParam($name)) ) {
+	if( ($tmp = $cnf->getParam($name)) == undef ) {
 		
 		## If there is an Error, just send the missing
 		## parameter error to the browser
@@ -300,7 +298,7 @@
                 ##// the link/unlink doesn't work with multiple
                 ## cross devices.
 
-                my $ret = $tools->getFile( $origFile );
+                my $ret = $query->getFile( $origFile );
                 open( FD, ">$destFile" ) or print "ERROR: $?<BR>";
                         print FD "$ret";
                 close(FD);
@@ -353,26 +351,8 @@
 sub libDBGetLastItem {
 
 	my $datatype = $_[0];
-	my $result;
 
-	if ($datatype =~ /^REQUEST$/i and getRequired ("DBmodule") !~ /DBI/i)
-	{
-		$result = $db->getPrevItem (DATATYPE => "PENDING_REQUEST");
-		my $result_2 = $db->getPrevItem (DATATYPE => "APPROVED_REQUEST");
-		my $result_3 = $db->getPrevItem (DATATYPE => "ARCHIVED_REQUEST");
-		my $result_4 = $db->getPrevItem (DATATYPE => "DELETED_REQUEST");
-		$result = $result_2
-			if (not $result or
-			    ($result_2 and $result_2->getSerial() > $result->getSerial()));
-		$result = $result_3
-			if (not $result or
-			    ($result_3 and $result_3->getSerial() > $result->getSerial()));
-		$result = $result_4
-			if (not $result or
-			    ($result_4 and $result_4->getSerial() > $result->getSerial()));
-	} else {
-		$result = $db->getPrevItem (DATATYPE => $datatype);
-	}
+	my $result = $db->getPrevItem (DATATYPE => $datatype);
 	if (not $result and $db->errno())
 	{
 		generalError (i18nGettext ("Database failed with errorcode __ERRNO__.",
@@ -445,5 +425,3 @@
 }
 
 1;
-
-

Reply via email to