Browse files

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.
  • Loading branch information...
1 parent 4dea4d2 commit 100e6a9808ead4ee8d951da59ead1550e75bb4c3 hdl committed Apr 24, 2007
Showing with 213 additions and 302 deletions.
  1. +0 −1 C4/Auth.pm
  2. +63 −1 C4/Output.pm
  3. +0 −1 about.pl
  4. +0 −1 acqui/acqui-home.pl
  5. +0 −2 acqui/addorder.pl
  6. +0 −1 acqui/basket.pl
  7. +1 −1 acqui/bookfund.pl
  8. +0 −1 acqui/booksellers.pl
  9. +1 −1 acqui/histsearch.pl
  10. +0 −1 acqui/lateorders.pl
  11. +1 −2 acqui/neworderbiblio.pl
  12. +0 −1 acqui/neworderempty.pl
  13. +1 −1 acqui/newordersuggestion.pl
  14. +1 −1 acqui/orderreceive.pl
  15. +1 −2 acqui/parcel.pl
  16. +0 −1 acqui/parcels.pl
  17. +1 −1 acqui/spent.pl
  18. +0 −1 acqui/supplier.pl
  19. +0 −1 admin/admin-home.pl
  20. +0 −1 admin/aqbookfund.pl
  21. +0 −1 admin/aqbudget.pl
  22. +0 −1 admin/auth_subfields_structure.pl
  23. +0 −1 admin/auth_tag_structure.pl
  24. +0 −1 admin/authorised_values.pl
  25. +1 −2 admin/authtypes.pl
  26. +1 −2 admin/biblio_framework.pl
  27. +0 −1 admin/branches.pl
  28. +1 −3 admin/categorie.pl
  29. +1 −3 admin/categoryitem.pl
  30. +0 −1 admin/checkmarc.pl
  31. +1 −3 admin/cities.pl
  32. +1 −3 admin/currency.pl
  33. +1 −3 admin/finesrules.pl
  34. +0 −3 admin/issuingrules.pl
  35. +1 −2 admin/itemtypecategory.pl
  36. +1 −2 admin/itemtypes.pl
  37. +1 −2 admin/itemtypesubcategory.pl
  38. +0 −1 admin/koha2marclinks.pl
  39. +0 −1 admin/letter.pl
  40. +0 −1 admin/marc_subfields_structure.pl
  41. +0 −1 admin/marctagstructure.pl
  42. +1 −2 admin/mediatype.pl
  43. +0 −2 admin/printers.pl
  44. +1 −2 admin/roadtype.pl
  45. +0 −1 admin/systempreferences.pl
  46. +1 −3 admin/thesaurus.pl
  47. +1 −4 admin/z3950servers.pl
  48. +1 −1 authorities/auth_finder.pl
  49. +0 −1 authorities/authorities-home.pl
  50. +0 −1 authorities/authorities.pl
  51. +0 −1 authorities/blinddetail-biblio-search.pl
  52. +0 −1 authorities/detail-biblio-search.pl
  53. +0 −1 authorities/detail.pl
  54. +1 −2 barcodes/barcodes.pl
  55. +0 −1 barcodes/label-home.pl
  56. +0 −1 barcodes/label-item-search.pl
  57. +0 −1 barcodes/label-manager.pl
  58. +0 −1 barcodes/label-print-opus-pdf.pl
  59. +0 −1 barcodes/label-print-pdf.pl
  60. +0 −1 barcodes/label-print.pl
  61. +0 −1 barcodes/printerConfig.pl
  62. +7 −1 bookshelves/addbookbybiblionumber.pl
  63. +8 −2 bookshelves/shelves.pl
  64. +0 −1 catalogue/ISBDdetail.pl
  65. +0 −1 catalogue/MARCdetail.pl
  66. +1 −1 catalogue/detail.pl
  67. +1 −2 catalogue/detailprint.pl
  68. +1 −2 catalogue/dictionary.pl
  69. +1 −1 catalogue/issuehistory.pl
  70. +0 −1 catalogue/moredetail.pl
  71. +1 −1 catalogue/search.pl
  72. +0 −1 catalogue/suggest.pl
  73. +0 −1 cataloguing/addbiblio.pl
  74. +0 −1 cataloguing/addbooks.pl
  75. +0 −1 cataloguing/additem.pl
  76. +1 −3 cataloguing/thesaurus_popup.pl
  77. +1 −1 cataloguing/value_builder/labs_theses.pl
  78. +0 −2 cataloguing/value_builder/marc21_field_003.pl
  79. +0 −2 cataloguing/value_builder/marc21_field_005.pl
  80. +0 −1 cataloguing/value_builder/marc21_field_040c.pl
  81. +0 −1 cataloguing/value_builder/marc21_field_040d.pl
  82. +7 −6 cataloguing/value_builder/unimarc_field_210c.pl
  83. +1 −1 cataloguing/value_builder/unimarc_field_4XX.pl
  84. +0 −2 cataloguing/value_builder/usmarc_field_952v.pl
  85. +0 −1 cataloguing/z3950_search.pl
  86. +1 −1 circ/branchoverdues.pl
  87. +0 −1 circ/branchtransfers.pl
  88. +5 −5 circ/circulation.pl
  89. +0 −1 circ/overdue.pl
  90. +1 −2 circ/reserve.pl
  91. +3 −4 circ/returns.pl
  92. +0 −1 circ/selectbranchprinter.pl
  93. +1 −2 circ/stats.pl
  94. +0 −1 export/export.pl
  95. +0 −1 export/export_filtered.pl
  96. +0 −1 export/marc.pl
  97. +1 −1 help.pl
  98. +1 −2 installer/InstallAuth.pm
  99. +1 −1 installer/install.pl
  100. +0 −1 members/boraccount.pl
  101. +0 −1 members/borrowers_details.pl
  102. +0 −1 members/deletemem.pl
  103. +0 −1 members/guarantor_search.pl
  104. +0 −1 members/mancredit.pl
  105. +0 −1 members/maninvoice.pl
  106. +1 −1 members/member-flags.pl
  107. +0 −1 members/member-password.pl
  108. +0 −2 members/member-picupload.pl
  109. +0 −1 members/member.pl
  110. +0 −1 members/memberentry.pl
  111. +0 −1 members/members-home.pl
  112. +2 −4 members/moremember.pl
  113. +3 −3 members/pay.pl
  114. +0 −1 members/readingrec.pl
  115. +0 −1 opac/opac-ISBDdetail.pl
  116. +0 −1 opac/opac-MARCdetail.pl
  117. +1 −3 opac/opac-account.pl
  118. +1 −2 opac/opac-addbookbybiblionumber.pl
  119. +0 −1 opac/opac-alert-subscribe.pl
  120. +0 −1 opac/opac-authorities-home.pl
  121. +0 −1 opac/opac-authoritiesdetail.pl
  122. +1 −1 opac/opac-basket.pl
  123. +0 −1 opac/opac-browser.pl
  124. +1 −1 opac/opac-detail.pl
  125. +1 −2 opac/opac-detailprint.pl
  126. +0 −1 opac/opac-dictionary.pl
  127. +1 −1 opac/opac-main.pl
  128. +1 −1 opac/opac-passwd.pl
  129. +1 −1 opac/opac-readingrecord.pl
  130. +1 −1 opac/opac-reserve.pl
  131. +1 −1 opac/opac-review.pl
  132. +1 −1 opac/opac-search.pl
  133. +1 −1 opac/opac-sendbasket.pl
  134. +0 −1 opac/opac-serial-issues.pl
  135. +8 −1 opac/opac-shelves.pl
  136. +1 −1 opac/opac-showreviews.pl
  137. +1 −1 opac/opac-suggestions.pl
  138. +0 −1 opac/opac-tags_subject.pl
  139. +1 −2 opac/opac-topissues.pl
  140. +1 −1 opac/opac-user.pl
  141. +1 −1 opac/opac-userdetails.pl
  142. +1 −1 opac/opac-userupdate.pl
  143. +0 −1 reports/acquisitions_stats.pl
  144. +3 −4 reports/bor_issues_top.pl
  145. +3 −5 reports/borrowers_out.pl
  146. +2 −3 reports/borrowers_stats.pl
  147. +0 −1 reports/cat_issues_top.pl
  148. +1 −2 reports/catalogue_out.pl
  149. +0 −1 reports/catalogue_stats.pl
  150. +0 −1 reports/inventory.pl
  151. +0 −1 reports/issues_avg_stats.pl
  152. +1 −2 reports/issues_stats.pl
  153. +0 −1 reports/manager.pl
  154. +0 −1 reports/reports-home.pl
  155. +0 −1 reports/reservereport.pl
  156. +0 −1 reports/stats.print.pl
  157. +0 −1 reports/stats.screen.pl
  158. +0 −1 reserve/request.pl
  159. +0 −1 reviews/reviewswaiting.pl
  160. +0 −1 serials/acqui-search-result.pl
  161. +0 −1 serials/acqui-search.pl
  162. +0 −1 serials/checkexpiration.pl
  163. +0 −1 serials/claims.pl
  164. +0 −1 serials/distributedto.pl
  165. +0 −1 serials/lateissues-excel.pl
  166. +1 −1 serials/member-search.pl
  167. +0 −1 serials/receipt.pl
  168. +3 −4 serials/reorder_members.pl
  169. +0 −1 serials/routing-preview.pl
  170. +1 −1 serials/routing.pl
  171. +0 −1 serials/serial-issues.pl
  172. +0 −1 serials/serials-collection.pl
  173. +0 −1 serials/serials-edit.pl
  174. +0 −1 serials/serials-home.pl
  175. +0 −1 serials/serials-recieve.pl
  176. +0 −1 serials/statecollection.pl
  177. +2 −3 serials/subscription-add.pl
  178. +0 −1 serials/subscription-bib-search.pl
  179. +2 −3 serials/subscription-copy.pl
  180. +0 −1 serials/subscription-detail.pl
  181. +0 −1 serials/subscription-renew.pl
  182. +1 −3 serials/viewalerts.pl
  183. +1 −1 suggestion/acceptorreject.pl
  184. +1 −2 tools/barcodes.pl
  185. +10 −6 tools/breeding.pl
  186. +1 −1 tools/cleanborrowers.pl
  187. +0 −1 tools/exceptionHolidays.pl
  188. +0 −1 tools/export.pl
  189. +0 −1 tools/holidays.pl
  190. +10 −7 tools/import.pl
  191. +0 −1 tools/inventory.pl
  192. +1 −1 tools/itemslost.pl
  193. +1 −2 tools/koha-news.pl
  194. +0 −1 tools/letter.pl
  195. +0 −1 tools/newHolidays.pl
  196. +0 −3 tools/overduerules.pl
  197. +4 −6 tools/printerConfig.pl
  198. +1 −1 tools/tools-home.pl
  199. +1 −1 tools/viewlog.pl
View
1 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
View
64 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 =~ /<meta\s+http-equiv=(["']?)Content-Type\1\s+content=(["'])text\/html\s*;\s*charset=([^\2\s\r\n]+)\2\s*(?:\/?)>/is) {
+ $charset = $3;
+ } elsif ($html =~ /<meta\s+content=(["'])text\/html\s*;\s*charset=([^\1\s\r\n]+)\1\s+http-equiv=(["']?)Content-Type\3\s*(?:\/?)>/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;
View
1 about.pl
@@ -20,7 +20,6 @@
require Exporter;
use C4::Output; # contains gettemplate
-use C4::Interface::CGI::Output;
use C4::Auth;
use C4::Context;
use CGI;
View
1 acqui/acqui-home.pl
@@ -44,7 +44,6 @@ =head1 CGI PARAMETERS
use CGI;
use C4::Auth;
use C4::Output;
-use C4::Interface::CGI::Output;
use C4::Suggestions;
View
2 acqui/addorder.pl
@@ -115,12 +115,10 @@ =head1 CGI PARAMETERS
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;
View
1 acqui/basket.pl
@@ -27,7 +27,6 @@
use C4::Koha;
use C4::Output;
use CGI;
-use C4::Interface::CGI::Output;
use C4::Acquisition;
View
2 acqui/bookfund.pl
@@ -21,7 +21,7 @@
use strict;
use CGI;
use C4::Auth;
-use C4::Interface::CGI::Output;
+use C4::Output;
my $dbh = C4::Context->dbh;
my $input = new CGI;
View
1 acqui/booksellers.pl
@@ -58,7 +58,6 @@ =head1 CGI PARAMETERS
use C4::Biblio;
use C4::Output;
use CGI;
-use C4::Interface::CGI::Output;
use C4::Acquisition;
View
2 acqui/histsearch.pl
@@ -52,7 +52,7 @@ =head1 CGI PARAMETERS
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;
View
1 acqui/lateorders.pl
@@ -49,7 +49,6 @@ =head1 CGI PARAMETERS
use C4::Auth;
use C4::Koha;
use C4::Output;
-use C4::Interface::CGI::Output;
use C4::Context;
use C4::Acquisition;
use C4::Letters;
View
3 acqui/neworderbiblio.pl
@@ -57,12 +57,11 @@ =head1 CGI PARAMETERS
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;
View
1 acqui/neworderempty.pl
@@ -76,7 +76,6 @@ =head1 CGI PARAMETERS
use C4::Output;
use C4::Input;
use C4::Koha;
-use C4::Interface::CGI::Output;
use C4::Branch; # GetBranches
use C4::Members;
View
2 acqui/newordersuggestion.pl
@@ -91,7 +91,7 @@ =head1 CGI PARAMETERS
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;
View
2 acqui/orderreceive.pl
@@ -63,7 +63,7 @@ =head1 CGI PARAMETERS
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;
View
3 acqui/parcel.pl
@@ -59,9 +59,8 @@ =head1 CGI PARAMETERS
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;
View
1 acqui/parcels.pl
@@ -65,7 +65,6 @@ =head1 CGI PARAMETERS
use CGI;
use C4::Auth;
use C4::Output;
-use C4::Interface::CGI::Output;
use C4::Date;
View
2 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;
View
1 acqui/supplier.pl
@@ -47,7 +47,6 @@ =head1 CGI PARAMETERS
use C4::Biblio;
use C4::Output;
use CGI;
-use C4::Interface::CGI::Output;
use C4::Bookseller;
View
1 admin/admin-home.pl
@@ -19,7 +19,6 @@
use CGI;
use C4::Auth;
use C4::Output;
-use C4::Interface::CGI::Output;
View
1 admin/aqbookfund.pl
@@ -59,7 +59,6 @@ =head1 CGI PARAMETERS
use C4::Context;
use C4::Bookfund;
use C4::Output;
-use C4::Interface::CGI::Output;
use C4::Date;
my $dbh = C4::Context->dbh;
View
1 admin/aqbudget.pl
@@ -47,7 +47,6 @@
use C4::Acquisition;
use C4::Context;
use C4::Output;
-use C4::Interface::CGI::Output;
use C4::Koha;
my $input = new CGI;
View
1 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;
View
1 admin/auth_tag_structure.pl
@@ -24,7 +24,6 @@
use C4::Koha;
use C4::Context;
use C4::Output;
-use C4::Interface::CGI::Output;
use C4::Context;
View
1 admin/authorised_values.pl
@@ -22,7 +22,6 @@
use C4::Auth;
use C4::Context;
use C4::Output;
-use C4::Interface::CGI::Output;
use C4::Context;
View
3 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 {
View
3 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 {
View
1 admin/branches.pl
@@ -48,7 +48,6 @@ =head1 branches.pl
use C4::Auth;
use C4::Context;
use C4::Output;
-use C4::Interface::CGI::Output;
use C4::Koha;
use C4::Branch;
View
4 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)=@_;
View
4 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)=@_;
View
1 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;
View
4 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)=@_;
View
4 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)=@_;
View
4 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;
View
3 admin/issuingrules.pl
@@ -21,11 +21,8 @@
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;
View
3 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 {
View
3 admin/itemtypes.pl
@@ -45,9 +45,8 @@
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)=@_;
View
3 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 {
View
1 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;
View
1 admin/letter.pl
@@ -43,7 +43,6 @@
use C4::Auth;
use C4::Context;
use C4::Output;
-use C4::Interface::CGI::Output;
sub StringSearch {
View
1 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;
View
1 admin/marctagstructure.pl
@@ -24,7 +24,6 @@
use C4::Koha;
use C4::Context;
use C4::Output;
-use C4::Interface::CGI::Output;
use C4::Context;
View
3 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 {
View
2 admin/printers.pl
@@ -41,9 +41,7 @@
use CGI;
use C4::Context;
use C4::Output;
-
use C4::Auth;
-use C4::Interface::CGI::Output;
sub StringSearch {
my ($searchstring,$type)=@_;
View
3 admin/roadtype.pl
@@ -21,9 +21,8 @@
use CGI;
use C4::Context;
use C4::Output;
-
use C4::Auth;
-use C4::Interface::CGI::Output;
+
sub StringSearch {
my ($searchstring,$type)=@_;
View
1 admin/systempreferences.pl
@@ -47,7 +47,6 @@ =head1 systempreferences.pl
use C4::Koha;
use C4::Languages;
use C4::Output;
-use C4::Interface::CGI::Output;
use C4::Context;
View
4 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;
View
5 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)=@_;
View
2 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;
View
1 authorities/authorities-home.pl
@@ -26,7 +26,6 @@
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
View
1 authorities/authorities.pl
@@ -23,7 +23,6 @@
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
View
1 authorities/blinddetail-biblio-search.pl
@@ -44,7 +44,6 @@ =head1 FUNCTIONS
use C4::Auth;
use C4::Context;
use C4::Output;
-use C4::Interface::CGI::Output;
use CGI;
use MARC::Record;
use C4::Koha;
View
1 authorities/detail-biblio-search.pl
@@ -44,7 +44,6 @@ =head1 FUNCTIONS
use C4::Auth;
use C4::Context;
use C4::Output;
-use C4::Interface::CGI::Output;
use CGI;
use MARC::Record;
use C4::Koha;
View
1 authorities/detail.pl
@@ -44,7 +44,6 @@ =head1 FUNCTIONS
use C4::Auth;
use C4::Context;
use C4::Output;
-use C4::Interface::CGI::Output;
use CGI;
use MARC::Record;
use C4::Koha;
View
3 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 CGI;
use C4::Auth;
use C4::Output;
-use C4::Interface::CGI::Output;
use C4::Context;
use C4::Barcodes::PrinterConfig;
View
1 barcodes/label-home.pl
@@ -20,7 +20,6 @@
use C4::Auth;
use C4::Output;
use C4::Labels;
-use C4::Interface::CGI::Output;
use C4::Context;
View
1 barcodes/label-item-search.pl
@@ -27,7 +27,6 @@
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
View
1 barcodes/label-manager.pl
@@ -20,7 +20,6 @@
use C4::Auth;
use C4::Labels;
use C4::Output;
-use C4::Interface::CGI::Output;
use POSIX;
View
1 barcodes/label-print-opus-pdf.pl
@@ -20,7 +20,6 @@
use C4::Labels;
use C4::Auth;
use C4::Output;
-use C4::Interface::CGI::Output;
use C4::Context;
use PDF::Reuse;
use PDF::Reuse::Barcode;
View
1 barcodes/label-print-pdf.pl
@@ -36,7 +36,6 @@ =head1 label-print-pdf.pl
use C4::Labels;
use C4::Auth;
use C4::Output;
-use C4::Interface::CGI::Output;
use C4::Context;
use PDF::Reuse;
View
1 barcodes/label-print.pl
@@ -20,7 +20,6 @@
use C4::Auth;
use C4::Serials;
use C4::Output;
-use C4::Interface::CGI::Output;
use C4::Context;
use GD::Barcode::UPCE;
View
1 barcodes/printerConfig.pl
@@ -31,7 +31,6 @@
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.
View
8 bookshelves/addbookbybiblionumber.pl
@@ -62,7 +62,6 @@ =head1 CGI PARAMETERS
use C4::BookShelves;
use C4::Circulation;
use C4::Auth;
-use C4::Interface::CGI::Output;
#use it only to debug !
@@ -122,6 +121,13 @@ =head1 CGI PARAMETERS
}
# $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.
#
View
10 bookshelves/shelves.pl
@@ -65,11 +65,10 @@ =head1 CGI PARAMETERS
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.
#
View
1 catalogue/ISBDdetail.pl
@@ -39,7 +39,6 @@ =head1 FUNCTIONS
use C4::Auth;
use C4::Context;
use C4::Output;
-use C4::Interface::CGI::Output;
use CGI;
use C4::Koha;
use C4::Biblio;
View
1 catalogue/MARCdetail.pl
@@ -48,7 +48,6 @@ =head1 FUNCTIONS
use C4::Auth;
use C4::Context;
use C4::Output;
-use C4::Interface::CGI::Output;
use CGI;
use C4::Koha;
use MARC::Record;
View
2 catalogue/detail.pl
@@ -22,7 +22,7 @@
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;
View
3 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;
View
3 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 @@ =head1 SYNOPSIS
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++) {
View
2 catalogue/issuehistory.pl
@@ -21,7 +21,7 @@
require Exporter;
use CGI;
use C4::Auth;
-use C4::Interface::CGI::Output;
+use C4::Output;
use C4::Circulation; # GetBiblioIssues
View
1 catalogue/moredetail.pl
@@ -27,7 +27,6 @@
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
View
2 catalogue/search.pl
@@ -145,7 +145,7 @@ =head3 Additional Notes
# 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
View
1 catalogue/suggest.pl
@@ -26,7 +26,6 @@
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
View
1 cataloguing/addbiblio.pl
@@ -23,7 +23,6 @@
use CGI;
use C4::Auth;
use C4::Output;
-use C4::Interface::CGI::Output;
use C4::Biblio;
use C4::Search;
use C4::Context;
View
1 cataloguing/addbooks.pl
@@ -38,7 +38,6 @@
use C4::Biblio;
use C4::Breeding;
use C4::Output;
-use C4::Interface::CGI::Output;
use C4::Koha;
use C4::Search;
View
1 cataloguing/additem.pl
@@ -23,7 +23,6 @@
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
View
4 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');
View
2 cataloguing/value_builder/labs_theses.pl
@@ -21,7 +21,7 @@
require Exporter;
use CGI;
-use C4::Interface::CGI::Output;
+use C4::Output;
use C4::Context;
use C4::Auth;
use C4::Output;
View
2 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;
View
2 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;
View
1 cataloguing/value_builder/marc21_field_040c.pl
@@ -24,7 +24,6 @@
use C4::Auth;
use C4::Context;
use C4::Output;
-use C4::Interface::CGI::Output;
use CGI;
use C4::Search;
use MARC::Record;
View
1 cataloguing/value_builder/marc21_field_040d.pl
@@ -24,7 +24,6 @@
use C4::Auth;
use C4::Context;
use C4::Output;
-use C4::Interface::CGI::Output;
use CGI;
use C4::Search;
use MARC::Record;
View
13 cataloguing/value_builder/unimarc_field_210c.pl
@@ -24,12 +24,11 @@
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 @@ sub plugin_javascript {
#---- 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");
View
2 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;
View
2 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;
View
1 cataloguing/z3950_search.pl
@@ -22,7 +22,6 @@
use C4::Auth;
use C4::Output;
-use C4::Interface::CGI::Output;
use C4::Biblio;
use C4::Context;
use C4::Breeding;
View
2 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
View
1 circ/branchtransfers.pl
@@ -28,7 +28,6 @@
use C4::Reserves;
use C4::Biblio;
use C4::Auth;
-use C4::Interface::CGI::Output;
use C4::Branch; # GetBranches
use C4::Koha;
View
10 circ/circulation.pl
@@ -28,9 +28,13 @@
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 @@
Date_to_Days
);
-use C4::Circulation;
-use C4::Members;
-use C4::Biblio;
-use C4::Reserves;
#
# PARAMETERS READING
View
1 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;
View
3 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');
View
7 circ/returns.pl
@@ -27,18 +27,17 @@ =head1 returns.pl
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;
View
1 circ/selectbranchprinter.pl
@@ -23,7 +23,6 @@
use C4::Output;
use C4::Auth;
use C4::Print;
-use C4::Interface::CGI::Output;
use C4::Koha;
use C4::Branch; # GetBranches
View
3 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;
View
1 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;
View
1 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;
View
1 export/marc.pl
@@ -24,7 +24,6 @@
require Exporter;
use C4::Auth;
-use C4::Interface::CGI::Output;
use C4::Output; # contains gettemplate
use C4::Biblio;
use CGI;
View
2 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;
View
3 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);
View
2 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
View
1 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;
View
1 members/borrowers_details.pl
@@ -29,7 +29,6 @@
use C4::Auth;
use C4::Context;
use C4::Output;
-use C4::Interface::CGI::Output;
use CGI;
use C4::Members;
use C4::Koha;
View
1 members/deletemem.pl
@@ -28,7 +28,6 @@
use CGI;
use C4::Context;
-use C4::Interface::CGI::Output;
use C4::Output;
use C4::Circulation;
use C4::Auth;
View
1 members/guarantor_search.pl
@@ -24,7 +24,6 @@
use strict;
use C4::Auth;
use C4::Output;
-use C4::Interface::CGI::Output;
use CGI;
#op
View
1 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;
View
1 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;
View
2 members/member-flags.pl
@@ -13,7 +13,7 @@
use C4::Members;
#use C4::Acquisitions;
-use C4::Interface::CGI::Output;
+use C4::Output;
my $input = new CGI;