use C4::Creators::Profile;
use C4::Creators::Lib qw(get_unit_values);
-BEGIN {
- use version; our $VERSION = qv('3.07.00.049');
-}
sub _check_params {
shift if $_[0] =~ m/::/; # this seems a bit hackish
push @query_params, $opts{'template_id'}, $opts{'creator'};
}
if (scalar(@query_params) < 2) { # If there is no template id or creator type then we cannot delete it
- warn sprintf('%s : Cannot delete template as the template id is invalid or non-existant.', $call_type) if !$query_params[0];
- warn sprintf('%s : Cannot delete template as the creator type is invalid or non-existant.', $call_type) if !$query_params[1];
+ warn sprintf('%s : Cannot delete template as the template id is invalid or non-existent.', $call_type) if !$query_params[0];
+ warn sprintf('%s : Cannot delete template as the creator type is invalid or non-existent.', $call_type) if !$query_params[1];
return -1;
}
my $query = "DELETE FROM creator_templates WHERE template_id = ? AND creator = ?";
foreach my $key (keys %{$self}) {
next if ($key eq 'template_id') || ($key eq 'template_stat') || ($key eq 'creator');
push (@params, $self->{$key});
- $query .= "$key=?, ";
+ $query .= "`$key`=?, ";
}
$query = substr($query, 0, (length($query)-2));
push (@params, $self->{'template_id'}, $self->{'creator'});
foreach my $key (keys %{$self}) {
next if $key eq 'template_stat';
push (@params, $self->{$key});
- $query .= "$key, ";
+ $query .= "`$key`, ";
}
$query = substr($query, 0, (length($query)-2));
$query .= ") VALUES (";
my $template = C4::Labels::Template->new(profile_id => 1, page_width => 8.5, page_height => 11.0, units => 'INCH'); # Creates and returns a new template object using
the supplied values to override the defaults
- B<NOTE:> This template is I<not> written to the database untill save() is invoked. You have been warned!
+ B<NOTE:> This template is I<not> written to the database until save() is invoked. You have been warned!
=head2 retrieve(template_id => $template_id)
This file is part of Koha.
-Koha is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software
-Foundation; either version 2 of the License, or (at your option) any later version.
+Koha is free software; you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 3 of the License, or
+(at your option) any later version.
+
+Koha is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
-You should have received a copy of the GNU General Public License along with Koha; if not, write to the Free Software Foundation, Inc., 51 Franklin Street,
-Fifth Floor, Boston, MA 02110-1301 USA.
+You should have received a copy of the GNU General Public License
+along with Koha; if not, see <http://www.gnu.org/licenses>.
=head1 DISCLAIMER OF WARRANTY