|
|
 |
 |
 |
mainResponder.discuss.postEditedMessage
Manila is built on top of mainresponder which implements, among other things, the basic functionality of the Discussion group of Manila sites - including a way to attach documents to messages, which in some situations is superior to GEMS. This patch restores that functionality; manilaFixer is needed to configure and add a UI for it.
| on postEditedMessage (flAcceptFileUploads=false, flAcceptFileDeletions=false, flNeuterMacros=true, flNeuterText=true, lastUpdateTime=nil) |
| |
local (pta = html.getPageTableAddress ()) |
| |
local (msgNum = number (pta^.postArgs.msgNum)) |
| |
local (body = string (pta^.postArgs.body)) |
| |
local (subject = string (pta^.postArgs.subject)) |
| |
local (adrMsg = mainResponder.discuss.getMessageTable (msgNum)) |
| |
«if string.lower (adrMsg^.member) != string.lower (nameOf (pta^.adrmemberinfo^)) |
| |
if not (mainResponder.discuss.memberCanEdit (adrMsg, pta^.adrMemberInfo)) //PBS 6/9/99 |
| |
bundle //PBS 12/14/00: handle OPML formatted text |
| |
mainResponder.discuss.setMessageText (adrMsg, body, flNeuterMacros, flNeuterText, lastUpdateTime:lastUpdateTime) //PBS 04/02/00: lastUpdateTime is a new parameter needed for time zone support in Manila |
| |
adrMsg^.subject = mainResponder.neuterText (subject) |
| |
fileMenu.saveMyRoot (adrMsg) |
| |
pta^.adrEditedMsg = adrMsg |
| |
mainResponder.callbackLoop (@config.mainResponder.callbacks.editMessage, pta) |
| |
«mainResponder.discuss.archiveMessage (adrMsg) //PBS 06/01/00: commented out //8/13/99; 10:36:33 PM by DW |
| |
if flAcceptFileUploads //write attached file to the enclosure folder structure |
| |
if flAcceptFileDeletions //delete attached files that were checked off when the button was clicked |
| |
bundle //compute folderPath |
| |
try {folderPath = mainResponder.discuss.getMessageAttachmentsFolder (adrMsg)} //02/09/30, 14:56:47 by DAB |
| |
«PBS 03/15/00: old code, now factored out |
| |
if folderPath != "" //made conditional 02/09/30, 14:56:39 by DAB |
| |
local (ix, ct = sizeOf (pta^.postArgs), adrArg, magicPrefix="delete_", f, fname) |
| |
adrArg = @pta^.postArgs [ix] |
| |
if nameOf (adrArg^) beginsWith magicPrefix |
| |
fname = string.delete (nameOf (adrArg^), 1, sizeOf (magicPrefix)) |
| |
for i = sizeOf (fname) downTo 1 //pop off everything but the file name |
| |
if not (string.isAlpha (ch) or string.isNumeric (ch) or (ch == ".") or (ch == " ")) |
| |
fname = string.delete (fname, 1, i) |
| |
local (redirectUrl = pta^.responderAttributes.urls^.discussMsgReader + msgNum) |
| |
if defined (pta^.postArgs.referer) |
| |
mainResponder.redirect (redirectUrl) |
Relative to Frontier version 9.7b10
|