Bugzilla – Attachment 115144 Details for
Bug 22544
Move C4:NewsChannels to Koha namespace
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 22544: Update to current codebase
Bug-22544-Update-to-current-codebase.patch (text/plain), 7.17 KB, created by
Josef Moravec
on 2021-01-14 11:34:15 UTC
(
hide
)
Description:
Bug 22544: Update to current codebase
Filename:
MIME Type:
Creator:
Josef Moravec
Created:
2021-01-14 11:34:15 UTC
Size:
7.17 KB
patch
obsolete
>From 717d78a05542f8a61f8a3afbce19f94343ff53db Mon Sep 17 00:00:00 2001 >From: Josef Moravec <josef.moravec@gmail.com> >Date: Wed, 30 Sep 2020 18:58:01 +0000 >Subject: [PATCH] Bug 22544: Update to current codebase > >--- > Koha/News.pm | 9 +++++++-- > koha-tmpl/intranet-tmpl/prog/en/modules/intranet-main.tt | 2 +- > koha-tmpl/intranet-tmpl/prog/en/modules/tools/koha-news.tt | 2 +- > t/db_dependent/Koha/News.t | 12 ++++++------ > tools/koha-news.pl | 4 ++-- > 5 files changed, 17 insertions(+), 12 deletions(-) > >diff --git a/Koha/News.pm b/Koha/News.pm >index f0106a7852..79f2a2104a 100644 >--- a/Koha/News.pm >+++ b/Koha/News.pm >@@ -55,7 +55,12 @@ type is one of this: > - slip - for ISSUESLIP notice > - koha - for intranet > - opac - for online catalogue >-- OpanNavRight - Right column in the online catalogue >+- OpacNavRight - Right column in the online catalogue >+- OpacLoginInstructions >+- OpacMainUserBlock >+- OpacCustomSearch >+- opacheader >+- opaccredits > > lang is language code - it is used only when type is opac or OpacNavRight > >@@ -78,7 +83,7 @@ sub search_for_display { > } > > $search_params->{branchcode} = [ $params->{library_id}, undef ] if $params->{library_id}; >- $search_params->{timestamp} = { '<=' => \'NOW()' }; >+ $search_params->{published_on} = { '<=' => \'NOW()' }; > $search_params->{-or} = [ expirationdate => { '>=' => \'NOW()' }, > expirationdate => undef ]; > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/intranet-main.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/intranet-main.tt >index 514cb116fa..c83f09b184 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/intranet-main.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/intranet-main.tt >@@ -25,7 +25,7 @@ > [% FOREACH koha_new IN koha_news %] > <div class="newsitem" id="news[% koha_new.idnew | html %]"><h4>[% koha_new.title | html %]</h4> > <div class="newsbody">[% koha_new.content | $raw %]</div> >- <p class="newsfooter"> Posted on [% koha_new.timestamp | $KohaDates %][% IF( show_author && koha_new.borrowernumber ) %] by <span class="newsauthor_title">[% koha_new.author.title | html %] </span>[% koha_new.author.firstname | html %] [% koha_new.author.surname | html %]<br />[% END %] >+ <p class="newsfooter"> Posted on [% koha_new.published_on | $KohaDates %][% IF( show_author && koha_new.borrowernumber ) %] by <span class="newsauthor_title">[% koha_new.author.title | html %] </span>[% koha_new.author.firstname | html %] [% koha_new.author.surname | html %]<br />[% END %] > [% IF ( CAN_user_tools ) %] > <a href="/cgi-bin/koha/tools/koha-news.pl?op=add_form&id=[% koha_new.idnew | uri %]">Edit</a> > | <a class="news_delete" href="/cgi-bin/koha/tools/koha-news.pl?op=del&ids=[% koha_new.idnew | html %]">Delete</a> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/koha-news.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/koha-news.tt >index a94e78c4cd..8ca8278b1f 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/koha-news.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/koha-news.tt >@@ -149,7 +149,7 @@ Edit news item[% ELSE %]Add news item[% END %][% ELSE %]News[% END %]</div> > [% ELSE %][% opac_new.library.branchname | html %] > [% END %]</td> > <td>[% opac_new.number | html %]</td> >- <td><span title="[% opac_new.timestamp | html %]">[% opac_new.timestamp | $KohaDates %]</span></td> >+ <td><span title="[% opac_new.published_on | html %]">[% opac_new.published_on | $KohaDates %]</span></td> > <td><span title="[% opac_new.expirationdate | html %]">[% opac_new.expirationdate | $KohaDates %] [% IF ( opac_new.is_expired ) %](<span class="expired">expired</span>)[% END %]</span></td> > <td>[% opac_new.title | html %]</td> > <td>[% IF ( opac_new.author) %][% INCLUDE 'patron-title.inc' patron=opac_new.author hide_patron_infos_if_needed=1 %][% END %]</td> >diff --git a/t/db_dependent/Koha/News.t b/t/db_dependent/Koha/News.t >index 4ee810229d..3d0ba8fc5e 100755 >--- a/t/db_dependent/Koha/News.t >+++ b/t/db_dependent/Koha/News.t >@@ -174,7 +174,7 @@ subtest '->search_for_display' => sub { > class => 'Koha::News', > value => { > expirationdate => $yesterday, >- timestamp => $today, >+ published_on => $today, > lang => '', > branchcode => undef, > number => 1, >@@ -184,7 +184,7 @@ subtest '->search_for_display' => sub { > class => 'Koha::News', > value => { > expirationdate => $tomorrow, >- timestamp => $today, >+ published_on => $today, > lang => '', > branchcode => undef, > number => 2, >@@ -194,7 +194,7 @@ subtest '->search_for_display' => sub { > class => 'Koha::News', > value => { > expirationdate => $tomorrow, >- timestamp => $tomorrow, >+ published_on => $tomorrow, > lang => '', > branchcode => undef, > number => 3, >@@ -204,7 +204,7 @@ subtest '->search_for_display' => sub { > class => 'Koha::News', > value => { > expirationdate => $tomorrow, >- timestamp => $today, >+ published_on => $today, > lang => 'slip', > branchcode => $library1->branchcode, > number => 4, >@@ -214,7 +214,7 @@ subtest '->search_for_display' => sub { > class => 'Koha::News', > value => { > expirationdate => $tomorrow, >- timestamp => $today, >+ published_on => $today, > lang => 'koha', > branchcode => $library2->branchcode, > number => 5, >@@ -224,7 +224,7 @@ subtest '->search_for_display' => sub { > class => 'Koha::News', > value => { > expirationdate => $tomorrow, >- timestamp => $today, >+ published_on => $today, > lang => 'koha', > branchcode => undef, > number => 5, >diff --git a/tools/koha-news.pl b/tools/koha-news.pl >index 1184f38798..1ddb186e78 100755 >--- a/tools/koha-news.pl >+++ b/tools/koha-news.pl >@@ -113,7 +113,7 @@ elsif ( $op eq 'add' ) { > content => $content, > lang => $lang, > expirationdate => $expirationdate, >- timestamp => $timestamp, >+ published_on => $published_on, > number => $number, > branchcode => $branchcode, > borrowernumber => $borrowernumber, >@@ -151,7 +151,7 @@ else { > my $opac_news = Koha::News->search( > $params, > { >- order_by => { -desc => 'timestamp' }, >+ order_by => { -desc => 'published_on' }, > } > ); > $template->param( opac_news => $opac_news ); >-- >2.11.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 22544
:
86772
|
86773
|
86774
|
86775
|
86776
|
86777
|
86780
|
86781
|
90103
|
90104
|
90105
|
90106
|
90107
|
90108
|
90109
|
90110
|
92005
|
92006
|
92007
|
92008
|
92009
|
92010
|
92011
|
92012
|
95613
|
95614
|
95615
|
95627
|
95628
|
95629
|
95630
|
95631
|
95632
|
95633
|
95634
|
99849
|
99850
|
99851
|
99852
|
99853
|
99854
|
99855
|
99856
|
99857
|
104176
|
104177
|
104178
|
104179
|
104180
|
104181
|
104182
|
104183
|
104184
|
111012
|
111013
|
111014
|
111015
|
111016
|
111017
|
111018
|
111019
|
111020
|
111021
|
111022
|
111023
|
115135
|
115136
|
115137
|
115138
|
115139
|
115140
|
115141
|
115142
|
115143
|
115144
|
115145
|
115146
|
115218
|
115296
|
115297
|
115298
|
115299
|
116933
|
116934
|
116935
|
117479
|
117480
|
117481
|
117482
|
117483
|
117484
|
117485
|
117486
|
117487
|
117488
|
117489
|
117490
|
117491
|
117492
|
117493
|
117494
|
117495
|
117496
|
117497
|
118054
|
118055
|
118056
|
118057
|
118058
|
118059
|
118060
|
118061
|
118062
|
118063
|
118064
|
118065
|
118066
|
118067
|
118068
|
118069
|
118070
|
118071
|
118072
|
118073
|
118087
|
118088
|
118089
|
118090
|
118091
|
118092
|
118093
|
118094
|
118095
|
118096
|
118097
|
118098
|
118099
|
118100
|
118101
|
118102
|
118103
|
118104
|
118105
|
118106
|
120377
|
120378
|
120379
|
120380
|
120381
|
120382
|
120383
|
120384
|
120385
|
120386
|
120387
|
120388
|
120389
|
120390
|
120391
|
120392
|
120393
|
120394
|
120395
|
120396
|
122396
|
122397
|
122398
|
122399
|
122400
|
122401
|
122402
|
122403
|
122404
|
122405
|
122406
|
122407
|
122408
|
122409
|
122410
|
122411
|
122412
|
122413
|
122414
|
122415