Bugzilla – Attachment 38717 Details for
Bug 13421
Add the creation time for virtual shelves
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 13421 - Change creation_time to created_on
Bug-13421---Change-creationtime-to-createdon.patch (text/plain), 5.77 KB, created by
Jonathan Druart
on 2015-04-30 07:42:33 UTC
(
hide
)
Description:
Bug 13421 - Change creation_time to created_on
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2015-04-30 07:42:33 UTC
Size:
5.77 KB
patch
obsolete
>From 3cc17e5738ec89ff2ac0d7ba5eeca051cd231d72 Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Fri, 19 Dec 2014 10:20:22 -0500 >Subject: [PATCH] Bug 13421 - Change creation_time to created_on > >--- > C4/Utils/DataTables/VirtualShelves.pm | 2 +- > C4/VirtualShelves.pm | 2 +- > installer/data/mysql/kohastructure.sql | 2 +- > installer/data/mysql/updatedatabase.pl | 8 ++++---- > koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt | 2 +- > .../prog/en/modules/virtualshelves/tables/shelves_results.tt | 4 ++-- > 6 files changed, 10 insertions(+), 10 deletions(-) > >diff --git a/C4/Utils/DataTables/VirtualShelves.pm b/C4/Utils/DataTables/VirtualShelves.pm >index e49fde2..a305617 100644 >--- a/C4/Utils/DataTables/VirtualShelves.pm >+++ b/C4/Utils/DataTables/VirtualShelves.pm >@@ -32,7 +32,7 @@ sub search { > # But the code is too dirty to refactor... > my $select = q| > SELECT vs.shelfnumber, vs.shelfname, vs.owner, vs.category AS type, >- vs.creation_time, vs.lastmodified as modification_time, >+ vs.created_on, vs.lastmodified as modification_time, > bo.surname, bo.firstname, vs.sortfield as sortby, > count(vc.biblionumber) as count > |; >diff --git a/C4/VirtualShelves.pm b/C4/VirtualShelves.pm >index d376039..3833eec 100644 >--- a/C4/VirtualShelves.pm >+++ b/C4/VirtualShelves.pm >@@ -318,7 +318,7 @@ sub AddShelf { > return -1 unless _CheckShelfName($hashref->{shelfname}, $hashref->{category}, $owner, 0); > > my $query = q|INSERT INTO virtualshelves >- (shelfname,owner,category,sortfield,allow_add,allow_delete_own,allow_delete_other, creation_time) >+ (shelfname,owner,category,sortfield,allow_add,allow_delete_own,allow_delete_other, created_on) > VALUES (?,?,?,?,?,?,?, NOW()) > |; > >diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql >index 5062458..471ac4a 100644 >--- a/installer/data/mysql/kohastructure.sql >+++ b/installer/data/mysql/kohastructure.sql >@@ -2311,7 +2311,7 @@ CREATE TABLE `virtualshelves` ( -- information about lists (or virtual shelves) > `category` varchar(1) default NULL, -- type of list (private [1], public [2]) > `sortfield` varchar(16) default NULL, -- the field this list is sorted on > `lastmodified` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, -- date and time the list was last modified >- `creation_time` TIMESTAMP NOT NULL, -- creation time >+ `created_on` TIMESTAMP NOT NULL, -- creation time > `allow_add` tinyint(1) default 0, -- permission for adding entries to list > `allow_delete_own` tinyint(1) default 1, -- permission for deleting entries frm list that you added yourself > `allow_delete_other` tinyint(1) default 0, -- permission for deleting entries from list that another person added >diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl >index f2e8ae4..4a2fb53 100755 >--- a/installer/data/mysql/updatedatabase.pl >+++ b/installer/data/mysql/updatedatabase.pl >@@ -10319,16 +10319,16 @@ $DBversion = "3.19.00.XXX"; > if ( CheckVersion($DBversion) ) { > $dbh->do(q| > ALTER TABLE virtualshelves >- ADD COLUMN creation_time TIMESTAMP NOT NULL AFTER lastmodified >+ ADD COLUMN created_on TIMESTAMP NOT NULL AFTER lastmodified > |); >- # Set creation_time = lastmodified >+ # Set created_on = lastmodified > # I would say it's better than 0000-00-00 > # Set modified to the existing value (do not get the current ts!) > $dbh->do(q| > UPDATE virtualshelves >- SET creation_time = lastmodified, lastmodified = lastmodified >+ SET created_on = lastmodified, lastmodified = lastmodified > |); >- print "Upgrade to $DBversion done (Bug XXXXX: Add DB field virtualshelves.creation_time)\n"; >+ print "Upgrade to $DBversion done (Bug XXXXX: Add DB field virtualshelves.created_on)\n"; > SetVersion ($DBversion); > } > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt >index 59953b9..0f479a5 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt >@@ -54,7 +54,7 @@ $(document).ready(function(){ > { 'mDataProp': 'dt_count' }, > { 'mDataProp': 'dt_owner' }, > { 'mDataProp': 'dt_sortby' }, >- { 'mDataProp': 'dt_creation_time' }, >+ { 'mDataProp': 'dt_created_on' }, > { 'mDataProp': 'dt_modification_time' }, > { 'mDataProp': 'dt_action', 'bSortable': false } > ], >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/tables/shelves_results.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/tables/shelves_results.tt >index e156c27..e6909d6 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/tables/shelves_results.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/tables/shelves_results.tt >@@ -16,8 +16,8 @@ > "<a href='/cgi-bin/koha/members/moremember.pl?borrowernumber=[% data.owner %]'>[% data.firstname %] [% data.surname %]</a>", > "dt_sortby": > [% IF data.sortby == "author" %]"Author"[% ELSIF data.sortby == "copyrightdate" %]"Year"[% ELSIF data.sortby == "itemcallnumber" %]"Call number"[% ELSE %]"Title"[% END %], >- "dt_creation_time": >- "[% data.creation_time | $KohaDates %]", >+ "dt_created_on": >+ "[% data.created_on | $KohaDates %]", > "dt_modification_time": > "[% data.modification_time | $KohaDates %]", > "dt_action": >-- >2.1.0
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 13421
:
34244
|
34505
|
34581
|
34583
|
38716
| 38717 |
39185