koha-cvs
[Top][All Lists]
Advanced

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

[Koha-cvs] CVS: koha/admin systempreferences.pl,1.6,1.7


From: Andrew Arensburger
Subject: [Koha-cvs] CVS: koha/admin systempreferences.pl,1.6,1.7
Date: Sat, 05 Oct 2002 03:03:35 -0700

Update of /cvsroot/koha/koha/admin
In directory usw-pr-cvs1:/tmp/cvs-serv27112/admin

Modified Files:
        systempreferences.pl 
Log Message:
Merged with arensb-context branch: use C4::Context->dbh instead of
&C4Connect, and generally prefer C4::Context over C4::Database.


Index: systempreferences.pl
===================================================================
RCS file: /cvsroot/koha/koha/admin/systempreferences.pl,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -r1.6 -r1.7
*** systempreferences.pl        22 Aug 2002 03:06:33 -0000      1.6
--- systempreferences.pl        5 Oct 2002 10:03:32 -0000       1.7
***************
*** 39,50 ****
  
  use strict;
- use C4::Output;
  use CGI;
  use C4::Search;
- use C4::Database;
  
  sub StringSearch  {
        my ($env,$searchstring,$type)address@hidden;
!       my $dbh = &C4Connect;
        $searchstring=~ s/\'/\\\'/g;
        my @data=split(' ',$searchstring);
--- 39,50 ----
  
  use strict;
  use CGI;
+ use C4::Context;
+ use C4::Output;
  use C4::Search;
  
  sub StringSearch  {
        my ($env,$searchstring,$type)address@hidden;
!       my $dbh = C4::Context->dbh;
        $searchstring=~ s/\'/\\\'/g;
        my @data=split(' ',$searchstring);
***************
*** 61,65 ****
        #  $sth->execute;
        $sth->finish;
-       $dbh->disconnect;
        return ($cnt,address@hidden);
  }
--- 61,64 ----
***************
*** 88,92 ****
        my $data;
        if ($searchfield) {
!               my $dbh = &C4Connect;
                my $sth=$dbh->prepare("select variable,value,explanation from 
systempreferences where variable='$searchfield'");
                $sth->execute;
--- 87,91 ----
        my $data;
        if ($searchfield) {
!               my $dbh = C4::Context->dbh;
                my $sth=$dbh->prepare("select variable,value,explanation from 
systempreferences where variable='$searchfield'");
                $sth->execute;
***************
*** 173,177 ****
  # called by add_form, used to insert/modify data in DB
  } elsif ($op eq 'add_validate') {
!       my $dbh=C4Connect;
        my $query = "replace systempreferences (variable,value,explanation) 
values (";
        $query.= $dbh->quote($input->param('variable')).",";
--- 172,176 ----
  # called by add_form, used to insert/modify data in DB
  } elsif ($op eq 'add_validate') {
!       my $dbh = C4::Context->dbh;
        my $query = "replace systempreferences (variable,value,explanation) 
values (";
        $query.= $dbh->quote($input->param('variable')).",";
***************
*** 189,193 ****
  # called by default form, used to confirm deletion of data in DB
  } elsif ($op eq 'delete_confirm') {
!       my $dbh = &C4Connect;
        my $sth=$dbh->prepare($reqsel);
        $sth->execute;
--- 188,192 ----
  # called by default form, used to confirm deletion of data in DB
  } elsif ($op eq 'delete_confirm') {
!       my $dbh = C4::Context->dbh;
        my $sth=$dbh->prepare($reqsel);
        $sth->execute;
***************
*** 204,208 ****
  # called by delete_confirm, used to effectively confirm deletion of data in DB
  } elsif ($op eq 'delete_confirmed') {
!       my $dbh=C4Connect;
  #     my $searchfield=$input->param('branchcode');
        my $sth=$dbh->prepare($reqdel);
--- 203,207 ----
  # called by delete_confirm, used to effectively confirm deletion of data in DB
  } elsif ($op eq 'delete_confirmed') {
!       my $dbh = C4::Context->dbh;
  #     my $searchfield=$input->param('branchcode');
        my $sth=$dbh->prepare($reqdel);




reply via email to

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