Version 2.5.0

SVN revision: 723
This commit is contained in:
2004-01-28 15:27:18 +00:00
parent 9ca97925dd
commit 8396b1bfff
11 changed files with 363 additions and 98 deletions
+2
View File
@@ -9,6 +9,8 @@ On PC4534:
- Modify ChangeLog
- Add release date to ChangeLog
- Do a "make indent"
- Do a "make loc"
- Translate new strings in eloglang.german
- c:\elog> cvs commit -m "Version x.x.x"
- build xxx
+11
View File
@@ -1,3 +1,14 @@
Version 2.5.0, released January 28th, 2004
==========================================
- Implemented mirroring, see new section in config.html
- Updated all translation files with current set of required stings
- Search 'all logbooks' only for current top group
- Changed 'message' to 'entry' consistently
- Removed '{n}' in quick filter and find page list
- Display months on find page localized
- Implemented setlocale() for strftime()
Version 2.4.1, released January 13th, 2004
==========================================
+131
View File
@@ -28,6 +28,7 @@
&nbsp;[<a class=nav href="#access">Access Control</a>]&nbsp;
&nbsp;[<a class=nav href="#flags">Flags</a>]&nbsp;
&nbsp;[<a class=nav href="#themes">Themes</a>]&nbsp;
&nbsp;[<a class=nav href="#mirroring">Mirroring</a>]&nbsp;
*&nbsp;</div>
<p>
<div class=Sub><i>Global and individual logbook options for an ELOG server</i></div>
@@ -1530,6 +1531,136 @@ These two images display the same logbook entry using different themes:
<img src=theme1.jpg>&nbsp;&nbsp;<img src=theme2.jpg>
<p>
<a name="mirroring"><hr>
<div class=section>&nbsp; Mirroring &nbsp;</div>
<p>
Sometimes it can be useful to have the same ELOG logbook on two different computers. This
might be the case if you travel with your laptop, but want to keep the logbooks from your
desktop computer on the laptop. The problem is that if you add an entry on your laptop,
the logbooks on the laptop and the desktop get out of sync. Merging only the ELOG database
files does not help, since two entries could be made at the same day on the laptop and
the desktop, which would lead to a conflict in that day's database file.
<p>
To solve this problem, <i>mirroring</i> was introduced from Version 2.5.0 on. This technology
allows to synchronize one ELOG server with a number of other servers on a per-entry basis. No
additional software is needed, only two elogd daemons talking to each other. The synchronization
can be executed manually or periodically. If entries are changed/added/deleted on both sides,
they get merged properly during synchronization. In order to minimize network traffic, each
ELOG server calculates a MD5 checksum for each message, which gets exchanged during synchronization.
Only when the MD5 checksum differs, entries are transferred.
<p>
To set-up mirroring, following configuration options are available. They should be put
into the [global] section of the cofiguration file:<p>
<UL>
<li><b><code>Mirror server = &lt;URL-list&gt;</code></b>
<br>
This statement specifies one or more mirror servers. Each URL must contain the host, port and
possible subdirectory of the remote server, as if you would access it through your browser.
A typical statement looks like:<br><br>
<code>Mirror server = myhost.mydomain.org:8080, http://another.server.org/elog/</code>
<br><br>
The URL should not contain any logbook name, this gets added automatically. The second
example contains a subdirectory, which is typically used if the elogd daemon runs
under an Apache proxy. If this statement is present in the configuration file, a new
menu option <b><code>"Synchronize"</code></b> appears on the elog page. Clicking on
this menu options starts the synchronization:<br><br>
<img src="sync.gif"><br><br>
On the left side one sees the entry ID's. Entries which are equal locally and remotely
are not displayed. Here are the rules for synchronization:<br><br>
<UL>
<LI> If an entry has been modified locally but not remotely, it is submitted to the remote
server.
<LI> If an entry has been modified remotely but not locally, it is retrieved from the
remote server and saved locally.
<LI> If an entry has been modified remotely and locally since the last synchronization,
an error is shown that the entries are conflicting. In that case one has to merge
the entries manually and delete it on one side.
<LI> If an entry has been deleted locally, it is deleted remotely.
<LI> If an entry has been deleted remotely, it is deleted locally.
<LI> If a new entry exists locally, it is submitted.
<LI> If a new entry exists remotely, it is retrieved from the remote server and
saved locally.
<LI> If new entries exist locally and remotely having the same entry ID, the local
entries are changed to have higher entry IDs, then the remote ones are retrieved. Care
should be taken if external links (such as <b><code>elog:123</code></b>) to the
local entries are used, since they will point afterwards to the wrong entry.
</UL><br><br>
<li><b><code>Mirror config = 0 | 1</code></b><br>
Normally, only the logbook entries are mirrored. One can also mirror the contents
of the elogd.cfg configuration file for individual logbooks. This can be turned on
by setting this option to <b><code>1</code></b>. Default is <b><code>1</code></b>.
Only the individual logbook section is mirrored, not the [global] section. Settings
which are specific to one server, for example the <b><code>URL = </code></b> statement,
should then be kept in the [global] section, so that they are not mirrored between
different servers.<br><br>
<li><b><code>Mirror cron = Minute Hour Day Month Weekday</code></b><br>
This statement turns on periodic mirroring. The format is similar to the UNIX
<b><code>cron</b></code> command. Each of the five values can either be an
asterisk, which means all possible values, a comma-separated list or a range.
It can be explained most easily with examples:<br><br>
<table border=1>
<tr><th>Mirror cron=<th>meaning</tr>
<tr><td>0 3 * * *<td>Every night at 3:00</td>
<tr><td>30 7 1,15 * *<td>At 7:30 every 1st and 15th of a month</td>
<tr><td>0 12 10 10 *<td>Once a year at 12:00 on my birthday</td>
<tr><td>0 7-18 * * 1-5<td>Once every hour from 7:00 to 18:00 from Monday to Friday</td>
</table><br><br>
Valid ranges for each value are:<br><br>
<table border=1>
<tr><td>Minute<td>0-59</td>
<tr><td>Hour<td>0-23</td>
<tr><td>Day<td>1-31</td>
<tr><td>Month<td>1-12</td>
<tr><td>Weekday<td>0-6 with 0=Sunday, 1=Monday, etc.</td>
</table><br><br>
If mirroring is turned on, it is advisable to use the <b><code>Logfile =</code></b>
option to turn on logging, so that one can inspect the logfile to see if the mirroring
works correctly.<br><br>
<li><b><code>Mirror user = &lt;name&gt;</code></b><br>
If periodic mirroring is used via the <b><code>Mirror cron =</b></code> statement
and the remote logbook uses user-level access, this statement specifies the
user name which is used to log in to the remote logbook. The password is taken from
the local password file and has to match the password in the remote password file,
otherwise the access is not allowed. The user name is typical the login name of
the administrator.<br><br>
<li><b><code>Mirror simulate = 0 | 1</code></b><br>
If one wants to try out mirroring without causing any harm, one can turn on this flag.
During synchronization, entries are compared and necessary transfers are displayed,
but not executed. Default is <b><code>0</code></b>.
</UL>
<HR>
<div class=footer>&nbsp;
Content by <a class=nav href="mailto:Stefan.Ritt@psi.ch">Stefan Ritt</a>,
+1 -1
View File
@@ -32,7 +32,7 @@
&nbsp;[<a class=nav href="#links">Links</a>]&nbsp;
*&nbsp;</div>
<P class=Sub>Home of the <i>Electronic Logbook</i> package by <a href="mailto:Stefan.Ritt@psi.ch">Stefan Ritt</a></P>
<div class=version>&nbsp; Current version is : 2.4.1 &nbsp;</div>
<div class=version>&nbsp; Current version is : 2.5.0 &nbsp;</div>
<hr><a name="whatis">
<div class=section>&nbsp; What is ELOG ? &nbsp;</div>
+23 -5
View File
@@ -157,7 +157,6 @@ Only user <i>%s</i> can delete this entry =
Are you sure to delete these messages? =
and all their replies =
Synchronization =
Synchronizing with =
Entry is currently edited by =
Date =
Threaded =
@@ -211,13 +210,9 @@ Entry #%d is locked on remote server =
Cannot save remote entry locally =
local =
remote =
Entry has been changed locally and remotely. =
Please delete %s or %s entry to resolve conflict =
Entry identical =
Entry has been deleted locally =
Error sending local entry =
Local entry submitted =
Entry has been deleted remotely =
Error deleting remote entry =
ID =
Full =
@@ -232,3 +227,26 @@ copied successfully from "%s" to "%s" =
This entry has been deleted =
Login =
by =
#
#---- please translate following items and then remove this comment ----#
#
Cannot connect to remote server "%s" =
Remote server is not an ELOG server =
Incorrect remote ELOG server version %s =
User "%s" has no access to remote logbook =
Passwords for user "%s" do not match locally and remotely =
Error accessing remote logbook =
Invalid HTTP header =
No user name supplied to access remote logbook =
Synchronizing logbook %s with server "%s" =
Configuration has been changed locally and remotely =
Please merge manually to resolve conflict =
Logbook "%s" does not exist on remote server =
Entry has been changed locally and remotely =
Entry deleted locally =
Changed local entry ID to %d =
Entry deleted remotely =
All entries identical =
Invalid mirror_id or entry_date =
Synchronize all logbooks =
+19 -5
View File
@@ -198,7 +198,6 @@ Expand all = Alles uitbreiden
Add %s = Voeg %s toe
No mirror server defined in configuration file =Geen mirror server gedefinieerd in het configuratie bestand
Synchronization = Synchronisatie
Synchronizing with = Synchronizeren met
Error: Value <b>%s</b> not allowed for boolean attributes = Fout: Waarde <b>%s</b> niet toegestaan voor booleaanse attributen
Error: Attribute option <b>%s</b> not existing = Fout: Attribuut optie <b>%s</b> bestaat niet
Last submission = Laatste toevoeging
@@ -224,13 +223,9 @@ Entry #%d is locked on remote server =
Cannot save remote entry locally =
local =
remote =
Entry has been changed locally and remotely. =
Please delete %s or %s entry to resolve conflict =
Entry identical =
Entry has been deleted locally =
Error sending local entry =
Local entry submitted =
Entry has been deleted remotely =
Error deleting remote entry =
New entry cannot be written to directory "%s" =
Entry %s cannot be read from logbook "%s" =
@@ -238,3 +233,22 @@ No entry selected =
One entry =
This entry has been deleted =
Entries =
Cannot connect to remote server "%s" =
Remote server is not an ELOG server =
Incorrect remote ELOG server version %s =
User "%s" has no access to remote logbook =
Passwords for user "%s" do not match locally and remotely =
Error accessing remote logbook =
Invalid HTTP header =
No user name supplied to access remote logbook =
Synchronizing logbook %s with server "%s" =
Configuration has been changed locally and remotely =
Please merge manually to resolve conflict =
Logbook "%s" does not exist on remote server =
Entry has been changed locally and remotely =
Entry deleted locally =
Changed local entry ID to %d =
Entry deleted remotely =
All entries identical =
Invalid mirror_id or entry_date =
Synchronize all logbooks =
+20 -5
View File
@@ -182,6 +182,7 @@ Maximum number of attachments reached = Le nombre maximal d'attachements a
Invalid user name <i>"%s"</i> = Le nom d'utilisateur <i>"%s"</i> est incorrect
on = sur
Entry is currently edited by = Entrée actuellement en cours de modification par
#
#---------- please translate following items ----------#
#
@@ -195,7 +196,6 @@ Change %s =
Error sending Email via <i>"%s"</i> =
User name <i>"%s"</i> not registered =
Synchronization =
Synchronizing with =
recipients =
Error: Value <b>%s</b> not allowed for boolean attributes =
Error: Attribute option <b>%s</b> not existing =
@@ -219,13 +219,9 @@ Entry #%d is locked on remote server =
Cannot save remote entry locally =
local =
remote =
Entry has been changed locally and remotely. =
Please delete %s or %s entry to resolve conflict =
Entry identical =
Entry has been deleted locally =
Error sending local entry =
Local entry submitted =
Entry has been deleted remotely =
Error deleting remote entry =
New entry cannot be written to directory "%s" =
Entry %s cannot be read from logbook "%s" =
@@ -234,3 +230,22 @@ One entry =
This entry has been deleted =
by =
Entries =
Cannot connect to remote server "%s" =
Remote server is not an ELOG server =
Incorrect remote ELOG server version %s =
User "%s" has no access to remote logbook =
Passwords for user "%s" do not match locally and remotely =
Error accessing remote logbook =
Invalid HTTP header =
No user name supplied to access remote logbook =
Synchronizing logbook %s with server "%s" =
Configuration has been changed locally and remotely =
Please merge manually to resolve conflict =
Logbook "%s" does not exist on remote server =
Entry has been changed locally and remotely =
Entry deleted locally =
Changed local entry ID to %d =
Entry deleted remotely =
All entries identical =
Invalid mirror_id or entry_date =
Synchronize all logbooks =
+19 -5
View File
@@ -195,7 +195,6 @@ Expand all = Alles erweitern
Add %s = %s hinzufügen
User name <i>"%s"</i> not registered = Benutzername <i>"%s"<i> ist nicht registriert
Synchronization = Synchronisation
Synchronizing with = Synchronisieren mit
Error: Value <b>%s</b> not allowed for boolean attributes = Fehler: Wert <b>%s</b> ist nicht erlaubt für bool'sche Attribute
Error: Attribute option <b>%s</b> not existing = Fehler: Attribut Option <b>%s</b> existiert nicht
Last submission = Letzter Eintrag
@@ -217,13 +216,9 @@ Entry #%d is locked on remote server = Eintrag #%d is auf anderem Computer in Be
Cannot save remote entry locally = Kann fremden Eintrag nicht lokal speichern
local = lokalen
remote = fremden
Entry has been changed locally and remotely. = Eintrag wurde lokal und auf anderem Rechner gelöscht.
Please delete %s or %s entry to resolve conflict = Bitte %s oder %s Eintrag löschen um Konflikt zu lösen
Entry identical = Einträge sind identisch
Entry has been deleted locally = Eintrag wurde lokal gelöscht
Error sending local entry = Fehler beim senden von lokalem Eintrag
Local entry submitted = Lokaler Eintrag gesendet
Entry has been deleted remotely = Fremder Eintrag wurde gelöscht
Error deleting remote entry = Fehler beim Löschen von fremdem Eintrag
New entry cannot be written to directory "%s" = Neuer Eintrag kann nicht in Verzeichnis "%s" geschrieben werden
Entry %s cannot be read from logbook "%s" = Eintrag %s kann nicht aus Logbuch "%s" gelesen werden
@@ -231,4 +226,23 @@ No entry selected = Kein Eintrag ausgew
One entry = Ein Eintrag
This entry has been deleted = Dieser Eintrag wurde gelöscht
Entries = Einträge
Cannot connect to remote server "%s" = Verbindung mit entferntem Server "%s" kann nicht hergestellt werden
Remote server is not an ELOG server = Entfernter Server ist kein ELOG Server
Incorrect remote ELOG server version %s = Falsche Version %s des entefernten Servers
User "%s" has no access to remote logbook = Benutzer "%s" hat keinen Zugriff auf entferntes Logbuch
Passwords for user "%s" do not match locally and remotely = Kennwörter für Benutzer "%s" sind lokal und entfernt verschieden
Error accessing remote logbook = Fehler beim Zugriff auf entfertes Logbuch
Invalid HTTP header = Falscher HTTP Kopf
No user name supplied to access remote logbook = Kein Benutzername definiert zum Zugriff auf entferntes Logbuch
Synchronizing logbook %s with server "%s" = Synchronisiere Logbuch %s mit Server "%s"
Configuration has been changed locally and remotely = Konfiguration wurde lokal und entfernt geändert
Please merge manually to resolve conflict = Bitte manuell zusammenfügen um Konflikt aufzulösen
Logbook "%s" does not exist on remote server = Logbuch "%s" existiert nicht auf entferntem Server
Entry has been changed locally and remotely = Eintrag ist lokal und entfernt geändert worden
Entry deleted locally = Eintrag lokal entfernt
Changed local entry ID to %d = Lokale ID des Eintrages auf %d geändert
Entry deleted remotely = Entfernter Eintrag gelöscht
All entries identical = Alle Einträge identisch
Invalid mirror_id or entry_date = Falsche mirror_id oder entry_date
Synchronize all logbooks = Alle Logbücher synchronisieren
+23 -33
View File
@@ -54,19 +54,15 @@ Suppress Email notification = Disattiva l'invio di e-mail
Resubmit as new entry = Reinvia come nuovo elemento
Attachment = Allegato
Attachments = Allegati
No message available = Nessun messaggio disponibile
Reply to this = Rispondi a questo
In reply to = In risposta a
ELOG Error = ELOG Errore
Fields marked with = I campi segnati con
are required = sono obbligatori
New message cannot be written to directory "%s" = Il nuovo messaggio non può essere scritto nella cartella "%s"
Please check that it exists and elogd has write access = Per favore controlla che esista e che ELOGD abbia diritti di accesso in scrittura
Error: Attribute <b>%s</b> not supplied = Errore: Attributo <b>%s</b> non fornito
Please go back and enter the <b>%s</b> field = Per favore torna indietro ed inserisci il campo <b>%s</b>
Please use your browser's back button to go back = Per favore usa il pulsante indietro del tuo browser
Only user <i>%s</i> can edit this entry = Solo l'utente <i>%s</i> può modificare questo elemento
ELOG search result = ELOG risultato della ricerca
ELOG find = ELOG Cerca
Find = Trova
Search = Cerca
@@ -90,21 +86,14 @@ Copy ELog entry = Copia elemento ELOG
Are you sure to delete this message? = Sei sicuro di voler cancellare questo messaggio?
Yes = Si
No = No
Message successfully deleted = Messaggio cancellato con successo
Error deleting message: status = Errore nel cancellare il messaggio: stato
Goto last message = Vai all'ultimo messaggio
Error: Command "<b>%s</b>" not allowed = Errore: Comando "<b>%s</b>" non permesso
Error: Command "<b>%s</b>" is not allowed for user "<b>%s</b>" = Errore: Comando "<b>%s</b>" non permesso all'utente "<b>%s</b>"
Cannot open file <b>%s</b> = Non posso aprire il file <b>%s</b>
Cannot write to <b>%s</b> = Non posso scrivere su <b>%s</b>
No SMTP host defined in [global] section of configuration file = Nessun server SMTP definito nella sezione [global] del file di configurazione
Messags %s cannot be read from logbook "%s" = Il messaggio %s non può essere letto dal registro "%s"
New message cannot be written to directory "%s" = Il nuovo messaggio non può essere scritto nella cartella "%s"
Only user <i>%s</i> can edit this entry = Solo l'utente <i>%s</i> può modificare questo elemento
Display full message = Mostra il messaggio completo
Display threads = Mostra le discussioni
Logbook is empty = Il registro è vuoto
This message has been deleted = Questo messaggio è stato cancellato
Download = Scarica
and all its replies = e tutte le sue risposte
Message ID = ID messaggio
@@ -112,14 +101,12 @@ Not logged in = Non entrato
Login = Entra
Page %d of %d = Pagina %d di %d
all entries = tutti gli elementi
%d entries = %d elementi
Login name = Nome utente
Full name = Nome completo
ELOG user config = ELOG configurazione utente
ELOG new user = ELOG nuovo utente
Admin = Amministratore
Select user = Scegli l'utente
Go = Vai
Remove user = Cancella l'utente
New user = Crea nuovo utente
Retype new password = Riscrivi la nuova password
@@ -138,8 +125,6 @@ Your ELOG account has been activated on host = Il tuo account ELOG
You can access it at = Puoi accedervi da
Are you sure to delete these messages? = Sei sicuro di voler cancellare questi messaggi?
Select = Seleziona
No message selected for deletion = Nessun messaggio selezionato per la cancellazione
No message selected = Nessun messaggio selezionato
All entries = Tutti gli elementi
Day = Giorno
Week = Settimana
@@ -159,24 +144,20 @@ Expand = Espandi
Full = Completo
Summary = Sommario
Threaded = Ad albero
ELOG Entries = ELOG Elementi
Filters = Filtri
Mode = Modo
Options = Opzioni
Error: start date after end date = Errore: la data iniziale è posteriore a quella finale
and all their replies = e tutte le loro risposte
Your request has been forwarded to the administrator. You will be notified by email upon activation of your new account. = La tua richiesta è stata inoltrata all'amministratore. Ti verrà inviata notifica per e-mail dell'attivazione del tuo nuovo account.
Upload = Carica
Requested = Richiesto
Registration request on logbook "%s" = Richiesta di registrazione nel registro "%s"
A new ELOG user wants to register on "%s" = Un nuovo utente ELOG vuole registrarsi su "%s"
One message = Un messaggio
%d messages = %d messaggi
and its replies = e le sue risposte
and their replies = e le loro risposte
moved successfully from "%s" to "%s" = spostate con successo da "%s" a "%s"
copied successfully from "%s" to "%s" = copiate con successo da "%s" a "%s"
Last x = Ultimi x
Only user <i>%s</i> can delete this entry = Solo l'utente <i>%s</i> può cancellare questo elemento
Search text also in attributes = Ricerca il testo anche negli attributi
Goto logbook selection page = Vai alla pagina di selezione dei registri
@@ -188,7 +169,6 @@ Change elogd.cfg = Modifica elogd.cfg
Remember me on this computer = Ricordami su questo computer
Forgot password? = Dimenticata la password?
Email address <i>"%s"</i> not registered = Indirizzo e-mail <i>"%s"</i> non registrato
User name <i>\%s\</i> not registered = Nome utente <i>"%s"</i> non registrato
ELOG password recovery = ELOG ripristino password
No Email address registered with user name <i>"%s"</i> = Nessun indirizzo e-mail registrato con il nome utente <i>"%s"</i>
Error sending Email via <i>"%s"</i> = Errore nell'nvio della e-mail con <i>"%s"</i>
@@ -196,35 +176,26 @@ A new password for user <i>"%s"</i> has been sent to %s = Una nuova password per
Forgot = Dimenticata
User "%s" registered on host "%s" = Utente "%s" registrato sul server "%s"
Registration request on host "%s" = Richiesta di registrazione sul server "%s"
Please log on by clicking on following link and change your password = Per favore entra cliccando sul seguente collegamento e cambia la tua password
A new password has been created for you on host %s = Ti è stata creata una nuova password sul server %s
Enter your user name or email address = Inserisci il tuo nome utente o l'indirizzo e-mail
Password recovery for ELOG %s = Ripristino password per ELOG %s
Host = Server
Your ELOG account has been activated = Il tuo account ELOG è stato attivato
Activate = Attiva
Maximum number of attachments reached = Raggiunto il massimo numero di allegati consentito
Invalid user name <i>"%s"</i> = Nome utente non valido <i>"%s"</i>
User = Utente
on = su
computer = Server
Entry is currently edited by = L'elemento è ora modificato da
recipients = destinatari
Suppress shell execution = Disattiva esecuzione da shell
Maximum number of replies (%d) exceeded = Superato il numero massimo di risposte (%d)
Update = Aggiorna
Change %s = Cambia %s
Editing %s = Modifica %s
Add new option here = Aggiungi qui una nuova opzione
Message can only be edited %1.2lg hours after creation = Il messaggio può essere modificato solo per %1.2lg ore dopo la creazione
Add %s = Aggiungi %s
User name <i>"%s"</i> not registered = Il nome <i>"%s"</i> non è registrato
Synchronization = Sincronizzazione
Synchronizing with = In sincronizzazione con
Message identical = Messaggio identico
Error: Value <b>%s</b> not allowed for boolean attributes = Errore: valore <b>%s</b> non consentito per elementi booleani
Error: Attribute option <b>%s</b> not existing = Errore: l'opzione <b>%s</b> dell'elemento non esiste
Message %s cannot be read from logbook "%s" = Il messaggio %s non si può leggere dal registro "%s"
Last submission = Ultima immissione
Expand all = Espandi tutto
Synchronize = Sincronizza
@@ -244,13 +215,9 @@ Entry #%d is locked on remote server = L'elemento #%d
Cannot save remote entry locally = Non posso salvare l'elemento remoto in locale
local = locale
remote = remoto
Entry has been changed locally and remotely. = L'elemento è stato modificato localmente e in remoto
Please delete %s or %s entry to resolve conflict = Per favore cancella %s o %s per risolvere il conflitto
Entry identical = Elemento identico
Entry has been deleted locally = L'elemento è stato cancellato localmente
Error sending local entry = Errore nell'invio dell'elemento locale
Local entry submitted = Elemento locale inviato
Entry has been deleted remotely = L'elemento è stato cancellato in remoto
Error deleting remote entry = Errore nel cancellare l'elemento remoto
New entry cannot be written to directory "%s" = Il nuovo elemento non può essere scritto nella cartella "%s"
Entry %s cannot be read from logbook "%s" = L'elemento %s non può essere letto dal registro "%s"
@@ -259,3 +226,26 @@ One entry = Un elemento
This entry has been deleted = Questo elemento è stato cancellato
by = da
Entries = Elementi
#
#---- please translate following items and then remove this comment ----#
#
Cannot connect to remote server "%s" =
Remote server is not an ELOG server =
Incorrect remote ELOG server version %s =
User "%s" has no access to remote logbook =
Passwords for user "%s" do not match locally and remotely =
Error accessing remote logbook =
Invalid HTTP header =
No user name supplied to access remote logbook =
Synchronizing logbook %s with server "%s" =
Configuration has been changed locally and remotely =
Please merge manually to resolve conflict =
Logbook "%s" does not exist on remote server =
Entry has been changed locally and remotely =
Entry deleted locally =
Changed local entry ID to %d =
Entry deleted remotely =
All entries identical =
Invalid mirror_id or entry_date =
Synchronize all logbooks =
+19 -5
View File
@@ -158,7 +158,6 @@ Only user <i>%s</i> can delete this entry =
Are you sure to delete these messages? =
and all their replies =
Synchronization =
Synchronizing with =
Entry is currently edited by =
Date =
Threaded =
@@ -212,13 +211,9 @@ Entry #%d is locked on remote server =
Cannot save remote entry locally =
local =
remote =
Entry has been changed locally and remotely. =
Please delete %s or %s entry to resolve conflict =
Entry identical =
Entry has been deleted locally =
Error sending local entry =
Local entry submitted =
Entry has been deleted remotely =
Error deleting remote entry =
ID =
Full =
@@ -233,3 +228,22 @@ copied successfully from "%s" to "%s" =
This entry has been deleted =
Login =
by =
Cannot connect to remote server "%s" =
Remote server is not an ELOG server =
Incorrect remote ELOG server version %s =
User "%s" has no access to remote logbook =
Passwords for user "%s" do not match locally and remotely =
Error accessing remote logbook =
Invalid HTTP header =
No user name supplied to access remote logbook =
Synchronizing logbook %s with server "%s" =
Configuration has been changed locally and remotely =
Please merge manually to resolve conflict =
Logbook "%s" does not exist on remote server =
Entry has been changed locally and remotely =
Entry deleted locally =
Changed local entry ID to %d =
Entry deleted remotely =
All entries identical =
Invalid mirror_id or entry_date =
Synchronize all logbooks =
+95 -39
View File
@@ -6,6 +6,9 @@
Contents: Web server program for Electronic Logbook ELOG
$Log$
Revision 1.216 2004/01/28 15:27:18 midas
Version 2.5.0
Revision 1.215 2004/01/27 16:18:10 midas
Use HTTP 1.0 in receive_message
@@ -3472,9 +3475,15 @@ int el_submit(LOGBOOK * lbs, int message_id, BOOL bedit,
/* if index not ordered, sort it */
i = *lbs->n_el_index;
if (i > 1 && lbs->el_index[i - 1].file_time < lbs->el_index[i - 2].file_time)
if (i > 1 && lbs->el_index[i - 1].file_time < lbs->el_index[i - 2].file_time) {
qsort(lbs->el_index, i, sizeof(EL_INDEX), eli_compare);
/* search message again, index could have been changed by sorting */
for (index = 0; index < *lbs->n_el_index; index++)
if (lbs->el_index[index].message_id == message_id)
break;
}
/* if other logbook has same index, update pointers */
for (i = 0; lb_list[i].name[0]; i++)
if (&lb_list[i] != lbs && lb_list[i].n_el_index == lbs->n_el_index)
@@ -3642,7 +3651,7 @@ INT el_delete_message(LOGBOOK * lbs, int message_id,
\********************************************************************/
{
INT i, index, n, size, fh, tail_size;
INT i, index, n, size, fh, tail_size, old_offset;
char str[MAX_PATH_LENGTH], file_name[MAX_PATH_LENGTH], reply_to[MAX_REPLY_TO * 10],
in_reply_to[256];
char *buffer, *p;
@@ -3773,14 +3782,19 @@ INT el_delete_message(LOGBOOK * lbs, int message_id,
/* remove message from index */
strcpy(str, lbs->el_index[index].file_name);
old_offset = lbs->el_index[index].offset;
for (i = index; i < *lbs->n_el_index - 1; i++) {
memcpy(&lbs->el_index[i], &lbs->el_index[i + 1], sizeof(EL_INDEX));
if (equal_ustring(lbs->el_index[i].file_name, str))
lbs->el_index[i].offset -= size;
}
(*lbs->n_el_index)--;
lbs->el_index = realloc(lbs->el_index, sizeof(EL_INDEX) * (*lbs->n_el_index));
/* correct all offsets after deleted message */
for (i = 0; i < *lbs->n_el_index; i++)
if (equal_ustring(lbs->el_index[i].file_name, str) &&
lbs->el_index[i].offset > old_offset)
lbs->el_index[i].offset -= size;
/* if other logbook has same index, update pointers */
for (i = 0; lb_list[i].name[0]; i++)
if (&lb_list[i] != lbs && lb_list[i].n_el_index == lbs->n_el_index)
@@ -3896,13 +3910,14 @@ This routine corrects that. */
int el_move_message_thread(LOGBOOK * lbs, int message_id)
{
int i, n, size, new_id;
char date[80], attrib[MAX_N_ATTR][NAME_LENGTH], text[TEXT_SIZE],
char date[80], attrib[MAX_N_ATTR][NAME_LENGTH], *text,
in_reply_to[80], reply_to[MAX_REPLY_TO * 10], encoding[80], locked_by[256];
char list[MAX_N_ATTR][NAME_LENGTH], str[256];
char att_file[MAX_ATTACHMENTS][256];
/* retrieve message */
size = sizeof(text);
text = malloc(TEXT_SIZE);
size = TEXT_SIZE;
el_retrieve(lbs, message_id, date, attr_list, attrib, lbs->n_attr,
text, &size, in_reply_to, reply_to, att_file, encoding, locked_by);
@@ -3911,6 +3926,8 @@ int el_move_message_thread(LOGBOOK * lbs, int message_id)
new_id = el_submit(lbs, 0, FALSE, date, attr_list, attrib, lbs->n_attr, text,
in_reply_to, reply_to, encoding, att_file, FALSE, locked_by);
free(text);
/* correct links */
el_correct_links(lbs, message_id, new_id);
@@ -3931,6 +3948,42 @@ int el_move_message_thread(LOGBOOK * lbs, int message_id)
/*------------------------------------------------------------------*/
int el_move_message(LOGBOOK * lbs, int old_id, int new_id)
{
int status, size;
char date[80], attrib[MAX_N_ATTR][NAME_LENGTH], *text, in_reply_to[80],
reply_to[MAX_REPLY_TO * 10], encoding[80], locked_by[256],
att_file[MAX_ATTACHMENTS][256];
/* retrieve message */
text = malloc(TEXT_SIZE);
size = TEXT_SIZE;
status = el_retrieve(lbs, old_id, date, attr_list, attrib, lbs->n_attr,
text, &size, in_reply_to, reply_to, att_file, encoding,
locked_by);
if (status != EL_SUCCESS)
return 0;
/* submit as new message */
status = el_submit(lbs, new_id, FALSE, date, attr_list, attrib, lbs->n_attr, text,
in_reply_to, reply_to, encoding, att_file, FALSE, locked_by);
free(text);
if (status != new_id)
return 0;
/* correct links */
el_correct_links(lbs, old_id, new_id);
/* delete original message */
el_delete_message(lbs, old_id, FALSE, NULL, FALSE, FALSE);
return 1;
}
/*------------------------------------------------------------------*/
int el_lock_message(LOGBOOK * lbs, int message_id, char *user)
/* lock message for editing */
{
@@ -8231,18 +8284,6 @@ int retrieve_remote_md5(LOGBOOK * lbs, char *host, MD5_INDEX ** md5_index,
sprintf(error_str, loc("Error accessing remote logbook"));
}
/* debugging only
for (i = 0; i < n; i++) {
int j;
printf("ID %d MD5:", (*md5_index)[i].message_id);
for (j = 0; j < 16; j++)
printf("%02X", (*md5_index)[i].md5_digest[j]);
printf("\n");
}
*/
free(text);
return n;
@@ -8947,7 +8988,7 @@ BOOL equal_md5(unsigned char m1[16], unsigned char m2[16])
void synchronize_logbook(LOGBOOK * lbs, BOOL bcron)
{
int index, i, j, i_msg, i_remote, i_cache, n_remote, n_cache, nserver,
remote_id, exist_remote, exist_cache, message_id;
remote_id, exist_remote, exist_cache, message_id, max_id;
int priority_remote = 0, all_identical;
char str[2000], url[256], loc_ref[256], rem_ref[256];
MD5_INDEX *md5_remote, *md5_cache;
@@ -9128,19 +9169,6 @@ void synchronize_logbook(LOGBOOK * lbs, BOOL bcron)
/* if message exists in both lists, compare MD5s */
if (exist_remote && exist_cache) {
/*
printf("ID%02d: ", message_id);
for (j = 0; j < 16; j++)
printf("%02X", lbs->el_index[i_msg].md5_digest[j]);
printf("\nCache : ");
for (j = 0; j < 16; j++)
printf("%02X", md5_cache[i_cache].md5_digest[j]);
printf("\nRemote: ");
for (j = 0; j < 16; j++)
printf("%02X", md5_remote[i_remote].md5_digest[j]);
printf("\n\n");
*/
/* if message has been changed on this server, but not remotely, send it */
if (!equal_md5(md5_cache[i_cache].md5_digest, lbs->el_index[i_msg].md5_digest)
&& equal_md5(md5_cache[i_cache].md5_digest,
@@ -9210,7 +9238,8 @@ void synchronize_logbook(LOGBOOK * lbs, BOOL bcron)
all_identical = FALSE;
if (!bcron) {
rsprintf("%s.\n\t", loc("Entry has been changed locally and remotely"));
rsprintf("ID%d:\t%s.\n\t", message_id,
loc("Entry has been changed locally and remotely"));
rsprintf(loc("Please delete %s or %s entry to resolve conflict"),
loc_ref, rem_ref);
rsprintf(".\n");
@@ -9271,6 +9300,37 @@ void synchronize_logbook(LOGBOOK * lbs, BOOL bcron)
rsprintf("ID%d:\t%s\n", message_id, loc("Local entry submitted"));
}
/* if message does not exist in cache but remotely,
messages were added on both sides, so resubmit local one and retrieve remote one */
if (!exist_cache && exist_remote) {
/* find max id both locally and remotely */
max_id = 1;
for (i = 0; i < *lbs->n_el_index; i++)
if (lbs->el_index[i].message_id > max_id)
max_id = lbs->el_index[i].message_id;
for (i = 0; i < n_remote; i++)
if (md5_remote[i].message_id > max_id)
max_id = md5_remote[i].message_id;
if (_logging_level > 1)
logf(lbs, "MIRROR change entry #%d to #%d", message_id, max_id + 1);
/* rearrange local message not to conflict with remote message */
if (!getcfg(lbs->name, "Mirror simulate", str) || atoi(str) == 0)
el_move_message(lbs, message_id, max_id + 1);
all_identical = FALSE;
if (!bcron) {
sprintf(str, loc("Changed local entry ID to %d"), max_id + 1);
rsprintf("ID%d:\t%s\n", message_id, str);
}
/* current message has been changed, so start over */
i_msg--;
}
flush_return_buffer();
}
@@ -12044,6 +12104,7 @@ void submit_elog(LOGBOOK * lbs)
if (*getparam("edit_id") && *getparam("resubmit")
&& atoi(getparam("resubmit")) == 1) {
resubmit_orig = atoi(getparam("edit_id"));
bedit = TRUE;
/* get old links */
el_retrieve(lbs, resubmit_orig, NULL, NULL, NULL, 0, NULL, 0, in_reply_to,
@@ -12087,8 +12148,7 @@ void submit_elog(LOGBOOK * lbs)
message_id =
el_submit(lbs, message_id, bedit, date, attr_list, attrib, lbs->n_attr,
getparam("text"), in_reply_to, reply_to,
*getparam("html") ? "HTML" : "plain", att_file,
!isparam("mirror_id"), NULL);
*getparam("html") ? "HTML" : "plain", att_file, TRUE, NULL);
if (message_id <= 0) {
sprintf(str, loc("New entry cannot be written to directory \"%s\""), lbs->data_dir);
@@ -14907,10 +14967,6 @@ void check_cron()
time(&now);
ts = localtime(&now);
strcpy(str, ctime(&now));
str[24] = 0;
printf("Cron: %s\r", str);
/* check once every minute */
if (last_time.tm_year && last_time.tm_min != ts->tm_min) {