Bug 24545: Fix license statements
[srvgit] / C4 / Creators / Layout.pm
index 73a19fa..5d53743 100644 (file)
@@ -9,9 +9,6 @@ use C4::Context;
 use C4::Debug;
 use C4::Creators::PDF;
 
-BEGIN {
-    use version; our $VERSION = qv('1.0.0_1');
-}
 
 # FIXME: Consider this style parameter verification instead...
 #  my %param = @_;
@@ -33,6 +30,7 @@ sub _check_params {
         'printing_type',
         'layout_name',
         'guidebox',
+        'oblique_title',
         'font',
         'font_size',
         'callnum_split',
@@ -78,6 +76,7 @@ sub new {
             printing_type   =>      'BAR',
             layout_name     =>      'DEFAULT',
             guidebox        =>      0,
+            oblique_title   =>      1,
             font            =>      'TR',
             font_size       =>      3,
             callnum_split   =>      0,
@@ -129,8 +128,8 @@ sub delete {
         push @params, $opts{'layout_id'}, $opts{'creator'};
     }
     if (scalar(@params) < 2) {   # If there is no layout id or creator type then we cannot delete it
-        warn sprintf('%s : Cannot delete layout as the profile id is invalid or non-existant.', $call_type) if !$params[0];
-        warn sprintf('%s : Cannot delete layout as the creator type is invalid or non-existant.', $call_type) if !$params[1];
+        warn sprintf('%s : Cannot delete layout as the profile id is invalid or non-existent.', $call_type) if !$params[0];
+        warn sprintf('%s : Cannot delete layout as the creator type is invalid or non-existent.', $call_type) if !$params[1];
         return -1;
     }
     my $query = "DELETE FROM creator_layouts WHERE layout_id = ? AND creator = ?";
@@ -166,6 +165,7 @@ sub save {
     }
     else {                      # otherwise create a new record
         my @params;
+        delete $self->{layout_id}; # Could be an empty string
         my $query = "INSERT INTO creator_layouts (";
         foreach my $key (keys %{$self}) {
             push (@params, $self->{$key});
@@ -228,7 +228,7 @@ sub get_text_wrap_cols {
     my $textlimit = $params{'label_width'} - (( 3 * $params{'left_text_margin'} ) || 13.5 );
 
     while ($strwidth < $textlimit) {
-        $string .= '0';
+        $string .= '8'; # using '8' as filling char instead of '0'
         $col_count++;
         $strwidth = C4::Creators::PDF->StrWidth( $string, $self->{'font'}, $self->{'font_size'} );
     }
@@ -267,7 +267,7 @@ This module provides methods for creating, retrieving, and otherwise manipulatin
             CODE39MOD10     = Code 3 of 9 with modulo 10 checksum
 
 =item .
-            COOP2OF5        = A varient of 2 of 5 barcode based on NEC's "Process 8000" code
+            COOP2OF5        = A variant of 2 of 5 barcode based on NEC's "Process 8000" code
 
 =item .
             INDUSTRIAL2OF5  = The standard 2 of 5 barcode (a binary level bar code developed by Identicon Corp. and Computer Identics Corp. in 1970)
@@ -425,11 +425,18 @@ Copyright 2009 Foundations Bible College.
 
 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