diff --git a/C4/Auth.pm b/C4/Auth.pm
index 39fa33c588..c4baf09915 100644
--- a/C4/Auth.pm
+++ b/C4/Auth.pm
@@ -26,7 +26,6 @@ use Digest::MD5 qw(md5_base64);
require Exporter;
use C4::Context;
use C4::Output; # to get the template
-use C4::Interface::CGI::Output;
use C4::Members;
use C4::Koha;
use C4::Branch; # GetBranches
diff --git a/C4/Output.pm b/C4/Output.pm
index 089521a972..b9279e161b 100644
--- a/C4/Output.pm
+++ b/C4/Output.pm
@@ -48,10 +48,18 @@ C4::Output - Functions for managing templates
=cut
@ISA = qw(Exporter);
-@EXPORT = qw(
+push @EXPORT, qw(
&themelanguage &gettemplate setlanguagecookie pagination_bar
);
+#Output
+push @EXPORT, qw(
+ &guesscharset
+ &guesstype
+ &output_html_with_http_headers
+ );
+
+
#FIXME: this is a quick fix to stop rc1 installing broken
#Still trying to figure out the correct fix.
my $path = C4::Context->config('intrahtdocs') . "/default/en/includes/";
@@ -307,6 +315,60 @@ sub pagination_bar {
return $pagination_bar;
}
+
+=item guesscharset
+
+ &guesscharset($output)
+
+"Guesses" the charset from the some HTML that would be output.
+
+C<$output> is the HTML page to be output. If it contains a META tag
+with a Content-Type, the tag will be scanned for a language code.
+This code is returned if it is found; undef is returned otherwise.
+
+This function only does sloppy guessing; it will be confused by
+unexpected things like SGML comments. What it basically does is to
+grab something that looks like a META tag and scan it.
+
+=cut
+
+sub guesscharset ($) {
+ my($html) = @_;
+ my $charset = undef;
+ local($`, $&, $', $1, $2, $3);
+ # FIXME... These regular expressions will miss a lot of valid tags!
+ if ($html =~ //is) {
+ $charset = $3;
+ } elsif ($html =~ //is) {
+ $charset = $2;
+ }
+ return $charset;
+} # guess
+
+sub guesstype ($) {
+ my($html) = @_;
+ my $charset = guesscharset($html);
+ return defined $charset? "text/html; charset=$charset": "text/html";
+}
+
+=item output_html_with_http_headers
+
+ &output_html_with_http_headers($query, $cookie, $html)
+
+Outputs the HTML page $html with the appropriate HTTP headers,
+with the authentication cookie $cookie and a Content-Type that
+corresponds to the HTML page $html.
+
+=cut
+
+sub output_html_with_http_headers ($$$) {
+ my($query, $cookie, $html) = @_;
+ print $query->header(
+ -type => guesstype($html),
+ -cookie => $cookie,
+ ), $html;
+}
+
END { } # module clean-up code here (global destructor)
1;
diff --git a/about.pl b/about.pl
index ffe16ce5a4..6e411c0d55 100755
--- a/about.pl
+++ b/about.pl
@@ -20,7 +20,6 @@ use strict;
require Exporter;
use C4::Output; # contains gettemplate
-use C4::Interface::CGI::Output;
use C4::Auth;
use C4::Context;
use CGI;
diff --git a/acqui/acqui-home.pl b/acqui/acqui-home.pl
index 030dd62169..2d521aab18 100755
--- a/acqui/acqui-home.pl
+++ b/acqui/acqui-home.pl
@@ -44,7 +44,6 @@ use strict;
use CGI;
use C4::Auth;
use C4::Output;
-use C4::Interface::CGI::Output;
use C4::Suggestions;
diff --git a/acqui/addorder.pl b/acqui/addorder.pl
index 4919df7b74..c90719ea7c 100755
--- a/acqui/addorder.pl
+++ b/acqui/addorder.pl
@@ -115,12 +115,10 @@ if it is an order from an existing suggestion : the id of this suggestion.
use strict;
use CGI;
use C4::Auth;
-use C4::Output;
use C4::Acquisition;
use C4::Suggestions;
use C4::Biblio;
use C4::Output;
-use C4::Interface::CGI::Output;
diff --git a/acqui/basket.pl b/acqui/basket.pl
index 8536dec530..a94422b913 100755
--- a/acqui/basket.pl
+++ b/acqui/basket.pl
@@ -27,7 +27,6 @@ use C4::Auth;
use C4::Koha;
use C4::Output;
use CGI;
-use C4::Interface::CGI::Output;
use C4::Acquisition;
diff --git a/acqui/bookfund.pl b/acqui/bookfund.pl
index c417a1cafe..76e14fe7b7 100755
--- a/acqui/bookfund.pl
+++ b/acqui/bookfund.pl
@@ -21,7 +21,7 @@ use C4::Context;
use strict;
use CGI;
use C4::Auth;
-use C4::Interface::CGI::Output;
+use C4::Output;
my $dbh = C4::Context->dbh;
my $input = new CGI;
diff --git a/acqui/booksellers.pl b/acqui/booksellers.pl
index 0fb0b48e96..178a74931c 100755
--- a/acqui/booksellers.pl
+++ b/acqui/booksellers.pl
@@ -58,7 +58,6 @@ use C4::Auth;
use C4::Biblio;
use C4::Output;
use CGI;
-use C4::Interface::CGI::Output;
use C4::Acquisition;
diff --git a/acqui/histsearch.pl b/acqui/histsearch.pl
index 89bed6bbc0..6613415481 100755
--- a/acqui/histsearch.pl
+++ b/acqui/histsearch.pl
@@ -52,7 +52,7 @@ use strict;
require Exporter;
use CGI;
use C4::Auth; # get_template_and_user
-use C4::Interface::CGI::Output;
+use C4::Output;
use C4::Acquisition;
my $input = new CGI;
diff --git a/acqui/lateorders.pl b/acqui/lateorders.pl
index 5956d23b62..d78a959725 100755
--- a/acqui/lateorders.pl
+++ b/acqui/lateorders.pl
@@ -49,7 +49,6 @@ use C4::Bookseller;
use C4::Auth;
use C4::Koha;
use C4::Output;
-use C4::Interface::CGI::Output;
use C4::Context;
use C4::Acquisition;
use C4::Letters;
diff --git a/acqui/neworderbiblio.pl b/acqui/neworderbiblio.pl
index 0e56c7c472..b5cabfddb6 100755
--- a/acqui/neworderbiblio.pl
+++ b/acqui/neworderbiblio.pl
@@ -57,12 +57,11 @@ the basket number to know on which basket this script have to add a new order.
use strict;
use C4::Search;
use CGI;
-use C4::Output;
use C4::Bookseller;
use C4::Biblio;
use C4::Auth;
-use C4::Interface::CGI::Output;
+use C4::Output;
use C4::Koha;
my $input = new CGI;
diff --git a/acqui/neworderempty.pl b/acqui/neworderempty.pl
index 09c2f4f3ae..7ebb053180 100755
--- a/acqui/neworderempty.pl
+++ b/acqui/neworderempty.pl
@@ -76,7 +76,6 @@ use C4::Biblio;
use C4::Output;
use C4::Input;
use C4::Koha;
-use C4::Interface::CGI::Output;
use C4::Branch; # GetBranches
use C4::Members;
diff --git a/acqui/newordersuggestion.pl b/acqui/newordersuggestion.pl
index bc424465c1..5f637c15a3 100755
--- a/acqui/newordersuggestion.pl
+++ b/acqui/newordersuggestion.pl
@@ -91,7 +91,7 @@ use strict;
require Exporter;
use CGI;
use C4::Auth; # get_template_and_user
-use C4::Interface::CGI::Output;
+use C4::Output;
use C4::Suggestions;
use C4::Biblio;
diff --git a/acqui/orderreceive.pl b/acqui/orderreceive.pl
index 36c4d0310c..5836227aa1 100644
--- a/acqui/orderreceive.pl
+++ b/acqui/orderreceive.pl
@@ -63,7 +63,7 @@ use C4::Context;
use C4::Koha; # GetKohaAuthorisedValues GetItemTypes
use C4::Acquisition;
use C4::Auth;
-use C4::Interface::CGI::Output;
+use C4::Output;
use C4::Date;
use C4::Bookseller;
use C4::Members;
diff --git a/acqui/parcel.pl b/acqui/parcel.pl
index 0cba2f8aa7..ca03a2c85a 100644
--- a/acqui/parcel.pl
+++ b/acqui/parcel.pl
@@ -59,9 +59,8 @@ use C4::Auth;
use C4::Acquisition;
use C4::Bookseller;
use C4::Biblio;
-use C4::Output;
use CGI;
-use C4::Interface::CGI::Output;
+use C4::Output;
use C4::Date;
use strict;
diff --git a/acqui/parcels.pl b/acqui/parcels.pl
index 6803a6db45..8f35a2b714 100644
--- a/acqui/parcels.pl
+++ b/acqui/parcels.pl
@@ -65,7 +65,6 @@ use strict;
use CGI;
use C4::Auth;
use C4::Output;
-use C4::Interface::CGI::Output;
use C4::Date;
diff --git a/acqui/spent.pl b/acqui/spent.pl
index f4231e268a..f73537bad5 100755
--- a/acqui/spent.pl
+++ b/acqui/spent.pl
@@ -6,7 +6,7 @@
use C4::Context;
use C4::Auth;
-use C4::Interface::CGI::Output;
+use C4::Output;
use strict;
use CGI;
diff --git a/acqui/supplier.pl b/acqui/supplier.pl
index 43dff175c4..1a8be5b4f5 100755
--- a/acqui/supplier.pl
+++ b/acqui/supplier.pl
@@ -47,7 +47,6 @@ use C4::Acquisition;
use C4::Biblio;
use C4::Output;
use CGI;
-use C4::Interface::CGI::Output;
use C4::Bookseller;
diff --git a/admin/admin-home.pl b/admin/admin-home.pl
index 3205978749..5a6b8fccea 100755
--- a/admin/admin-home.pl
+++ b/admin/admin-home.pl
@@ -19,7 +19,6 @@ use strict;
use CGI;
use C4::Auth;
use C4::Output;
-use C4::Interface::CGI::Output;
diff --git a/admin/aqbookfund.pl b/admin/aqbookfund.pl
index b78325efdd..778bf11856 100755
--- a/admin/aqbookfund.pl
+++ b/admin/aqbookfund.pl
@@ -59,7 +59,6 @@ use C4::Koha;
use C4::Context;
use C4::Bookfund;
use C4::Output;
-use C4::Interface::CGI::Output;
use C4::Date;
my $dbh = C4::Context->dbh;
diff --git a/admin/aqbudget.pl b/admin/aqbudget.pl
index e5642ce230..3a6c2f665c 100755
--- a/admin/aqbudget.pl
+++ b/admin/aqbudget.pl
@@ -47,7 +47,6 @@ use C4::Auth;
use C4::Acquisition;
use C4::Context;
use C4::Output;
-use C4::Interface::CGI::Output;
use C4::Koha;
my $input = new CGI;
diff --git a/admin/auth_subfields_structure.pl b/admin/auth_subfields_structure.pl
index 44fce405ad..6e465b64f6 100755
--- a/admin/auth_subfields_structure.pl
+++ b/admin/auth_subfields_structure.pl
@@ -20,7 +20,6 @@
use strict;
use C4::Output;
-use C4::Interface::CGI::Output;
use C4::Auth;
use CGI;
use C4::Context;
diff --git a/admin/auth_tag_structure.pl b/admin/auth_tag_structure.pl
index 9458891a86..b7f5ba878a 100755
--- a/admin/auth_tag_structure.pl
+++ b/admin/auth_tag_structure.pl
@@ -24,7 +24,6 @@ use C4::Auth;
use C4::Koha;
use C4::Context;
use C4::Output;
-use C4::Interface::CGI::Output;
use C4::Context;
diff --git a/admin/authorised_values.pl b/admin/authorised_values.pl
index 244025decf..1c2f03e9b9 100755
--- a/admin/authorised_values.pl
+++ b/admin/authorised_values.pl
@@ -22,7 +22,6 @@ use CGI;
use C4::Auth;
use C4::Context;
use C4::Output;
-use C4::Interface::CGI::Output;
use C4::Context;
diff --git a/admin/authtypes.pl b/admin/authtypes.pl
index ffa4e7411b..141313b4ca 100755
--- a/admin/authtypes.pl
+++ b/admin/authtypes.pl
@@ -24,9 +24,8 @@
use strict;
use CGI;
use C4::Context;
-use C4::Output;
use C4::Auth;
-use C4::Interface::CGI::Output;
+use C4::Output;
sub StringSearch {
diff --git a/admin/biblio_framework.pl b/admin/biblio_framework.pl
index d6b4c9a3ba..97d364b18b 100755
--- a/admin/biblio_framework.pl
+++ b/admin/biblio_framework.pl
@@ -24,9 +24,8 @@
use strict;
use CGI;
use C4::Context;
-use C4::Output;
use C4::Auth;
-use C4::Interface::CGI::Output;
+use C4::Output;
sub StringSearch {
diff --git a/admin/branches.pl b/admin/branches.pl
index 3440a7f029..3217c34df4 100755
--- a/admin/branches.pl
+++ b/admin/branches.pl
@@ -48,7 +48,6 @@ use CGI;
use C4::Auth;
use C4::Context;
use C4::Output;
-use C4::Interface::CGI::Output;
use C4::Koha;
use C4::Branch;
diff --git a/admin/categorie.pl b/admin/categorie.pl
index 16a767fe6c..b6f4a022c8 100755
--- a/admin/categorie.pl
+++ b/admin/categorie.pl
@@ -39,10 +39,8 @@
use strict;
use CGI;
use C4::Context;
-use C4::Output;
-
use C4::Auth;
-use C4::Interface::CGI::Output;
+use C4::Output;
sub StringSearch {
my ($searchstring,$type)=@_;
diff --git a/admin/categoryitem.pl b/admin/categoryitem.pl
index e3ef25b4c8..e2a8b83c19 100644
--- a/admin/categoryitem.pl
+++ b/admin/categoryitem.pl
@@ -40,10 +40,8 @@
use strict;
use CGI;
use C4::Context;
-use C4::Output;
-
use C4::Auth;
-use C4::Interface::CGI::Output;
+use C4::Output;
sub StringSearch {
my ($searchstring,$type)=@_;
diff --git a/admin/checkmarc.pl b/admin/checkmarc.pl
index 85864cb450..2405c70b86 100755
--- a/admin/checkmarc.pl
+++ b/admin/checkmarc.pl
@@ -20,7 +20,6 @@
use strict;
use C4::Output;
-use C4::Interface::CGI::Output;
use C4::Auth;
use CGI;
use C4::Context;
diff --git a/admin/cities.pl b/admin/cities.pl
index 040e190278..ffda794cee 100755
--- a/admin/cities.pl
+++ b/admin/cities.pl
@@ -20,10 +20,8 @@
use strict;
use CGI;
use C4::Context;
-use C4::Output;
-
use C4::Auth;
-use C4::Interface::CGI::Output;
+use C4::Output;
sub StringSearch {
my ($searchstring,$type)=@_;
diff --git a/admin/currency.pl b/admin/currency.pl
index a759315124..75bd964475 100755
--- a/admin/currency.pl
+++ b/admin/currency.pl
@@ -40,10 +40,8 @@
use strict;
use CGI;
use C4::Context;
-use C4::Output;
-
use C4::Auth;
-use C4::Interface::CGI::Output;
+use C4::Output;
sub StringSearch {
my ($searchstring,$type)=@_;
diff --git a/admin/finesrules.pl b/admin/finesrules.pl
index 8a7c3a24dd..fbeb7e1aa6 100755
--- a/admin/finesrules.pl
+++ b/admin/finesrules.pl
@@ -20,12 +20,10 @@
use strict;
use CGI;
use C4::Context;
-use C4::Output;
-
use C4::Auth;
use C4::Output;
+
use C4::Koha;
-use C4::Interface::CGI::Output;
use C4::Branch; # GetBranches
my $input = new CGI;
diff --git a/admin/issuingrules.pl b/admin/issuingrules.pl
index 89dd8d2eec..e58b51ff9e 100755
--- a/admin/issuingrules.pl
+++ b/admin/issuingrules.pl
@@ -21,11 +21,8 @@ use strict;
use CGI;
use C4::Context;
use C4::Output;
-
use C4::Auth;
-use C4::Output;
use C4::Koha;
-use C4::Interface::CGI::Output;
use C4::Branch; # GetBranches
my $input = new CGI;
diff --git a/admin/itemtypecategory.pl b/admin/itemtypecategory.pl
index 6fc3afae9e..6f8b41ed53 100644
--- a/admin/itemtypecategory.pl
+++ b/admin/itemtypecategory.pl
@@ -42,9 +42,8 @@
use strict;
use CGI;
use C4::Context;
-use C4::Output;
use C4::Auth;
-use C4::Interface::CGI::Output;
+use C4::Output;
sub StringSearch {
diff --git a/admin/itemtypes.pl b/admin/itemtypes.pl
index c3a882bb2f..c81a766379 100755
--- a/admin/itemtypes.pl
+++ b/admin/itemtypes.pl
@@ -45,9 +45,8 @@ use List::Util qw/min/;
use C4::Koha;
use C4::Context;
-use C4::Output;
use C4::Auth;
-use C4::Interface::CGI::Output;
+use C4::Output;
sub StringSearch {
my ($searchstring,$type)=@_;
diff --git a/admin/itemtypesubcategory.pl b/admin/itemtypesubcategory.pl
index b9fc6b1795..bb78d715da 100644
--- a/admin/itemtypesubcategory.pl
+++ b/admin/itemtypesubcategory.pl
@@ -42,9 +42,8 @@
use strict;
use CGI;
use C4::Context;
-use C4::Output;
use C4::Auth;
-use C4::Interface::CGI::Output;
+use C4::Output;
sub StringSearch {
diff --git a/admin/koha2marclinks.pl b/admin/koha2marclinks.pl
index 6c69042927..3a0ee1166e 100755
--- a/admin/koha2marclinks.pl
+++ b/admin/koha2marclinks.pl
@@ -19,7 +19,6 @@
use strict;
use C4::Output;
-use C4::Interface::CGI::Output;
use C4::Auth;
use CGI;
use C4::Context;
diff --git a/admin/letter.pl b/admin/letter.pl
index 7198ca9563..ff522cd7ed 100755
--- a/admin/letter.pl
+++ b/admin/letter.pl
@@ -43,7 +43,6 @@ use C4::Date;
use C4::Auth;
use C4::Context;
use C4::Output;
-use C4::Interface::CGI::Output;
sub StringSearch {
diff --git a/admin/marc_subfields_structure.pl b/admin/marc_subfields_structure.pl
index 22e887c3f5..42f9a9ec07 100755
--- a/admin/marc_subfields_structure.pl
+++ b/admin/marc_subfields_structure.pl
@@ -19,7 +19,6 @@
use strict;
use C4::Output;
-use C4::Interface::CGI::Output;
use C4::Auth;
use CGI;
use C4::Context;
diff --git a/admin/marctagstructure.pl b/admin/marctagstructure.pl
index 94fafd0155..99edb1cc6a 100755
--- a/admin/marctagstructure.pl
+++ b/admin/marctagstructure.pl
@@ -24,7 +24,6 @@ use C4::Auth;
use C4::Koha;
use C4::Context;
use C4::Output;
-use C4::Interface::CGI::Output;
use C4::Context;
diff --git a/admin/mediatype.pl b/admin/mediatype.pl
index 1fb58b2de7..cbbd482c91 100644
--- a/admin/mediatype.pl
+++ b/admin/mediatype.pl
@@ -43,9 +43,8 @@
use strict;
use CGI;
use C4::Context;
-use C4::Output;
use C4::Auth;
-use C4::Interface::CGI::Output;
+use C4::Output;
sub StringSearch {
diff --git a/admin/printers.pl b/admin/printers.pl
index 6e6e9f5c26..434d76d824 100755
--- a/admin/printers.pl
+++ b/admin/printers.pl
@@ -41,9 +41,7 @@ use strict;
use CGI;
use C4::Context;
use C4::Output;
-
use C4::Auth;
-use C4::Interface::CGI::Output;
sub StringSearch {
my ($searchstring,$type)=@_;
diff --git a/admin/roadtype.pl b/admin/roadtype.pl
index a667accf6f..44c801570a 100755
--- a/admin/roadtype.pl
+++ b/admin/roadtype.pl
@@ -21,9 +21,8 @@ use strict;
use CGI;
use C4::Context;
use C4::Output;
-
use C4::Auth;
-use C4::Interface::CGI::Output;
+
sub StringSearch {
my ($searchstring,$type)=@_;
diff --git a/admin/systempreferences.pl b/admin/systempreferences.pl
index 87f004bb38..e772838f81 100755
--- a/admin/systempreferences.pl
+++ b/admin/systempreferences.pl
@@ -47,7 +47,6 @@ use C4::Context;
use C4::Koha;
use C4::Languages;
use C4::Output;
-use C4::Interface::CGI::Output;
use C4::Context;
diff --git a/admin/thesaurus.pl b/admin/thesaurus.pl
index d867f9875a..4c54a0d7d4 100755
--- a/admin/thesaurus.pl
+++ b/admin/thesaurus.pl
@@ -19,11 +19,9 @@
use strict;
use CGI;
-use C4::Auth;
-use C4::Interface::CGI::Output;
use C4::Context;
use C4::Output;
-
+use C4::Auth;
use C4::AuthoritiesMarc;
my $input = new CGI;
diff --git a/admin/z3950servers.pl b/admin/z3950servers.pl
index 9aa7981694..9f9308e8b7 100755
--- a/admin/z3950servers.pl
+++ b/admin/z3950servers.pl
@@ -20,13 +20,10 @@
# - we delete the record having primkey=$primkey
use strict;
-use C4::Output;
use CGI;
-
use C4::Context;
-
use C4::Auth;
-use C4::Interface::CGI::Output;
+use C4::Output;
sub StringSearch {
my ($searchstring,$type)=@_;
diff --git a/authorities/auth_finder.pl b/authorities/auth_finder.pl
index 0a17d51439..b6b526b384 100755
--- a/authorities/auth_finder.pl
+++ b/authorities/auth_finder.pl
@@ -21,7 +21,7 @@
use strict;
require Exporter;
use CGI;
-use C4::Interface::CGI::Output;
+use C4::Output;
use C4::Auth;
use C4::Context;
diff --git a/authorities/authorities-home.pl b/authorities/authorities-home.pl
index c68001ae1b..efe3259dbb 100755
--- a/authorities/authorities-home.pl
+++ b/authorities/authorities-home.pl
@@ -26,7 +26,6 @@ use C4::Auth;
use C4::Context;
use C4::Auth;
use C4::Output;
-use C4::Interface::CGI::Output;
use C4::AuthoritiesMarc;
use C4::Acquisition;
use C4::Koha; # XXX subfield_is_koha_internal_p
diff --git a/authorities/authorities.pl b/authorities/authorities.pl
index 6b1d86f01c..5c04e0911a 100755
--- a/authorities/authorities.pl
+++ b/authorities/authorities.pl
@@ -23,7 +23,6 @@ use strict;
use CGI;
use C4::Auth;
use C4::Output;
-use C4::Interface::CGI::Output;
use C4::AuthoritiesMarc;
use C4::Context;
use C4::Koha; # XXX subfield_is_koha_internal_p
diff --git a/authorities/blinddetail-biblio-search.pl b/authorities/blinddetail-biblio-search.pl
index a468d1bdc1..9d57c8e8d5 100755
--- a/authorities/blinddetail-biblio-search.pl
+++ b/authorities/blinddetail-biblio-search.pl
@@ -44,7 +44,6 @@ use C4::AuthoritiesMarc;
use C4::Auth;
use C4::Context;
use C4::Output;
-use C4::Interface::CGI::Output;
use CGI;
use MARC::Record;
use C4::Koha;
diff --git a/authorities/detail-biblio-search.pl b/authorities/detail-biblio-search.pl
index dda7144c64..0f3b97689c 100755
--- a/authorities/detail-biblio-search.pl
+++ b/authorities/detail-biblio-search.pl
@@ -44,7 +44,6 @@ use C4::AuthoritiesMarc;
use C4::Auth;
use C4::Context;
use C4::Output;
-use C4::Interface::CGI::Output;
use CGI;
use MARC::Record;
use C4::Koha;
diff --git a/authorities/detail.pl b/authorities/detail.pl
index 8e96b6cc3b..aa95e31cc5 100755
--- a/authorities/detail.pl
+++ b/authorities/detail.pl
@@ -44,7 +44,6 @@ use C4::AuthoritiesMarc;
use C4::Auth;
use C4::Context;
use C4::Output;
-use C4::Interface::CGI::Output;
use CGI;
use MARC::Record;
use C4::Koha;
diff --git a/barcodes/barcodes.pl b/barcodes/barcodes.pl
index cf228052e6..7e78ffb036 100755
--- a/barcodes/barcodes.pl
+++ b/barcodes/barcodes.pl
@@ -3,7 +3,7 @@
# script to generate items barcodes
# written 07/04
# by Veleda Matias - matias_veleda@hotmail.com - Physics Library UNLP Argentina and
-# Castañeda Sebastian - seba3c@yahoo.com.ar - Physics Library UNLP Argentina and
+# Casta�eda Sebastian - seba3c@yahoo.com.ar - Physics Library UNLP Argentina and
# This file is part of Koha.
#
@@ -24,7 +24,6 @@ use strict;
use CGI;
use C4::Auth;
use C4::Output;
-use C4::Interface::CGI::Output;
use C4::Context;
use C4::Barcodes::PrinterConfig;
diff --git a/barcodes/label-home.pl b/barcodes/label-home.pl
index c40ef0625e..5fa02ad9f1 100755
--- a/barcodes/label-home.pl
+++ b/barcodes/label-home.pl
@@ -20,7 +20,6 @@ use CGI;
use C4::Auth;
use C4::Output;
use C4::Labels;
-use C4::Interface::CGI::Output;
use C4::Context;
diff --git a/barcodes/label-item-search.pl b/barcodes/label-item-search.pl
index b46c8fdd23..a54578b613 100755
--- a/barcodes/label-item-search.pl
+++ b/barcodes/label-item-search.pl
@@ -27,7 +27,6 @@ use C4::Auth;
use C4::Context;
use C4::Auth;
use C4::Output;
-use C4::Interface::CGI::Output;
use C4::Biblio;
use C4::Acquisition;
use C4::Koha; # XXX subfield_is_koha_internal_p
diff --git a/barcodes/label-manager.pl b/barcodes/label-manager.pl
index 37bd7efe64..b25ac2f80f 100755
--- a/barcodes/label-manager.pl
+++ b/barcodes/label-manager.pl
@@ -20,7 +20,6 @@ use CGI;
use C4::Auth;
use C4::Labels;
use C4::Output;
-use C4::Interface::CGI::Output;
use POSIX;
diff --git a/barcodes/label-print-opus-pdf.pl b/barcodes/label-print-opus-pdf.pl
index 2cd159df41..5247ce9417 100755
--- a/barcodes/label-print-opus-pdf.pl
+++ b/barcodes/label-print-opus-pdf.pl
@@ -20,7 +20,6 @@ use CGI;
use C4::Labels;
use C4::Auth;
use C4::Output;
-use C4::Interface::CGI::Output;
use C4::Context;
use PDF::Reuse;
use PDF::Reuse::Barcode;
diff --git a/barcodes/label-print-pdf.pl b/barcodes/label-print-pdf.pl
index 88eccfba39..a473b7637e 100755
--- a/barcodes/label-print-pdf.pl
+++ b/barcodes/label-print-pdf.pl
@@ -36,7 +36,6 @@ use CGI;
use C4::Labels;
use C4::Auth;
use C4::Output;
-use C4::Interface::CGI::Output;
use C4::Context;
use PDF::Reuse;
diff --git a/barcodes/label-print.pl b/barcodes/label-print.pl
index 2d10152af7..acf6a515f2 100755
--- a/barcodes/label-print.pl
+++ b/barcodes/label-print.pl
@@ -20,7 +20,6 @@ use CGI;
use C4::Auth;
use C4::Serials;
use C4::Output;
-use C4::Interface::CGI::Output;
use C4::Context;
use GD::Barcode::UPCE;
diff --git a/barcodes/printerConfig.pl b/barcodes/printerConfig.pl
index eb68d860c4..174801bb60 100755
--- a/barcodes/printerConfig.pl
+++ b/barcodes/printerConfig.pl
@@ -31,7 +31,6 @@ use C4::Auth;
use PDF::API2;
use PDF::API2::Page;
use PDF::API2::Util;
-use C4::Interface::CGI::Output;
# This function returns the path to deal with the correct files, considering
# templates set and language.
diff --git a/bookshelves/addbookbybiblionumber.pl b/bookshelves/addbookbybiblionumber.pl
index dcb10f630f..787a13b7fa 100755
--- a/bookshelves/addbookbybiblionumber.pl
+++ b/bookshelves/addbookbybiblionumber.pl
@@ -62,7 +62,6 @@ use C4::Output;
use C4::BookShelves;
use C4::Circulation;
use C4::Auth;
-use C4::Interface::CGI::Output;
#use it only to debug !
@@ -122,6 +121,13 @@ if ($shelfnumber || ($shelfnumber == -1)) { # the shelf already exist.
}
# $Log$
+# Revision 1.8 2007/04/24 13:54:29 hdl
+# functions that were in C4::Interface::CGI::Output are now in C4::Output.
+# So this implies quite a change for files.
+# Sorry about conflicts which will be caused.
+# directory Interface::CGI should now be dropped.
+# I noticed that many scripts (reports ones, but also some circ/stats.pl or opac-topissues) still use Date::Manip.
+#
# Revision 1.7 2007/04/04 16:46:22 tipaul
# HUGE COMMIT : code cleaning circulation.
#
diff --git a/bookshelves/shelves.pl b/bookshelves/shelves.pl
index 59c677661e..4062e38b81 100755
--- a/bookshelves/shelves.pl
+++ b/bookshelves/shelves.pl
@@ -65,11 +65,10 @@
use strict;
use CGI;
-use C4::Output;
use C4::BookShelves;
use C4::Biblio;
use C4::Auth;
-use C4::Interface::CGI::Output;
+use C4::Output;
my $query = new CGI;
@@ -281,6 +280,13 @@ sub shelves {
#
# $Log$
+# Revision 1.13 2007/04/24 13:54:29 hdl
+# functions that were in C4::Interface::CGI::Output are now in C4::Output.
+# So this implies quite a change for files.
+# Sorry about conflicts which will be caused.
+# directory Interface::CGI should now be dropped.
+# I noticed that many scripts (reports ones, but also some circ/stats.pl or opac-topissues) still use Date::Manip.
+#
# Revision 1.12 2007/04/04 16:46:22 tipaul
# HUGE COMMIT : code cleaning circulation.
#
diff --git a/catalogue/ISBDdetail.pl b/catalogue/ISBDdetail.pl
index d8e8d9d9dd..8993aa4388 100755
--- a/catalogue/ISBDdetail.pl
+++ b/catalogue/ISBDdetail.pl
@@ -39,7 +39,6 @@ require Exporter;
use C4::Auth;
use C4::Context;
use C4::Output;
-use C4::Interface::CGI::Output;
use CGI;
use C4::Koha;
use C4::Biblio;
diff --git a/catalogue/MARCdetail.pl b/catalogue/MARCdetail.pl
index cb296dd577..17ae11b433 100755
--- a/catalogue/MARCdetail.pl
+++ b/catalogue/MARCdetail.pl
@@ -48,7 +48,6 @@ require Exporter;
use C4::Auth;
use C4::Context;
use C4::Output;
-use C4::Interface::CGI::Output;
use CGI;
use C4::Koha;
use MARC::Record;
diff --git a/catalogue/detail.pl b/catalogue/detail.pl
index 6effc3ae21..855746bd04 100755
--- a/catalogue/detail.pl
+++ b/catalogue/detail.pl
@@ -22,7 +22,7 @@ require Exporter;
use CGI;
use C4::Auth;
use C4::Serials; #uses getsubscriptionfrom biblionumber
-use C4::Interface::CGI::Output;
+use C4::Output;
use C4::Biblio;
use C4::Serials;
diff --git a/catalogue/detailprint.pl b/catalogue/detailprint.pl
index 9d2285a40d..3440f16e70 100755
--- a/catalogue/detailprint.pl
+++ b/catalogue/detailprint.pl
@@ -21,11 +21,10 @@
use strict;
require Exporter;
use C4::Context;
-use C4::Output; # contains gettemplate
use CGI;
use C4::Auth;
use C4::Biblio;
-use C4::Interface::CGI::Output;
+use C4::Output;
use C4::Date;
my $query=new CGI;
diff --git a/catalogue/dictionary.pl b/catalogue/dictionary.pl
index 1d3aea4576..f6a137ee1c 100755
--- a/catalogue/dictionary.pl
+++ b/catalogue/dictionary.pl
@@ -20,7 +20,6 @@
use strict;
use C4::Output;
-use C4::Interface::CGI::Output;
use C4::Auth;
use CGI;
use C4::Search;
@@ -149,7 +148,7 @@ if ($op eq "do_search") {
my @authresults;
my $authnbresults;
while ((my $authtypecode) = $sth->fetchrow) {
- my ($curauthresults,$nbresults) = authoritysearch($dbh,[''],[''],[''],['contains'],
+ my ($curauthresults,$nbresults) = SearchAuthorities([''],[''],[''],['contains'],
\@search,$startfrom*$resultsperpage, $resultsperpage,$authtypecode);
if (defined(@$curauthresults)) {
for (my $i = 0; $i < @$curauthresults ;$i++) {
diff --git a/catalogue/issuehistory.pl b/catalogue/issuehistory.pl
index aa2d3452bd..673629d3f5 100755
--- a/catalogue/issuehistory.pl
+++ b/catalogue/issuehistory.pl
@@ -21,7 +21,7 @@ use strict;
require Exporter;
use CGI;
use C4::Auth;
-use C4::Interface::CGI::Output;
+use C4::Output;
use C4::Circulation; # GetBiblioIssues
diff --git a/catalogue/moredetail.pl b/catalogue/moredetail.pl
index 71d8a2d1f7..8d515258da 100755
--- a/catalogue/moredetail.pl
+++ b/catalogue/moredetail.pl
@@ -27,7 +27,6 @@ use C4::Biblio; # to use &GetBiblioItemData &itemissues
use C4::Acquisition;
use C4::Output; # contains gettemplate
use C4::Auth;
-use C4::Interface::CGI::Output;
use C4::Date;
use C4::Circulation; # to use itemissues
diff --git a/catalogue/search.pl b/catalogue/search.pl
index dc4b28470b..f91081cd94 100755
--- a/catalogue/search.pl
+++ b/catalogue/search.pl
@@ -145,7 +145,7 @@ use strict; # always use
# to perform, etc.
## load Koha modules
use C4::Context;
-use C4::Interface::CGI::Output;
+use C4::Output;
use C4::Auth;
use C4::Search;
use C4::Languages; # getAllLanguages
diff --git a/catalogue/suggest.pl b/catalogue/suggest.pl
index a62820c622..266ea028e1 100755
--- a/catalogue/suggest.pl
+++ b/catalogue/suggest.pl
@@ -26,7 +26,6 @@ use C4::Auth;
use C4::Context;
use C4::Auth;
use C4::Output;
-use C4::Interface::CGI::Output;
use C4::Biblio;
use C4::Acquisition;
use C4::Koha; # XXX subfield_is_koha_internal_p
diff --git a/cataloguing/addbiblio.pl b/cataloguing/addbiblio.pl
index 184b5f2ad1..dc5fa501fc 100755
--- a/cataloguing/addbiblio.pl
+++ b/cataloguing/addbiblio.pl
@@ -23,7 +23,6 @@ use strict;
use CGI;
use C4::Auth;
use C4::Output;
-use C4::Interface::CGI::Output;
use C4::Biblio;
use C4::Search;
use C4::Context;
diff --git a/cataloguing/addbooks.pl b/cataloguing/addbooks.pl
index 01b9873715..88d7c735f2 100755
--- a/cataloguing/addbooks.pl
+++ b/cataloguing/addbooks.pl
@@ -38,7 +38,6 @@ use C4::Auth;
use C4::Biblio;
use C4::Breeding;
use C4::Output;
-use C4::Interface::CGI::Output;
use C4::Koha;
use C4::Search;
diff --git a/cataloguing/additem.pl b/cataloguing/additem.pl
index f84dbf1b87..eca945ab36 100755
--- a/cataloguing/additem.pl
+++ b/cataloguing/additem.pl
@@ -23,7 +23,6 @@ use CGI;
use strict;
use C4::Auth;
use C4::Output;
-use C4::Interface::CGI::Output;
use C4::Biblio;
use C4::Context;
use C4::Koha; # XXX subfield_is_koha_internal_p
diff --git a/cataloguing/thesaurus_popup.pl b/cataloguing/thesaurus_popup.pl
index 7e4ee40878..1dd3fca3ec 100755
--- a/cataloguing/thesaurus_popup.pl
+++ b/cataloguing/thesaurus_popup.pl
@@ -22,13 +22,11 @@
# Suite 330, Boston, MA 02111-1307 USA
use strict;
-use C4::Auth;
use CGI;
+use C4::Auth;
use C4::Context;
-
use C4::Output;
use C4::Authorities;
-use C4::Interface::CGI::Output;
# get all the data ....
my $input = new CGI;
my $result = $input->param('result');
diff --git a/cataloguing/value_builder/labs_theses.pl b/cataloguing/value_builder/labs_theses.pl
index 075959c9d5..2fc88187a6 100755
--- a/cataloguing/value_builder/labs_theses.pl
+++ b/cataloguing/value_builder/labs_theses.pl
@@ -21,7 +21,7 @@ use strict;
require Exporter;
use CGI;
-use C4::Interface::CGI::Output;
+use C4::Output;
use C4::Context;
use C4::Auth;
use C4::Output;
diff --git a/cataloguing/value_builder/marc21_field_003.pl b/cataloguing/value_builder/marc21_field_003.pl
index f19c30377a..84ace02941 100755
--- a/cataloguing/value_builder/marc21_field_003.pl
+++ b/cataloguing/value_builder/marc21_field_003.pl
@@ -20,11 +20,9 @@
# Suite 330, Boston, MA 02111-1307 USA
require Exporter;
-use C4::AuthoritiesMarc;
use C4::Auth;
use C4::Context;
use C4::Output;
-use C4::Interface::CGI::Output;
use CGI;
use C4::Search;
use MARC::Record;
diff --git a/cataloguing/value_builder/marc21_field_005.pl b/cataloguing/value_builder/marc21_field_005.pl
index 4de9d88c29..8d48c4bd67 100755
--- a/cataloguing/value_builder/marc21_field_005.pl
+++ b/cataloguing/value_builder/marc21_field_005.pl
@@ -21,11 +21,9 @@
# Suite 330, Boston, MA 02111-1307 USA
require Exporter;
-use C4::AuthoritiesMarc;
use C4::Auth;
use C4::Context;
use C4::Output;
-use C4::Interface::CGI::Output;
use CGI;
use C4::Search;
use MARC::Record;
diff --git a/cataloguing/value_builder/marc21_field_040c.pl b/cataloguing/value_builder/marc21_field_040c.pl
index 8c17bf7a03..46b14f069c 100755
--- a/cataloguing/value_builder/marc21_field_040c.pl
+++ b/cataloguing/value_builder/marc21_field_040c.pl
@@ -24,7 +24,6 @@ use C4::AuthoritiesMarc;
use C4::Auth;
use C4::Context;
use C4::Output;
-use C4::Interface::CGI::Output;
use CGI;
use C4::Search;
use MARC::Record;
diff --git a/cataloguing/value_builder/marc21_field_040d.pl b/cataloguing/value_builder/marc21_field_040d.pl
index 5eecb7a2b4..8317b534e9 100755
--- a/cataloguing/value_builder/marc21_field_040d.pl
+++ b/cataloguing/value_builder/marc21_field_040d.pl
@@ -24,7 +24,6 @@ use C4::AuthoritiesMarc;
use C4::Auth;
use C4::Context;
use C4::Output;
-use C4::Interface::CGI::Output;
use CGI;
use C4::Search;
use MARC::Record;
diff --git a/cataloguing/value_builder/unimarc_field_210c.pl b/cataloguing/value_builder/unimarc_field_210c.pl
index c9716633a4..82a44336f6 100755
--- a/cataloguing/value_builder/unimarc_field_210c.pl
+++ b/cataloguing/value_builder/unimarc_field_210c.pl
@@ -24,12 +24,11 @@ use C4::AuthoritiesMarc;
use C4::Auth;
use C4::Context;
use C4::Output;
-use C4::Interface::CGI::Output;
use CGI;
use C4::Search;
use MARC::Record;
use C4::Koha;
-
+###TODO To rewrite in order to use SearchAuthorities
=head1
@@ -64,10 +63,12 @@ my $function_name= "210c".(int(rand(100000))+1);
#---- 200$a for isbn
#---- 200$b for editor
#---- 200$c (repeated) for collections
-my $sth = $dbh->prepare("select auth_subfield_table.authid,subfieldvalue from auth_subfield_table
- left join auth_header on auth_subfield_table.authid=auth_header.authid
- where authtypecode='EDITORS' and tag='200' and subfieldcode='a'");
-my $sth2 = $dbh->prepare("select subfieldvalue from auth_subfield_table where tag='200' and subfieldcode='b' and authid=?");
+ my $sth;
+#= $dbh->prepare("select auth_subfield_table.authid,subfieldvalue from auth_subfield_table
+# left join auth_header on auth_subfield_table.authid=auth_header.authid
+# where authtypecode='EDITORS' and tag='200' and subfieldcode='a'");
+ my $sth2;
+ # = $dbh->prepare("select subfieldvalue from auth_subfield_table where tag='200' and subfieldcode='b' and authid=?");
$sth->execute;
my @editors;
my $authoritysep = C4::Context->preference("authoritysep");
diff --git a/cataloguing/value_builder/unimarc_field_4XX.pl b/cataloguing/value_builder/unimarc_field_4XX.pl
index 7ab2579be7..95edbe38c5 100755
--- a/cataloguing/value_builder/unimarc_field_4XX.pl
+++ b/cataloguing/value_builder/unimarc_field_4XX.pl
@@ -20,7 +20,7 @@
use strict;
require Exporter;
use CGI;
-use C4::Interface::CGI::Output;
+use C4::Output;
use C4::Context;
use C4::Search;
use C4::Auth;
diff --git a/cataloguing/value_builder/usmarc_field_952v.pl b/cataloguing/value_builder/usmarc_field_952v.pl
index 0ce8536c43..5ff0931d1a 100755
--- a/cataloguing/value_builder/usmarc_field_952v.pl
+++ b/cataloguing/value_builder/usmarc_field_952v.pl
@@ -20,11 +20,9 @@
# Suite 330, Boston, MA 02111-1307 USA
require Exporter;
-use C4::AuthoritiesMarc;
use C4::Auth;
use C4::Context;
use C4::Output;
-use C4::Interface::CGI::Output;
use CGI;
use C4::Search;
use MARC::Record;
diff --git a/cataloguing/z3950_search.pl b/cataloguing/z3950_search.pl
index b923605436..5403d28a34 100755
--- a/cataloguing/z3950_search.pl
+++ b/cataloguing/z3950_search.pl
@@ -22,7 +22,6 @@ use CGI;
use C4::Auth;
use C4::Output;
-use C4::Interface::CGI::Output;
use C4::Biblio;
use C4::Context;
use C4::Breeding;
diff --git a/circ/branchoverdues.pl b/circ/branchoverdues.pl
index cc2ff76abb..8d4cf9ce74 100755
--- a/circ/branchoverdues.pl
+++ b/circ/branchoverdues.pl
@@ -20,7 +20,7 @@
use strict;
use C4::Context;
use CGI;
-use C4::Interface::CGI::Output;
+use C4::Output;
use C4::Auth;
use C4::Date;
use C4::Overdues; # AddNotifyLine
diff --git a/circ/branchtransfers.pl b/circ/branchtransfers.pl
index 493363ab53..70184dc9f9 100755
--- a/circ/branchtransfers.pl
+++ b/circ/branchtransfers.pl
@@ -28,7 +28,6 @@ use C4::Output;
use C4::Reserves;
use C4::Biblio;
use C4::Auth;
-use C4::Interface::CGI::Output;
use C4::Branch; # GetBranches
use C4::Koha;
diff --git a/circ/circulation.pl b/circ/circulation.pl
index f5f79d0cb5..b4a0cebb86 100755
--- a/circ/circulation.pl
+++ b/circ/circulation.pl
@@ -28,9 +28,13 @@ use C4::Output;
use C4::Print;
use C4::Auth;
use C4::Date;
-use C4::Interface::CGI::Output;
use C4::Branch; # GetBranches
use C4::Koha; # GetPrinter
+use C4::Circulation;
+use C4::Members;
+use C4::Biblio;
+use C4::Reserves;
+
use Date::Calc qw(
Today
Today_and_Now
@@ -39,10 +43,6 @@ use Date::Calc qw(
Date_to_Days
);
-use C4::Circulation;
-use C4::Members;
-use C4::Biblio;
-use C4::Reserves;
#
# PARAMETERS READING
diff --git a/circ/overdue.pl b/circ/overdue.pl
index 85bfdb7532..33da5fe2e2 100755
--- a/circ/overdue.pl
+++ b/circ/overdue.pl
@@ -22,7 +22,6 @@
use strict;
use C4::Context;
use C4::Output;
-use C4::Interface::CGI::Output;
use CGI;
use C4::Auth;
use C4::Date;
diff --git a/circ/reserve.pl b/circ/reserve.pl
index 576dc93028..14d66a91e7 100755
--- a/circ/reserve.pl
+++ b/circ/reserve.pl
@@ -20,12 +20,11 @@
# Suite 330, Boston, MA 02111-1307 USA
use strict;
+use CGI;
use C4::Context;
use C4::Output;
-use CGI;
use C4::Auth;
use C4::Date;
-use C4::Interface::CGI::Output;
my $input = new CGI;
my $order = $input->param('order');
diff --git a/circ/returns.pl b/circ/returns.pl
index f0a9beb930..ba57d832cc 100755
--- a/circ/returns.pl
+++ b/circ/returns.pl
@@ -27,18 +27,17 @@ written 11/3/2002 by Finlay
use strict;
use CGI;
+use C4::Context;
+use C4::Auth;
+use C4::Output;
use C4::Circulation;
use C4::Date;
-use C4::Output;
use C4::Print;
use C4::Reserves;
-use C4::Auth;
use C4::Biblio;
use C4::Members;
-use C4::Interface::CGI::Output;
use C4::Branch; # GetBranchName
use C4::Koha; # FIXME : is it still useful ?
-use C4::Context;
my $query = new CGI;
diff --git a/circ/selectbranchprinter.pl b/circ/selectbranchprinter.pl
index f2ac61ac23..f01860b304 100644
--- a/circ/selectbranchprinter.pl
+++ b/circ/selectbranchprinter.pl
@@ -23,7 +23,6 @@ use C4::Circulation;
use C4::Output;
use C4::Auth;
use C4::Print;
-use C4::Interface::CGI::Output;
use C4::Koha;
use C4::Branch; # GetBranches
diff --git a/circ/stats.pl b/circ/stats.pl
index 118d396762..874fd89dc5 100755
--- a/circ/stats.pl
+++ b/circ/stats.pl
@@ -24,10 +24,9 @@
use strict;
use CGI;
+use C4::Context;
use C4::Output;
use C4::Auth;
-use C4::Interface::CGI::Output;
-use C4::Context;
use Date::Manip;
use C4::Stats;
diff --git a/export/export.pl b/export/export.pl
index 734a2aaabc..5056fa7a47 100755
--- a/export/export.pl
+++ b/export/export.pl
@@ -22,7 +22,6 @@
use strict;
require Exporter;
use C4::Auth;
-use C4::Interface::CGI::Output;
use C4::Output; # contains gettemplate
use C4::Biblio;
use CGI;
diff --git a/export/export_filtered.pl b/export/export_filtered.pl
index 60f56152ad..0dc4bf062d 100755
--- a/export/export_filtered.pl
+++ b/export/export_filtered.pl
@@ -22,7 +22,6 @@
use strict;
require Exporter;
use C4::Auth;
-use C4::Interface::CGI::Output;
use C4::Output; # contains gettemplate
use C4::Biblio;
use CGI;
diff --git a/export/marc.pl b/export/marc.pl
index ba3fbd46c8..c8d4d0bf69 100755
--- a/export/marc.pl
+++ b/export/marc.pl
@@ -24,7 +24,6 @@ use strict;
require Exporter;
use C4::Auth;
-use C4::Interface::CGI::Output;
use C4::Output; # contains gettemplate
use C4::Biblio;
use CGI;
diff --git a/help.pl b/help.pl
index 3994157c96..0917f9b15d 100755
--- a/help.pl
+++ b/help.pl
@@ -21,7 +21,7 @@
use strict;
require Exporter;
use C4::Output; # contains gettemplate
-use C4::Interface::CGI::Output;
+use C4::Output;
# use C4::Auth;
use C4::Context;
use CGI;
diff --git a/installer/InstallAuth.pm b/installer/InstallAuth.pm
index d3bf137bd1..71d46eed2e 100644
--- a/installer/InstallAuth.pm
+++ b/installer/InstallAuth.pm
@@ -25,8 +25,7 @@ use Digest::MD5 qw(md5_base64);
require Exporter;
use C4::Context;
-use C4::Output; # to get the template
-use C4::Interface::CGI::Output;
+use C4::Output;
use C4::Koha;
use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
diff --git a/installer/install.pl b/installer/install.pl
index de29a59057..c65fff54ff 100755
--- a/installer/install.pl
+++ b/installer/install.pl
@@ -5,7 +5,7 @@
# use Install;
use InstallAuth;
use C4::Context;
-use C4::Interface::CGI::Output;
+use C4::Output;
use C4::Languages;
use strict; # please develop with the strict pragma
diff --git a/members/boraccount.pl b/members/boraccount.pl
index bd7a82988c..d80e28faa1 100755
--- a/members/boraccount.pl
+++ b/members/boraccount.pl
@@ -26,7 +26,6 @@
use strict;
use C4::Auth;
use C4::Output;
-use C4::Interface::CGI::Output;
use C4::Date;
use CGI;
use C4::Members;
diff --git a/members/borrowers_details.pl b/members/borrowers_details.pl
index 1d8e086bab..0e4a2e857d 100644
--- a/members/borrowers_details.pl
+++ b/members/borrowers_details.pl
@@ -29,7 +29,6 @@ use strict;
use C4::Auth;
use C4::Context;
use C4::Output;
-use C4::Interface::CGI::Output;
use CGI;
use C4::Members;
use C4::Koha;
diff --git a/members/deletemem.pl b/members/deletemem.pl
index 6e762e56ff..2a4b3c1986 100755
--- a/members/deletemem.pl
+++ b/members/deletemem.pl
@@ -28,7 +28,6 @@ use strict;
use CGI;
use C4::Context;
-use C4::Interface::CGI::Output;
use C4::Output;
use C4::Circulation;
use C4::Auth;
diff --git a/members/guarantor_search.pl b/members/guarantor_search.pl
index 2d2ba0a80e..b737a874ee 100755
--- a/members/guarantor_search.pl
+++ b/members/guarantor_search.pl
@@ -24,7 +24,6 @@
use strict;
use C4::Auth;
use C4::Output;
-use C4::Interface::CGI::Output;
use CGI;
#op
diff --git a/members/mancredit.pl b/members/mancredit.pl
index a03502f229..54678635cb 100755
--- a/members/mancredit.pl
+++ b/members/mancredit.pl
@@ -24,7 +24,6 @@
use strict;
use C4::Auth;
use C4::Output;
-use C4::Interface::CGI::Output;
use CGI;
use C4::Members;
diff --git a/members/maninvoice.pl b/members/maninvoice.pl
index e462c27852..6ff6c26e76 100755
--- a/members/maninvoice.pl
+++ b/members/maninvoice.pl
@@ -24,7 +24,6 @@
use strict;
use C4::Auth;
use C4::Output;
-use C4::Interface::CGI::Output;
use CGI;
use C4::Members;
use C4::Accounts;
diff --git a/members/member-flags.pl b/members/member-flags.pl
index 8c44727233..36a240a889 100755
--- a/members/member-flags.pl
+++ b/members/member-flags.pl
@@ -13,7 +13,7 @@ use C4::Context;
use C4::Members;
#use C4::Acquisitions;
-use C4::Interface::CGI::Output;
+use C4::Output;
my $input = new CGI;
diff --git a/members/member-password.pl b/members/member-password.pl
index 3f72dc8548..2f90903146 100755
--- a/members/member-password.pl
+++ b/members/member-password.pl
@@ -7,7 +7,6 @@
use strict;
use C4::Auth;
use C4::Output;
-use C4::Interface::CGI::Output;
use C4::Context;
use C4::Members;
use C4::Circulation;
diff --git a/members/member-picupload.pl b/members/member-picupload.pl
index 671a19d01b..6190ac747c 100644
--- a/members/member-picupload.pl
+++ b/members/member-picupload.pl
@@ -31,8 +31,6 @@ use C4::Context;
use C4::Output;
use CGI;
-use C4::Interface::CGI::Output;
-use C4::Interface::CGI::Template;
my $input = new CGI;
my $name = $input->param('name');
diff --git a/members/member.pl b/members/member.pl
index 2e2b81be21..89163613c2 100755
--- a/members/member.pl
+++ b/members/member.pl
@@ -26,7 +26,6 @@
use strict;
use C4::Auth;
use C4::Output;
-use C4::Interface::CGI::Output;
use CGI;
use C4::Members;
diff --git a/members/memberentry.pl b/members/memberentry.pl
index d6711f6cd4..ebda6daf74 100755
--- a/members/memberentry.pl
+++ b/members/memberentry.pl
@@ -31,7 +31,6 @@ use Digest::MD5 qw(md5_base64);
use C4::Auth;
use C4::Context;
use C4::Output;
-use C4::Interface::CGI::Output;
use C4::Members;
use C4::Koha;
use C4::Date;
diff --git a/members/members-home.pl b/members/members-home.pl
index 3a0b2232cf..a029ffaeae 100755
--- a/members/members-home.pl
+++ b/members/members-home.pl
@@ -19,7 +19,6 @@ use strict;
use CGI;
use C4::Auth;
use C4::Output;
-use C4::Interface::CGI::Output;
use C4::Context;
diff --git a/members/moremember.pl b/members/moremember.pl
index 5bb1376fc5..6d279c5499 100755
--- a/members/moremember.pl
+++ b/members/moremember.pl
@@ -33,14 +33,12 @@
=cut
use strict;
+use CGI;
+use Date::Manip;
use C4::Auth;
use C4::Context;
use C4::Output;
-use C4::Interface::CGI::Output;
-use C4::Interface::CGI::Template;
-use CGI;
use C4::Members;
-use Date::Manip;
use C4::Date;
use C4::Reserves;
use C4::Circulation;
diff --git a/members/pay.pl b/members/pay.pl
index 4e4243d2b6..8e8220b105 100755
--- a/members/pay.pl
+++ b/members/pay.pl
@@ -99,8 +99,8 @@ if ( $check == 0 ) {
my $numberofnotify = scalar(@notify);
for ( my $j = 0 ; $j < scalar(@notify) ; $j++ ) {
my @loop_pay;
- my ( $numaccts, $accts, $total ) =
- GetBorNotifyAcctRecord( '', \%bor, $notify[$j] );
+ my ( $total , $accts, $numaccts) =
+ GetBorNotifyAcctRecord( $borrowernumber, $notify[$j] );
for ( my $i = 0 ; $i < $numaccts ; $i++ ) {
my %line;
if ( $accts->[$i]{'amountoutstanding'} > 0 ) {
@@ -140,7 +140,7 @@ if ( $check == 0 ) {
borrowernumber => $borrowernumber,
total => sprintf( "%.2f", $total )
);
- print "Content-Type: text/html\n\n", $template->output;
+ output_html_with_http_headers $input, $cookie, $template->output;
}
else {
diff --git a/members/readingrec.pl b/members/readingrec.pl
index d41f2b9788..5e3067b696 100755
--- a/members/readingrec.pl
+++ b/members/readingrec.pl
@@ -23,7 +23,6 @@
use strict;
use C4::Auth;
use C4::Output;
-use C4::Interface::CGI::Output;
use CGI;
use C4::Members;
diff --git a/opac/opac-ISBDdetail.pl b/opac/opac-ISBDdetail.pl
index 1fd8229377..b46c51ad84 100755
--- a/opac/opac-ISBDdetail.pl
+++ b/opac/opac-ISBDdetail.pl
@@ -47,7 +47,6 @@ require Exporter;
use C4::Auth;
use C4::Context;
use C4::Output;
-use C4::Interface::CGI::Output;
use CGI;
use MARC::Record;
use C4::Biblio;
diff --git a/opac/opac-MARCdetail.pl b/opac/opac-MARCdetail.pl
index d8edefaff5..1d156917a4 100755
--- a/opac/opac-MARCdetail.pl
+++ b/opac/opac-MARCdetail.pl
@@ -44,7 +44,6 @@ require Exporter;
use C4::Auth;
use C4::Context;
use C4::Output;
-use C4::Interface::CGI::Output;
use CGI;
use MARC::Record;
use C4::Biblio;
diff --git a/opac/opac-account.pl b/opac/opac-account.pl
index 6136735766..8940abf70f 100755
--- a/opac/opac-account.pl
+++ b/opac/opac-account.pl
@@ -19,13 +19,11 @@
# script to display borrowers account details in the opac
use strict;
-use C4::Output;
use CGI;
use C4::Members;
use C4::Circulation;
use C4::Auth;
-use C4::Interface::CGI::Output;
-
+use C4::Output;
use C4::Date;
my $query = new CGI;
diff --git a/opac/opac-addbookbybiblionumber.pl b/opac/opac-addbookbybiblionumber.pl
index 3c9b390950..88930c0506 100755
--- a/opac/opac-addbookbybiblionumber.pl
+++ b/opac/opac-addbookbybiblionumber.pl
@@ -25,11 +25,10 @@
use strict;
use C4::Biblio;
use CGI;
-use C4::Output;
use C4::BookShelves;
use C4::Circulation;
use C4::Auth;
-use C4::Interface::CGI::Output;
+use C4::Output;
my $query = new CGI;
my $biblionumber = $query->param('biblionumber');
diff --git a/opac/opac-alert-subscribe.pl b/opac/opac-alert-subscribe.pl
index 4e5d9d247e..d26af246e8 100755
--- a/opac/opac-alert-subscribe.pl
+++ b/opac/opac-alert-subscribe.pl
@@ -24,7 +24,6 @@ use CGI;
use C4::Auth;
use C4::Date;
use C4::Output;
-use C4::Interface::CGI::Output;
use C4::Context;
use C4::Koha;
use C4::Letters;
diff --git a/opac/opac-authorities-home.pl b/opac/opac-authorities-home.pl
index a7fa351983..158bfbbe76 100755
--- a/opac/opac-authorities-home.pl
+++ b/opac/opac-authorities-home.pl
@@ -26,7 +26,6 @@ use C4::Auth;
use C4::Context;
use C4::Auth;
use C4::Output;
-use C4::Interface::CGI::Output;
use C4::AuthoritiesMarc;
use C4::Koha; # XXX subfield_is_koha_internal_p
diff --git a/opac/opac-authoritiesdetail.pl b/opac/opac-authoritiesdetail.pl
index 6094eb1c2c..3272ff662b 100755
--- a/opac/opac-authoritiesdetail.pl
+++ b/opac/opac-authoritiesdetail.pl
@@ -43,7 +43,6 @@ use C4::AuthoritiesMarc;
use C4::Auth;
use C4::Context;
use C4::Output;
-use C4::Interface::CGI::Output;
use CGI;
use MARC::Record;
use C4::Koha;
diff --git a/opac/opac-basket.pl b/opac/opac-basket.pl
index ffb7129bc4..7882545ff4 100755
--- a/opac/opac-basket.pl
+++ b/opac/opac-basket.pl
@@ -22,7 +22,7 @@ require Exporter;
use CGI;
use C4::Biblio;
use C4::Auth;
-use C4::Interface::CGI::Output;
+use C4::Output;
my $query = new CGI;
diff --git a/opac/opac-browser.pl b/opac/opac-browser.pl
index dd9e54471f..0b42133d49 100755
--- a/opac/opac-browser.pl
+++ b/opac/opac-browser.pl
@@ -30,7 +30,6 @@ require Exporter;
use C4::Auth;
use C4::Context;
use C4::Output;
-use C4::Interface::CGI::Output;
use CGI;
use C4::Biblio;
use C4::Koha; # use getitemtypeinfo
diff --git a/opac/opac-detail.pl b/opac/opac-detail.pl
index 68d57691d1..a65ca56a0e 100755
--- a/opac/opac-detail.pl
+++ b/opac/opac-detail.pl
@@ -24,7 +24,7 @@ require Exporter;
use CGI;
use C4::Auth;
use C4::Serials; #uses getsubscriptionfrom biblionumber
-use C4::Interface::CGI::Output;
+use C4::Output;
use C4::Biblio;
use C4::Amazon;
use C4::Review;
diff --git a/opac/opac-detailprint.pl b/opac/opac-detailprint.pl
index c8aef6b100..72a16c3728 100755
--- a/opac/opac-detailprint.pl
+++ b/opac/opac-detailprint.pl
@@ -21,11 +21,10 @@
use strict;
require Exporter;
use C4::Context;
-use C4::Output; # contains gettemplate
use CGI;
use C4::Biblio;
use C4::Auth;
-use C4::Interface::CGI::Output;
+use C4::Output;
use C4::Date;
my $query = new CGI;
diff --git a/opac/opac-dictionary.pl b/opac/opac-dictionary.pl
index 6d36353edd..985986cf36 100755
--- a/opac/opac-dictionary.pl
+++ b/opac/opac-dictionary.pl
@@ -19,7 +19,6 @@
use strict;
use C4::Output;
-use C4::Interface::CGI::Output;
use C4::Auth;
use CGI;
use C4::Search;
diff --git a/opac/opac-main.pl b/opac/opac-main.pl
index bec99cc165..c769a50aea 100755
--- a/opac/opac-main.pl
+++ b/opac/opac-main.pl
@@ -21,7 +21,7 @@ use strict;
require Exporter;
use CGI;
use C4::Auth; # get_template_and_user
-use C4::Interface::CGI::Output;
+use C4::Output;
use C4::BookShelves;
use C4::Languages; # getTranslatedLanguages
use C4::Branch; # GetBranches
diff --git a/opac/opac-passwd.pl b/opac/opac-passwd.pl
index ca0d111ded..b749c3a32f 100755
--- a/opac/opac-passwd.pl
+++ b/opac/opac-passwd.pl
@@ -27,7 +27,7 @@ use C4::Context;
use Digest::MD5 qw(md5_base64);
use C4::Circulation;
-use C4::Interface::CGI::Output;
+use C4::Output;
my $query = new CGI;
my $dbh = C4::Context->dbh;
diff --git a/opac/opac-readingrecord.pl b/opac/opac-readingrecord.pl
index 4c7cbda5ec..9d4f0b1bce 100755
--- a/opac/opac-readingrecord.pl
+++ b/opac/opac-readingrecord.pl
@@ -27,7 +27,7 @@ use C4::Circulation;
use C4::Date;
use C4::Members;
-use C4::Interface::CGI::Output;
+use C4::Output;
my $query = new CGI;
my ( $template, $borrowernumber, $cookie ) = get_template_and_user(
diff --git a/opac/opac-reserve.pl b/opac/opac-reserve.pl
index 0b7f932f18..bb79c53c2b 100755
--- a/opac/opac-reserve.pl
+++ b/opac/opac-reserve.pl
@@ -23,7 +23,7 @@ use C4::Auth; # checkauth, getborrowernumber.
use C4::Koha;
use C4::Circulation;
use C4::Reserves;
-use C4::Interface::CGI::Output;
+use C4::Output;
use C4::Date;
use C4::Context;
use C4::Branch; # GetBranches
diff --git a/opac/opac-review.pl b/opac/opac-review.pl
index dc6aa101df..0a9124ac5a 100755
--- a/opac/opac-review.pl
+++ b/opac/opac-review.pl
@@ -22,7 +22,7 @@ require Exporter;
use CGI;
use C4::Auth;
use C4::Koha;
-use C4::Interface::CGI::Output;
+use C4::Output;
use C4::Circulation;
use C4::Review;
use C4::Biblio;
diff --git a/opac/opac-search.pl b/opac/opac-search.pl
index a3ba74b73a..3a54022a80 100755
--- a/opac/opac-search.pl
+++ b/opac/opac-search.pl
@@ -148,7 +148,7 @@ use strict; # always use
# to perform, etc.
## load Koha modules
use C4::Context;
-use C4::Interface::CGI::Output;
+use C4::Output;
use C4::Auth;
use C4::Search;
use C4::Languages; # getAllLanguages
diff --git a/opac/opac-sendbasket.pl b/opac/opac-sendbasket.pl
index 87e71b6fbe..44305fc0cb 100755
--- a/opac/opac-sendbasket.pl
+++ b/opac/opac-sendbasket.pl
@@ -23,7 +23,7 @@ use MIME::QuotedPrint;
use MIME::Base64;
use C4::Biblio;
use C4::Auth;
-use C4::Interface::CGI::Output;
+use C4::Output;
use C4::Biblio;
my $query = new CGI;
diff --git a/opac/opac-serial-issues.pl b/opac/opac-serial-issues.pl
index 493b70dc97..298c090544 100755
--- a/opac/opac-serial-issues.pl
+++ b/opac/opac-serial-issues.pl
@@ -27,7 +27,6 @@ use C4::Date;
use C4::Serials;
use C4::Letters;
use C4::Output;
-use C4::Interface::CGI::Output;
use C4::Context;
diff --git a/opac/opac-shelves.pl b/opac/opac-shelves.pl
index ee4439b37d..ac4a26cda5 100755
--- a/opac/opac-shelves.pl
+++ b/opac/opac-shelves.pl
@@ -70,7 +70,7 @@ use C4::Output;
use C4::BookShelves;
use C4::Circulation;
use C4::Auth;
-use C4::Interface::CGI::Output;
+use C4::Output;
my $query = new CGI;
@@ -229,6 +229,13 @@ output_html_with_http_headers $query, $cookie, $template->output;
#
# $Log$
+# Revision 1.12 2007/04/24 13:54:29 hdl
+# functions that were in C4::Interface::CGI::Output are now in C4::Output.
+# So this implies quite a change for files.
+# Sorry about conflicts which will be caused.
+# directory Interface::CGI should now be dropped.
+# I noticed that many scripts (reports ones, but also some circ/stats.pl or opac-topissues) still use Date::Manip.
+#
# Revision 1.11 2007/04/17 08:52:19 tipaul
# circulation cleaning continued: bufixing
#
diff --git a/opac/opac-showreviews.pl b/opac/opac-showreviews.pl
index 8e75ed070a..b636acceba 100755
--- a/opac/opac-showreviews.pl
+++ b/opac/opac-showreviews.pl
@@ -20,7 +20,7 @@ require Exporter;
use CGI;
use C4::Auth;
use C4::Koha;
-use C4::Interface::CGI::Output;
+use C4::Output;
use C4::Circulation;
use C4::Review;
use C4::Biblio;
diff --git a/opac/opac-suggestions.pl b/opac/opac-suggestions.pl
index cdec0e7fe3..a8b8a6b8f4 100755
--- a/opac/opac-suggestions.pl
+++ b/opac/opac-suggestions.pl
@@ -19,7 +19,7 @@ use strict;
require Exporter;
use CGI;
use C4::Auth; # get_template_and_user
-use C4::Interface::CGI::Output;
+use C4::Output;
use C4::Suggestions;
my $input = new CGI;
diff --git a/opac/opac-tags_subject.pl b/opac/opac-tags_subject.pl
index 61af51df28..11cea1653a 100755
--- a/opac/opac-tags_subject.pl
+++ b/opac/opac-tags_subject.pl
@@ -30,7 +30,6 @@ require Exporter;
use C4::Auth;
use C4::Context;
use C4::Output;
-use C4::Interface::CGI::Output;
use CGI;
use C4::Biblio;
use C4::Koha; # use getitemtypeinfo
diff --git a/opac/opac-topissues.pl b/opac/opac-topissues.pl
index c0c26c8e12..ca74b85ec4 100755
--- a/opac/opac-topissues.pl
+++ b/opac/opac-topissues.pl
@@ -20,14 +20,13 @@
# Suite 330, Boston, MA 02111-1307 USA
use strict;
-use C4::Auth;
use CGI;
+use C4::Auth;
use C4::Context;
use C4::Search;
use C4::Output;
use C4::Koha;
use C4::Branch;
-use C4::Interface::CGI::Output;
use Date::Manip;
=head1 NAME
diff --git a/opac/opac-user.pl b/opac/opac-user.pl
index 29893c54dc..274ca0bfa6 100755
--- a/opac/opac-user.pl
+++ b/opac/opac-user.pl
@@ -26,7 +26,7 @@ use C4::Koha;
use C4::Circulation;
use C4::Reserves;
use C4::Members;
-use C4::Interface::CGI::Output;
+use C4::Output;
use C4::Biblio;
use C4::Date;
use C4::Letters;
diff --git a/opac/opac-userdetails.pl b/opac/opac-userdetails.pl
index bc36e5cbb3..e09f523604 100755
--- a/opac/opac-userdetails.pl
+++ b/opac/opac-userdetails.pl
@@ -24,7 +24,7 @@ use C4::Auth;
use C4::Koha;
use C4::Circulation;
-use C4::Interface::CGI::Output;
+use C4::Output;
use C4::Date;
use C4::Members;
diff --git a/opac/opac-userupdate.pl b/opac/opac-userupdate.pl
index 7ce2f628da..c2a5826505 100755
--- a/opac/opac-userupdate.pl
+++ b/opac/opac-userupdate.pl
@@ -26,7 +26,7 @@ use C4::Auth; # checkauth, getborrowernumber.
use C4::Context;
use C4::Koha;
use C4::Circulation;
-use C4::Interface::CGI::Output;
+use C4::Output;
use C4::Date;
use C4::Members;
diff --git a/reports/acquisitions_stats.pl b/reports/acquisitions_stats.pl
index f760169254..0b9a19fa52 100755
--- a/reports/acquisitions_stats.pl
+++ b/reports/acquisitions_stats.pl
@@ -28,7 +28,6 @@ use C4::Context;
use C4::Output;
use C4::Koha;
-use C4::Interface::CGI::Output;
use C4::Circulation;
=head1 NAME
diff --git a/reports/bor_issues_top.pl b/reports/bor_issues_top.pl
index 8bfc349725..cfd7b65901 100755
--- a/reports/bor_issues_top.pl
+++ b/reports/bor_issues_top.pl
@@ -20,16 +20,15 @@
# Suite 330, Boston, MA 02111-1307 USA
use strict;
-use C4::Auth;
use CGI;
+use C4::Auth;
+use C4::Output;
use C4::Context;
use C4::Branch; # GetBranches
-use C4::Output;
use C4::Koha;
-use C4::Interface::CGI::Output;
use C4::Circulation;
-use Date::Manip;
use C4::Members;
+use Date::Manip;
=head1 NAME
diff --git a/reports/borrowers_out.pl b/reports/borrowers_out.pl
index 9e642dbcd3..e3a577bb64 100755
--- a/reports/borrowers_out.pl
+++ b/reports/borrowers_out.pl
@@ -20,16 +20,14 @@
# Suite 330, Boston, MA 02111-1307 USA
use strict;
-use C4::Auth;
use CGI;
+use C4::Auth;
use C4::Context;
-
-use C4::Output;
use C4::Koha;
-use C4::Interface::CGI::Output;
+use C4::Output;
use C4::Circulation;
-use Date::Manip;
use C4::Members;
+use Date::Manip;
=head1 NAME
diff --git a/reports/borrowers_stats.pl b/reports/borrowers_stats.pl
index 521595b8fa..b159780eef 100755
--- a/reports/borrowers_stats.pl
+++ b/reports/borrowers_stats.pl
@@ -20,14 +20,13 @@
# Suite 330, Boston, MA 02111-1307 USA
use strict;
-use C4::Auth;
use CGI;
+use C4::Auth;
use C4::Context;
use C4::Branch; # GetBranches
-use C4::Output;
use C4::Koha;
use C4::Acquisition;
-use C4::Interface::CGI::Output;
+use C4::Output;
use C4::Circulation;
=head1 NAME
diff --git a/reports/cat_issues_top.pl b/reports/cat_issues_top.pl
index 9dca9846aa..0c689e411f 100755
--- a/reports/cat_issues_top.pl
+++ b/reports/cat_issues_top.pl
@@ -26,7 +26,6 @@ use C4::Context;
use C4::Branch; # GetBranches
use C4::Output;
use C4::Koha;
-use C4::Interface::CGI::Output;
use C4::Circulation;
use Date::Manip;
use C4::Members;
diff --git a/reports/catalogue_out.pl b/reports/catalogue_out.pl
index 07468003a0..52693243d3 100755
--- a/reports/catalogue_out.pl
+++ b/reports/catalogue_out.pl
@@ -20,13 +20,12 @@
# Suite 330, Boston, MA 02111-1307 USA
use strict;
-use C4::Auth;
use CGI;
+use C4::Auth;
use C4::Context;
use C4::Branch; # GetBranches
use C4::Output;
use C4::Koha;
-use C4::Interface::CGI::Output;
use C4::Circulation;
use Date::Manip;
diff --git a/reports/catalogue_stats.pl b/reports/catalogue_stats.pl
index b2c1494e6a..c7bb42c775 100755
--- a/reports/catalogue_stats.pl
+++ b/reports/catalogue_stats.pl
@@ -26,7 +26,6 @@ use C4::Context;
use C4::Branch; # GetBranches
use C4::Output;
use C4::Koha;
-use C4::Interface::CGI::Output;
use C4::Circulation;
=head1 NAME
diff --git a/reports/inventory.pl b/reports/inventory.pl
index 71c51e19d0..c72adbb39a 100755
--- a/reports/inventory.pl
+++ b/reports/inventory.pl
@@ -22,7 +22,6 @@ use CGI;
use C4::Auth;
use C4::Context;
use C4::Output;
-use C4::Interface::CGI::Output;
use C4::Biblio;
use C4::Date;
diff --git a/reports/issues_avg_stats.pl b/reports/issues_avg_stats.pl
index 128d140b15..ceb736f82f 100755
--- a/reports/issues_avg_stats.pl
+++ b/reports/issues_avg_stats.pl
@@ -26,7 +26,6 @@ use C4::Context;
use C4::Branch; # GetBranches
use C4::Output;
use C4::Koha;
-use C4::Interface::CGI::Output;
use C4::Circulation;
use Date::Calc qw(Delta_Days);
diff --git a/reports/issues_stats.pl b/reports/issues_stats.pl
index bc5f4604e5..454a1140d1 100755
--- a/reports/issues_stats.pl
+++ b/reports/issues_stats.pl
@@ -24,9 +24,8 @@ use C4::Auth;
use CGI;
use C4::Context;
use C4::Branch; # GetBranches
-use C4::Output;
use C4::Koha;
-use C4::Interface::CGI::Output;
+use C4::Output;
use C4::Circulation;
use Date::Manip;
diff --git a/reports/manager.pl b/reports/manager.pl
index aa7cd74f4e..a21f629057 100755
--- a/reports/manager.pl
+++ b/reports/manager.pl
@@ -22,7 +22,6 @@ use CGI;
use C4::Auth;
use C4::Context;
use C4::Output;
-use C4::Interface::CGI::Output;
use C4::Circulation;
diff --git a/reports/reports-home.pl b/reports/reports-home.pl
index 3d164fc742..bfed7a43fe 100644
--- a/reports/reports-home.pl
+++ b/reports/reports-home.pl
@@ -20,7 +20,6 @@ use strict;
use CGI;
use C4::Auth;
use C4::Output;
-use C4::Interface::CGI::Output;
use C4::Context;
diff --git a/reports/reservereport.pl b/reports/reservereport.pl
index 692da8b627..66d4b1bfd4 100755
--- a/reports/reservereport.pl
+++ b/reports/reservereport.pl
@@ -30,7 +30,6 @@ use CGI;
use C4::Output;
use C4::Branch; # GetBranches
use C4::Auth;
-use C4::Interface::CGI::Output;
use C4::Koha;
diff --git a/reports/stats.print.pl b/reports/stats.print.pl
index 8df2ea722e..1d89520fc0 100755
--- a/reports/stats.print.pl
+++ b/reports/stats.print.pl
@@ -5,7 +5,6 @@ use CGI;
use C4::Output;
use C4::Auth;
-use C4::Interface::CGI::Output;
use C4::Context;
use Date::Manip;
use C4::Stats;
diff --git a/reports/stats.screen.pl b/reports/stats.screen.pl
index e2fd380c53..a7161994d9 100755
--- a/reports/stats.screen.pl
+++ b/reports/stats.screen.pl
@@ -19,7 +19,6 @@ use strict;
use CGI;
use C4::Output;
use C4::Auth;
-use C4::Interface::CGI::Output;
use C4::Context;
use Date::Manip;
use C4::Stats;
diff --git a/reserve/request.pl b/reserve/request.pl
index 0c83350b56..659d91207d 100755
--- a/reserve/request.pl
+++ b/reserve/request.pl
@@ -32,7 +32,6 @@ use CGI;
use List::MoreUtils qw/uniq/;
use Date::Calc qw/Today Date_to_Days/;
use C4::Output;
-use C4::Interface::CGI::Output;
use C4::Auth;
use C4::Reserves;
use C4::Biblio;
diff --git a/reviews/reviewswaiting.pl b/reviews/reviewswaiting.pl
index b4f4a0c1b4..aa3903e357 100755
--- a/reviews/reviewswaiting.pl
+++ b/reviews/reviewswaiting.pl
@@ -19,7 +19,6 @@ use strict;
use CGI;
use C4::Auth;
use C4::Output;
-use C4::Interface::CGI::Output;
use C4::Context;
use C4::Review;
use C4::Members;
diff --git a/serials/acqui-search-result.pl b/serials/acqui-search-result.pl
index 64fc6174b3..e9d01cc372 100755
--- a/serials/acqui-search-result.pl
+++ b/serials/acqui-search-result.pl
@@ -45,7 +45,6 @@ use C4::Auth;
use C4::Biblio;
use C4::Output;
use CGI;
-use C4::Interface::CGI::Output;
use C4::Acquisition;
diff --git a/serials/acqui-search.pl b/serials/acqui-search.pl
index f82dc4348a..e8e09b8b93 100755
--- a/serials/acqui-search.pl
+++ b/serials/acqui-search.pl
@@ -23,7 +23,6 @@ use strict;
use CGI;
use C4::Auth;
use C4::Output;
-use C4::Interface::CGI::Output;
use C4::Bookfund;
my $query = new CGI;
diff --git a/serials/checkexpiration.pl b/serials/checkexpiration.pl
index 458beef193..de711b4a5f 100644
--- a/serials/checkexpiration.pl
+++ b/serials/checkexpiration.pl
@@ -48,7 +48,6 @@ use CGI;
use C4::Auth;
use C4::Serials; # GetExpirationDate
use C4::Output;
-use C4::Interface::CGI::Output;
use C4::Context;
use Date::Calc qw/Today Date_to_Days/;
diff --git a/serials/claims.pl b/serials/claims.pl
index db08e23c1c..be12b9c268 100755
--- a/serials/claims.pl
+++ b/serials/claims.pl
@@ -7,7 +7,6 @@ use C4::Serials;
use C4::Acquisition;
use C4::Output;
use C4::Bookseller;
-use C4::Interface::CGI::Output;
use C4::Context;
use C4::Letters;
diff --git a/serials/distributedto.pl b/serials/distributedto.pl
index eabe9672ef..344986eea8 100755
--- a/serials/distributedto.pl
+++ b/serials/distributedto.pl
@@ -53,7 +53,6 @@ use C4::Date;
use C4::Auth;
use C4::Context;
use C4::Output;
-use C4::Interface::CGI::Output;
use C4::Serials;
use C4::Members;
diff --git a/serials/lateissues-excel.pl b/serials/lateissues-excel.pl
index b4d69b4d83..e07eb93c70 100755
--- a/serials/lateissues-excel.pl
+++ b/serials/lateissues-excel.pl
@@ -6,7 +6,6 @@ use C4::Auth;
use C4::Serials;
use C4::Acquisition;
use C4::Output;
-use C4::Interface::CGI::Output;
use C4::Context;
# use Date::Manip;
diff --git a/serials/member-search.pl b/serials/member-search.pl
index dcb9608481..7b17515b4f 100755
--- a/serials/member-search.pl
+++ b/serials/member-search.pl
@@ -24,7 +24,7 @@ Member Search.pl script used to search for members to add to a routing list
use strict;
use CGI;
use C4::Auth; # get_template_and_user
-use C4::Interface::CGI::Output;
+use C4::Output;
use C4::Members; # BornameSearch
my $query = new CGI;
diff --git a/serials/receipt.pl b/serials/receipt.pl
index 2ad8cb5efb..2a07827ff9 100755
--- a/serials/receipt.pl
+++ b/serials/receipt.pl
@@ -23,7 +23,6 @@ use strict;
use CGI;
use C4::Auth;
use C4::Output;
-use C4::Interface::CGI::Output;
use C4::Context;
diff --git a/serials/reorder_members.pl b/serials/reorder_members.pl
index e4eef5f3bb..dd083e50ba 100755
--- a/serials/reorder_members.pl
+++ b/serials/reorder_members.pl
@@ -6,13 +6,12 @@
# printed out
use strict;
use CGI;
-use C4::Koha;
use C4::Auth;
-use C4::Date;
-use C4::Output;
-use C4::Acquisition;
-use C4::Interface::CGI::Output;
use C4::Context;
+use C4::Output;
+use C4::Koha;
+use C4::Date;
+use C4::Acquisition;
use C4::Serials;
my $query = new CGI;
diff --git a/serials/routing-preview.pl b/serials/routing-preview.pl
index d3a60576e3..548b4facf1 100755
--- a/serials/routing-preview.pl
+++ b/serials/routing-preview.pl
@@ -12,7 +12,6 @@ use C4::Output;
use C4::Acquisition;
use C4::Reserves;
use C4::Circulation;
-use C4::Interface::CGI::Output;
use C4::Context;
use C4::Members;
use C4::Biblio;
diff --git a/serials/routing.pl b/serials/routing.pl
index f4d5be7288..0afa519b4a 100755
--- a/serials/routing.pl
+++ b/serials/routing.pl
@@ -32,7 +32,7 @@ use C4::Auth;
use C4::Date;
use C4::Output;
use C4::Acquisition;
-use C4::Interface::CGI::Output;
+use C4::Output;
use C4::Context;
use C4::Members;
diff --git a/serials/serial-issues.pl b/serials/serial-issues.pl
index b9277897b1..05ea2c12d2 100755
--- a/serials/serial-issues.pl
+++ b/serials/serial-issues.pl
@@ -49,7 +49,6 @@ use C4::Koha;
use C4::Date;
use C4::Serials;
use C4::Output;
-use C4::Interface::CGI::Output;
use C4::Context;
diff --git a/serials/serials-collection.pl b/serials/serials-collection.pl
index 3b0704a3be..8aa51e92bd 100755
--- a/serials/serials-collection.pl
+++ b/serials/serials-collection.pl
@@ -27,7 +27,6 @@ use C4::Date;
use C4::Serials;
use C4::Letters;
use C4::Output;
-use C4::Interface::CGI::Output;
use C4::Context;
diff --git a/serials/serials-edit.pl b/serials/serials-edit.pl
index a931813ae3..b6f0e943d1 100755
--- a/serials/serials-edit.pl
+++ b/serials/serials-edit.pl
@@ -70,7 +70,6 @@ use C4::Date;
use C4::Biblio;
use C4::Koha;
use C4::Output;
-use C4::Interface::CGI::Output;
use C4::Context;
use C4::Serials;
diff --git a/serials/serials-home.pl b/serials/serials-home.pl
index 03b89fbf00..7a8c5a28b1 100755
--- a/serials/serials-home.pl
+++ b/serials/serials-home.pl
@@ -46,7 +46,6 @@ use CGI;
use C4::Auth;
use C4::Serials;
use C4::Output;
-use C4::Interface::CGI::Output;
use C4::Context;
my $query = new CGI;
diff --git a/serials/serials-recieve.pl b/serials/serials-recieve.pl
index bb7e5600c7..830c56a975 100755
--- a/serials/serials-recieve.pl
+++ b/serials/serials-recieve.pl
@@ -70,7 +70,6 @@ use C4::Date;
use C4::Biblio;
use C4::Koha;
use C4::Output;
-use C4::Interface::CGI::Output;
use C4::Context;
use C4::Serials;
use C4::Branch; # GetBranches
diff --git a/serials/statecollection.pl b/serials/statecollection.pl
index 9b1608a42c..8f42e704ef 100755
--- a/serials/statecollection.pl
+++ b/serials/statecollection.pl
@@ -22,7 +22,6 @@ use CGI;
use C4::Auth;
use C4::Date;
use C4::Output;
-use C4::Interface::CGI::Output;
use C4::Context;
use C4::Serials;
diff --git a/serials/subscription-add.pl b/serials/subscription-add.pl
index d132bdb7d6..7a00e82782 100755
--- a/serials/subscription-add.pl
+++ b/serials/subscription-add.pl
@@ -17,16 +17,15 @@
use strict;
use CGI;
+use Date::Manip;
use C4::Koha;
use C4::Auth;
use C4::Date;
-use C4::Output;
use C4::Acquisition;
-use C4::Interface::CGI::Output;
+use C4::Output;
use C4::Context;
use C4::Branch; # GetBranches
use C4::Serials;
-use Date::Manip;
use C4::Letters;
my $query = new CGI;
diff --git a/serials/subscription-bib-search.pl b/serials/subscription-bib-search.pl
index c37934621e..6f28c43865 100755
--- a/serials/subscription-bib-search.pl
+++ b/serials/subscription-bib-search.pl
@@ -54,7 +54,6 @@ use C4::Koha;
use C4::Auth;
use C4::Context;
use C4::Output;
-use C4::Interface::CGI::Output;
use C4::Search;
use C4::Biblio;
diff --git a/serials/subscription-copy.pl b/serials/subscription-copy.pl
index a416d69a60..7993f12abc 100755
--- a/serials/subscription-copy.pl
+++ b/serials/subscription-copy.pl
@@ -3,16 +3,15 @@
use strict;
use CGI;
+use Date::Manip;
+
use C4::Koha;
use C4::Auth;
use C4::Date;
use C4::Output;
use C4::Acquisition;
-use C4::Interface::CGI::Output;
use C4::Context;
-
use C4::Serials;
-use Date::Manip;
my $query = new CGI;
my $subscriptionid = $query->param('subscriptionid');
diff --git a/serials/subscription-detail.pl b/serials/subscription-detail.pl
index 5f7c88e281..c26b5a8184 100755
--- a/serials/subscription-detail.pl
+++ b/serials/subscription-detail.pl
@@ -22,7 +22,6 @@ use C4::Koha;
use C4::Date;
use C4::Serials;
use C4::Output;
-use C4::Interface::CGI::Output;
use C4::Context;
use Date::Manip;
diff --git a/serials/subscription-renew.pl b/serials/subscription-renew.pl
index 16cdc7e41a..5856c236e8 100755
--- a/serials/subscription-renew.pl
+++ b/serials/subscription-renew.pl
@@ -56,7 +56,6 @@ use C4::Date;
use C4::Context;
use C4::Auth;
use C4::Output;
-use C4::Interface::CGI::Output;
use C4::Serials;
my $query = new CGI;
diff --git a/serials/viewalerts.pl b/serials/viewalerts.pl
index 5608176ecd..24581f6abc 100755
--- a/serials/viewalerts.pl
+++ b/serials/viewalerts.pl
@@ -20,12 +20,10 @@
# Suite 330, Boston, MA 02111-1307 USA
use strict;
+use CGI;
use C4::Auth;
use C4::Context;
use C4::Output;
-use CGI;
-use C4::Interface::CGI::Output;
-use C4::Interface::CGI::Template;
use C4::Koha;
use C4::Letters;
use C4::Serials;
diff --git a/suggestion/acceptorreject.pl b/suggestion/acceptorreject.pl
index f9f82fa1d7..d51e01d398 100755
--- a/suggestion/acceptorreject.pl
+++ b/suggestion/acceptorreject.pl
@@ -70,7 +70,7 @@ require Exporter;
use CGI;
use C4::Auth; # get_template_and_user
-use C4::Interface::CGI::Output;
+use C4::Output;
use C4::Suggestions;
use C4::Koha; # GetAuthorisedValue
diff --git a/tools/barcodes.pl b/tools/barcodes.pl
index f436888a35..08924f5776 100755
--- a/tools/barcodes.pl
+++ b/tools/barcodes.pl
@@ -3,7 +3,7 @@
# script to generate items barcodes
# written 07/04
# by Veleda Matias - matias_veleda@hotmail.com - Physics Library UNLP Argentina and
-# Castañeda Sebastian - seba3c@yahoo.com.ar - Physics Library UNLP Argentina and
+# Casta�eda Sebastian - seba3c@yahoo.com.ar - Physics Library UNLP Argentina and
# This file is part of Koha.
#
@@ -24,7 +24,6 @@ use strict;
use CGI;
use C4::Auth;
use C4::Output;
-use C4::Interface::CGI::Output;
use C4::Context;
diff --git a/tools/breeding.pl b/tools/breeding.pl
index 89849207db..db304adeb4 100755
--- a/tools/breeding.pl
+++ b/tools/breeding.pl
@@ -32,17 +32,14 @@ use strict;
# standard or CPAN modules used
use CGI;
use DBI;
+use MARC::File::USMARC;
# Koha modules used
use C4::Context;
-use C4::Output;
-use C4::Interface::CGI::Output;
-use C4::Input;
-use C4::Biblio;
-use MARC::File::USMARC;
-
-use C4::Output;
use C4::Auth;
+use C4::Input;
+use C4::Output;
+use C4::Biblio;
use C4::Breeding;
#------------------
@@ -103,6 +100,13 @@ my $file;
#---------------
# log cleared, as marcimport is (almost) rewritten from scratch.
# $Log$
+# Revision 1.3 2007/04/24 13:54:30 hdl
+# functions that were in C4::Interface::CGI::Output are now in C4::Output.
+# So this implies quite a change for files.
+# Sorry about conflicts which will be caused.
+# directory Interface::CGI should now be dropped.
+# I noticed that many scripts (reports ones, but also some circ/stats.pl or opac-topissues) still use Date::Manip.
+#
# Revision 1.2 2007/03/09 15:47:55 tipaul
# rel_3_0 moved to HEAD (introducing new files)
#
diff --git a/tools/cleanborrowers.pl b/tools/cleanborrowers.pl
index 0928e71ddc..3be6059a12 100755
--- a/tools/cleanborrowers.pl
+++ b/tools/cleanborrowers.pl
@@ -36,7 +36,7 @@ This script allows to do 2 things.
use strict;
use CGI;
use C4::Auth;
-use C4::Interface::CGI::Output;
+use C4::Output;
use C4::Members; # GetBorrowersWhoHavexxxBorrowed.
diff --git a/tools/exceptionHolidays.pl b/tools/exceptionHolidays.pl
index 59352e3c5c..dd47161334 100755
--- a/tools/exceptionHolidays.pl
+++ b/tools/exceptionHolidays.pl
@@ -5,7 +5,6 @@ use CGI;
use C4::Auth;
use C4::Output;
-use C4::Interface::CGI::Output;
use C4::Calendar;
diff --git a/tools/export.pl b/tools/export.pl
index c540c6483d..540f6e8771 100755
--- a/tools/export.pl
+++ b/tools/export.pl
@@ -21,7 +21,6 @@
use strict;
require Exporter;
use C4::Auth;
-use C4::Interface::CGI::Output;
use C4::Output; # contains gettemplate
use C4::Biblio; # GetMarcBiblio GetXmlBiblio
use CGI;
diff --git a/tools/holidays.pl b/tools/holidays.pl
index 6994f87408..cf42716067 100755
--- a/tools/holidays.pl
+++ b/tools/holidays.pl
@@ -21,7 +21,6 @@ use CGI;
use C4::Auth;
use C4::Output;
-use C4::Interface::CGI::Output;
use C4::Calendar;
diff --git a/tools/import.pl b/tools/import.pl
index 569dc6cc7a..6b6ca69c9c 100755
--- a/tools/import.pl
+++ b/tools/import.pl
@@ -31,18 +31,14 @@ use strict;
# standard or CPAN modules used
use CGI;
-use DBI;
+use MARC::File::USMARC;
# Koha modules used
use C4::Context;
-use C4::Output;
-use C4::Interface::CGI::Output;
-use C4::Input;
-use C4::Biblio;
-use MARC::File::USMARC;
-
-use C4::Output;
use C4::Auth;
+use C4::Input;
+use C4::Output;
+use C4::Biblio;
use C4::Breeding;
#------------------
@@ -101,6 +97,13 @@ output_html_with_http_headers $input, $cookie, $template->output;
#---------------
# log cleared, as marcimport is (almost) rewritten from scratch.
# $Log$
+# Revision 1.5 2007/04/24 13:54:30 hdl
+# functions that were in C4::Interface::CGI::Output are now in C4::Output.
+# So this implies quite a change for files.
+# Sorry about conflicts which will be caused.
+# directory Interface::CGI should now be dropped.
+# I noticed that many scripts (reports ones, but also some circ/stats.pl or opac-topissues) still use Date::Manip.
+#
# Revision 1.4 2007/03/09 15:14:47 tipaul
# rel_3_0 moved to HEAD
#
diff --git a/tools/inventory.pl b/tools/inventory.pl
index b2120d8ff2..97a97bba3d 100755
--- a/tools/inventory.pl
+++ b/tools/inventory.pl
@@ -22,7 +22,6 @@ use CGI;
use C4::Auth;
use C4::Context;
use C4::Output;
-use C4::Interface::CGI::Output;
use C4::Biblio;
use C4::Date;
use C4::Koha;
diff --git a/tools/itemslost.pl b/tools/itemslost.pl
index 0861339086..6fa02726c3 100755
--- a/tools/itemslost.pl
+++ b/tools/itemslost.pl
@@ -26,7 +26,7 @@ This script displays lost items.
use strict;
use CGI;
use C4::Auth;
-use C4::Interface::CGI::Output;
+use C4::Output;
use C4::Biblio; # GetLostItems
use C4::Koha; # GetItemTypes
use C4::Branch; # GetBranches
diff --git a/tools/koha-news.pl b/tools/koha-news.pl
index 1169d3bcde..68ea6750d0 100755
--- a/tools/koha-news.pl
+++ b/tools/koha-news.pl
@@ -2,7 +2,7 @@
# Script to manage the opac news.
# written 11/04
-# Castañeda, Carlos Sebastian - seba3c@yahoo.com.ar - Physics Library UNLP Argentina
+# Casta�eda, Carlos Sebastian - seba3c@yahoo.com.ar - Physics Library UNLP Argentina
# Modified to include news to KOHA intranet - tgarip@neu.edu.tr NEU library -Cyprus
# Copyright 2000-2002 Katipo Communications
#
@@ -27,7 +27,6 @@ use C4::Auth;
use C4::Koha;
use C4::Context;
use C4::Output;
-use C4::Interface::CGI::Output;
use C4::NewsChannels;
use C4::Languages;
use Date::Calc qw/Date_to_Days Today/;
diff --git a/tools/letter.pl b/tools/letter.pl
index eb954f8506..9be77f7806 100755
--- a/tools/letter.pl
+++ b/tools/letter.pl
@@ -43,7 +43,6 @@ use C4::Date;
use C4::Auth;
use C4::Context;
use C4::Output;
-use C4::Interface::CGI::Output;
sub StringSearch {
diff --git a/tools/newHolidays.pl b/tools/newHolidays.pl
index a22a19e995..71dd8397ef 100755
--- a/tools/newHolidays.pl
+++ b/tools/newHolidays.pl
@@ -5,7 +5,6 @@ use CGI;
use C4::Auth;
use C4::Output;
-use C4::Interface::CGI::Output;
use C4::Calendar;
diff --git a/tools/overduerules.pl b/tools/overduerules.pl
index 75948b2f3f..5bdec702e2 100755
--- a/tools/overduerules.pl
+++ b/tools/overduerules.pl
@@ -21,11 +21,8 @@ use strict;
use CGI;
use C4::Context;
use C4::Output;
-
use C4::Auth;
-use C4::Output;
use C4::Koha;
-use C4::Interface::CGI::Output;
use C4::Branch; # GetBranches
use C4::Letters;
diff --git a/tools/printerConfig.pl b/tools/printerConfig.pl
index a29ff78027..ede9395a2b 100755
--- a/tools/printerConfig.pl
+++ b/tools/printerConfig.pl
@@ -22,16 +22,14 @@
require Exporter;
use strict;
-
use CGI;
-use C4::Context;
-use C4::Output;
-use C4::Auth;
-
use PDF::API2;
use PDF::API2::Page;
use PDF::API2::PDF::Utils;
-use C4::Interface::CGI::Output;
+
+use C4::Context;
+use C4::Output;
+use C4::Auth;
# This function returns the path to deal with the correct files, considering
# templates set and language.
diff --git a/tools/tools-home.pl b/tools/tools-home.pl
index 1a87fd6b90..cca60e9a07 100755
--- a/tools/tools-home.pl
+++ b/tools/tools-home.pl
@@ -18,7 +18,7 @@
use strict;
use CGI;
use C4::Auth;
-use C4::Interface::CGI::Output;
+use C4::Output;
my $query = new CGI;
my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
diff --git a/tools/viewlog.pl b/tools/viewlog.pl
index 691fe35529..080b1ccc00 100755
--- a/tools/viewlog.pl
+++ b/tools/viewlog.pl
@@ -24,7 +24,7 @@ use C4::Auth;
use CGI;
use C4::Context;
use C4::Koha;
-use C4::Interface::CGI::Output;
+use C4::Output;
use C4::Log;
use Date::Manip;