mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-24 01:16:15 -04:00
Pad: Rename originalPad
context property to srcPad
This commit is contained in:
parent
59d60480c0
commit
9cdb69c159
3 changed files with 27 additions and 6 deletions
|
@ -429,7 +429,14 @@ Pad.prototype.copy = async function (destinationID, force) {
|
|||
await padManager.getPad(destinationID, null);
|
||||
|
||||
// let the plugins know the pad was copied
|
||||
await hooks.aCallAll('padCopy', {originalPad: this, destinationID});
|
||||
await hooks.aCallAll('padCopy', {
|
||||
get originalPad() {
|
||||
warnDeprecated('padCopy originalPad context property is deprecated; use srcPad instead');
|
||||
return this.srcPad;
|
||||
},
|
||||
srcPad: this,
|
||||
destinationID,
|
||||
});
|
||||
|
||||
return {padID: destinationID};
|
||||
};
|
||||
|
@ -518,7 +525,14 @@ Pad.prototype.copyPadWithoutHistory = async function (destinationID, force, auth
|
|||
const changeset = Changeset.pack(oldLength, newLength, assem.toString(), newText);
|
||||
newPad.appendRevision(changeset, authorId);
|
||||
|
||||
await hooks.aCallAll('padCopy', {originalPad: this, destinationID});
|
||||
await hooks.aCallAll('padCopy', {
|
||||
get originalPad() {
|
||||
warnDeprecated('padCopy originalPad context property is deprecated; use srcPad instead');
|
||||
return this.srcPad;
|
||||
},
|
||||
srcPad: this,
|
||||
destinationID,
|
||||
});
|
||||
|
||||
return {padID: destinationID};
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue