Bugzilla – Attachment 2823 Details for
Bug 5431
Separate state field for library addresses
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
proposed patch
0001-Bug-5431-Separate-state-field-for-library-addresses.patch (text/plain), 7.94 KB, created by
Katrin Fischer
on 2010-12-09 06:22:21 UTC
(
hide
)
Description:
proposed patch
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2010-12-09 06:22:21 UTC
Size:
7.94 KB
patch
obsolete
>From e30f4f7953191971678f1fc2392869d9f4587754 Mon Sep 17 00:00:00 2001 >From: Katrin Fischer <Katrin.Fischer.83@web.de> >Date: Thu, 9 Dec 2010 07:14:03 +0100 >Subject: [PATCH] Bug 5431: Separate state field for library addresses >Content-Type: text/plain; charset="utf-8" > >--- > C4/Branch.pm | 10 ++++++---- > admin/branches.pl | 3 ++- > installer/data/mysql/kohastructure.sql | 1 + > installer/data/mysql/updatedatabase.pl | 7 +++++++ > .../prog/en/modules/admin/branches.tmpl | 6 ++++-- > kohaversion.pl | 2 +- > 6 files changed, 21 insertions(+), 8 deletions(-) > >diff --git a/C4/Branch.pm b/C4/Branch.pm >index 056a1d1..27ad998 100644 >--- a/C4/Branch.pm >+++ b/C4/Branch.pm >@@ -202,7 +202,7 @@ sub ModBranch { > my $query = " > INSERT INTO branches > (branchcode,branchname,branchaddress1, >- branchaddress2,branchaddress3,branchzip,branchcity, >+ branchaddress2,branchaddress3,branchzip,branchcity,branchstate, > branchcountry,branchphone,branchfax,branchemail, > branchurl,branchip,branchprinter,branchnotes) > VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) >@@ -212,7 +212,8 @@ sub ModBranch { > $data->{'branchcode'}, $data->{'branchname'}, > $data->{'branchaddress1'}, $data->{'branchaddress2'}, > $data->{'branchaddress3'}, $data->{'branchzip'}, >- $data->{'branchcity'}, $data->{'branchcountry'}, >+ $data->{'branchcity'}, $data->{'branchstate'}, >+ $data->{'branchcountry'}, > $data->{'branchphone'}, $data->{'branchfax'}, > $data->{'branchemail'}, $data->{'branchurl'}, > $data->{'branchip'}, $data->{'branchprinter'}, >@@ -224,7 +225,7 @@ sub ModBranch { > UPDATE branches > SET branchname=?,branchaddress1=?, > branchaddress2=?,branchaddress3=?,branchzip=?, >- branchcity=?,branchcountry=?,branchphone=?, >+ branchcity=?,branchstate=?,branchcountry=?,branchphone=?, > branchfax=?,branchemail=?,branchurl=?,branchip=?, > branchprinter=?,branchnotes=? > WHERE branchcode=? >@@ -234,7 +235,8 @@ sub ModBranch { > $data->{'branchname'}, > $data->{'branchaddress1'}, $data->{'branchaddress2'}, > $data->{'branchaddress3'}, $data->{'branchzip'}, >- $data->{'branchcity'}, $data->{'branchcountry'}, >+ $data->{'branchcity'}, $data->{'branchstate'}, >+ $data->{'branchcountry'}, > $data->{'branchphone'}, $data->{'branchfax'}, > $data->{'branchemail'}, $data->{'branchurl'}, > $data->{'branchip'}, $data->{'branchprinter'}, >diff --git a/admin/branches.pl b/admin/branches.pl >index 758fa32..b83fb67 100755 >--- a/admin/branches.pl >+++ b/admin/branches.pl >@@ -343,7 +343,7 @@ sub branchinfotable { > for my $field ( > 'branchaddress1', 'branchaddress2', > 'branchaddress3', 'branchzip', >- 'branchcity', 'branchcountry', >+ 'branchcity', 'branchstate', 'branchcountry', > 'branchphone', 'branchfax', > 'branchemail', 'branchurl', > 'branchip', 'branchprinter', 'branchnotes' >@@ -402,6 +402,7 @@ sub _branch_to_template { > branchaddress3 => $data->{'branchaddress3'}, > branchzip => $data->{'branchzip'}, > branchcity => $data->{'branchcity'}, >+ branchstate => $data->{'branchstate'}, > branchcountry => $data->{'branchcountry'}, > branchphone => $data->{'branchphone'}, > branchfax => $data->{'branchfax'}, >diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql >index 9148970..dc3df00 100644 >--- a/installer/data/mysql/kohastructure.sql >+++ b/installer/data/mysql/kohastructure.sql >@@ -342,6 +342,7 @@ CREATE TABLE `branches` ( > `branchaddress3` mediumtext, > `branchzip` varchar(25) default NULL, > `branchcity` mediumtext, >+ `branchstate` mediumtext, > `branchcountry` text, > `branchphone` mediumtext, > `branchfax` mediumtext, >diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl >index d093946..1b1d39c 100755 >--- a/installer/data/mysql/updatedatabase.pl >+++ b/installer/data/mysql/updatedatabase.pl >@@ -3876,6 +3876,13 @@ VALUES > SetVersion ($DBversion); > }; > >+$DBversion = '3.0X.XX.XXX'; >+if (C4::Context->preference("Version") < TransformToNum($DBversion)) { >+ $dbh->do("ALTER TABLE branches ADD `branchstate` mediumtext AFTER `branchcity`;"); >+ print "Upgrade to $DBversion done (Add state to branch address)\n"; >+ SetVersion ($DBversion); >+} >+ > =head1 FUNCTIONS > > =head2 DropAllForeignKeys($table) >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/branches.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/branches.tmpl >index aaa869c..b294a3b 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/branches.tmpl >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/branches.tmpl >@@ -109,7 +109,8 @@ > <li><label for="branchaddress1">Address Line 1</label><input type="text" name="branchaddress1" id="branchaddress1" value="<!-- TMPL_VAR name="branchaddress1" escape="HTML" -->" /></li> > <li><label for="branchaddress2">Address Line 2</label><input type="text" name="branchaddress2" id="branchaddress2" value="<!-- TMPL_VAR name="branchaddress2" escape="HTML" -->" /></li> > <li><label for="branchaddress3">Address Line 3</label><input type="text" name="branchaddress3" id="branchaddress3" value="<!-- TMPL_VAR name="branchaddress3" escape="HTML" -->" /></li> >- <li><label for="branchcity">City, State</label><input type="text" name="branchcity" id="branchcity" value="<!-- TMPL_VAR name="branchcity" escape="HTML" -->" /></li> >+ <li><label for="branchcity">City</label><input type="text" name="branchcity" id="branchcity" value="<!-- TMPL_VAR name="branchcity" escape="HTML" -->" /></li> >+ <li><label for="branchstate">State</label><input type="text" name="branchstate" id="branchstate" value="<!-- TMPL_VAR name="branchstate" escape="HTML" -->" /></li> > <li><label for="branchzip">Zip/Postal Code</label><input type="text" name="branchzip" id="branchzip" value="<!-- TMPL_VAR name="branchzip" escape="HTML" -->" /></li> > <li><label for="branchcountry">Country</label><input type="text" name="branchcountry" id="branchcountry" value="<!-- TMPL_VAR name="branchcountry" escape="HTML" -->" /></li> > <li><label for="branchphone">Phone</label><input type="text" name="branchphone" id="branchphone" value="<!-- TMPL_VAR name="branchphone" escape="HTML" -->" /></li> >@@ -193,7 +194,8 @@ > <!-- TMPL_IF name="branchzip" --> > <br /><!-- TMPL_VAR name="branchzip" escape="HTML" --><!-- /TMPL_IF --> > <!-- TMPL_IF name="branchcity" --> >- <br /><!-- TMPL_VAR name="branchcity" escape="HTML" --><!-- /TMPL_IF --> >+ <br /><!-- TMPL_VAR name="branchcity" escape="HTML" --><!-- /TMPL_IF --><!-- TMPL_IF name="branchstate" -->, >+ <!-- TMPL_VAR name="branchstate" escape="HTML" --><!-- /TMPL_IF --> > <!-- TMPL_IF name="branchcountry" --> > <br /><!-- TMPL_VAR name="branchcountry" escape="HTML" --><!-- /TMPL_IF --> > <!-- TMPL_IF name="branchphone" --> >diff --git a/kohaversion.pl b/kohaversion.pl >index 53c1724..3ece202 100644 >--- a/kohaversion.pl >+++ b/kohaversion.pl >@@ -16,7 +16,7 @@ the kohaversion is divided in 4 parts : > use strict; > > sub kohaversion { >- our $VERSION = '3.03.00.004'; >+ our $VERSION = '3.0X.XX.XXX'; > # version needs to be set this way > # so that it can be picked up by Makefile.PL > # during install >-- >1.7.1 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 5431
:
2823
|
2989
|
3805
|
3855
|
3885