projects
/
koha.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Bug 10572: Add phone to message_transport_types table for new installs
[koha.git]
/
C4
/
Csv.pm
diff --git
a/C4/Csv.pm
b/C4/Csv.pm
index
13ab1a4
..
511540c
100644
(file)
--- a/
C4/Csv.pm
+++ b/
C4/Csv.pm
@@
-98,12
+98,17
@@
sub GetMarcFieldsForCsv {
# Returns informations aboout csv profiles suitable for html templates
sub GetCsvProfilesLoop {
# Returns informations aboout csv profiles suitable for html templates
sub GetCsvProfilesLoop {
- # List of existing profiles
+ my ( $type ) = @_;
+ # List of existing profiles
my $dbh = C4::Context->dbh;
my $sth;
my $query = "SELECT export_format_id, profile FROM export_format";
my $dbh = C4::Context->dbh;
my $sth;
my $query = "SELECT export_format_id, profile FROM export_format";
+ if ( $type ) {
+ $query .= " WHERE type = ?";
+ }
+
$sth = $dbh->prepare($query);
$sth = $dbh->prepare($query);
- $sth->execute();
+ $sth->execute(
$type ? $type : ()
);
return $sth->fetchall_arrayref({});
}
return $sth->fetchall_arrayref({});
}