koha-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Koha-cvs] koha opac/opac-suggestions.pl updater/updatedat... [rel_2_2]


From: Joshua Ferraro
Subject: [Koha-cvs] koha opac/opac-suggestions.pl updater/updatedat... [rel_2_2]
Date: Sat, 04 Mar 2006 06:05:14 +0000

CVSROOT:        /sources/koha
Module name:    koha
Branch:         rel_2_2
Changes by:     Joshua Ferraro <address@hidden> 06/03/04 06:05:13

Modified files:
        opac           : opac-suggestions.pl 
        updater        : updatedatabase 

Log message:
        New syspref: AnonSuggestions to allow an anonymous patron to make a
        suggestion (requested by NPL). To enable, set to the borrowernumber
        of the anonymous patron (must be created).

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/koha/opac/opac-suggestions.pl.diff?only_with_tag=rel_2_2&tr1=1.3.2.4&tr2=1.3.2.5&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/koha/koha/updater/updatedatabase.diff?only_with_tag=rel_2_2&tr1=1.100.2.32&tr2=1.100.2.33&r1=text&r2=text

Patches:
Index: koha/opac/opac-suggestions.pl
diff -u koha/opac/opac-suggestions.pl:1.3.2.4 
koha/opac/opac-suggestions.pl:1.3.2.5
--- koha/opac/opac-suggestions.pl:1.3.2.4       Wed Mar  1 22:33:25 2006
+++ koha/opac/opac-suggestions.pl       Sat Mar  4 06:05:13 2006
@@ -23,14 +23,32 @@
 my $op = $input->param('op');
 $op = 'else' unless $op;
 
+my ($template, $borrowernumber, $cookie);
+
 my $dbh = C4::Context->dbh;
-my ($template, $borrowernumber, $cookie)
+
+if (C4::Context->preference("AnonSuggestions")) {
+
+($template, $borrowernumber, $cookie)
     = get_template_and_user({template_name => "opac-suggestions.tmpl",
-                            type => "opac",
-                            query => $input,
-                            authnotrequired => 1,
-                            flagsrequired => {borrow => 1},
+                                        query => $input,
+                                        type => "opac",
+                                        authnotrequired => 1,
+                         });
+if (!$borrowernumber) {
+       $borrowernumber = C4::Context->preference("AnonSuggestions");
+}
+
+} else {
+
+($template, $borrowernumber, $cookie)
+    = get_template_and_user({template_name => "opac-suggestions.tmpl",
+                                       query => $input,
+                                        type => "opac",
+                                        authnotrequired => 1,
                         });
+}
+
 if ($op eq "add_confirm") {
        
&newsuggestion($borrowernumber,$title,$author,$publishercode,$note,$copyrightdate,$volumedesc,$publicationyear,$place,$isbn,'');
        # empty fields, to avoid filter in "searchsuggestion"
Index: koha/updater/updatedatabase
diff -u koha/updater/updatedatabase:1.100.2.32 
koha/updater/updatedatabase:1.100.2.33
--- koha/updater/updatedatabase:1.100.2.32      Fri Mar  3 16:20:23 2006
+++ koha/updater/updatedatabase Sat Mar  4 06:05:13 2006
@@ -1,6 +1,6 @@
 #!/usr/bin/perl
 
-# $Id: updatedatabase,v 1.100.2.32 2006/03/03 16:20:23 kados Exp $
+# $Id: updatedatabase,v 1.100.2.33 2006/03/04 06:05:13 kados Exp $
 
 # Database Updater
 # This script checks for required updates to the database.
@@ -1046,6 +1046,16 @@
             explanation         => 'Use HTML tabs to add navigational links to 
the left-hand navigational bar in Intranet',
             type                => 'free',
         },
+       
+        {                                                                      
 
+            uniquefieldrequired => 'variable',
+            variable            => 'AnonSuggestions',
+            value               => '0',
+            forceupdate         => { 'explanation' => 1,                       
                                      '
+                                        type' => 1},
+            explanation         => 'Set to anonymous borrowernumber to enable 
Anonymous suggestions',
+            type                => 'free',
+        },                           
         {                                                                      
             
            uniquefieldrequired => 'variable',
             variable            => 'AmazonContent',
@@ -1718,6 +1728,11 @@
 exit;
 
 # $Log: updatedatabase,v $
+# Revision 1.100.2.33  2006/03/04 06:05:13  kados
+# New syspref: AnonSuggestions to allow an anonymous patron to make a
+# suggestion (requested by NPL). To enable, set to the borrowernumber
+# of the anonymous patron (must be created).
+#
 # Revision 1.100.2.32  2006/03/03 16:20:23  kados
 # hopefully fixes truncated amazon.com links in syspref
 # ----------------------------------------------------------------------




reply via email to

[Prev in Thread] Current Thread [Next in Thread]