@@ -, +, @@ --- installer/data/mysql/sysprefs.sql | 2 +- installer/data/mysql/updatedatabase.pl | 2 +- misc/cronjobs/longoverdue.pl | 5 +---- 3 files changed, 3 insertions(+), 6 deletions(-) --- a/installer/data/mysql/sysprefs.sql +++ a/installer/data/mysql/sysprefs.sql @@ -411,4 +411,4 @@ INSERT INTO systempreferences (variable,value,options,explanation,type) VALUES ( INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type) VALUES('IDreamBooksReviews','0','Display book review snippets from IDreamBooks.com','','YesNo'); INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type) VALUES('IDreamBooksReadometer','0','Display Readometer from IDreamBooks.com','','YesNo'); INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type) VALUES('IDreamBooksResults','0','Display IDreamBooks.com rating in search results','','YesNo'); -INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('ReturnLostItems', '1', 'If enabled, items marked as lost via the librarian intranet will be automatically returned. Note, the cronjob for marking items as lost has its own command line switch and is not affected by this system preference.','', 'YesNo'); +INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('ReturnLostItems', '1', 'If enabled, items marked as lost will be automatically returned.','', 'YesNo'); --- a/installer/data/mysql/updatedatabase.pl +++ a/installer/data/mysql/updatedatabase.pl @@ -6401,7 +6401,7 @@ if ( CheckVersion($DBversion) ) { $DBversion ="3.11.00.XXX"; if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) { - $dbh->do("INSERT INTO systempreferences (variable,value,options,explanation,type) VALUES('ReturnLostItems', '1', '','If enabled, items marked as lost via the librarian intranet will be automatically returned. Note, the cronjob for marking items as lost has its own command line switch and is not affected by this system preference.', 'YesNo')"); + $dbh->do("INSERT INTO systempreferences (variable,value,options,explanation,type) VALUES('ReturnLostItems', '1', '','If enabled, items marked as lost will be automatically returned.', 'YesNo')"); print "Upgrade to $DBversion done (Add system preference ReturnLostItems)\n"; SetVersion($DBversion); } --- a/misc/cronjobs/longoverdue.pl +++ a/misc/cronjobs/longoverdue.pl @@ -50,7 +50,6 @@ GetOptions( 'verbose' => \$verbose, 'quiet' => \$quiet, 'maxdays=s' => \$endrange, - 'mark-returned' => \$mark_returned, ); my $usage = << 'ENDUSAGE'; @@ -77,8 +76,6 @@ This script takes the following parameters : --maxdays Specifies the end of the range of overdue days to deal with (defaults to 366). This value is universal to all lost num days overdue passed. - --mark-returned When an item is marked lost, remove it from the borrowers issued items. - examples : $PERL5LIB/misc/cronjobs/longoverdue.pl --lost 30=1 Would set LOST=1 after 30 days (up to one year), but not charge the account. @@ -165,7 +162,7 @@ foreach my $startrange (sort keys %$lost) { printf ("Due %s: item %5s from borrower %5s to lost: %s\n", $row->{date_due}, $row->{itemnumber}, $row->{borrowernumber}, $lostvalue) if($verbose); if($confirm) { ModItem({ itemlost => $lostvalue }, $row->{'biblionumber'}, $row->{'itemnumber'}); - LostItem($row->{'itemnumber'}, $mark_returned, 'CHARGE FEE') if( $charge && $charge eq $lostvalue); + LostItem($row->{'itemnumber'}, C4::Context->preference("ReturnLostItems"), 'CHARGE FEE') if( $charge && $charge eq $lostvalue); } $count++; } --