Skip to content

Commit 1932d24

Browse files
committed
Merge branch 'release/1.4.1'
2 parents c3a6a23 + 2530bf0 commit 1932d24

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

87 files changed

+7963
-7404
lines changed

CHANGELOG.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,22 @@
1+
# 1.4.1
2+
* NEW: Translations
3+
* NEW: userLeave Hook
4+
* NEW: Script to reinsert all DB values of a Pad
5+
* NEW: Allow for absolute settings paths
6+
* NEW: API: Get Pad ID from read Only Pad ID
7+
* NEW: Huge improvement on MySQL database read/write (InnoDB to MyISAM)
8+
* NEW: Hook for Export File Name
9+
* NEW: Preprocessor Hook for DOMLine attributes (allows plugins to wrap entire line contents)
10+
* Fix: Exception on Plugin Search and fix for plugins not being fetched
11+
* Fix: Font on innerdoc body can be arial on paste
12+
* Fix: Fix Dropping of messages in handleMessage
13+
* Fix: Don't use Abiword for HTML exports
14+
* Fix: Color issues with user Icon
15+
* Fix: Timeslider Button
16+
* Fix: Session Deletion error
17+
* Fix: Allow browser tabs to be cycled when focus is in editor
18+
* Fix: Various Editor issues with Easysync potentially entering forever loop on bad changeset
19+
120
# 1.4
221
* NEW: Disable toolbar items through settings.json
322
* NEW: Internal stats/metrics engine

bin/repairPad.js

Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
/*
2+
This is a repair tool. It extracts all datas of a pad, removes and inserts them again.
3+
*/
4+
5+
console.warn("WARNING: This script must not be used while etherpad is running!");
6+
7+
if(process.argv.length != 3)
8+
{
9+
console.error("Use: node bin/repairPad.js $PADID");
10+
process.exit(1);
11+
}
12+
//get the padID
13+
var padId = process.argv[2];
14+
15+
var db, padManager, pad, settings;
16+
var neededDBValues = ["pad:"+padId];
17+
18+
var npm = require("../src/node_modules/npm");
19+
var async = require("../src/node_modules/async");
20+
21+
async.series([
22+
// load npm
23+
function(callback) {
24+
npm.load({}, function(er) {
25+
if(er)
26+
{
27+
console.error("Could not load NPM: " + er)
28+
process.exit(1);
29+
}
30+
else
31+
{
32+
callback();
33+
}
34+
})
35+
},
36+
// load modules
37+
function(callback) {
38+
settings = require('../src/node/utils/Settings');
39+
db = require('../src/node/db/DB');
40+
callback();
41+
},
42+
//intallize the database
43+
function (callback)
44+
{
45+
db.init(callback);
46+
},
47+
//get the pad
48+
function (callback)
49+
{
50+
padManager = require('../src/node/db/PadManager');
51+
52+
padManager.getPad(padId, function(err, _pad)
53+
{
54+
pad = _pad;
55+
callback(err);
56+
});
57+
},
58+
function (callback)
59+
{
60+
//add all authors
61+
var authors = pad.getAllAuthors();
62+
for(var i=0;i<authors.length;i++)
63+
{
64+
neededDBValues.push("globalAuthor:" + authors[i]);
65+
}
66+
67+
//add all revisions
68+
var revHead = pad.head;
69+
for(var i=0;i<=revHead;i++)
70+
{
71+
neededDBValues.push("pad:"+padId+":revs:" + i);
72+
}
73+
74+
//get all chat values
75+
var chatHead = pad.chatHead;
76+
for(var i=0;i<=chatHead;i++)
77+
{
78+
neededDBValues.push("pad:"+padId+":chat:" + i);
79+
}
80+
callback();
81+
},
82+
function (callback) {
83+
db = db.db;
84+
neededDBValues.forEach(function(key, value) {
85+
console.debug("Key: "+key+", value: "+value);
86+
db.remove(key);
87+
db.set(key, value);
88+
});
89+
callback();
90+
}
91+
], function (err)
92+
{
93+
if(err) throw err;
94+
else
95+
{
96+
console.info("finished");
97+
process.exit();
98+
}
99+
});
100+
101+
//get the pad object
102+
//get all revisions of this pad
103+
//get all authors related to this pad
104+
//get the readonly link releated to this pad
105+
//get the chat entrys releated to this pad
106+
//remove all keys from database and insert them again

doc/api/hooks_server-side.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -247,3 +247,36 @@ Things in context:
247247

248248
This hook will allow a plug-in developer to re-write each line when exporting to HTML.
249249

250+
## exportFileName
251+
Called from src/node/handler/ExportHandler.js
252+
253+
Things in context:
254+
255+
1. padId
256+
257+
This hook will allow a plug-in developer to modify the file name of an exported pad. This is useful if you want to export a pad under another name and/or hide the padId under export. Note that the doctype or file extension cannot be modified for security reasons.
258+
259+
Example:
260+
261+
```
262+
exports.exportFileName = function(hook, padId, callback){
263+
callback("newFileName"+padId);
264+
}
265+
```
266+
267+
## userLeave
268+
Called from src/node/handler/PadMessageHandler.js
269+
270+
This in context:
271+
272+
1. session (including the pad id and author id)
273+
274+
This hook gets called when an author leaves a pad. This is useful if you want to perform certain actions after a pad has been edited
275+
276+
Example:
277+
278+
```
279+
exports.userLeave = function(hook, session, callback) {
280+
console.log('%s left pad %s', session.author, session.padId);
281+
};
282+
```

doc/api/http_api.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -455,6 +455,15 @@ returns the read only link of a pad
455455
* `{code: 0, message:"ok", data: {readOnlyID: "r.s8oes9dhwrvt0zif"}}`
456456
* `{code: 1, message:"padID does not exist", data: null}`
457457

458+
#### getPadID(readOnlyID)
459+
* API >= 1.2.10
460+
461+
returns the id of a pad which is assigned to the readOnlyID
462+
463+
*Example returns:*
464+
* `{code: 0, message:"ok", data: {padID: "p.s8oes9dhwrvt0zif"}}`
465+
* `{code: 1, message:"padID does not exist", data: null}`
466+
458467
#### setPublicStatus(padID, publicStatus)
459468
* API >= 1
460469

doc/easysync/easysync-full-description.tex

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ \section{Composition of Changesets}
8383

8484
\begin{itemize}
8585
\item[] $A=(n_1\rightarrow n_2)[\cdots]$
86-
\item[] $A=(n_2\rightarrow n_3)[\cdots]$
86+
\item[] $B=(n_2\rightarrow n_3)[\cdots]$
8787
\end{itemize}
8888
it is clear that there is a third changeset $C=(n_1\rightarrow n_3)[\cdots]$ such that applying $C$ to a document $X$ yeilds the same resulting document as does applying $A$ and then $B$. In this case, we write $AB=C$.
8989

@@ -97,14 +97,14 @@ \section{Changeset Merging}
9797

9898
This is where \emph{merging} comes in. Merging takes two changesets that apply to the same initial document (and that cannot be composed), and computes a single new changeset that presevers the intent of both changes. The merge of $A$ and $B$ is written as $m(A,B)$. For the Etherpad system to work, we require that $m(A,B)=m(B,A)$.
9999

100-
Aside from what we have said so far about merging, there aremany different implementations that will lead to a workable system. We have created one implementation for text that has the following constraints.
100+
Aside from what we have said so far about merging, there are many different implementations that will lead to a workable system. We have created one implementation for text that has the following constraints.
101101

102102
\section{Follows} \label{follows}
103103

104104
When users $A$ and $B$ have the same document $X$ on their screen, and they proceed to make respective changesets $A$ and $B$, it is no use to compute $m(A,B)$, because $m(A,B)$ applies to document $X$, but the users are already looking at document $XA$ and $XB$. What we really want is to compute $B'$ and $A'$ such that
105105
$$XAB' = XBA' = Xm(A,B)$$
106106

107-
``Following'' computes these $B'$ and $A'$ changesets. The definition of the ``follow'' function $f$ is such that $Af(A,B)=Bf(B,A)=m(A,B)=m(B,A)$. When we computer $f(A,B)$.
107+
``Following'' computes these $B'$ and $A'$ changesets. The definition of the ``follow'' function $f$ is such that $Af(A,B)=Bf(B,A)=m(A,B)=m(B,A)$. When we compute $f(A,B)$
108108
\begin{itemize}
109109
\item Insertions in $A$ become retained characters in $f(A,B)$
110110
\item Insertions in $B$ become insertions in $f(A,B)$

settings.json.template

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,9 @@
5959

6060
/* Users may edit pads but not create new ones. Pad creation is only via the API. This applies both to group pads and regular pads. */
6161
"editOnly" : false,
62+
63+
/* Users, who have a valid session, automatically get granted access to password protected pads */
64+
"sessionNoPassword" : false,
6265

6366
/* if true, all css & js will be minified before sending to the client. This will improve the loading performance massivly,
6467
but makes it impossible to debug the javascript/css */

src/locales/af.json

Lines changed: 64 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -1,65 +1,65 @@
11
{
2-
"@metadata": {
3-
"authors": [
4-
"Naudefj"
5-
]
6-
},
7-
"index.newPad": "Nuwe pad",
8-
"index.createOpenPad": "of skep/open 'n pad met die naam:",
9-
"pad.toolbar.bold.title": "Vet (Ctrl-B)",
10-
"pad.toolbar.italic.title": "Kursief (Ctrl-I)",
11-
"pad.toolbar.underline.title": "Onderstreep (Ctrl-U)",
12-
"pad.toolbar.strikethrough.title": "Deurgehaal",
13-
"pad.toolbar.ol.title": "Geordende lys",
14-
"pad.toolbar.ul.title": "Ongeordende lys",
15-
"pad.toolbar.indent.title": "Indenteer",
16-
"pad.toolbar.unindent.title": "Verklein indentering",
17-
"pad.toolbar.undo.title": "Ongedaan maak (Ctrl-Z)",
18-
"pad.toolbar.redo.title": "Herdoen (Ctrl-Y)",
19-
"pad.toolbar.settings.title": "Voorkeure",
20-
"pad.colorpicker.save": "Stoor",
21-
"pad.colorpicker.cancel": "Kanselleer",
22-
"pad.loading": "Laai...",
23-
"pad.settings.myView": "My oorsig",
24-
"pad.settings.fontType.normal": "Normaal",
25-
"pad.settings.fontType.monospaced": "Monospasie",
26-
"pad.importExport.exporthtml": "HTML",
27-
"pad.importExport.exportpdf": "PDF",
28-
"pad.importExport.exportdokuwiki": "DokuWiki",
29-
"pad.modals.userdup.advice": "Maak weer 'n verbinding as u die venster wil gebruik.",
30-
"pad.modals.unauth": "Nie toegestaan",
31-
"pad.modals.deleted": "Geskrap.",
32-
"pad.share": "Deel die pad",
33-
"pad.share.readonly": "Lees-alleen",
34-
"pad.share.link": "Skakel",
35-
"pad.share.emebdcode": "Inbed URL",
36-
"pad.chat": "Klets",
37-
"pad.chat.title": "Maak kletsblad vir die pad oop",
38-
"timeslider.toolbar.returnbutton": "Terug na pad",
39-
"timeslider.toolbar.authors": "Outeurs:",
40-
"timeslider.toolbar.authorsList": "Geen outeurs",
41-
"timeslider.exportCurrent": "Huidige weergawe eksporteer as:",
42-
"timeslider.version": "Weergawe {{version}}",
43-
"timeslider.saved": "Gestoor op {{day}} {{month}} {{year}}",
44-
"timeslider.dateformat": "{{year}}-{{month}}-{{day}} {{hours}}:{{minutes}}:{{seconds}}",
45-
"timeslider.month.january": "Januarie",
46-
"timeslider.month.february": "Februarie",
47-
"timeslider.month.march": "Maart",
48-
"timeslider.month.april": "April",
49-
"timeslider.month.may": "Mei",
50-
"timeslider.month.june": "Junie",
51-
"timeslider.month.july": "Julie",
52-
"timeslider.month.august": "Augustus",
53-
"timeslider.month.september": "September",
54-
"timeslider.month.october": "Oktober",
55-
"timeslider.month.november": "November",
56-
"timeslider.month.december": "Desember",
57-
"pad.userlist.entername": "Verskaf u naam",
58-
"pad.userlist.unnamed": "sonder naam",
59-
"pad.userlist.guest": "Gas",
60-
"pad.userlist.deny": "Keur af",
61-
"pad.userlist.approve": "Keur goed",
62-
"pad.impexp.importbutton": "Voer nou in",
63-
"pad.impexp.importing": "Besig met invoer...",
64-
"pad.impexp.importfailed": "Invoer het gefaal"
65-
}
2+
"@metadata": {
3+
"authors": [
4+
"Naudefj"
5+
]
6+
},
7+
"index.newPad": "Nuwe pad",
8+
"index.createOpenPad": "of skep/open 'n pad met die naam:",
9+
"pad.toolbar.bold.title": "Vet (Ctrl-B)",
10+
"pad.toolbar.italic.title": "Kursief (Ctrl-I)",
11+
"pad.toolbar.underline.title": "Onderstreep (Ctrl-U)",
12+
"pad.toolbar.strikethrough.title": "Deurgehaal",
13+
"pad.toolbar.ol.title": "Geordende lys",
14+
"pad.toolbar.ul.title": "Ongeordende lys",
15+
"pad.toolbar.indent.title": "Indenteer",
16+
"pad.toolbar.unindent.title": "Verklein indentering",
17+
"pad.toolbar.undo.title": "Ongedaan maak (Ctrl-Z)",
18+
"pad.toolbar.redo.title": "Herdoen (Ctrl-Y)",
19+
"pad.toolbar.settings.title": "Voorkeure",
20+
"pad.colorpicker.save": "Stoor",
21+
"pad.colorpicker.cancel": "Kanselleer",
22+
"pad.loading": "Laai...",
23+
"pad.settings.myView": "My oorsig",
24+
"pad.settings.fontType.normal": "Normaal",
25+
"pad.settings.fontType.monospaced": "Monospasie",
26+
"pad.importExport.exporthtml": "HTML",
27+
"pad.importExport.exportpdf": "PDF",
28+
"pad.importExport.exportdokuwiki": "DokuWiki",
29+
"pad.modals.userdup.advice": "Maak weer 'n verbinding as u die venster wil gebruik.",
30+
"pad.modals.unauth": "Nie toegestaan",
31+
"pad.modals.deleted": "Geskrap.",
32+
"pad.share": "Deel die pad",
33+
"pad.share.readonly": "Lees-alleen",
34+
"pad.share.link": "Skakel",
35+
"pad.share.emebdcode": "Inbed URL",
36+
"pad.chat": "Klets",
37+
"pad.chat.title": "Maak kletsblad vir die pad oop",
38+
"timeslider.toolbar.returnbutton": "Terug na pad",
39+
"timeslider.toolbar.authors": "Outeurs:",
40+
"timeslider.toolbar.authorsList": "Geen outeurs",
41+
"timeslider.exportCurrent": "Huidige weergawe eksporteer as:",
42+
"timeslider.version": "Weergawe {{version}}",
43+
"timeslider.saved": "Gestoor op {{day}} {{month}} {{year}}",
44+
"timeslider.dateformat": "{{year}}-{{month}}-{{day}} {{hours}}:{{minutes}}:{{seconds}}",
45+
"timeslider.month.january": "Januarie",
46+
"timeslider.month.february": "Februarie",
47+
"timeslider.month.march": "Maart",
48+
"timeslider.month.april": "April",
49+
"timeslider.month.may": "Mei",
50+
"timeslider.month.june": "Junie",
51+
"timeslider.month.july": "Julie",
52+
"timeslider.month.august": "Augustus",
53+
"timeslider.month.september": "September",
54+
"timeslider.month.october": "Oktober",
55+
"timeslider.month.november": "November",
56+
"timeslider.month.december": "Desember",
57+
"pad.userlist.entername": "Verskaf u naam",
58+
"pad.userlist.unnamed": "sonder naam",
59+
"pad.userlist.guest": "Gas",
60+
"pad.userlist.deny": "Keur af",
61+
"pad.userlist.approve": "Keur goed",
62+
"pad.impexp.importbutton": "Voer nou in",
63+
"pad.impexp.importing": "Besig met invoer...",
64+
"pad.impexp.importfailed": "Invoer het gefaal"
65+
}

0 commit comments

Comments
 (0)