View | Details | Raw Unified | Return to bug 8943
Collapse All | Expand All

(-)a/C4/Creators/Lib.pm (-2 / +4 lines)
Lines 155-161 sub get_all_templates { Link Here
155
    my %params = @_;
155
    my %params = @_;
156
    my @templates = ();
156
    my @templates = ();
157
    my $query = "SELECT " . ($params{'field_list'} ? $params{'field_list'} : '*') . " FROM creator_templates";
157
    my $query = "SELECT " . ($params{'field_list'} ? $params{'field_list'} : '*') . " FROM creator_templates";
158
    $query .= ($params{'filter'} ? " WHERE $params{'filter'};" : ';');
158
    $query .= ($params{'filter'} ? " WHERE $params{'filter'} " : '');
159
    $query .= ($params{'orderby'} ? " ORDER BY $params{'orderby'} " : '');
159
    my $sth = C4::Context->dbh->prepare($query);
160
    my $sth = C4::Context->dbh->prepare($query);
160
    $sth->execute();
161
    $sth->execute();
161
    if ($sth->err) {
162
    if ($sth->err) {
Lines 181-187 sub get_all_layouts { Link Here
181
    my %params = @_;
182
    my %params = @_;
182
    my @layouts = ();
183
    my @layouts = ();
183
    my $query = "SELECT " . ($params{'field_list'} ? $params{'field_list'} : '*') . " FROM creator_layouts";
184
    my $query = "SELECT " . ($params{'field_list'} ? $params{'field_list'} : '*') . " FROM creator_layouts";
184
    $query .= ($params{'filter'} ? " WHERE $params{'filter'};" : ';');
185
    $query .= ($params{'filter'} ? " WHERE $params{'filter'} " : '');
186
    $query .= ($params{'orderby'} ? " ORDER BY $params{'orderby'} " : '');
185
    my $sth = C4::Context->dbh->prepare($query);
187
    my $sth = C4::Context->dbh->prepare($query);
186
    $sth->execute();
188
    $sth->execute();
187
    if ($sth->err) {
189
    if ($sth->err) {
(-)a/labels/label-print.pl (-3 / +2 lines)
Lines 115-122 elsif ($op eq 'none') { Link Here
115
    @batch_ids = map{{batch_id => $_}} @batch_ids;
115
    @batch_ids = map{{batch_id => $_}} @batch_ids;
116
    @label_ids = map{{label_id => $_}} @label_ids;
116
    @label_ids = map{{label_id => $_}} @label_ids;
117
    @item_numbers = map{{item_number => $_}} @item_numbers;
117
    @item_numbers = map{{item_number => $_}} @item_numbers;
118
    $templates = get_all_templates(field_list => 'template_id, template_code', filter => 'creator = "Labels"');
118
    $templates = get_all_templates(field_list => 'template_id, template_code', filter => 'creator = "Labels"', orderby => 'template_code' );
119
    $layouts = get_all_layouts(field_list => 'layout_id, layout_name', filter => 'creator = "Labels"');
119
    $layouts = get_all_layouts(field_list => 'layout_id, layout_name', filter => 'creator = "Labels"', orderby => 'layout_name' );
120
    $output_formats = get_output_formats();
120
    $output_formats = get_output_formats();
121
    $template->param(
121
    $template->param(
122
                    batch_ids                   => \@batch_ids,
122
                    batch_ids                   => \@batch_ids,
123
- 

Return to bug 8943