space Baylys
Just practicing to pass the Turing test.
space
space
space
space
Developer for Hire!
space
addedValues Plugin
space

Home

What's new

Bayly.Root

Cornershop Plugin

Career

edutools Root

Enhancements

Interests

linguist Plugin

Manila

Patches

space

mainresponder

space
space

adminSite

calendar

controlpanel

discuss

space
space

editmessageForm

newMessageForm

postEditedMessage

space

getFileMimeType

members

parseMultipart

respond

subscriptions

space

manilaData

manilamacros

manilaSuite

system

Patches by Group

Papers

Sales

Sign My Guestbook

User(land) Relations.

Contact Address

Search Baylys

urlchains

space
Join Now
Login
space space space

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)
  «Changes:
 unaltered lines omitted
 
  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^))
 unaltered lines omitted
  if not (mainResponder.discuss.memberCanEdit (adrMsg, pta^.adrMemberInfo)) //PBS 6/9/99
 unaltered lines omitted
 
  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
 unaltered lines omitted
  if flAcceptFileDeletions //delete attached files that were checked off when the button was clicked
  local (folderPath = "")
  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
 unaltered lines omitted
  if folderPath != "" //made conditional 02/09/30, 14:56:39 by DAB
  local (ix, ct = sizeOf (pta^.postArgs), adrArg, magicPrefix="delete_", f, fname)
  for ix = ct downTo 1
  adrArg = @pta^.postArgs [ix]
  if nameOf (adrArg^) beginsWith magicPrefix
  fname = string.delete (nameOf (adrArg^), 1, sizeOf (magicPrefix))
  local (i, ch)
  for i = sizeOf (fname) downTo 1 //pop off everything but the file name
  ch = fname [i]
  if not (string.isAlpha (ch) or string.isNumeric (ch) or (ch == ".") or (ch == " "))
  fname = string.delete (fname, 1, i)
  break
  f = folderPath + fname
  if file.exists (f)
  file.delete (f)
 
  local (redirectUrl = pta^.responderAttributes.urls^.discussMsgReader + msgNum)
  if defined (pta^.postArgs.referer)
 unaltered lines omitted
  mainResponder.redirect (redirectUrl)

Relative to Frontier version 9.7b10