From ba40698126a412c7936ebd2feebde46f42197d71 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Wed, 2 Sep 2020 14:36:32 +0200 Subject: [PATCH] Bug 21066: Rename publicationdate with published_on --- C4/NewsChannels.pm | 10 +++++----- .../mysql/de-DE/mandatory/sample_notices.sql | 2 +- .../data/mysql/de-DE/optional/sample_news.sql | 2 +- .../data/mysql/en/mandatory/sample_notices.yml | 2 +- .../data/mysql/en/optional/sample_news.yml | 4 ++-- .../mysql/fr-CA/facultatif/sample_news.sql | 2 +- .../mysql/fr-CA/obligatoire/sample_notices.sql | 2 +- .../fr-FR/1-Obligatoire/sample_notices.sql | 2 +- .../mysql/fr-FR/2-Optionel/sample_news.sql | 2 +- .../data/mysql/it-IT/necessari/notices.sql | 2 +- .../data/mysql/it-IT/optional/sample_news.sql | 2 +- installer/data/mysql/kohastructure.sql | 2 +- .../nb-NO/1-Obligatorisk/sample_notices.sql | 2 +- .../mysql/nb-NO/2-Valgfritt/sample_news.sql | 2 +- .../mysql/pl-PL/mandatory/sample_notices.sql | 2 +- .../data/mysql/pl-PL/optional/sample_news.sql | 2 +- .../data/mysql/ru-RU/optional/sample_news.sql | 16 ++++++++-------- .../mysql/uk-UA/mandatory/sample_notices.sql | 2 +- .../data/mysql/uk-UA/optional/sample_news.sql | 18 +++++++++--------- installer/data/mysql/updatedatabase.pl | 6 +++--- .../prog/en/modules/tools/koha-news.tt | 2 +- .../bootstrap/en/modules/opac-main.tt | 2 +- t/db_dependent/Letters/TemplateToolkit.t | 2 +- t/db_dependent/NewsChannels.t | 16 ++++++++-------- tools/koha-news.pl | 6 +++--- 25 files changed, 56 insertions(+), 56 deletions(-) diff --git a/C4/NewsChannels.pm b/C4/NewsChannels.pm index e9733901a5..7c9df5b2e5 100644 --- a/C4/NewsChannels.pm +++ b/C4/NewsChannels.pm @@ -136,7 +136,7 @@ sub get_opac_new { $sth->execute($idnew); my $data = $sth->fetchrow_hashref; $data->{expirationdate} = output_pref({ dt => dt_from_string( $data->{expirationdate} ), dateonly => 1 }) if ( $data->{expirationdate} ); - $data->{publicationdate} = output_pref({ dt => dt_from_string( $data->{publicationdate} ), dateonly => 1 }); + $data->{published_on} = output_pref({ dt => dt_from_string( $data->{published_on} ), dateonly => 1 }); return $data; } @@ -146,7 +146,7 @@ sub get_opac_news { my $dbh = C4::Context->dbh; my $query = q{ SELECT opac_news.*, branches.branchname, - publicationdate AS newdate, + published_on AS newdate, borrowers.title AS author_title, borrowers.firstname AS author_firstname, borrowers.surname AS author_surname @@ -163,7 +163,7 @@ sub get_opac_news { $query .= ' AND (opac_news.branchcode IS NULL OR opac_news.branchcode=?)'; push @values,$branchcode; } - $query.= ' ORDER BY publicationdate DESC '; + $query.= ' ORDER BY published_on DESC '; #if ($limit) { # $query.= 'LIMIT 0, ' . $limit; #} @@ -193,7 +193,7 @@ sub GetNewsToDisplay { my ($lang,$branch) = @_; my $dbh = C4::Context->dbh; my $query = q{ - SELECT opac_news.*,publicationdate AS newdate, + SELECT opac_news.*,published_on AS newdate, borrowers.title AS author_title, borrowers.firstname AS author_firstname, borrowers.surname AS author_surname @@ -203,7 +203,7 @@ sub GetNewsToDisplay { expirationdate >= CURRENT_DATE() OR expirationdate IS NULL ) - AND publicationdate <= CURDATE() + AND published_on <= CURDATE() AND (opac_news.lang = '' OR opac_news.lang = ?) AND (opac_news.branchcode IS NULL OR opac_news.branchcode = ?) ORDER BY number diff --git a/installer/data/mysql/de-DE/mandatory/sample_notices.sql b/installer/data/mysql/de-DE/mandatory/sample_notices.sql index 6aca8afe30..0bf9d28c5d 100644 --- a/installer/data/mysql/de-DE/mandatory/sample_notices.sql +++ b/installer/data/mysql/de-DE/mandatory/sample_notices.sql @@ -87,7 +87,7 @@ Fällig am: <>
<>

<>

-

<>

+

<>


', 1), diff --git a/installer/data/mysql/de-DE/optional/sample_news.sql b/installer/data/mysql/de-DE/optional/sample_news.sql index 2abc09fbbc..118070d30e 100644 --- a/installer/data/mysql/de-DE/optional/sample_news.sql +++ b/installer/data/mysql/de-DE/optional/sample_news.sql @@ -1,2 +1,2 @@ -INSERT INTO `opac_news` (`title`, `content`, `lang`, `publicationdate`, `expirationdate`, `number`) VALUES ('Willkommen bei Koha','Willkommen bei Koha. Koha ist ein vollständiges integriertes Bibliothekssystem. Es wurde ursprünglich in Neuseeland von Katipo Communications Ltd entwickelt und ging im Januar 2000 für den Horowhenua Library Trust zum ersten mal in Produktion. Koha wird heute von einem internationalen Team aus Support-Dienstleistern und Anwendern weiterentwickelt.','koha','2007-10-29 05:25:58','2099-01-10',1), +INSERT INTO `opac_news` (`title`, `content`, `lang`, `published_on`, `expirationdate`, `number`) VALUES ('Willkommen bei Koha','Willkommen bei Koha. Koha ist ein vollständiges integriertes Bibliothekssystem. Es wurde ursprünglich in Neuseeland von Katipo Communications Ltd entwickelt und ging im Januar 2000 für den Horowhenua Library Trust zum ersten mal in Produktion. Koha wird heute von einem internationalen Team aus Support-Dienstleistern und Anwendern weiterentwickelt.','koha','2007-10-29 05:25:58','2099-01-10',1), ('Was kommt jetzt?','Wie geht es weiter, nachdem Sie Koha installiert haben? Hier einige Vorschläge:\r\n\r\n','koha','2007-10-29 05:34:45','2099-01-10',2); diff --git a/installer/data/mysql/en/mandatory/sample_notices.yml b/installer/data/mysql/en/mandatory/sample_notices.yml index 2e37a168f3..50bb421386 100644 --- a/installer/data/mysql/en/mandatory/sample_notices.yml +++ b/installer/data/mysql/en/mandatory/sample_notices.yml @@ -505,7 +505,7 @@ tables: - "
" - "
<>
" - "

<>

" - - "

Posted on <>

" + - "

Posted on <>

" - "
" - "
" - "" diff --git a/installer/data/mysql/en/optional/sample_news.yml b/installer/data/mysql/en/optional/sample_news.yml index 92490d45ae..badff452a3 100644 --- a/installer/data/mysql/en/optional/sample_news.yml +++ b/installer/data/mysql/en/optional/sample_news.yml @@ -29,7 +29,7 @@ tables: content: - "Welcome to Koha. Koha is a full-featured open-source ILS. Developed initially in New Zealand by Katipo Communications Ltd and first deployed in January of 2000 for Horowhenua Library Trust, Koha is currently maintained by a team of software providers and library technology staff from around the globe." lang: "koha" - publicationdate: "2007-10-29 05:25:58" + published_on: "2007-10-29 05:25:58" expirationdate: "2099-01-10" number: 1 @@ -46,6 +46,6 @@ tables: - "" - "" lang: "koha" - publicationdate: "2007-10-29 05:34:45" + published_on: "2007-10-29 05:34:45" expirationdate: "2099-01-10" number: 2 diff --git a/installer/data/mysql/fr-CA/facultatif/sample_news.sql b/installer/data/mysql/fr-CA/facultatif/sample_news.sql index 2238ead2ac..6d390fc100 100644 --- a/installer/data/mysql/fr-CA/facultatif/sample_news.sql +++ b/installer/data/mysql/fr-CA/facultatif/sample_news.sql @@ -1 +1 @@ -INSERT INTO `opac_news` (`title`, `content`, `lang`, `publicationdate`, `expirationdate`, `number`) VALUES ('Bienvenue dans Koha !','Bienvenue dans Koha 3, la toute nouvelle version du système intégré de gestion de bibliothèque (SIGB) open source de référence. Développé initialement en Nouvelle Zélande et déployé pour la première fois en janvier 2000, Koha est un projet international soutenu par des sociétés de services en logiciels libres et par des bibliothécaires du monde entier.','koha','2008-01-14 03:25:58','2099-01-10',1),('Et maintenant ?','Félicitations ! vous avez désormais une version opérationnelle de Koha. Et maintenant, que faire ?\r\n\r\n','koha','2008-01-14 03:34:45','2099-01-10',2); +INSERT INTO `opac_news` (`title`, `content`, `lang`, `published_on`, `expirationdate`, `number`) VALUES ('Bienvenue dans Koha !','Bienvenue dans Koha 3, la toute nouvelle version du système intégré de gestion de bibliothèque (SIGB) open source de référence. Développé initialement en Nouvelle Zélande et déployé pour la première fois en janvier 2000, Koha est un projet international soutenu par des sociétés de services en logiciels libres et par des bibliothécaires du monde entier.','koha','2008-01-14 03:25:58','2099-01-10',1),('Et maintenant ?','Félicitations ! vous avez désormais une version opérationnelle de Koha. Et maintenant, que faire ?\r\n\r\n','koha','2008-01-14 03:34:45','2099-01-10',2); diff --git a/installer/data/mysql/fr-CA/obligatoire/sample_notices.sql b/installer/data/mysql/fr-CA/obligatoire/sample_notices.sql index 817b4549de..1a231dd12e 100644 --- a/installer/data/mysql/fr-CA/obligatoire/sample_notices.sql +++ b/installer/data/mysql/fr-CA/obligatoire/sample_notices.sql @@ -4,7 +4,7 @@ INSERT INTO `letter` (module, code, branchcode, name, is_html, title, content, m ('circulation','DUE','','Document à rendre aujourd\'hui',0,'Document à rendre aujourd\'hui','Bonjour <> <>,\r\n\r\nLe prêt de ce document arrive à expiration aujourd\'hui.\r\n\r\n<>, <> (<>)\r\n\r\nMerci de nous le retourner.\r\n\r\n<>','email'), ('circulation','DUEDGST','','Document à rendre aujourd\'hui (Résumé)',0,'Document à rendre aujourd\'hui','Bonjour <> <>,\r\n\r\nVous avez <> document(s) dont le prêt arrive à expiration.\r\n\r\nMerci de nous le(s) retourner rapidement.\r\n\r\n<>','email'), ('circulation','ISSUEQSLIP','','Ticket rapide de prêts',1,'Ticket rapide de prêts','

<>

\r\nEmprunté par <> <>
\r\n(<>)
\r\n\r\n<>
\r\n\r\n

Emprunté(s) aujourd\'hui

\r\n\r\n

\r\n<>
\r\nCode-barres : <>
\r\nDate de retour : <>
\r\n

\r\n
','email'), -('circulation','ISSUESLIP','','Ticket de prêts',1,'Ticket de prêts','

<>

\r\nEmprunté par <> <>
\r\n(<>)
\r\n\r\n<>
\r\n\r\n

Emprunté(s) aujourd\'hui

\r\n\r\n

\r\n<>
\r\nCode-barres : <>
\r\nDate de retour : <>
\r\n

\r\n
\r\n\r\n

Retards

\r\n\r\n

\r\n<>
\r\nCode-barres : <>
\r\nDate de retour : <>
\r\n

\r\n
\r\n\r\n
\r\n\r\n

Nouvelles

\r\n\r\n
\r\n
<>
\r\n

<>

\r\n

Publiée le <>

\r\n
\r\n
\r\n
','email'), +('circulation','ISSUESLIP','','Ticket de prêts',1,'Ticket de prêts','

<>

\r\nEmprunté par <> <>
\r\n(<>)
\r\n\r\n<>
\r\n\r\n

Emprunté(s) aujourd\'hui

\r\n\r\n

\r\n<>
\r\nCode-barres : <>
\r\nDate de retour : <>
\r\n

\r\n
\r\n\r\n

Retards

\r\n\r\n

\r\n<>
\r\nCode-barres : <>
\r\nDate de retour : <>
\r\n

\r\n
\r\n\r\n
\r\n\r\n

Nouvelles

\r\n\r\n
\r\n
<>
\r\n

<>

\r\n

Publiée le <>

\r\n
\r\n
\r\n
','email'), ('circulation','ODUE','','Document(s) en retard',0,'Document(s) en retard','Bonjour <> <>,\r\n\r\nSelon nos informations, vous avez au moins un document en retard. Merci de retourner ou renouveller ce ou ces documents dans votre bibliothèque le plus rapidement possible.\r\n\r\n<>\r\n<>\r\n<> <>\r\nTél : <>\r\nFax : <>\r\nCourriel : <>\r\n\r\nSi vous avez le mot de passe de votre compte lecteur, vous pouvez renouveler directement en ligne. Sinon, merci de nous contacter.\r\n\r\nLe ou les documents suivants sont en retard :\r\n\r\n\"<>\" par <>, <>, code-barres : <> Amende : <>\r\n\r\nMerci de votre attention.\r\n\r\n<>','email'), ('circulation','PREDUE','','Document à rendre bientôt',0,'Document à rendre bientôt','Bonjour <> <>,\r\n\r\nNous souhaitons vous informer que le prêt de ce document arrive bientôt à expiration :\r\n\r\n<>, <> (<>)\r\n\r\nMerci.\r\n\r\n<>','email'), ('circulation','PREDUEDGST','','Document à rendre bientôt (Résumé)',0,'Document(s) à rendre bientôt','Bonjour <> <>,\r\n\r\nVous avez <> document(s) dont le prêt arrive bientôt à expiration.\r\n\r\n<>','email'), diff --git a/installer/data/mysql/fr-FR/1-Obligatoire/sample_notices.sql b/installer/data/mysql/fr-FR/1-Obligatoire/sample_notices.sql index 0933d280b3..f844c90b2a 100644 --- a/installer/data/mysql/fr-FR/1-Obligatoire/sample_notices.sql +++ b/installer/data/mysql/fr-FR/1-Obligatoire/sample_notices.sql @@ -83,7 +83,7 @@ Retour le : <>
<>

<>

-

Posted on <>

+

Posted on <>


', 1), diff --git a/installer/data/mysql/fr-FR/2-Optionel/sample_news.sql b/installer/data/mysql/fr-FR/2-Optionel/sample_news.sql index 2238ead2ac..6d390fc100 100644 --- a/installer/data/mysql/fr-FR/2-Optionel/sample_news.sql +++ b/installer/data/mysql/fr-FR/2-Optionel/sample_news.sql @@ -1 +1 @@ -INSERT INTO `opac_news` (`title`, `content`, `lang`, `publicationdate`, `expirationdate`, `number`) VALUES ('Bienvenue dans Koha !','Bienvenue dans Koha 3, la toute nouvelle version du système intégré de gestion de bibliothèque (SIGB) open source de référence. Développé initialement en Nouvelle Zélande et déployé pour la première fois en janvier 2000, Koha est un projet international soutenu par des sociétés de services en logiciels libres et par des bibliothécaires du monde entier.','koha','2008-01-14 03:25:58','2099-01-10',1),('Et maintenant ?','Félicitations ! vous avez désormais une version opérationnelle de Koha. Et maintenant, que faire ?\r\n\r\n','koha','2008-01-14 03:34:45','2099-01-10',2); +INSERT INTO `opac_news` (`title`, `content`, `lang`, `published_on`, `expirationdate`, `number`) VALUES ('Bienvenue dans Koha !','Bienvenue dans Koha 3, la toute nouvelle version du système intégré de gestion de bibliothèque (SIGB) open source de référence. Développé initialement en Nouvelle Zélande et déployé pour la première fois en janvier 2000, Koha est un projet international soutenu par des sociétés de services en logiciels libres et par des bibliothécaires du monde entier.','koha','2008-01-14 03:25:58','2099-01-10',1),('Et maintenant ?','Félicitations ! vous avez désormais une version opérationnelle de Koha. Et maintenant, que faire ?\r\n\r\n','koha','2008-01-14 03:34:45','2099-01-10',2); diff --git a/installer/data/mysql/it-IT/necessari/notices.sql b/installer/data/mysql/it-IT/necessari/notices.sql index a918042967..9be907b0b5 100644 --- a/installer/data/mysql/it-IT/necessari/notices.sql +++ b/installer/data/mysql/it-IT/necessari/notices.sql @@ -88,7 +88,7 @@ Data di scadenza: <>
<>

<>

-

Inserite il <>

+

Inserite il <>


', 1), diff --git a/installer/data/mysql/it-IT/optional/sample_news.sql b/installer/data/mysql/it-IT/optional/sample_news.sql index 3d41342861..9b8350e38d 100644 --- a/installer/data/mysql/it-IT/optional/sample_news.sql +++ b/installer/data/mysql/it-IT/optional/sample_news.sql @@ -13,6 +13,6 @@ -- -- Dump dei dati per la tabella 'opac_news' -- -INSERT INTO opac_news (title, content, lang, publicationdate, expirationdate, number) VALUES +INSERT INTO opac_news (title, content, lang, published_on, expirationdate, number) VALUES ('Benvenuto in Koha', '

Koha è un gestionale di biblioteca (ILS) completo e Open Source. Sviluppato inzialmente in New Zealand da Katipo Communications Ltd e messo in linea per la prima volta nel gennaio 2000 per il Horowhenua Library Trust, Koha è ora mantenuto da un gruppo di aziende di servizi e dipendenti di biblioteca distribuiti in tutto il mondo.

', 'koha', '2007-10-29 00:00:00', '2099-01-10', 1), ('Cosa c''è di nuovo ?', '

Ora che hai installato cosa, qual''è il passo successivo ? Qui alcuni suggerimenti:

\r\n\r\n', 'koha', '2007-10-29 00:00:00', '2099-01-10', 2); diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql index a433603294..a1f886f748 100644 --- a/installer/data/mysql/kohastructure.sql +++ b/installer/data/mysql/kohastructure.sql @@ -1726,7 +1726,7 @@ CREATE TABLE `opac_news` ( -- data from the news tool `title` varchar(250) NOT NULL default '', -- title of the news article `content` MEDIUMTEXT NOT NULL, -- the body of your news article `lang` varchar(50) NOT NULL default '', -- location for the article (koha is the staff interface, slip is the circulation receipt and language codes are for the opac) - `publicationdate` date DEFAULT NULL, -- publication date + `published_on` date DEFAULT NULL, -- publication date `updated_on` timestamp NOT NULL default CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, -- last modification `expirationdate` date default NULL, -- date the article is set to expire or no longer be visible `number` int(11) default NULL, -- the order in which this article appears in that specific location diff --git a/installer/data/mysql/nb-NO/1-Obligatorisk/sample_notices.sql b/installer/data/mysql/nb-NO/1-Obligatorisk/sample_notices.sql index e31859a9a6..e3564ffb1d 100644 --- a/installer/data/mysql/nb-NO/1-Obligatorisk/sample_notices.sql +++ b/installer/data/mysql/nb-NO/1-Obligatorisk/sample_notices.sql @@ -103,7 +103,7 @@ Innleveringsfrist: <>
<>

<>

-

Publisert <>

+

Publisert <>


', 1), diff --git a/installer/data/mysql/nb-NO/2-Valgfritt/sample_news.sql b/installer/data/mysql/nb-NO/2-Valgfritt/sample_news.sql index fefa575884..fb7cba9884 100644 --- a/installer/data/mysql/nb-NO/2-Valgfritt/sample_news.sql +++ b/installer/data/mysql/nb-NO/2-Valgfritt/sample_news.sql @@ -1,2 +1,2 @@ -INSERT INTO `opac_news` (`title`, `content`, `lang`, `publicationdate`, `expirationdate`, `number`) VALUES ('Velkommen til Koha!','Velkommen til Koha. Koha er et biblioteksystem rikt på funksjoner. Koha ble opprinnelig utviklet i New Zealand av Katipo Communications Ltd og først tatt i bruk i januar 2000 av Horowhenua Library Trust. I dag vedlikeholdes Koha av et verdensomspennende fellesskap av bibliotek og leverandører.','koha',DATE_SUB(NOW(), INTERVAL 1 DAY),'2099-01-10',1), +INSERT INTO `opac_news` (`title`, `content`, `lang`, `published_on`, `expirationdate`, `number`) VALUES ('Velkommen til Koha!','Velkommen til Koha. Koha er et biblioteksystem rikt på funksjoner. Koha ble opprinnelig utviklet i New Zealand av Katipo Communications Ltd og først tatt i bruk i januar 2000 av Horowhenua Library Trust. I dag vedlikeholdes Koha av et verdensomspennende fellesskap av bibliotek og leverandører.','koha',DATE_SUB(NOW(), INTERVAL 1 DAY),'2099-01-10',1), ('Hva nå?','Hva kan du gjøre nå som du har installert Koha? Her er noen forslag:\r\n\r\n','koha',DATE_SUB(NOW(), INTERVAL 1 DAY),'2099-01-10',2); diff --git a/installer/data/mysql/pl-PL/mandatory/sample_notices.sql b/installer/data/mysql/pl-PL/mandatory/sample_notices.sql index 0187ca1b54..f228b5c68d 100644 --- a/installer/data/mysql/pl-PL/mandatory/sample_notices.sql +++ b/installer/data/mysql/pl-PL/mandatory/sample_notices.sql @@ -82,7 +82,7 @@ Date due: <>
<>

<>

-

Posted on <>

+

Posted on <>


', 1), diff --git a/installer/data/mysql/pl-PL/optional/sample_news.sql b/installer/data/mysql/pl-PL/optional/sample_news.sql index 86350f5465..17e5099ce7 100644 --- a/installer/data/mysql/pl-PL/optional/sample_news.sql +++ b/installer/data/mysql/pl-PL/optional/sample_news.sql @@ -1,3 +1,3 @@ -INSERT INTO `opac_news` (`title`, `content`, `lang`, `publicationdate`, `expirationdate`, `number`) VALUES ('Witaj w Koha.','Koha to profesjonalny system biblioteczny o otwartym kodzie. Stworzony w Nowej Zelandii przez Katipo Communications Ltd (wdrożony po raz pierwszy w styczniu 2000 r. Horowhenua Library Trust) jest obecnie rozwijany przez grupe programistów i bibliotekarzy z całego świata..','koha','2007-10-29 05:25:58','2099-01-10',1), +INSERT INTO `opac_news` (`title`, `content`, `lang`, `published_on`, `expirationdate`, `number`) VALUES ('Witaj w Koha.','Koha to profesjonalny system biblioteczny o otwartym kodzie. Stworzony w Nowej Zelandii przez Katipo Communications Ltd (wdrożony po raz pierwszy w styczniu 2000 r. Horowhenua Library Trust) jest obecnie rozwijany przez grupe programistów i bibliotekarzy z całego świata..','koha','2007-10-29 05:25:58','2099-01-10',1), ('Co dalej?','Zainstalowałeś Koha - i co dalej? Poniżej znajdziesz kilka wskazówek: \r\n\r\n','koha','2007-10-29 05:34:45','2099-01-10',2); diff --git a/installer/data/mysql/ru-RU/optional/sample_news.sql b/installer/data/mysql/ru-RU/optional/sample_news.sql index 93fd0aaafb..2f67121df9 100644 --- a/installer/data/mysql/ru-RU/optional/sample_news.sql +++ b/installer/data/mysql/ru-RU/optional/sample_news.sql @@ -1,25 +1,25 @@ -INSERT INTO `opac_news` (`title`, `content`, `lang`, `publicationdate`, `expirationdate`, `number`) VALUES +INSERT INTO `opac_news` (`title`, `content`, `lang`, `published_on`, `expirationdate`, `number`) VALUES ('Welcome to Koha','Welcome to Koha. Koha is a full-featured open-source ILS. Developed initially in New Zealand by Katipo Communications Ltd and first deployed in January of 2000 for Horowhenua Library Trust, Koha is currently maintained by a team of software providers and library technology staff from around the globe.','en','2008-05-28 22:45:42','2099-01-10',1); -INSERT INTO `opac_news` (`title`, `content`, `lang`, `publicationdate`, `expirationdate`, `number`) VALUES +INSERT INTO `opac_news` (`title`, `content`, `lang`, `published_on`, `expirationdate`, `number`) VALUES ('Ласкаво просимо до Коха','Ласкаво просимо до Коха. Коха є повнофункціональною АБІС з відкритими джерельними кодам. Розроблена спочатку в Новій Зеландії компанією Katipo Communications Ltd і вперше випущена в січні 2000 року для бібліотечного консорціуму Хороунеа. Коха в даний час підтримується групою постачальників програмного забезпечення і фахівцями з бібліотечних технологій зі всієї земної кулі. ','uk-UA','2008-05-28 22:48:29','2099-01-10',1); -INSERT INTO `opac_news` (`title`, `content`, `lang`, `publicationdate`, `expirationdate`, `number`) VALUES +INSERT INTO `opac_news` (`title`, `content`, `lang`, `published_on`, `expirationdate`, `number`) VALUES ('Добро пожаловать в Коха','Добро пожаловать в Коха. Коха является полнофункциональной АБИС с открытыми исходниками. Разработана первоначально в Новой Зеландии компанией Katipo Communications Ltd и впервые выпущена в январе 2000 года для библиотечного консорциума Хороунеа, Коха в настоящее время поддерживается группой поставщиков программного обеспечения и специалистами по библиотечным технологиям со всего земного шара. ','ru-RU','2007-10-29 05:25:58','2099-01-10',1); -INSERT INTO `opac_news` (`title`, `content`, `lang`, `publicationdate`, `expirationdate`, `number`) VALUES +INSERT INTO `opac_news` (`title`, `content`, `lang`, `published_on`, `expirationdate`, `number`) VALUES ('Добро пожаловать в Коха','Добро пожаловать в Коха. Коха является полнофункциональной АБИС с открытыми исходниками. Разработана первоначально в Новой Зеландии компанией Katipo Communications Ltd и впервые выпущена в январе 2000 года для библиотечного консорциума Хороунеа, Коха в настоящее время поддерживается группой поставщиков программного обеспечения и специалистами по библиотечным технологиям со всего земного шара. ','koha','2007-10-29 05:25:58','2099-01-10',1); -INSERT INTO `opac_news` (`title`, `content`, `lang`, `publicationdate`, `expirationdate`, `number`) VALUES +INSERT INTO `opac_news` (`title`, `content`, `lang`, `published_on`, `expirationdate`, `number`) VALUES ('What\'s Next?','Now that you\'ve installed Koha, what\'s next? Here are some suggestions:\r\n\r\n','en','2007-10-29 05:34:45','2099-01-10',2); -INSERT INTO `opac_news` (`title`, `content`, `lang`, `publicationdate`, `expirationdate`, `number`) VALUES +INSERT INTO `opac_news` (`title`, `content`, `lang`, `published_on`, `expirationdate`, `number`) VALUES ('Що далі?','Тепер, коли Ви встановили Коха, що ж далі? Ось деякі пропозиції:\r\n','uk-UA','2008-05-28 23:07:23','2099-01-10',2); -INSERT INTO `opac_news` (`title`, `content`, `lang`, `publicationdate`, `expirationdate`, `number`) VALUES +INSERT INTO `opac_news` (`title`, `content`, `lang`, `published_on`, `expirationdate`, `number`) VALUES ('Что дальше?','Теперь, когда Вы установили Коха, что же дальше? Вот некоторые предложения:\r\n','ru-RU','2008-05-28 23:02:25','2099-01-10',2); -INSERT INTO `opac_news` (`title`, `content`, `lang`, `publicationdate`, `expirationdate`, `number`) VALUES +INSERT INTO `opac_news` (`title`, `content`, `lang`, `published_on`, `expirationdate`, `number`) VALUES ('Что дальше?','Теперь, когда Вы установили Коха, что же дальше? Вот некоторые предложения:\r\n','koha','2008-05-28 23:02:25','2099-01-10',2); diff --git a/installer/data/mysql/uk-UA/mandatory/sample_notices.sql b/installer/data/mysql/uk-UA/mandatory/sample_notices.sql index b32895a2e8..17bd9f7606 100644 --- a/installer/data/mysql/uk-UA/mandatory/sample_notices.sql +++ b/installer/data/mysql/uk-UA/mandatory/sample_notices.sql @@ -154,7 +154,7 @@ INSERT INTO `letter` (module, code, name, title, content, is_html) VALUES
<>

<>

-

Вивішено <>

+

Вивішено <>


', diff --git a/installer/data/mysql/uk-UA/optional/sample_news.sql b/installer/data/mysql/uk-UA/optional/sample_news.sql index 2f1e76e153..114eb0e677 100644 --- a/installer/data/mysql/uk-UA/optional/sample_news.sql +++ b/installer/data/mysql/uk-UA/optional/sample_news.sql @@ -5,45 +5,45 @@ -- title -- title of the news article -- new -- the body of your news article -- lang -- location for the article (koha is the staff client, slip is the circulation receipt and language codes are for the opac) --- publicationdate -- publication date +-- published_on -- publication date -- expirationdate -- date the article is set to expire or no longer be visible -- number -- the order in which this article appears in that specific location -- borrowernumber -- The user who created the news article -- Бібліотечний інтерфейс -INSERT INTO opac_news (title, content, lang, publicationdate, expirationdate, number) VALUES +INSERT INTO opac_news (title, content, lang, published_on, expirationdate, number) VALUES ('Ласкаво просимо до Коха','Ласкаво просимо до Коха. Коха є повнофункціональною АБІС з відкритими джерельними текстами. Розроблена спочатку в Новій Зеландії компанією Katipo Communications Ltd і вперше випущена у січні 2000 року для бібліотечного консорціуму Хороунеа. Коха на даний час підтримується групою постачальників програмного забезпечення та фахівцями з бібліотечних технологій зі всієї земної кулі.', 'koha',NOW(),'2099-01-10',1); -- DATE_SUB(NOW(), INTERVAL 1 DAY) -INSERT INTO opac_news (title, content, lang, publicationdate, expirationdate, number) VALUES +INSERT INTO opac_news (title, content, lang, published_on, expirationdate, number) VALUES ('Що далі?','Тепер, коли Ви встановили Коха, що ж далі? Ось деякі пропозиції:\r\n', 'koha',NOW(),'2099-01-10',2); -- Електронний каталог / укр -INSERT INTO opac_news (title, content, lang, publicationdate, expirationdate, number) VALUES +INSERT INTO opac_news (title, content, lang, published_on, expirationdate, number) VALUES ('Ласкаво просимо до Коха','Ласкаво просимо до Коха. Коха є повнофункціональною АБІС з відкритими джерельними текстами. Розроблена спочатку в Новій Зеландії компанією Katipo Communications Ltd і вперше випущена у січні 2000 року для бібліотечного консорціуму Хороунеа. Коха на даний час підтримується групою постачальників програмного забезпечення та фахівцями з бібліотечних технологій зі всієї земної кулі.', 'uk-UA',NOW(),'2099-01-10',1); -INSERT INTO opac_news (title, content, lang, publicationdate, expirationdate, number) VALUES +INSERT INTO opac_news (title, content, lang, published_on, expirationdate, number) VALUES ('Що далі?','Тепер, коли Ви встановили Коха, що ж далі? Ось деякі пропозиції:\r\n', 'uk-UA',NOW(),'2099-01-10',2); -- Електронний каталог / рос -INSERT INTO opac_news (title, content, lang, publicationdate, expirationdate, number) VALUES +INSERT INTO opac_news (title, content, lang, published_on, expirationdate, number) VALUES ('Добро пожаловать в Коха','Добро пожаловать в Коха. Коха является полнофункциональной АБИС с открытыми исходниками. Разработана первоначально в Новой Зеландии компанией Katipo Communications Ltd и впервые выпущена в январе 2000 года для библиотечного консорциума Хороунеа. Коха в настоящее время поддерживается группой поставщиков программного обеспечения и специалистами по библиотечным технологиям со всего земного шара.', 'ru-RU',NOW(),'2099-01-10',1); -INSERT INTO opac_news (title, content, lang, publicationdate, expirationdate, number) VALUES +INSERT INTO opac_news (title, content, lang, published_on, expirationdate, number) VALUES ('Что дальше?','Теперь, когда Вы установили Коха, что же дальше? Вот некоторые предложения:\r\n', 'ru-RU',NOW(),'2099-01-10',2); -- Електронний каталог / англ -INSERT INTO opac_news (title, content, lang, publicationdate, expirationdate, number) VALUES +INSERT INTO opac_news (title, content, lang, published_on, expirationdate, number) VALUES ('Welcome to Koha','Welcome to Koha. Koha is a full-featured open-source ILS. Developed initially in New Zealand by Katipo Communications Ltd and first deployed in January of 2000 for Horowhenua Library Trust, Koha is currently maintained by a team of software providers and library technology staff from around the globe.', 'en',NOW(),'2099-01-10',1); -INSERT INTO opac_news (title, content, lang, publicationdate, expirationdate, number) VALUES +INSERT INTO opac_news (title, content, lang, published_on, expirationdate, number) VALUES ('What\'s Next?','Now that you\'ve installed Koha, what\'s next? Here are some suggestions:\r\n\r\n', 'en',NOW(),'2099-01-10',2); diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index e6ea662310..e243f8cbb4 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -22730,13 +22730,13 @@ if( CheckVersion( $DBversion ) ) { if( column_exists( 'opac_news', 'timestamp' ) ) { $dbh->do(q| ALTER TABLE opac_news - CHANGE COLUMN timestamp publicationdate date DEFAULT NULL + CHANGE COLUMN timestamp published_on date DEFAULT NULL |); } if( !column_exists( 'opac_news', 'updated_on' ) ) { $dbh->do(q| ALTER TABLE opac_news - ADD COLUMN updated_on timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP AFTER publicationdate + ADD COLUMN updated_on timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP AFTER published_on |); } @@ -22744,7 +22744,7 @@ if( CheckVersion( $DBversion ) ) { UPDATE letter SET content = REPLACE(content,?,?) WHERE content LIKE ? - |, undef, 'opac_news.timestamp', 'opac_news.publicationdate', '%opac_news.timestamp%' ); + |, undef, 'opac_news.timestamp', 'opac_news.published_on', '%opac_news.timestamp%' ); NewVersion( $DBversion, 21066, ["Update table opac_news", "Replace timestamp references in letters table"] ); } 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 205b1b1933..c37983b0d2 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 @@ -83,7 +83,7 @@ Edit news item[% ELSE %]Add news item[% END %][% ELSE %]News[% END %]
  • - +
    [% INCLUDE 'date-format.inc' %]
  • diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-main.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-main.tt index 23709abcaf..2ae3796563 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-main.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-main.tt @@ -94,7 +94,7 @@
    [% koha_new.content | $raw %]
    - Published on [% koha_new.publicationdate | $KohaDates %] + Published on [% koha_new.published_on | $KohaDates %] [% IF ( (newsdisp == 'opac' || newsdisp == 'both') && koha_new.borrowernumber ) %] by [% koha_new.author_title | html %] [% koha_new.author_firstname | html %] [% koha_new.author_surname | html %] [% END %] diff --git a/t/db_dependent/Letters/TemplateToolkit.t b/t/db_dependent/Letters/TemplateToolkit.t index 2f30f97e38..31a3cc295c 100644 --- a/t/db_dependent/Letters/TemplateToolkit.t +++ b/t/db_dependent/Letters/TemplateToolkit.t @@ -658,7 +658,7 @@ Date due: <>
    <>

    <>

    -

    Posted on <>

    +

    Posted on <>


    diff --git a/t/db_dependent/NewsChannels.t b/t/db_dependent/NewsChannels.t index f6cf6bcee0..9eb1489f3d 100644 --- a/t/db_dependent/NewsChannels.t +++ b/t/db_dependent/NewsChannels.t @@ -74,7 +74,7 @@ my $href_entry1 = { content => $new1, lang => $lang1, expirationdate => $expirationdate1, - publicationdate=> $timestamp1, + published_on=> $timestamp1, number => $number1, branchcode => 'LIB1', }; @@ -89,7 +89,7 @@ my $href_entry2 = { content => $new2, lang => $lang2, expirationdate => $expirationdate2, - publicationdate=> $timestamp2, + published_on=> $timestamp2, number => $number2, borrowernumber => $brwrnmbr, branchcode => 'LIB1', @@ -103,7 +103,7 @@ my $href_entry3 = { title => $title3, content => $new3, lang => $lang3, - publicationdate=> $timestamp3, + published_on=> $timestamp3, number => $number3, borrowernumber => $brwrnmbr, branchcode => 'LIB1', @@ -114,14 +114,14 @@ is( $rv, 1, 'Successfully added the third dummy news item without expiration dat # We need to determine the idnew in a non-MySQLism way. # This should be good enough. my $query = -q{ SELECT idnew from opac_news WHERE publicationdate='2000-01-01' AND expirationdate='2999-12-30'; }; +q{ SELECT idnew from opac_news WHERE published_on='2000-01-01' AND expirationdate='2999-12-30'; }; my ( $idnew1 ) = $dbh->selectrow_array( $query ); $query = -q{ SELECT idnew from opac_news WHERE publicationdate='2000-01-01' AND expirationdate='2999-12-31'; }; +q{ SELECT idnew from opac_news WHERE published_on='2000-01-01' AND expirationdate='2999-12-31'; }; my ( $idnew2 ) = $dbh->selectrow_array( $query ); $query = -q{ SELECT idnew from opac_news WHERE publicationdate='2000-01-02'; }; +q{ SELECT idnew from opac_news WHERE published_on='2000-01-02'; }; my ( $idnew3 ) = $dbh->selectrow_array( $query ); # Test upd_opac_new @@ -148,7 +148,7 @@ is_deeply( content => $new1, lang => $lang1, expirationdate => $expirationdate1, - publicationdate=> $timestamp1, + published_on=> $timestamp1, number => $number1, borrowernumber => undef, idnew => $idnew1, @@ -168,7 +168,7 @@ is_deeply( content => $new2, lang => $lang2, expirationdate => $expirationdate2, - publicationdate=> $timestamp2, + published_on=> $timestamp2, number => $number2, borrowernumber => $brwrnmbr, idnew => $idnew2, diff --git a/tools/koha-news.pl b/tools/koha-news.pl index 687259beaa..3ac11ae89e 100755 --- a/tools/koha-news.pl +++ b/tools/koha-news.pl @@ -42,7 +42,7 @@ my $expirationdate; if ( $cgi->param('expirationdate') ) { $expirationdate = output_pref({ dt => dt_from_string( scalar $cgi->param('expirationdate') ), dateformat => 'iso', dateonly => 1 }); } -my $publicationdate= output_pref({ dt => dt_from_string( scalar $cgi->param('publicationdate') ), dateformat => 'iso', dateonly => 1 }); +my $published_on= output_pref({ dt => dt_from_string( scalar $cgi->param('published_on') ), dateformat => 'iso', dateonly => 1 }); my $number = $cgi->param('number'); my $lang = $cgi->param('lang'); my $branchcode = $cgi->param('branch'); @@ -109,7 +109,7 @@ elsif ( $op eq 'add' ) { content => $content, lang => $lang, expirationdate => $expirationdate, - publicationdate=> $publicationdate, + published_on=> $published_on, number => $number, branchcode => $branchcode, borrowernumber => $borrowernumber, @@ -129,7 +129,7 @@ elsif ( $op eq 'edit' ) { content => $content, lang => $lang, expirationdate => $expirationdate, - publicationdate=> $publicationdate, + published_on=> $published_on, number => $number, branchcode => $branchcode, } -- 2.20.1