Lines 98-109
sub GetMarcFieldsForCsv {
Link Here
|
98 |
|
98 |
|
99 |
# Returns informations aboout csv profiles suitable for html templates |
99 |
# Returns informations aboout csv profiles suitable for html templates |
100 |
sub GetCsvProfilesLoop { |
100 |
sub GetCsvProfilesLoop { |
101 |
# List of existing profiles |
101 |
my ( $type ) = @_; |
|
|
102 |
# List of existing profiles |
102 |
my $dbh = C4::Context->dbh; |
103 |
my $dbh = C4::Context->dbh; |
103 |
my $sth; |
104 |
my $sth; |
104 |
my $query = "SELECT export_format_id, profile FROM export_format"; |
105 |
my $query = "SELECT export_format_id, profile FROM export_format"; |
|
|
106 |
if ( $type ) { |
107 |
$query .= " WHERE type = ?"; |
108 |
} |
109 |
|
105 |
$sth = $dbh->prepare($query); |
110 |
$sth = $dbh->prepare($query); |
106 |
$sth->execute(); |
111 |
$sth->execute( $type ? $type : () ); |
107 |
return $sth->fetchall_arrayref({}); |
112 |
return $sth->fetchall_arrayref({}); |
108 |
|
113 |
|
109 |
} |
114 |
} |