You can subscribe to this list here.
| 2004 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(447) |
Nov
(163) |
Dec
(57) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2005 |
Jan
(172) |
Feb
|
Mar
(123) |
Apr
(64) |
May
(1) |
Jun
(278) |
Jul
(89) |
Aug
(97) |
Sep
(62) |
Oct
(53) |
Nov
(119) |
Dec
(60) |
| 2006 |
Jan
(76) |
Feb
(1094) |
Mar
(363) |
Apr
(163) |
May
(57) |
Jun
(43) |
Jul
(39) |
Aug
(15) |
Sep
(33) |
Oct
(62) |
Nov
(8) |
Dec
|
| 2007 |
Jan
(9) |
Feb
(34) |
Mar
(2) |
Apr
(14) |
May
(8) |
Jun
(40) |
Jul
(21) |
Aug
(1) |
Sep
(20) |
Oct
(15) |
Nov
(26) |
Dec
|
| 2008 |
Jan
(1) |
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(3) |
Oct
|
Nov
|
Dec
(1) |
| 2009 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(32) |
Jun
|
Jul
|
Aug
(3) |
Sep
(3) |
Oct
|
Nov
|
Dec
|
| 2010 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2011 |
Jan
|
Feb
|
Mar
(2) |
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(7) |
Dec
|
| 2012 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: creecode <icr...@us...> - 2006-03-07 05:39:24
|
Update of /cvsroot/frontierkernel/odbs/frontierRoot/system/verbs/apps/Manila/windowTypes/types/manilaMessage In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6847 Modified Files: openMessage Log Message: replace calls to verbs at extensions.latinToMac with string.(latin/mac)To(Latin/Mac) verbs Index: openMessage =================================================================== RCS file: /cvsroot/frontierkernel/odbs/frontierRoot/system/verbs/apps/Manila/windowTypes/types/manilaMessage/openMessage,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** openMessage 26 Mar 2005 19:42:26 -0000 1.1.1.1 --- openMessage 7 Mar 2006 05:39:21 -0000 1.2 *************** *** 1,3 **** ! FrontierVcsFile:1:scpt:system.verbs.apps.Manila.windowTypes.types.manilaMessage.openMessage ! on openMessage (siteurl, msgnum, flHidden=false, flHomePage=false, adradrwindow=nil) { ÇOpen a message in a Manila site. ÇChanges Ç3/11/02; 11:56:46 AM by JES ÇIf this is a Mac, and the message is opml, convert to Mac text. bundle { //if the window is already open, bring it to the front local (t); new (tableType, @t); local (adrtype = parentOf (this^)); t.type = nameOf (adrtype^); t.msgnum = msgnum; manila.windowTypes.findSiteInfo (siteurl, @t.adrSiteInfo); local (adrwindow); if Frontier.tools.windowTypes.findWindowWithMatchingAtts (@t, @adrwindow) { local (title, flReadOnly = false); window.attributes.getOne ("title", @title, adrwindow); window.attributes.getOne ("flReadOnly", @flReadOnly, adrwindow); if not flHidden { edit (adrwindow, title, flReadOnly)}; return (true)}}; local (username, password); on createInfoCallback (adrinfo) { if manila.windowTypes.getUsernameAndPassword (adrinfo, @username, @password) { manila.windowTypes.setUsernameAndPassword (adrinfo, username, password)} else { bundle { //don't leave stale data lying around local (adrtempinfo = @system.temp.manila.data.sites.[nameOf (adrinfo^)]); if defined (adrtempinfo^) {delete (adrtempinfo)}; delete (adrinfo)}; return (false)}}; local (adrinfo); if not manila.windowTypes.findSiteInfo (siteUrl, @adrinfo, @createInfoCallback) { return (false)}; //the user cancelled the username/password dialog bundle { //get the site name and displaySiteName if we need them if adrinfo^.siteName == "" { adrinfo^.siteName = manila.getSiteName (nameOf (adrinfo^))}; if adrinfo^.displaySiteName == "" { adrinfo^.displaySiteName = adrinfo^.siteName}}; manila.windowTypes.getUsernameAndPassword (adrinfo, @username, @password); local (siteinfo = adrinfo^); siteinfo.username = username; siteinfo.password = password; local (msg = manila.message.get (@siteinfo, msgnum)); //get the message from the server bundle { //update server info if defined (msg.flServerAcceptsOpml) { adrinfo^.flServerAcceptsOpml = msg.flServerAcceptsOpml}; if defined (msg.displaySiteName) { adrinfo^.displaySiteName = msg.displaySiteName}}; local (windowTitle = adrinfo^.displaySiteName + ": " + msg.subject); local (flReadOnly = false); //the server doesn't support this, but there may be need in the future local (adr = Frontier.tools.windowTypes.newWindow ("manilaMessage", true, windowTitle)); window.attributes.setOne ("adrSiteInfo", adrinfo, adr); bundle { //put the message text in the window local (bodyType = "text/html"); if defined (msg.bodyType) { bodyType = msg.bodyType}; case bodyType { "text/html" { op.newOutlineObject (msg.body, adr)}; "text/x-outline-tabbed" { op.newOutlineObject (msg.outline, adr)}; "text/x-opml" { if defined (msg.opml) { local (opmltext = msg.opml); if system.environment.isMac { opmltext = latinToMac.convert (opmltext)}; op.xmlToOutline (opmltext, adr)} else { op.newOutlineObject (msg.body, adr)}}}; if defined (msg.windowInfo) { manila.windowTypes.restoreWindowState (adr, @msg.windowInfo)}; if defined (msg.flReadOnly) { flReadOnly = msg.flReadOnly}}; bundle { //set window attributes local (atts); new (tableType, @atts); atts.subject = msg.subject; atts.msgnum = msg.msgnum; atts.inResponseTo = msg.inResponseTo; atts.responses = msg.responses; atts.flAddToStoriesList = false; //if it's already a story, we don't need to add it again atts.timeCreated = msg.postTime; if defined (msg.lastUpdate) { //set lastSaved and the window's timeModified local (lastSaved = msg.lastUpdate, now = clock.now ()); if msg.lastUpdate > now { //make sure lastSaved is not later than now lastSaved = now}; atts.lastSaved = lastSaved; setTimeModified (adr, lastSaved)}; if defined (msg.url) { atts.url = msg.url}; if flHomePage { //get the home page url from the siteinfo table's name local (url = nameOf (adrinfo^)); local (parts = string.urlSplit (url)); if parts[2] contains ":" { if string.nthField (parts[2], ':', 2) == "80" { url = parts[1] + string.nthField (parts[2], ':', 1) + "/" + parts[3]}}; atts.url = url}; if defined (msg.rendererInfo) { atts.rendererInfo = msg.rendererInfo}; if defined (msg.member) { atts.authorEmail = msg.member}; if defined (msg.memberName) { atts.authorName = msg.memberName}; if defined (msg.ctReads) { atts.ctReads = msg.ctReads}; window.attributes.addGroup (@atts, adr)}; manila.message.checkOut (adrinfo, msgnum); if not flHidden { //open the window edit (adr, windowTitle, flReadOnly)}; if adradrwindow != nil { adradrwindow^ = adr}; return (true)}; bundle { //debugging openMessage ("http://test.w2k.jspace.org/", 3)} \ No newline at end of file --- 1,131 ---- ! FrontierVcsFile:2:scpt:system.verbs.apps.Manila.windowTypes.types.manilaMessage.openMessage ! on openMessage (siteurl, msgnum, flHidden=false, flHomePage=false, adradrwindow=nil) { ! «Changes ! «2/28/06; 12:07:07 PM by TAC ! «replace extensions.latinToMac.convert with string.latinToMac ! «3/11/02; 11:56:46 AM by JES ! «If this is a Mac, and the message is opml, convert to Mac text. ! «Open a message in a Manila site. ! ! bundle { //if the window is already open, bring it to the front ! local (t); new (tableType, @t); ! local (adrtype = parentOf (this^)); ! t.type = nameOf (adrtype^); ! t.msgnum = msgnum; ! manila.windowTypes.findSiteInfo (siteurl, @t.adrSiteInfo); ! local (adrwindow); ! if Frontier.tools.windowTypes.findWindowWithMatchingAtts (@t, @adrwindow) { ! local (title, flReadOnly = false); ! window.attributes.getOne ("title", @title, adrwindow); ! window.attributes.getOne ("flReadOnly", @flReadOnly, adrwindow); ! if not flHidden { ! edit (adrwindow, title, flReadOnly)}; ! return (true)}}; ! ! local (username, password); ! on createInfoCallback (adrinfo) { ! if manila.windowTypes.getUsernameAndPassword (adrinfo, @username, @password) { ! manila.windowTypes.setUsernameAndPassword (adrinfo, username, password)} ! else { ! bundle { //don't leave stale data lying around ! local (adrtempinfo = @system.temp.manila.data.sites.[nameOf (adrinfo^)]); ! if defined (adrtempinfo^) {delete (adrtempinfo)}; ! delete (adrinfo)}; ! return (false)}}; ! ! local (adrinfo); ! if not manila.windowTypes.findSiteInfo (siteUrl, @adrinfo, @createInfoCallback) { ! return (false)}; //the user cancelled the username/password dialog ! ! bundle { //get the site name and displaySiteName if we need them ! if adrinfo^.siteName == "" { ! adrinfo^.siteName = manila.getSiteName (nameOf (adrinfo^))}; ! if adrinfo^.displaySiteName == "" { ! adrinfo^.displaySiteName = adrinfo^.siteName}}; ! ! manila.windowTypes.getUsernameAndPassword (adrinfo, @username, @password); ! local (siteinfo = adrinfo^); ! siteinfo.username = username; ! siteinfo.password = password; ! ! local (msg = manila.message.get (@siteinfo, msgnum)); //get the message from the server ! ! bundle { //update server info ! if defined (msg.flServerAcceptsOpml) { ! adrinfo^.flServerAcceptsOpml = msg.flServerAcceptsOpml}; ! if defined (msg.displaySiteName) { ! adrinfo^.displaySiteName = msg.displaySiteName}}; ! ! local (windowTitle = adrinfo^.displaySiteName + ": " + msg.subject); ! local (flReadOnly = false); //the server doesn't support this, but there may be need in the future ! local (adr = Frontier.tools.windowTypes.newWindow ("manilaMessage", true, windowTitle)); ! window.attributes.setOne ("adrSiteInfo", adrinfo, adr); ! ! bundle { //put the message text in the window ! local (bodyType = "text/html"); ! if defined (msg.bodyType) { ! bodyType = msg.bodyType}; ! case bodyType { ! "text/html" { ! op.newOutlineObject (msg.body, adr)}; ! "text/x-outline-tabbed" { ! op.newOutlineObject (msg.outline, adr)}; ! "text/x-opml" { ! if defined (msg.opml) { ! local (opmltext = msg.opml); ! if system.environment.isMac { ! opmltext = string.latinToMac (opmltext)}; ! op.xmlToOutline (opmltext, adr)} ! else { ! op.newOutlineObject (msg.body, adr)}}}; ! if defined (msg.windowInfo) { ! manila.windowTypes.restoreWindowState (adr, @msg.windowInfo)}; ! if defined (msg.flReadOnly) { ! flReadOnly = msg.flReadOnly}}; ! ! bundle { //set window attributes ! local (atts); new (tableType, @atts); ! atts.subject = msg.subject; ! atts.msgnum = msg.msgnum; ! atts.inResponseTo = msg.inResponseTo; ! atts.responses = msg.responses; ! atts.flAddToStoriesList = false; //if it's already a story, we don't need to add it again ! atts.timeCreated = msg.postTime; ! if defined (msg.lastUpdate) { //set lastSaved and the window's timeModified ! local (lastSaved = msg.lastUpdate, now = clock.now ()); ! if msg.lastUpdate > now { //make sure lastSaved is not later than now ! lastSaved = now}; ! atts.lastSaved = lastSaved; ! setTimeModified (adr, lastSaved)}; ! if defined (msg.url) { ! atts.url = msg.url}; ! if flHomePage { //get the home page url from the siteinfo table's name ! local (url = nameOf (adrinfo^)); ! local (parts = string.urlSplit (url)); ! if parts[2] contains ":" { ! if string.nthField (parts[2], ':', 2) == "80" { ! url = parts[1] + string.nthField (parts[2], ':', 1) + "/" + parts[3]}}; ! atts.url = url}; ! if defined (msg.rendererInfo) { ! atts.rendererInfo = msg.rendererInfo}; ! if defined (msg.member) { ! atts.authorEmail = msg.member}; ! if defined (msg.memberName) { ! atts.authorName = msg.memberName}; ! if defined (msg.ctReads) { ! atts.ctReads = msg.ctReads}; ! window.attributes.addGroup (@atts, adr)}; ! ! manila.message.checkOut (adrinfo, msgnum); ! ! if not flHidden { //open the window ! edit (adr, windowTitle, flReadOnly)}; ! ! if adradrwindow != nil { ! adradrwindow^ = adr}; ! ! return (true)}; ! ! «bundle // testing ! «openMessage ("http://test.w2k.jspace.org/", 3) \ No newline at end of file |
|
From: creecode <icr...@us...> - 2006-03-07 05:39:20
|
Update of /cvsroot/frontierkernel/odbs/frontierRoot/system/verbs/apps/Manila/editResponder In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6822 Modified Files: respond Log Message: replace calls to verbs at extensions.latinToMac with string.(latin/mac)To(Latin/Mac) verbs Index: respond =================================================================== RCS file: /cvsroot/frontierkernel/odbs/frontierRoot/system/verbs/apps/Manila/editResponder/respond,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** respond 28 Sep 2005 03:08:48 -0000 1.2 --- respond 7 Mar 2006 05:39:16 -0000 1.3 *************** *** 1,3 **** ! FrontierVcsFile:1:scpt:system.verbs.apps.Manila.editResponder.respond ! on respond (pta) { ÇChanges Ç9/14/05; 4:34:26 PM by TAC Çchanged hard coded references to UserLand Radio and Radio to Frontier.getProgramName Ç3/12/02; 4:00:26 AM by JES ÇConvert the title of new stories from Latin to Mac text, if running on a Mac. (This conversion used to happen, but was lost in the move to the windowTypes framework.) Ç3/22/01; 6:38:26 PM by PBS ÇWhen creating a new story, convert the title that was typed in the form on the web page to Macintosh text (when on a Macintosh). Ç01/22/01; 1:59:38 AM by JES ÇFix a bug where stories created in the browser would not correctly translate to Mac text for editing in Radio. Ç2000 Ç12/30/00; 5:51:36 PM by JES ÇEdit Manila sites' site structure using the structure outline, instead of plain XML. Ç12/27/00; 2:50:35 PM by PBS ÇBring Radio to front on Windows right away (same as on Macs). If there's an error page to display, bring the Web browser to the front. Ç12/17/00; 6:32:24 PM by JES ÇOptimizations: If we already know the canonical site name, get it from user.playlist.manila.sites, instead of calling the server. If the story is already open for editing, don't make any calls to the server; just bring the window to the front. Ç12/12/00; 10:29:11 PM by PBS ÇIf this is a Macintosh, bring the app to front right away, to work around the MSIE 5 CPU hogging bug. Ç12/04/00 4:16:11 PM by PBS ÇIf there's an error, display a friendly It Didn't Work page rather than a 500 Server Error page. Ç12/04/00 at 3:53:37 PM by JES ÇIf there's a scriptError when checking out an item, forget the username and password, so the user will have a chance to enter them again. Ç11/27/00; 3:46:47 PM by PBS ÇShortening the URL the server generates -- less info is sent now. Get info from referer, assume defaults, when certain arguments aren't specified. If not supplied, get username and password from prefs or prompt user. Ç11/27/00; 12:47:13 AM by PBS ÇFixed a bug with editing messages -- you would sometimes get the rendered text instead of the outline. Ç11/26/00; 9:33:35 PM by PBS ÇpathArgs have priority over searchArgs, since sometimes we need to send a form, and searchArgs get wiped out in that case. So we use pathArgs in that case. For instance -- the Create a New Story form uses pathArgs, since it's a form. Ç11/26/00; 9:33:13 PM by PBS ÇImplement the edit responder that opens Manila objects for editing. Çscratchpad.pt = pta^ ÇfileMenu.save () local (programName = Frontier.getProgramName ()); Frontier.bringToFront (); bundle { //init windowTypes and nodeTypes manila.nodeTypes.init (); manila.windowTypes.init ()}; pta^.responseHeaders.["Content-Type"] = "text/html"; //a sensible default try { on buildResponse (code, shortmessage, longmessage) { pta^.code = code; pta^.responseBody = webserver.util.buildErrorPage (code + " " + string.upper (shortmessage), longmessage); return}; local (args, siteinfo, redirectURL, adrinfo); bundle { //decode args, copy items to siteinfo table and to redirectURL try { new (tabletype, @args); if pta^.pathArgs != "" { webserver.parseArgs (pta^.pathArgs, @args)}; bundle { //add search args local (t); new (tableType, @t); webserver.parseArgs (pta^.searchArgs, @t); table.copyContents (@t, @args)}; new (tabletype, @siteinfo); siteInfo.url = args.url; bundle { //host if defined (args.host) { //PBS 11/27/00: if not defined, get from site URL siteinfo.host = args.host} else { local (urlParts = string.urlSplit (siteInfo.url)); local (host = urlParts [2]); host = string.nthField (host, ':', 1); //strip port siteInfo.host = host}}; bundle { //port if defined (args.port) { //PBS 11/27/00: assume port 80 if not sent siteinfo.port = args.port} else { siteInfo.port = 80}}; bundle { //rpcPath if defined (args.rpcPath) { //PBS 11/27/00: assume /RPC2 if not sent siteinfo.rpcPath = args.rpcPath} else { siteInfo.rpcPath = "/RPC2"}}; bundle { //canonical site name if defined (args.siteName) { //PBS 11/27/00: get siteName via XML-RPC if not defined siteInfo.siteName = args.sitename} else { if defined (args.s) { //short name siteInfo.siteName = args.s} else { try { //12/17/00 JES: try to get the siteName from prefs ÇsiteInfo.siteName = playlist.manila.getCanonicalNameFromPrefs (siteInfo.url) bundle { //get the name from the siteInfoTable at user.manila.data.sites local (adrinfo); if manila.windowTypes.findSiteInfo (siteInfo.url, @adrinfo) { siteInfo.siteName = adrinfo^.siteName}}; if siteInfo.siteName == "" { siteInfo.siteName = manila.getSiteName (args.url)}} else { siteInfo.siteName = manila.getSiteName (args.url)}}}}; bundle { //display site name if defined (args.displaySiteName) { //PBS 11/27/00: use canonical site name if not defined siteInfo.displaySiteName = args.displaySiteName} else { if defined (args.d) { //short name siteInfo.displaySiteName = args.d} else { siteInfo.displaySiteName == ""; bundle { //get the displaySiteName from the siteInfoTable at user.manila.data.sites local (adrinfo); if manila.windowTypes.findSiteInfo (siteInfo.url, @adrinfo) { siteInfo.siteName = adrinfo^.displaySiteName}}; if siteInfo.displaySiteName == "" { //fall back to the canonical site name for displaySiteName siteInfo.displaySiteName = siteInfo.siteName}}}}; bundle { //redirect URL if defined (args.redirectUrl) { //PBS 11/27/00: if not defined, use referer redirectURL = args.redirectURL} else { redirectUrl = pta^.requestHeaders.referer}}; bundle { //server accepts OPML if defined (args.flAcceptsOpml) { siteInfo.flAcceptsOpml = args.flAcceptsOpml}}; bundle { //username and password siteInfo.username = ""; siteInfo.password = ""; if defined (args.u) { siteinfo.username = base64.decode (args.u)}; if defined (args.p) { siteinfo.password = base64.decode (args.p)}; Çif siteInfo.username == "" or siteInfo.password == "" //get from prefs or prompt user ÇsiteInfo.password = "" Çplaylist.manila.getUserNameAndPassword (siteinfo.URL, @siteInfo.username, @siteInfo.password)}} else { scripterror ("Can't edit with " + programName + " because an error occured while decoding the GET arguments: " + tryerror)}}; on passwordError () { try { //to clear the password manila.windowTypes.setUsernameAndPassword (adrinfo, siteInfo.username, "")}; scriptError ("Can't edit with " + programName + " because the username and password have not been set.")}; local (s = string.delete (pta^.path, 1, sizeOf ("/manilaEdit/"))); local (command = string.lower (string.nthField (s, '/', 1))); try { on createInfoCallback (adrinfo) { if manila.windowTypes.getUsernameAndPassword (adrinfo, @siteInfo.username, @siteInfo.password) { manila.windowTypes.setUsernameAndPassword (adrinfo, siteInfo.username, siteInfo.password); return (true)} else { return (false)}}; if manila.windowTypes.findSiteInfo (siteinfo.url, @adrinfo, @createInfoCallback) { bundle { //copy siteInfo items returned by the server if defined (siteinfo.host) { adrinfo^.host = siteinfo.host}; if defined (siteinfo.port) { adrinfo^.port = siteinfo.port}; if defined (siteinfo.rpcPath) { adrinfo^.rpcPath = siteinfo.rpcPath}; if defined (siteinfo.protocol) { adrinfo^.protocol = siteinfo.protocol}; if defined (siteinfo.soapAction) { adrinfo^.soapAction = siteinfo.soapAction}; if defined (siteinfo.siteName) { adrinfo^.siteName = siteinfo.siteName}; if defined (siteinfo.displaySiteName) { adrinfo^.displaySiteName = siteinfo.displaySiteName}; if defined (siteinfo.flAcceptsOpml) { adrinfo^.flAcceptsOpml = siteinfo.flAcceptsOpml}}; case command { "newstory" { local (adrtype); if Frontier.tools.windowTypes.findWindowType ("manilaMessage", @adrtype) { local (inResponseTo = 0); if defined (args.inResponseTo) { inResponseTo = args.inResponseTo}; local (title = args.title); if system.environment.isMac { title = latinToMac.convert (title)}; if not adrtype^.newMessage (args.url, title, inResponseTo, boolean (args.flPromoteToStory)) { scriptError ("Can't create story because there was a problem calling the manilaMessage.newMessage windowType script. It returned false.")}}; Çbundle //old code Çpike.checkSiteInfoTable (@siteinfo, "create story in Radio") Çlocal (storyinfo) Çnew (tableType, @storyinfo) Çnew (tableType, @storyinfo.rendererInfo) Çtry Çstoryinfo.subject = args.title Çif system.environment.isMac //PBS 03/22/01: convert title to Mac text ÇstoryInfo.subject = latinToMac.convert (storyInfo.subject) Çstoryinfo.rendererInfo.name = args.rendererName Çstoryinfo.rendererInfo.flRenderOnEntry = boolean (args.flRenderOnEntry) ÇstoryInfo.flPromoteToStory = boolean (args.flPromoteToStory) Çif defined (args.inResponseTo) ÇstoryInfo.inResponseTo = args.inResponseTo Çif defined (args.flAcceptsOpml) ÇstoryInfo.flServerAcceptsOpml = true Çelse Çscripterror ("Can't edit in Radio because an error occured while decoding the GET arguments: " + tryerror) Çlocal (adrStoryTable = pike.getNewStoryTableAddress (@siteinfo)) ÇadrStoryTable^.siteinfo = siteinfo ÇadrStoryTable^.storyinfo = storyinfo Ç Çthread.callScript (@pike.commands.newStory, {adrStoryTable})}; "editstory" { local (adrtype); if Frontier.tools.windowTypes.findWindowType ("manilaMessage", @adrtype) { local (flHomePage = false, adrwindow); try {flHomePage = (args.url == args.redirectUrl)}; if not adrtype^.openMessage (args.url, args.msgnum, false, flHomePage, @adrwindow) { scriptError ("Can't edit message because there was a problem calling the manilaMessage.openMessage windowType script. It returned false.")}}; Çbundle //old code Çpike.checkSiteInfoTable (@siteinfo, "edit story in Radio") Çlocal (msgnum) //actually, we don't care if it's a number Çtry Çmsgnum = args.msgnum Çelse Çscripterror ("Can't edit in Radio because an error occured while decoding the GET arguments: " + tryerror) Çlocal (adrStoryTable = pike.getStoryTableAddress (@siteinfo, msgnum), flAlreadyOpen = false) Çif defined (adrStoryTable^.outline) //12/17/00 JES: bring the outline to the front if already open Çif window.isOpen (@adrStoryTable^.outline) Çwindow.bringToFront (@adrStoryTable^.outline) ÇflAlreadyOpen = true Çif not flAlreadyOpen //12/17/00 JES: only call the server if the outline wasn't already open Çmanila.message.checkOut (@siteInfo, msgNum) //check out the story: custody support Çlocal (storyinfo = manila.message.get (@siteinfo, msgnum)) Çif defined (storyInfo.outline) ÇstoryInfo.body = storyInfo.outline Çpike.checkStoryInfoTable (@storyinfo, "edit story in Radio") Çif defined (args.flAcceptsOpml) ÇstoryInfo.flServerAcceptsOpml = true Çif system.environment.isMac //convert from Latin to Mac text (if this is a Mac) Çif defined (storyinfo.opml) //01/22/01 JES: only convert to Mac text if the body is opml ÇstoryInfo.body = latinToMac.convert (storyInfo.body) Çthread.callScript (@pike.commands.editStory, {siteinfo, storyinfo})}; "editadvanceditem" { local (item); try { //get the itemtype itemtype = args.itemtype} else { scripterror ("Can't edit in " + programName + " because an error occured while decoding the GET arguments: " + tryerror)}; local (adrtype); if Frontier.tools.windowTypes.findWindowType ("manilaTemplate", @adrtype) { if not adrtype^.openTemplate (args.url, itemtype) { scriptError ("Can't edit message because there was a problem calling the manilaTemplate.openTemplate windowType script. It returned false.")}}; Çbundle //old code Çmanila.advancedPref.checkOut (@siteInfo, itemType) //check it out Çlocal (itemInfo = manila.advancedPref.get (@siteInfo, itemType)) ÇitemInfo.type = itemType Ç Çlocal (adrBuildDisplayRoutine, adrSerializeRoutine) Çcase string.lower (itemInfo.type) //12/30/00 JES: edit site structure with site structure editor Ç"sitestructure" ÇadrBuildDisplayRoutine = @playlist.manila.siteStructure.xmlToOutline ÇadrSerializeRoutine = @playlist.manila.siteStructure.outlineToXml Çthread.callScript (@pike.commands.editAdvancedItem, {siteinfo, iteminfo, true, adrBuildDisplayRoutine, adrSerializeRoutine})}} else { //unimplemented command buildResponse (404, "NOT FOUND", "The object \"" + command + "\" doesn't exist."); return (true)}} else { //username/password error passwordError ()}} else { //the script that implements the command had an error local (lowerError = string.lower (tryError)); if (lowerError contains "password") or (lowerError contains "not a member") { passwordError ()} else { //unhandled error scriptError (tryError)}}; pta^.responseHeaders.location = redirectURL; pta^.responseHeaders.URI = redirectURL; buildResponse (302, "FOUND", "Found the page.")} else { //an error -- show It Didn't Work page webBrowser.bringToFront (); local (htmlText = "<html><head><title>It Didn't Work</title></head>"); on add (s) { htmlText = htmlText + s + "\r"}; add ("<body bgcolor=\"#FFFFFF\">"); add ("<blockquote><h2>It Didn't Work</h2>"); add ("<b>" + programName + " reported an error:</b><p>" + tryError + ""); add ("</blockquote></body></html>"); pta^.code = 200; pta^.responseBody = htmlText}; return (true)}; Çbundle //testing Çrespond (@scratchpad.pt) \ No newline at end of file --- 1,293 ---- ! FrontierVcsFile:2:scpt:system.verbs.apps.Manila.editResponder.respond ! on respond (pta) { ! «Changes ! «2/28/06; 11:57:18 AM by TAC ! «replace extensions.latinToMac.convert with string.latinToMac ! «9/14/05; 4:34:26 PM by TAC ! «changed hard coded references to UserLand Radio and Radio to Frontier.getProgramName ! «3/12/02; 4:00:26 AM by JES ! «Convert the title of new stories from Latin to Mac text, if running on a Mac. (This conversion used to happen, but was lost in the move to the windowTypes framework.) ! «3/22/01; 6:38:26 PM by PBS ! «When creating a new story, convert the title that was typed in the form on the web page to Macintosh text (when on a Macintosh). ! «01/22/01; 1:59:38 AM by JES ! «Fix a bug where stories created in the browser would not correctly translate to Mac text for editing in Radio. ! «2000 ! «12/30/00; 5:51:36 PM by JES ! «Edit Manila sites' site structure using the structure outline, instead of plain XML. ! «12/27/00; 2:50:35 PM by PBS ! «Bring Radio to front on Windows right away (same as on Macs). If there's an error page to display, bring the Web browser to the front. ! «12/17/00; 6:32:24 PM by JES ! «Optimizations: If we already know the canonical site name, get it from user.playlist.manila.sites, instead of calling the server. If the story is already open for editing, don't make any calls to the server; just bring the window to the front. ! «12/12/00; 10:29:11 PM by PBS ! «If this is a Macintosh, bring the app to front right away, to work around the MSIE 5 CPU hogging bug. ! «12/04/00 4:16:11 PM by PBS ! «If there's an error, display a friendly It Didn't Work page rather than a 500 Server Error page. ! «12/04/00 at 3:53:37 PM by JES ! «If there's a scriptError when checking out an item, forget the username and password, so the user will have a chance to enter them again. ! «11/27/00; 3:46:47 PM by PBS ! «Shortening the URL the server generates -- less info is sent now. Get info from referer, assume defaults, when certain arguments aren't specified. If not supplied, get username and password from prefs or prompt user. ! «11/27/00; 12:47:13 AM by PBS ! «Fixed a bug with editing messages -- you would sometimes get the rendered text instead of the outline. ! «11/26/00; 9:33:35 PM by PBS ! «pathArgs have priority over searchArgs, since sometimes we need to send a form, and searchArgs get wiped out in that case. So we use pathArgs in that case. For instance -- the Create a New Story form uses pathArgs, since it's a form. ! «11/26/00; 9:33:13 PM by PBS ! «Implement the edit responder that opens Manila objects for editing. ! ! «scratchpad.pt = pta^ ! «fileMenu.save () ! ! local (programName = Frontier.getProgramName ()); ! ! Frontier.bringToFront (); ! ! bundle { //init windowTypes and nodeTypes ! manila.nodeTypes.init (); ! manila.windowTypes.init ()}; ! ! pta^.responseHeaders.["Content-Type"] = "text/html"; //a sensible default ! ! try { ! on buildResponse (code, shortmessage, longmessage) { ! pta^.code = code; ! pta^.responseBody = webserver.util.buildErrorPage (code + " " + string.upper (shortmessage), longmessage); ! return}; ! ! local (args, siteinfo, redirectURL, adrinfo); ! bundle { //decode args, copy items to siteinfo table and to redirectURL ! try { ! new (tabletype, @args); ! if pta^.pathArgs != "" { ! webserver.parseArgs (pta^.pathArgs, @args)}; ! bundle { //add search args ! local (t); ! new (tableType, @t); ! webserver.parseArgs (pta^.searchArgs, @t); ! table.copyContents (@t, @args)}; ! new (tabletype, @siteinfo); ! ! siteInfo.url = args.url; ! ! bundle { //host ! if defined (args.host) { //PBS 11/27/00: if not defined, get from site URL ! siteinfo.host = args.host} ! else { ! local (urlParts = string.urlSplit (siteInfo.url)); ! local (host = urlParts [2]); ! host = string.nthField (host, ':', 1); //strip port ! siteInfo.host = host}}; ! bundle { //port ! if defined (args.port) { //PBS 11/27/00: assume port 80 if not sent ! siteinfo.port = args.port} ! else { ! siteInfo.port = 80}}; ! bundle { //rpcPath ! if defined (args.rpcPath) { //PBS 11/27/00: assume /RPC2 if not sent ! siteinfo.rpcPath = args.rpcPath} ! else { ! siteInfo.rpcPath = "/RPC2"}}; ! bundle { //canonical site name ! if defined (args.siteName) { //PBS 11/27/00: get siteName via XML-RPC if not defined ! siteInfo.siteName = args.sitename} ! else { ! if defined (args.s) { //short name ! siteInfo.siteName = args.s} ! else { ! try { //12/17/00 JES: try to get the siteName from prefs ! «siteInfo.siteName = playlist.manila.getCanonicalNameFromPrefs (siteInfo.url) ! bundle { //get the name from the siteInfoTable at user.manila.data.sites ! local (adrinfo); ! if manila.windowTypes.findSiteInfo (siteInfo.url, @adrinfo) { ! siteInfo.siteName = adrinfo^.siteName}}; ! if siteInfo.siteName == "" { ! siteInfo.siteName = manila.getSiteName (args.url)}} ! else { ! siteInfo.siteName = manila.getSiteName (args.url)}}}}; ! bundle { //display site name ! if defined (args.displaySiteName) { //PBS 11/27/00: use canonical site name if not defined ! siteInfo.displaySiteName = args.displaySiteName} ! else { ! if defined (args.d) { //short name ! siteInfo.displaySiteName = args.d} ! else { ! siteInfo.displaySiteName == ""; ! bundle { //get the displaySiteName from the siteInfoTable at user.manila.data.sites ! local (adrinfo); ! if manila.windowTypes.findSiteInfo (siteInfo.url, @adrinfo) { ! siteInfo.siteName = adrinfo^.displaySiteName}}; ! if siteInfo.displaySiteName == "" { //fall back to the canonical site name for displaySiteName ! siteInfo.displaySiteName = siteInfo.siteName}}}}; ! bundle { //redirect URL ! if defined (args.redirectUrl) { //PBS 11/27/00: if not defined, use referer ! redirectURL = args.redirectURL} ! else { ! redirectUrl = pta^.requestHeaders.referer}}; ! bundle { //server accepts OPML ! if defined (args.flAcceptsOpml) { ! siteInfo.flAcceptsOpml = args.flAcceptsOpml}}; ! bundle { //username and password ! siteInfo.username = ""; ! siteInfo.password = ""; ! ! if defined (args.u) { ! siteinfo.username = base64.decode (args.u)}; ! if defined (args.p) { ! siteinfo.password = base64.decode (args.p)}; ! }} ! «if siteInfo.username == "" or siteInfo.password == "" //get from prefs or prompt user ! «siteInfo.password = "" ! «playlist.manila.getUserNameAndPassword (siteinfo.URL, @siteInfo.username, @siteInfo.password)}} ! else { ! scripterror ("Can't edit with " + programName + " because an error occured while decoding the GET arguments: " + tryerror)}}; ! ! on passwordError () { ! try { //to clear the password ! manila.windowTypes.setUsernameAndPassword (adrinfo, siteInfo.username, "")}; ! scriptError ("Can't edit with " + programName + " because the username and password have not been set.")}; ! ! local (s = string.delete (pta^.path, 1, sizeOf ("/manilaEdit/"))); ! local (command = string.lower (string.nthField (s, '/', 1))); ! try { ! on createInfoCallback (adrinfo) { ! if manila.windowTypes.getUsernameAndPassword (adrinfo, @siteInfo.username, @siteInfo.password) { ! manila.windowTypes.setUsernameAndPassword (adrinfo, siteInfo.username, siteInfo.password); ! return (true)} ! else { ! return (false)}}; ! ! if manila.windowTypes.findSiteInfo (siteinfo.url, @adrinfo, @createInfoCallback) { ! bundle { //copy siteInfo items returned by the server ! if defined (siteinfo.host) { ! adrinfo^.host = siteinfo.host}; ! if defined (siteinfo.port) { ! adrinfo^.port = siteinfo.port}; ! if defined (siteinfo.rpcPath) { ! adrinfo^.rpcPath = siteinfo.rpcPath}; ! if defined (siteinfo.protocol) { ! adrinfo^.protocol = siteinfo.protocol}; ! if defined (siteinfo.soapAction) { ! adrinfo^.soapAction = siteinfo.soapAction}; ! if defined (siteinfo.siteName) { ! adrinfo^.siteName = siteinfo.siteName}; ! if defined (siteinfo.displaySiteName) { ! adrinfo^.displaySiteName = siteinfo.displaySiteName}; ! if defined (siteinfo.flAcceptsOpml) { ! adrinfo^.flAcceptsOpml = siteinfo.flAcceptsOpml}}; ! case command { ! "newstory" { ! local (adrtype); ! if Frontier.tools.windowTypes.findWindowType ("manilaMessage", @adrtype) { ! local (inResponseTo = 0); ! if defined (args.inResponseTo) { ! inResponseTo = args.inResponseTo}; ! local (title = args.title); ! if system.environment.isMac { ! title = string.latinToMac (title)}; ! if not adrtype^.newMessage (args.url, title, inResponseTo, boolean (args.flPromoteToStory)) { ! scriptError ("Can't create story because there was a problem calling the manilaMessage.newMessage windowType script. It returned false.")}}}; ! «bundle //old code ! «pike.checkSiteInfoTable (@siteinfo, "create story in Radio") ! «local (storyinfo) ! «new (tableType, @storyinfo) ! «new (tableType, @storyinfo.rendererInfo) ! «try ! «storyinfo.subject = args.title ! «if system.environment.isMac //PBS 03/22/01: convert title to Mac text ! «storyInfo.subject = stirng.latinToMac (storyInfo.subject) ! «storyinfo.rendererInfo.name = args.rendererName ! «storyinfo.rendererInfo.flRenderOnEntry = boolean (args.flRenderOnEntry) ! «storyInfo.flPromoteToStory = boolean (args.flPromoteToStory) ! «if defined (args.inResponseTo) ! «storyInfo.inResponseTo = args.inResponseTo ! «if defined (args.flAcceptsOpml) ! «storyInfo.flServerAcceptsOpml = true ! «else ! «scripterror ("Can't edit in Radio because an error occured while decoding the GET arguments: " + tryerror) ! «local (adrStoryTable = pike.getNewStoryTableAddress (@siteinfo)) ! «adrStoryTable^.siteinfo = siteinfo ! «adrStoryTable^.storyinfo = storyinfo ! « ! «thread.callScript (@pike.commands.newStory, {adrStoryTable})}; ! "editstory" { ! local (adrtype); ! if Frontier.tools.windowTypes.findWindowType ("manilaMessage", @adrtype) { ! local (flHomePage = false, adrwindow); ! try {flHomePage = (args.url == args.redirectUrl)}; ! if not adrtype^.openMessage (args.url, args.msgnum, false, flHomePage, @adrwindow) { ! scriptError ("Can't edit message because there was a problem calling the manilaMessage.openMessage windowType script. It returned false.")}}}; ! «bundle //old code ! «pike.checkSiteInfoTable (@siteinfo, "edit story in Radio") ! «local (msgnum) //actually, we don't care if it's a number ! «try ! «msgnum = args.msgnum ! «else ! «scripterror ("Can't edit in Radio because an error occured while decoding the GET arguments: " + tryerror) ! «local (adrStoryTable = pike.getStoryTableAddress (@siteinfo, msgnum), flAlreadyOpen = false) ! «if defined (adrStoryTable^.outline) //12/17/00 JES: bring the outline to the front if already open ! «if window.isOpen (@adrStoryTable^.outline) ! «window.bringToFront (@adrStoryTable^.outline) ! «flAlreadyOpen = true ! «if not flAlreadyOpen //12/17/00 JES: only call the server if the outline wasn't already open ! «manila.message.checkOut (@siteInfo, msgNum) //check out the story: custody support ! «local (storyinfo = manila.message.get (@siteinfo, msgnum)) ! «if defined (storyInfo.outline) ! «storyInfo.body = storyInfo.outline ! «pike.checkStoryInfoTable (@storyinfo, "edit story in Radio") ! «if defined (args.flAcceptsOpml) ! «storyInfo.flServerAcceptsOpml = true ! «if system.environment.isMac //convert from Latin to Mac text (if this is a Mac) ! «if defined (storyinfo.opml) //01/22/01 JES: only convert to Mac text if the body is opml ! «storyInfo.body = string.latinToMac (storyInfo.body) ! «thread.callScript (@pike.commands.editStory, {siteinfo, storyinfo})}; ! "editadvanceditem" { ! local (item); ! try { //get the itemtype ! itemtype = args.itemtype} ! else { ! scripterror ("Can't edit in " + programName + " because an error occured while decoding the GET arguments: " + tryerror)}; ! local (adrtype); ! if Frontier.tools.windowTypes.findWindowType ("manilaTemplate", @adrtype) { ! if not adrtype^.openTemplate (args.url, itemtype) { ! scriptError ("Can't edit message because there was a problem calling the manilaTemplate.openTemplate windowType script. It returned false.")}}}} ! «bundle //old code ! «manila.advancedPref.checkOut (@siteInfo, itemType) //check it out ! «local (itemInfo = manila.advancedPref.get (@siteInfo, itemType)) ! «itemInfo.type = itemType ! « ! «local (adrBuildDisplayRoutine, adrSerializeRoutine) ! «case string.lower (itemInfo.type) //12/30/00 JES: edit site structure with site structure editor ! «"sitestructure" ! «adrBuildDisplayRoutine = @playlist.manila.siteStructure.xmlToOutline ! «adrSerializeRoutine = @playlist.manila.siteStructure.outlineToXml ! «thread.callScript (@pike.commands.editAdvancedItem, {siteinfo, iteminfo, true, adrBuildDisplayRoutine, adrSerializeRoutine})}} ! else { //unimplemented command ! buildResponse (404, "NOT FOUND", "The object \"" + command + "\" doesn't exist."); ! return (true)}} ! else { //username/password error ! passwordError ()}} ! else { //the script that implements the command had an error ! local (lowerError = string.lower (tryError)); ! if (lowerError contains "password") or (lowerError contains "not a member") { ! passwordError ()} ! else { //unhandled error ! scriptError (tryError)}}; ! ! pta^.responseHeaders.location = redirectURL; ! pta^.responseHeaders.URI = redirectURL; ! buildResponse (302, "FOUND", "Found the page.")} ! else { //an error -- show It Didn't Work page ! webBrowser.bringToFront (); ! local (htmlText = "<html><head><title>It Didn't Work</title></head>"); ! on add (s) { ! htmlText = htmlText + s + "\r"}; ! add ("<body bgcolor=\"#FFFFFF\">"); ! add ("<blockquote><h2>It Didn't Work</h2>"); ! add ("<b>" + programName + " reported an error:</b><p>" + tryError + ""); ! add ("</blockquote></body></html>"); ! pta^.code = 200; ! pta^.responseBody = htmlText}; ! ! return (true)}; ! ! «bundle //testing ! «respond (@scratchpad.pt) \ No newline at end of file |
|
From: creecode <icr...@us...> - 2006-03-07 05:39:14
|
Update of /cvsroot/frontierkernel/odbs/frontierRoot/system/verbs/apps/Manila/windowTypes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6797 Modified Files: openSite Log Message: replace calls to verbs at extensions.latinToMac with string.(latin/mac)To(Latin/Mac) verbs Index: openSite =================================================================== RCS file: /cvsroot/frontierkernel/odbs/frontierRoot/system/verbs/apps/Manila/windowTypes/openSite,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** openSite 26 Mar 2005 19:42:24 -0000 1.1.1.1 --- openSite 7 Mar 2006 05:39:11 -0000 1.2 *************** *** 1,3 **** ! FrontierVcsFile:1:scpt:system.verbs.apps.Manila.windowTypes.openSite ! on openSite (adrinfo, username, password, flHidden=false, adradrwindow=nil) { ÇOpen a site in a window. Assume the prefs have already been set up. ÇWe get from the Manila site a structure that contains: editorialRole, siteOutline, flCheckedOut. Ç10/11/00; 10:58:19 PM by PBS ÇChanges: Ç10/28/00; 1:14:00 PM by PBS ÇMake sure there's a Manila Editors node. Ç11/03/00; 1:11:46 AM by JES ÇAdd flAcceptsOpml to the site-prefs table if the server specifies it. Ç11/20/00; 1:40:27 AM by JES ÇDon't base64 decode the site outline when getting the opml through the Manila glue, since the glue script does this for us. Ç12/04/00; 4:57:06 PM by JES ÇIf the entered or cached username doesn not specify a member of the site, present a username/password dialog. Ç12/08/00; 11:51:29 AM by JES ÇIf username doesn't correspond to a member of the site, display an error message before presenting the email/password dialog again. Ç12/31/00; 5:07:27 PM by JES ÇOn Macs, call op.xmlToOutline on opml that's converted to Mac text. Ç02/16/01; 1:38:32 PM by JES ÇSet the window's lastSave to now, to prevent extraneous save-confirmation dialogs after getting the outline from the server. If the user is not a managing editor, set flReadOnly to true -- if the user can't save the outline, why should they be able to edit it? Ç04/30/01; 2:20:30 AM by JES ÇFixed a bug where the editorial outline was read-only for a managing editor, when it should be read/write. Ç09/06/01; 8:48:15 PM by JES ÇSet adradrwindow immediately after creating the window, since it's needed by manila.windowTypes.manilaSite.openManilaSite, even if opening the site fails. bundle { //if the window is already open, bring it to the front local (t); new (tableType, @t); local (adrtype = parentOf (this^)); t.type = "manilaSite"; t.adrSiteInfo = adrinfo; local (adrwindow); if Frontier.tools.windowTypes.findWindowWithMatchingAtts (@t, @adrwindow) { local (title, flReadOnly = false); window.attributes.getOne ("title", @title, adrwindow); window.attributes.getOne ("flReadOnly", @flReadOnly, adrwindow); if not flHidden { edit (adrwindow, title, flReadOnly); return (true)}}}; bundle { //get siteName if adrinfo^.siteName == "" { adrinfo^.siteName = manila.getSiteName (nameOf (adrinfo^))}; if adrinfo^.displaySiteName == "" { adrinfo^.displaySiteName = adrinfo^.siteName}}; local (adrwindow); bundle { //create the window adrwindow = Frontier.tools.windowTypes.newWindow ("manilaSite", true); window.attributes.setOne ("adrSiteInfo", adrinfo, adrwindow); if adradrwindow != nil { adradrwindow^ = adrwindow}}; local (flReadOnly = false); local (flManagingEditor = false); local (flEditor = false); local (siteStruct); local (flGotFromServer = false); bundle { //make sure we have a username and password if not manila.windowTypes.getUsernameAndPassword (adrinfo, @username, @password) { return (false)}; bundle { //12/04/00 JES: make sure username specifies a member of the site local (memberRole = manila.member.getRole (adrinfo, username)); while memberRole == 4 { // loop until the user enters a username that's a member of the site dialog.alert ("Can't open " + nameOf (adrinfo^) + " because " + username + " is not a member."); //12/08/00 JES: Tell the user why the password dialog is about to appear again. manila.windowTypes.setUsernameAndPassword (adrinfo, username, ""); //clear the password if manila.windowTypes.getUsernameAndPassword (adrinfo, @username, @password) { manila.windowTypes.setUsernameAndPassword (adrinfo, username, password); username = string (username); password = string (password); memberRole = manila.member.getRole (adrinfo, username)} else { //clean up data, delete the unfinished window's windowType table if defined (adrinfo^) { adrinfo^.username = ""; adrinfo^.password = ""; if defined (system.temp.manila.data.sites) { if defined (system.temp.manila.data.sites.[nameOf (adrinfo^)]) { delete (@system.temp.manila.data.sites.[nameOf (adrinfo^)])}}}; delete (parentOf (adrwindow^)); return (false)}}; case memberRole { 1 { flEditor = true; flManagingEditor = true}; 2 { flEditor = true}}}}; try { //get the outline in a try because it might not exist yet local (rpcCallInfo = adrinfo^); rpcCallInfo.password = password; rpcCallInfo.username = username; siteStruct = manila.editorialOutline.get (@rpcCallInfo); if siteStruct.editorialRole == "Managing Editor" { flManagingEditor = true; flEditor = true}; if siteStruct.editorialRole == "Contributing Editor" { flEditor = true; flReadOnly = true}; if siteStruct.flCheckedOut { flReadOnly = true}; if defined (siteStruct.displaySiteName) { adrinfo^.displaySiteName = siteStruct.displaySiteName}; if defined (siteStruct.flAcceptsOpml) and siteStruct.flAcceptsOpml { //11/02/00 JES adrinfo^.flAcceptsOpml = true} else { adrinfo^.flAcceptsOpml = false}; flGotFromServer = true}; if flGotFromServer and flEditor { local (opmlText = siteStruct.siteOutline); //11/20/00 JES: support for calling RPC handlers through the Manila glue. if system.environment.isMac { //12/31/00 JES: convert to Mac text op.xmlToOutline (latinToMac.convert (opmlText), adrwindow)} else { op.xmlToOutline (opmlText, adrwindow)}; if adrinfo^.displaySiteName == "" { adrinfo^.displaySiteName = window.getTitle (adrwindow)}} else { //do default nodes local (oldTarget = target.set (adrwindow)); manila.windowTypes.buildManilaSiteOutline (adrwindow, adrinfo); op.firstSummit (); op.promote (); op.deleteLine (); op.firstSummit (); try {target.set (oldTarget)}; flReadOnly = false}; bundle { //make sure there's an Editors node local (oldTarget = target.set (adrwindow)); local (origCursor = op.getCursor ()); local (flFound = false); op.firstSummit (); loop { local (atts); if op.attributes.getAll (@atts) { if defined (atts.type) { if atts.type == "manilaEditorsContainer" { if atts.containerType == "toplevel" { flFound = true; break}}}}; if not (op.go (down, 1)) { break}}; if not flFound { //set up an Editors node op.insert ("Editors", down); local (atts); new (tableType, @atts); atts.type = "manilaEditorsContainer"; atts.containerType = "toplevel"; atts.siteUrl = nameOf (adrinfo^); op.attributes.addGroup (@atts)}; op.setCursor (origCursor); try {target.set (oldTarget)}}; local (t); new (tableType, @t); bundle { //set attributes if not flGotFromServer { setTimeModified (adrwindow, date (0))}; if not flManagingEditor { flReadOnly = true}; if adrinfo^.displaySiteName == "" { t.title = adrinfo^.siteName} else { t.title = adrinfo^.displaySiteName}; t.flReadOnly = flReadOnly; t.lastSaved = timeModified (adrwindow); //this happens in Frontier.tools.windowTypes.newWindow window.attributes.addGroup (@t, adrwindow)}; if not flHidden { edit (adrwindow, t.title, flReadOnly)}; return (true); Çbundle //old code Çif not defined (temp.pike) Çnew (tableType, @temp.pike) Çif not defined (temp.pike.outlines) Çnew (tableType, @temp.pike.outlines) Çlocal (adrOutlinesTable = @temp.pike.outlines) Çlocal (adrTable = @adrOutlinesTable^.[displaySiteName]) Çif not defined (adrTable) Çnew (tableType, adrTable) Ç Çlocal (flOpenAlready = false) Çif defined (adrTable^.outline) and window.isOpen (@adrTable^.outline) ÇflOpenAlready = true Çif flOpenAlready Çwindow.bringToFront (@adrTable^.outline) Çelse //create outline Çnew (tableType, adrTable) Çnew (outlineType, @adrTable^.outline) Çlocal (flReadOnly = false) Çlocal (flManagingEditor = false) Çlocal (flEditor = false) Çlocal (siteStruct) Çlocal (flGotFromServer = false) Çlocal (flAcceptsOpml = false) //11/02/00 JES Çbundle //12/04/00 JES: make sure username specifies a member of the site Çlocal (siteInfo = playlist.manila.buildSiteInfo (siteUrl)) Çif siteInfo.username == "" and siteInfo.password == ""// the user cancelled the username/password dialog Çreturn (false) Çlocal (memberRole = manila.member.getRole (@siteInfo, username)) Çwhile memberRole == 4 // loop until the user enters a username that's a member of the site Çdialog.alert ("Can't open " + siteUrl + " because " + username + " is not a member.") //12/08/00 JES: Tell the user why the password dialog is about to appear again. Çif playlist.manila.getPasswordDialog (siteUrl, @username, @password) Çplaylist.manila.setUsernameAndPassword (siteUrl, username, password) Çusername = string (username) Çpassword = string (password) ÇmemberRole = manila.member.getRole (@siteInfo, username) Çelse Çreturn (false) Çcase memberRole Ç1 ÇflEditor = true ÇflManagingEditor = true Ç2 ÇflEditor = true Çtry ÇsiteStruct = playlist.manila.rpc.getManilaSiteOutline (siteUrl, username, password) Çif siteStruct.flCheckedOut ÇflReadOnly = true Çif siteStruct.editorialRole == "Managing Editor" ÇflManagingEditor = true ÇflEditor = true Çif siteStruct.editorialRole == "Contributing Editor" ÇflEditor = true ÇflReadOnly = true Çif siteStruct.flCheckedOut ÇflReadOnly = true Çif defined (siteStruct.flAcceptsOpml) and siteStruct.flAcceptsOpml //11/02/00 JES ÇflAcceptsOpml = true Çuser.playlist.manila.sites.[siteUrl].flAcceptsOpml = true ÇflGotFromServer = true Çif flGotFromServer and flEditor Çlocal (opmlText = base64.decode (siteStruct.siteOutline)) Çlocal (opmlText = siteStruct.siteOutline) //11/20/00 JES: support for calling RPC handlers through the Manila glue. Çif system.environment.isMac //12/31/00 JES: convert to Mac text Çop.xmlToOutline (latinToMac.convert (opmlText), @adrTable^.outline) Çelse Çop.xmlToOutline (opmlText, @adrTable^.outline) Çelse //do default nodes Çlocal (oldTarget = target.set (@adrTable^.outline)) Çplaylist.manila.commands.addManilaSiteNode (siteUrl, username:username, password:password) Çop.firstSummit () Çop.promote () Çop.deleteLine () Çop.firstSummit () Çtry {target.set (oldTarget)} ÇflReadOnly = false Ç Çif flGotFromServer //02/16/00 JES: set lastSave so that non-dirty outlines don't act dirty ÇadrTable^.flSaved = true ÇadrTable^.lastSave = clock.now () Çelse ÇadrTable^.flSaved = false Çif not flManagingEditor //02/16/00 JES: if the user is not a managing editor, prevent a save/don't save/cancel dialog when closing the outline ÇflReadOnly = true ÇadrTable^.timeCreated = clock.now () ÇadrTable^.title = displaySiteName ÇadrTable^.flLocal = false ÇadrTable^.flManilaSiteOutline = true ÇadrTable^.flReadOnly = flReadOnly ÇadrTable^.siteUrl = siteUrl ÇadrTable^.flAcceptsOpml = flAcceptsOpml //11/02/00 JES Ç Çbundle //make sure there's an Editors node Çlocal (adrOutline = @adrTable^.outline) Çlocal (oldTarget = target.set (adrOutline)) Çlocal (origCursor = op.getCursor ()) Çlocal (flFound = false) Çop.firstSummit () Çloop Çlocal (atts) Çif op.attributes.getAll (@atts) Çif defined (atts.type) Çif atts.type == "manilaEditorsContainer" Çif atts.containerType == "toplevel" ÇflFound = true Çbreak Çif not (op.go (down, 1)) Çbreak Çif not flFound //set up an Editors node Çop.insert ("Editors", down) Çlocal (atts) Çnew (tableType, @atts) Çatts.type = "manilaEditorsContainer" Çatts.containerType = "toplevel" Çatts.siteUrl = siteUrl Çop.attributes.addGroup (@atts) Çop.setCursor (origCursor) Çtry {target.set (oldTarget)} Çedit (@adrTable^.outline, displaySiteName, flReadOnly) Ç Çreturn (true)}; Çbundle //testing ÇopenSite (@user.manila.data.sites.["http://private.braincase.net:80/"], "ja...@us...", "forget!it") \ No newline at end of file --- 1,299 ---- ! FrontierVcsFile:2:scpt:system.verbs.apps.Manila.windowTypes.openSite ! on openSite (adrinfo, username, password, flHidden=false, adradrwindow=nil) { ! «Changes ! «2/28/06; 12:05:13 PM by TAC ! «replace extensions.latinToMac.convert with string.latinToMac ! «2001 ! «09/06/01; 8:48:15 PM by JES ! «Set adradrwindow immediately after creating the window, since it's needed by manila.windowTypes.manilaSite.openManilaSite, even if opening the site fails. ! «04/30/01; 2:20:30 AM by JES ! «Fixed a bug where the editorial outline was read-only for a managing editor, when it should be read/write. ! «02/16/01; 1:38:32 PM by JES ! «Set the window's lastSave to now, to prevent extraneous save-confirmation dialogs after getting the outline from the server. If the user is not a managing editor, set flReadOnly to true -- if the user can't save the outline, why should they be able to edit it? ! «2000 ! «12/31/00; 5:07:27 PM by JES ! «On Macs, call op.xmlToOutline on opml that's converted to Mac text. ! «12/08/00; 11:51:29 AM by JES ! «If username doesn't correspond to a member of the site, display an error message before presenting the email/password dialog again. ! «12/04/00; 4:57:06 PM by JES ! «If the entered or cached username doesn not specify a member of the site, present a username/password dialog. ! «11/20/00; 1:40:27 AM by JES ! «Don't base64 decode the site outline when getting the opml through the Manila glue, since the glue script does this for us. ! «11/03/00; 1:11:46 AM by JES ! «Add flAcceptsOpml to the site-prefs table if the server specifies it. ! «10/28/00; 1:14:00 PM by PBS ! «Make sure there's a Manila Editors node. ! «Open a site in a window. Assume the prefs have already been set up. ! «We get from the Manila site a structure that contains: editorialRole, siteOutline, flCheckedOut. ! «10/11/00; 10:58:19 PM by PBS ! ! bundle { //if the window is already open, bring it to the front ! local (t); new (tableType, @t); ! local (adrtype = parentOf (this^)); ! t.type = "manilaSite"; ! t.adrSiteInfo = adrinfo; ! local (adrwindow); ! if Frontier.tools.windowTypes.findWindowWithMatchingAtts (@t, @adrwindow) { ! local (title, flReadOnly = false); ! window.attributes.getOne ("title", @title, adrwindow); ! window.attributes.getOne ("flReadOnly", @flReadOnly, adrwindow); ! if not flHidden { ! edit (adrwindow, title, flReadOnly); ! return (true)}}}; ! ! bundle { //get siteName ! if adrinfo^.siteName == "" { ! adrinfo^.siteName = manila.getSiteName (nameOf (adrinfo^))}; ! if adrinfo^.displaySiteName == "" { ! adrinfo^.displaySiteName = adrinfo^.siteName}}; ! ! local (adrwindow); ! bundle { //create the window ! adrwindow = Frontier.tools.windowTypes.newWindow ("manilaSite", true); ! window.attributes.setOne ("adrSiteInfo", adrinfo, adrwindow); ! if adradrwindow != nil { ! adradrwindow^ = adrwindow}}; ! local (flReadOnly = false); ! local (flManagingEditor = false); ! local (flEditor = false); ! local (siteStruct); ! local (flGotFromServer = false); ! ! bundle { //make sure we have a username and password ! if not manila.windowTypes.getUsernameAndPassword (adrinfo, @username, @password) { ! return (false)}; ! bundle { //12/04/00 JES: make sure username specifies a member of the site ! local (memberRole = manila.member.getRole (adrinfo, username)); ! while memberRole == 4 { // loop until the user enters a username that's a member of the site ! dialog.alert ("Can't open " + nameOf (adrinfo^) + " because " + username + " is not a member."); //12/08/00 JES: Tell the user why the password dialog is about to appear again. ! manila.windowTypes.setUsernameAndPassword (adrinfo, username, ""); //clear the password ! if manila.windowTypes.getUsernameAndPassword (adrinfo, @username, @password) { ! manila.windowTypes.setUsernameAndPassword (adrinfo, username, password); ! username = string (username); ! password = string (password); ! memberRole = manila.member.getRole (adrinfo, username)} ! else { //clean up data, delete the unfinished window's windowType table ! if defined (adrinfo^) { ! adrinfo^.username = ""; ! adrinfo^.password = ""; ! if defined (system.temp.manila.data.sites) { ! if defined (system.temp.manila.data.sites.[nameOf (adrinfo^)]) { ! delete (@system.temp.manila.data.sites.[nameOf (adrinfo^)])}}}; ! delete (parentOf (adrwindow^)); ! return (false)}}; ! case memberRole { ! 1 { ! flEditor = true; ! flManagingEditor = true}; ! 2 { ! flEditor = true}}}}; ! ! try { //get the outline in a try because it might not exist yet ! local (rpcCallInfo = adrinfo^); ! rpcCallInfo.password = password; ! rpcCallInfo.username = username; ! siteStruct = manila.editorialOutline.get (@rpcCallInfo); ! if siteStruct.editorialRole == "Managing Editor" { ! flManagingEditor = true; ! flEditor = true}; ! if siteStruct.editorialRole == "Contributing Editor" { ! flEditor = true; ! flReadOnly = true}; ! if siteStruct.flCheckedOut { ! flReadOnly = true}; ! if defined (siteStruct.displaySiteName) { ! adrinfo^.displaySiteName = siteStruct.displaySiteName}; ! if defined (siteStruct.flAcceptsOpml) and siteStruct.flAcceptsOpml { //11/02/00 JES ! adrinfo^.flAcceptsOpml = true} ! else { ! adrinfo^.flAcceptsOpml = false}; ! flGotFromServer = true}; ! ! if flGotFromServer and flEditor { ! local (opmlText = siteStruct.siteOutline); //11/20/00 JES: support for calling RPC handlers through the Manila glue. ! if system.environment.isMac { //12/31/00 JES: convert to Mac text ! op.xmlToOutline (string.latinToMac (opmlText), adrwindow)} ! else { ! op.xmlToOutline (opmlText, adrwindow)}; ! if adrinfo^.displaySiteName == "" { ! adrinfo^.displaySiteName = window.getTitle (adrwindow)}} ! else { //do default nodes ! local (oldTarget = target.set (adrwindow)); ! manila.windowTypes.buildManilaSiteOutline (adrwindow, adrinfo); ! op.firstSummit (); ! op.promote (); ! op.deleteLine (); ! op.firstSummit (); ! try {target.set (oldTarget)}; ! flReadOnly = false}; ! ! bundle { //make sure there's an Editors node ! local (oldTarget = target.set (adrwindow)); ! local (origCursor = op.getCursor ()); ! local (flFound = false); ! op.firstSummit (); ! loop { ! local (atts); ! if op.attributes.getAll (@atts) { ! if defined (atts.type) { ! if atts.type == "manilaEditorsContainer" { ! if atts.containerType == "toplevel" { ! flFound = true; ! break}}}}; ! if not (op.go (down, 1)) { ! break}}; ! if not flFound { //set up an Editors node ! op.insert ("Editors", down); ! local (atts); ! new (tableType, @atts); ! atts.type = "manilaEditorsContainer"; ! atts.containerType = "toplevel"; ! atts.siteUrl = nameOf (adrinfo^); ! op.attributes.addGroup (@atts)}; ! op.setCursor (origCursor); ! try {target.set (oldTarget)}}; ! ! local (t); new (tableType, @t); ! bundle { //set attributes ! if not flGotFromServer { ! setTimeModified (adrwindow, date (0))}; ! if not flManagingEditor { ! flReadOnly = true}; ! if adrinfo^.displaySiteName == "" { ! t.title = adrinfo^.siteName} ! else { ! t.title = adrinfo^.displaySiteName}; ! t.flReadOnly = flReadOnly; ! t.lastSaved = timeModified (adrwindow); //this happens in Frontier.tools.windowTypes.newWindow ! window.attributes.addGroup (@t, adrwindow)}; ! ! if not flHidden { ! edit (adrwindow, t.title, flReadOnly)}; ! ! return (true); ! }; ! «bundle //old code ! «if not defined (temp.pike) ! «new (tableType, @temp.pike) ! «if not defined (temp.pike.outlines) ! «new (tableType, @temp.pike.outlines) ! «local (adrOutlinesTable = @temp.pike.outlines) ! «local (adrTable = @adrOutlinesTable^.[displaySiteName]) ! «if not defined (adrTable) ! «new (tableType, adrTable) ! « ! «local (flOpenAlready = false) ! «if defined (adrTable^.outline) and window.isOpen (@adrTable^.outline) ! «flOpenAlready = true ! «if flOpenAlready ! «window.bringToFront (@adrTable^.outline) ! «else //create outline ! «new (tableType, adrTable) ! «new (outlineType, @adrTable^.outline) ! «local (flReadOnly = false) ! «local (flManagingEditor = false) ! «local (flEditor = false) ! «local (siteStruct) ! «local (flGotFromServer = false) ! «local (flAcceptsOpml = false) //11/02/00 JES ! «bundle //12/04/00 JES: make sure username specifies a member of the site ! «local (siteInfo = playlist.manila.buildSiteInfo (siteUrl)) ! «if siteInfo.username == "" and siteInfo.password == ""// the user cancelled the username/password dialog ! «return (false) ! «local (memberRole = manila.member.getRole (@siteInfo, username)) ! «while memberRole == 4 // loop until the user enters a username that's a member of the site ! «dialog.alert ("Can't open " + siteUrl + " because " + username + " is not a member.") //12/08/00 JES: Tell the user why the password dialog is about to appear again. ! «if playlist.manila.getPasswordDialog (siteUrl, @username, @password) ! «playlist.manila.setUsernameAndPassword (siteUrl, username, password) ! «username = string (username) ! «password = string (password) ! «memberRole = manila.member.getRole (@siteInfo, username) ! «else ! «return (false) ! «case memberRole ! «1 ! «flEditor = true ! «flManagingEditor = true ! «2 ! «flEditor = true ! «try ! «siteStruct = playlist.manila.rpc.getManilaSiteOutline (siteUrl, username, password) ! «if siteStruct.flCheckedOut ! «flReadOnly = true ! «if siteStruct.editorialRole == "Managing Editor" ! «flManagingEditor = true ! «flEditor = true ! «if siteStruct.editorialRole == "Contributing Editor" ! «flEditor = true ! «flReadOnly = true ! «if siteStruct.flCheckedOut ! «flReadOnly = true ! «if defined (siteStruct.flAcceptsOpml) and siteStruct.flAcceptsOpml //11/02/00 JES ! «flAcceptsOpml = true ! «user.playlist.manila.sites.[siteUrl].flAcceptsOpml = true ! «flGotFromServer = true ! «if flGotFromServer and flEditor ! «local (opmlText = base64.decode (siteStruct.siteOutline)) ! «local (opmlText = siteStruct.siteOutline) //11/20/00 JES: support for calling RPC handlers through the Manila glue. ! «if system.environment.isMac //12/31/00 JES: convert to Mac text ! «op.xmlToOutline (string.latinToMac (opmlText), @adrTable^.outline) ! «else ! «op.xmlToOutline (opmlText, @adrTable^.outline) ! «else //do default nodes ! «local (oldTarget = target.set (@adrTable^.outline)) ! «playlist.manila.commands.addManilaSiteNode (siteUrl, username:username, password:password) ! «op.firstSummit () ! «op.promote () ! «op.deleteLine () ! «op.firstSummit () ! «try {target.set (oldTarget)} ! «flReadOnly = false ! « ! «if flGotFromServer //02/16/00 JES: set lastSave so that non-dirty outlines don't act dirty ! «adrTable^.flSaved = true ! «adrTable^.lastSave = clock.now () ! «else ! «adrTable^.flSaved = false ! «if not flManagingEditor //02/16/00 JES: if the user is not a managing editor, prevent a save/don't save/cancel dialog when closing the outline ! «flReadOnly = true ! «adrTable^.timeCreated = clock.now () ! «adrTable^.title = displaySiteName ! «adrTable^.flLocal = false ! «adrTable^.flManilaSiteOutline = true ! «adrTable^.flReadOnly = flReadOnly ! «adrTable^.siteUrl = siteUrl ! «adrTable^.flAcceptsOpml = flAcceptsOpml //11/02/00 JES ! « ! «bundle //make sure there's an Editors node ! «local (adrOutline = @adrTable^.outline) ! «local (oldTarget = target.set (adrOutline)) ! «local (origCursor = op.getCursor ()) ! «local (flFound = false) ! «op.firstSummit () ! «loop ! «local (atts) ! «if op.attributes.getAll (@atts) ! «if defined (atts.type) ! «if atts.type == "manilaEditorsContainer" ! «if atts.containerType == "toplevel" ! «flFound = true ! «break ! «if not (op.go (down, 1)) ! «break ! «if not flFound //set up an Editors node ! «op.insert ("Editors", down) ! «local (atts) ! «new (tableType, @atts) ! «atts.type = "manilaEditorsContainer" ! «atts.containerType = "toplevel" ! «atts.siteUrl = siteUrl ! «op.attributes.addGroup (@atts) ! «op.setCursor (origCursor) ! «try {target.set (oldTarget)} ! «edit (@adrTable^.outline, displaySiteName, flReadOnly) ! « ! «return (true)}; ! ! «bundle // testing ! «openSite (@user.manila.data.sites.["http://private.braincase.net:80/"], "ja...@us...", "forget!it") \ No newline at end of file |
|
From: creecode <icr...@us...> - 2006-03-07 05:39:10
|
Update of /cvsroot/frontierkernel/odbs/frontierRoot/system/verbs/builtins/searchEngine In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6634 Modified Files: doSearch Log Message: replace calls to verbs at extensions.latinToMac with string.(latin/mac)To(Latin/Mac) verbs Index: doSearch =================================================================== RCS file: /cvsroot/frontierkernel/odbs/frontierRoot/system/verbs/builtins/searchEngine/doSearch,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** doSearch 26 Mar 2005 19:43:28 -0000 1.1.1.1 --- doSearch 7 Mar 2006 05:39:06 -0000 1.2 *************** *** 1,3 **** ! FrontierVcsFile:1:scpt:system.verbs.builtins.searchEngine.doSearch ! on doSearch (sites, urlThisPage, adrCaller, args = "", adr...@us...) { ÇRun the search. From a .wsf page, call searchEngine.searchMacro instead of this script. ÇIf you're running from inside an .fcgi, you can call this script directly. ÇParameters: ÇThe sites parameter is a list of site names. ÇurlThisPage is the URL of the calling page. ÇadrCaller is the Frontier address of the calling page or CGI script. Çargs is the arg string. ÇThe optional adrPrefs parameter lets you use multiple prefs tables for different searches. ÇYou can duplicate and modify the table at user.searchEngine.prefs. ÇTo create a new prefs table, call searchEngine.init with the address of a new prefs table. ÇThis script returns HTML text. local (searchString, searchType); local (filteredSearchString); local (numHits = 0, ctKeys); local (htmlText); local (searchTable, end); local (argTable, totalHits); local (origSearchString); local (adrStrings = @adrPrefs^.strings); local (adrDefaults = @adrPrefs^.defaults); local (adrStopWords = @adrPrefs^.stopWords); local (previewsList = {}); local (indexesList = {}); local (maxHitsPerPage = adrDefaults^.hitsPerPage, hitsThisPage, start = 1); urlThisPage = string.nthField (urlThisPage, '/', string.countFields (urlThisPage, '/')); new (tableType, @argTable); new (tableType, @searchTable); loop { if typeOf (adrStopWords) != addressType { break}; adrStopWords = adrStopWords^}; if typeOf (sites) != listType { scriptError ("Can't run a search because the sites parameter is not a list.")}; on add (s) { htmlText = htmlText + s}; on getPreview (adrItem) { local (prefix = "\r<p>\r" + (start + numHits) + ") "); local (i); for i = 1 to sizeOf (previewsList) { try { return (prefix + previewsList [i]^.[adrItem])}}; return (prefix + adrItem)}; on find (keywords) { local (x, flAND = (searchType == "and")); local (countKeys = string.countFields (keywords, ' ')); local (ctIgnored = 0); local (resultsTables = {}); local (oldTarget); local (adrSearchString); for x = 1 to countKeys { //loop through keywords, finding matches local (i); local (searchString = string.nthField (keywords, ' ', x)); searchString = string.popTrailing (searchString, 's'); searchString = string.dropNonAlphas (searchString); if not (searchEngine.checkStopWords (searchString, adrStopWords)) { ctIgnored++; continue}; for i = 1 to sizeOf (indexesList) { //loop through indexes, looking for matches local (adrIndex = indexesList [i]); local (firstLetter = string.mid (searchString, 1, 1)); local (adrLetter = @adrIndex^.[firstLetter]); if defined (adrLetter^) { local (adrResults = @adrLetter^.[searchString]); if defined (adrResults^) { resultsTables = resultsTables + adrResults}}}}; if resultsTables == {} { //was nothing found? return (adrStrings^.nothingFound)}; searchEngine.mergeResults (resultsTables, @searchTable); //combine the search results into one table bundle { //sort results by relevancy oldTarget = target.set (@searchTable); target.set (@searchTable); table.sortBy ("Value")}; local (results); local (min = ((countKeys - ctIgnored) - 1) * 4000); local (adrTable = @searchTable); totalHits = sizeOf (adrTable^); if flAnd { //don't count OR matches for i = totalHits downTo 1 { local (value = adrTable^ [i], name = nameOf (adrTable^ [i])); if value < min { totalHits = (totalHits - i); break}}}; local (top = (sizeOf (adrTable^) + 1) - start); local (bottom = (top + 1) - maxHitsPerPage); end = (start + maxHitsPerPage) - 1; if end > totalHits { end = totalHits}; if bottom < 1 { bottom = 1}; for i = top downTo bottom { local (value = adrTable^ [i], name = nameOf (adrTable^ [i])); if flAND { if value < min { break}}; if numHits == 0 { add ("<<replacenumhits>>")}; results = results + getPreview (name); numHits++}; target.set (oldTarget); add (results); bundle { //log search if adrPrefs^.logSearches { local (adrSearches = @adrPrefs^.searches); if not defined (adrSearches^) { new (tableType, adrSearches)}; local (adrPageSearches = @adrSearches^.[adrCaller]); if not defined (adrPageSearches^) { new (tableType, adrPageSearches)}; local (adrDaySearches = @adrPageSearches^.[date.shortString (clock.now ())]); if not defined (adrDaySearches^) { new (tableType, adrDaySearches)}; adrSearchString = @adrDaySearches^.[string.urlDecode (origSearchString)]; if not defined (adrSearchString^) { new (tableType, adrSearchString); adrSearchString^.ct = 0}; if typeOf (adrSearchString^) != tableType { local (ct = adrSearchString^); delete (adrSearchString); new (tableType, adrSearchString); adrSearchString^.ct = ct}; adrSearchString^.ct++; adrSearchString^.[searchType] = totalHits}}}; bundle { //get the search args if args != "" { //is this a search query? webserver.parseArgs (args, @argTable); try { //search string searchString = string.urlDecode (argTable.q); origSearchString = argTable.q; origSearchString = string.replaceAll (origSearchString, " ", "+")} else { searchString = ""}; try { //search type searchType = string.urlDecode (argTable.t); searchType = string.lower (searchType)} else { searchType = string.lower (adrDefaults^.searchType)}; if searchType != "or" and searchType != "and" { //it must be "or" or "and" searchType = "and"}; try { //max hits per page maxHitsPerPage = string.urlDecode (argTable.m); maxHitsPerPage = number (maxHitsPerPage)} else { maxHitsPerPage = adrDefaults^.hitsPerPage; if typeOf (maxHitsPerPage) != numberType { //this must be a number try { maxHitsPerPage = number (maxHitsPerPage)} else { maxHitsPerPage = 10}}}; //fallback position try { //start start = string.urlDecode (argTable.s); start = number (start)} else { start = 1}}}; bundle { //add the form if searchString == "" or adrPrefs^.formOnResultsPage { //do we place the form on this page? local (adrForm = @adrPrefs^.form); if defined (adrForm^) { //over-ride the default form with sysop's form loop { if typeOf (adrForm^) == addressType { //the form can be an address adrForm = adrForm^} else { break}}; if typeOf (adrForm^) == scriptType { add (adrForm^ (argTable, sites, urlThisPage, adrCaller, adrPrefs))} else { add (string (adrForm^))}} else { //build the default form on addOption (value, visibleValue, matchValue) { add ("<option value=\"" + value + "\""); if matchValue == value { add (" selected")}; add (">" + visibleValue + "\r")}; add ("<form method=\"GET\" action=\"" + urlThisPage + "\">\r"); if adrPrefs^.booleanPopup { add ("<br> <br>Find "); add ("<select name=\"t\">\r"); addOption ("and", "all the words", searchType); addOption ("or", "any of the words", searchType); add ("</select>\r"); add (" in<p>\r")} else { add ("<br> <br>Find "); if string.lower (searchType) == "and" { add ("all the words in:<p>\r"); add ("<input name=\"t\" type=\"hidden\" value=\"and\">")} else { add ("any of the words in:<p>\r"); add ("<input name=\"t\" type=\"hidden\" value=\"or\">")}}; add ("<input name=\"q\" size=30"); if searchString != "" { add (" value=\"" + string.replaceAll (searchString, "\"", """) + "\"")}; add ("><p>\r"); if adrPrefs^.matchesPopup { //add the matches per page popup? add ("Matches per page: "); add ("<select name=\"m\">\r"); addOption (10, "10", maxHitsPerPage); addOption (25, "25", maxHitsPerPage); addOption (50, "50", maxHitsPerPage); addOption (100, "100", maxHitsPerPage); add ("</select>\r"); add ("<p>\r")} else { add ("<input name=\"m\" type=\"hidden\" value=\"" + maxHitsPerPage + "\">")}; add ("<input name=\"s\" type=\"hidden\" value=\"1\">\r"); //starting hit add ("<input type=\"submit\" value=\"Search\">\r</form>\r<p>\r"); add (string (adrStrings^.searchTips))}; if searchString == "" { //we're not doing a search, just return the form. return (htmlText)}; add ("<p><hr noshade size=1><p>")}}; //add a separator between the form and the results bundle { //build list of indexes and previews addresses local (i); for i = 1 to sizeOf (sites) { indexesList [i] = searchEngine.getIndexAddress (sites [i]); ÇGet the address of the previews table. ÇFor the sake of speed, don't call searchEngine.getPreviewsAddress. local (adr = indexesList [i]); adr = parentOf (adr^); adr = @adr^.previews; previewsList [i] = adr}}; bundle { //add "Searching for" text local (searchingFor = adrStrings^.searchingFor); searchingFor = searchEngine.replaceAll (searchingFor, "<<searchString>>", searchString, true); add (searchingFor + "<p>\r")}; bundle { //filter the search string: remove markup, punctuation, etc. filteredSearchString = searchEngine.cleanText (searchString); local(theOS = sys.os()); if theOS == "MacOS" || theOS == "MacCn" { filteredSearchString = latinToMac.convert (filteredSearchString)}}; //convert Latin to Mac characters find (filteredSearchString); //do the find bundle { //report number of matches; add links to more screens if totalHits < 1 { add ("<p>" + adrStrings^.nothingFound)} else { if totalHits == 1 { htmlText = searchEngine.replaceAll (htmlText, "<<replacenumhits>>", adrStrings^.oneMatchFound + "<p>\r", true)} else { local (replacer = adrStrings^.matchesFound + "<p>\r"); replacer = searchEngine.replaceAll (replacer, "<<start>>", start, true); replacer = searchEngine.replaceAll (replacer, "<<end>>", end, true); replacer = searchEngine.replaceAll (replacer, "<<totalHits>>", totalHits, true); htmlText = searchEngine.replaceAll (htmlText, "<<replaceNumHits>>", replacer, true); on doMoreLinks () { local (totalScreens = ((totalHits - 1) / maxHitsPerPage) + 1); totalScreens = number (totalScreens); if totalScreens == 1 { return (false)}; Çif mod (totalHits, maxHitsPerPage) == 0 ÇtotalScreens = totalScreens - 1 local (thisScreen = number (start / maxHitsPerPage)); local (i); add ("<p>\r" + adrStrings^.moreMatches + "<p>\r"); for i = 0 to totalScreens - 1 { if i == thisScreen { add (i + 1)} else { local (url = urlThisPage + "?"); url = url + "t=" + argTable.t; url = url + "&q=" + string.urlEncode (origSearchString); url = url + "&m=" + argTable.m; url = url + "&s=" + ((i * maxHitsPerPage) + 1); add (html.getLink (i + 1, url))}; if i != totalScreens - 1 { add (" - ")}}}; doMoreLinks ()}}}; return (htmlText)} \ No newline at end of file --- 1,313 ---- ! FrontierVcsFile:2:scpt:system.verbs.builtins.searchEngine.doSearch ! on doSearch (sites, urlThisPage, adrCaller, args = "", adr...@us...) { ! «Changes ! «2/28/06; 12:31:27 PM by TAC ! «replace extensions.latinToMac.convert with string.latinToMac ! «Run the search. From a .wsf page, call searchEngine.searchMacro instead of this script. ! «If you're running from inside an .fcgi, you can call this script directly. ! «Parameters: ! «The sites parameter is a list of site names. ! «urlThisPage is the URL of the calling page. ! «adrCaller is the Frontier address of the calling page or CGI script. ! «args is the arg string. ! «The optional adrPrefs parameter lets you use multiple prefs tables for different searches. ! «You can duplicate and modify the table at user.searchEngine.prefs. ! «To create a new prefs table, call searchEngine.init with the address of a new prefs table. ! «This script returns HTML text. ! ! local (searchString, searchType); ! local (filteredSearchString); ! local (numHits = 0, ctKeys); ! local (htmlText); ! local (searchTable, end); ! local (argTable, totalHits); ! local (origSearchString); ! local (adrStrings = @adrPrefs^.strings); ! local (adrDefaults = @adrPrefs^.defaults); ! local (adrStopWords = @adrPrefs^.stopWords); ! local (previewsList = {}); ! local (indexesList = {}); ! local (maxHitsPerPage = adrDefaults^.hitsPerPage, hitsThisPage, start = 1); ! ! urlThisPage = string.nthField (urlThisPage, '/', string.countFields (urlThisPage, '/')); ! ! new (tableType, @argTable); ! new (tableType, @searchTable); ! ! loop { ! if typeOf (adrStopWords) != addressType { ! break}; ! adrStopWords = adrStopWords^}; ! ! if typeOf (sites) != listType { ! scriptError ("Can't run a search because the sites parameter is not a list.")}; ! ! on add (s) { ! htmlText = htmlText + s}; ! ! on getPreview (adrItem) { ! local (prefix = "\r<p>\r" + (start + numHits) + ") "); ! local (i); ! for i = 1 to sizeOf (previewsList) { ! try { ! return (prefix + previewsList [i]^.[adrItem])}}; ! return (prefix + adrItem)}; ! ! on find (keywords) { ! local (x, flAND = (searchType == "and")); ! local (countKeys = string.countFields (keywords, ' ')); ! local (ctIgnored = 0); ! local (resultsTables = {}); ! local (oldTarget); ! local (adrSearchString); ! ! for x = 1 to countKeys { //loop through keywords, finding matches ! local (i); ! local (searchString = string.nthField (keywords, ' ', x)); ! searchString = string.popTrailing (searchString, 's'); ! searchString = string.dropNonAlphas (searchString); ! ! if not (searchEngine.checkStopWords (searchString, adrStopWords)) { ! ctIgnored++; ! continue}; ! ! for i = 1 to sizeOf (indexesList) { //loop through indexes, looking for matches ! local (adrIndex = indexesList [i]); ! local (firstLetter = string.mid (searchString, 1, 1)); ! local (adrLetter = @adrIndex^.[firstLetter]); ! if defined (adrLetter^) { ! local (adrResults = @adrLetter^.[searchString]); ! if defined (adrResults^) { ! resultsTables = resultsTables + adrResults}}}}; ! ! if resultsTables == {} { //was nothing found? ! return (adrStrings^.nothingFound)}; ! ! searchEngine.mergeResults (resultsTables, @searchTable); //combine the search results into one table ! ! bundle { //sort results by relevancy ! oldTarget = target.set (@searchTable); ! target.set (@searchTable); ! table.sortBy ("Value")}; ! ! local (results); ! local (min = ((countKeys - ctIgnored) - 1) * 4000); ! ! local (adrTable = @searchTable); ! totalHits = sizeOf (adrTable^); ! ! if flAnd { //don't count OR matches ! for i = totalHits downTo 1 { ! local (value = adrTable^ [i], name = nameOf (adrTable^ [i])); ! if value < min { ! totalHits = (totalHits - i); ! break}}}; ! ! local (top = (sizeOf (adrTable^) + 1) - start); ! local (bottom = (top + 1) - maxHitsPerPage); ! end = (start + maxHitsPerPage) - 1; ! ! if end > totalHits { ! end = totalHits}; ! if bottom < 1 { ! bottom = 1}; ! ! for i = top downTo bottom { ! local (value = adrTable^ [i], name = nameOf (adrTable^ [i])); ! if flAND { ! if value < min { ! break}}; ! if numHits == 0 { ! add ("<<replacenumhits>>")}; ! results = results + getPreview (name); ! numHits++}; ! target.set (oldTarget); ! add (results); ! ! bundle { //log search ! if adrPrefs^.logSearches { ! local (adrSearches = @adrPrefs^.searches); ! if not defined (adrSearches^) { ! new (tableType, adrSearches)}; ! local (adrPageSearches = @adrSearches^.[adrCaller]); ! if not defined (adrPageSearches^) { ! new (tableType, adrPageSearches)}; ! local (adrDaySearches = @adrPageSearches^.[date.shortString (clock.now ())]); ! if not defined (adrDaySearches^) { ! new (tableType, adrDaySearches)}; ! adrSearchString = @adrDaySearches^.[string.urlDecode (origSearchString)]; ! if not defined (adrSearchString^) { ! new (tableType, adrSearchString); ! adrSearchString^.ct = 0}; ! if typeOf (adrSearchString^) != tableType { ! local (ct = adrSearchString^); ! delete (adrSearchString); ! new (tableType, adrSearchString); ! adrSearchString^.ct = ct}; ! adrSearchString^.ct++; ! adrSearchString^.[searchType] = totalHits}}}; ! ! bundle { //get the search args ! if args != "" { //is this a search query? ! webserver.parseArgs (args, @argTable); ! ! try { //search string ! searchString = string.urlDecode (argTable.q); ! origSearchString = argTable.q; ! origSearchString = string.replaceAll (origSearchString, " ", "+")} ! else { ! searchString = ""}; ! ! try { //search type ! searchType = string.urlDecode (argTable.t); ! searchType = string.lower (searchType)} ! else { ! searchType = string.lower (adrDefaults^.searchType)}; ! if searchType != "or" and searchType != "and" { //it must be "or" or "and" ! searchType = "and"}; ! ! try { //max hits per page ! maxHitsPerPage = string.urlDecode (argTable.m); ! maxHitsPerPage = number (maxHitsPerPage)} ! else { ! maxHitsPerPage = adrDefaults^.hitsPerPage; ! if typeOf (maxHitsPerPage) != numberType { //this must be a number ! try { ! maxHitsPerPage = number (maxHitsPerPage)} ! else { ! maxHitsPerPage = 10}}}; //fallback position ! ! try { //start ! start = string.urlDecode (argTable.s); ! start = number (start)} ! else { ! start = 1}}}; ! ! bundle { //add the form ! if searchString == "" or adrPrefs^.formOnResultsPage { //do we place the form on this page? ! local (adrForm = @adrPrefs^.form); ! ! if defined (adrForm^) { //over-ride the default form with sysop's form ! loop { ! if typeOf (adrForm^) == addressType { //the form can be an address ! adrForm = adrForm^} ! else { ! break}}; ! if typeOf (adrForm^) == scriptType { ! add (adrForm^ (argTable, sites, urlThisPage, adrCaller, adrPrefs))} ! else { ! add (string (adrForm^))}} ! else { //build the default form ! on addOption (value, visibleValue, matchValue) { ! add ("<option value=\"" + value + "\""); ! if matchValue == value { ! add (" selected")}; ! add (">" + visibleValue + "\r")}; ! ! add ("<form method=\"GET\" action=\"" + urlThisPage + "\">\r"); ! if adrPrefs^.booleanPopup { ! add ("<br> <br>Find "); ! add ("<select name=\"t\">\r"); ! addOption ("and", "all the words", searchType); ! addOption ("or", "any of the words", searchType); ! add ("</select>\r"); ! add (" in<p>\r")} ! else { ! add ("<br> <br>Find "); ! if string.lower (searchType) == "and" { ! add ("all the words in:<p>\r"); ! add ("<input name=\"t\" type=\"hidden\" value=\"and\">")} ! else { ! add ("any of the words in:<p>\r"); ! add ("<input name=\"t\" type=\"hidden\" value=\"or\">")}}; ! add ("<input name=\"q\" size=30"); ! if searchString != "" { ! add (" value=\"" + string.replaceAll (searchString, "\"", """) + "\"")}; ! add ("><p>\r"); ! if adrPrefs^.matchesPopup { //add the matches per page popup? ! add ("Matches per page: "); ! ! add ("<select name=\"m\">\r"); ! addOption (10, "10", maxHitsPerPage); ! addOption (25, "25", maxHitsPerPage); ! addOption (50, "50", maxHitsPerPage); ! addOption (100, "100", maxHitsPerPage); ! add ("</select>\r"); ! add ("<p>\r")} ! else { ! add ("<input name=\"m\" type=\"hidden\" value=\"" + maxHitsPerPage + "\">")}; ! ! add ("<input name=\"s\" type=\"hidden\" value=\"1\">\r"); //starting hit ! add ("<input type=\"submit\" value=\"Search\">\r</form>\r<p>\r"); ! add (string (adrStrings^.searchTips))}; ! ! if searchString == "" { //we're not doing a search, just return the form. ! return (htmlText)}; ! ! add ("<p><hr noshade size=1><p>")}}; //add a separator between the form and the results ! ! bundle { //build list of indexes and previews addresses ! local (i); ! for i = 1 to sizeOf (sites) { ! indexesList [i] = searchEngine.getIndexAddress (sites [i]); ! ! «Get the address of the previews table. ! «For the sake of speed, don't call searchEngine.getPreviewsAddress. ! local (adr = indexesList [i]); ! adr = parentOf (adr^); ! adr = @adr^.previews; ! ! previewsList [i] = adr}}; ! ! bundle { //add "Searching for" text ! local (searchingFor = adrStrings^.searchingFor); ! searchingFor = searchEngine.replaceAll (searchingFor, "<<searchString>>", searchString, true); ! add (searchingFor + "<p>\r")}; ! ! bundle { //filter the search string: remove markup, punctuation, etc. ! filteredSearchString = searchEngine.cleanText (searchString); ! local(theOS = sys.os()); ! if theOS == "MacOS" || theOS == "MacCn" { ! filteredSearchString = string.latinToMac (filteredSearchString)}}; //convert Latin to Mac characters ! ! find (filteredSearchString); //do the find ! ! bundle { //report number of matches; add links to more screens ! if totalHits < 1 { ! add ("<p>" + adrStrings^.nothingFound)} ! else { ! if totalHits == 1 { ! htmlText = searchEngine.replaceAll (htmlText, "<<replacenumhits>>", adrStrings^.oneMatchFound + "<p>\r", true)} ! else { ! local (replacer = adrStrings^.matchesFound + "<p>\r"); ! replacer = searchEngine.replaceAll (replacer, "<<start>>", start, true); ! replacer = searchEngine.replaceAll (replacer, "<<end>>", end, true); ! replacer = searchEngine.replaceAll (replacer, "<<totalHits>>", totalHits, true); ! htmlText = searchEngine.replaceAll (htmlText, "<<replaceNumHits>>", replacer, true); ! ! on doMoreLinks () { ! local (totalScreens = ((totalHits - 1) / maxHitsPerPage) + 1); ! totalScreens = number (totalScreens); ! if totalScreens == 1 { ! return (false)}; ! «if mod (totalHits, maxHitsPerPage) == 0 ! «totalScreens = totalScreens - 1 ! local (thisScreen = number (start / maxHitsPerPage)); ! local (i); ! add ("<p>\r" + adrStrings^.moreMatches + "<p>\r"); ! for i = 0 to totalScreens - 1 { ! if i == thisScreen { ! add (i + 1)} ! else { ! local (url = urlThisPage + "?"); ! url = url + "t=" + argTable.t; ! url = url + "&q=" + string.urlEncode (origSearchString); ! url = url + "&m=" + argTable.m; ! url = url + "&s=" + ((i * maxHitsPerPage) + 1); ! add (html.getLink (i + 1, url))}; ! if i != totalScreens - 1 { ! add (" - ")}}}; ! doMoreLinks ()}}}; ! ! return (htmlText)} \ No newline at end of file |
|
From: creecode <icr...@us...> - 2006-03-07 05:39:05
|
Update of /cvsroot/frontierkernel/odbs/frontierRoot/system/verbs/builtins/Frontier/tools/windowTypes/commands In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6521 Modified Files: openUrl Log Message: replace calls to verbs at extensions.latinToMac with string.(latin/mac)To(Latin/Mac) verbs Index: openUrl =================================================================== RCS file: /cvsroot/frontierkernel/odbs/frontierRoot/system/verbs/builtins/Frontier/tools/windowTypes/commands/openUrl,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** openUrl 6 Feb 2006 00:20:38 -0000 1.2 --- openUrl 7 Mar 2006 05:38:59 -0000 1.3 *************** *** 1,3 **** ! FrontierVcsFile:1:scpt:system.verbs.builtins.Frontier.tools.windowTypes.commands.openUrl ! on openUrl (url=nil, flOpenInPlace=false, adroutline=nil) { ÇChanges Ç2/5/06; 11:14:02 AM by TAC Çupdate run callbacks to deal with the callback table not being there Ç2002 Ç6/4/02; 3:58:23 PM by JES ÇWhen opening an OPML file, save the ownerName and ownerEmail from the head in the cache, and set corresponding windowType attributes. Ç6/1/02; 7:31:55 PM by JES ÇChanged the requirement that the URL's extension represents a type that can be opened in the outliner, so that if a key string like rss or opml is present anywhere in the URL, Radio will get a shot at opening the URL in the outliner. Fixes opening of Moreover's RSS feeds in Radio's outliner, for example. Ç5/15/02; 6:09:24 PM by JES ÇIf an address is passed in for adroutline, and the object specified by url cannot be converted to an outline, throw an error. Ç4/18/02; 4:27:35 PM by JES ÇWhen opening an RSS file, create the new window as read-only. Ç3/31/02; 7:36:52 PM by JES ÇFixed a bug which would cause an error opening an outline: flAcceptOpml has already been given a value. Ç3/31/02; 6:27:06 PM by JES ÇCall tcp.httpClient with flAcceptOpml true. Ç3/26/02; 11:02:59 PM by JES ÇFor opml and rss, if there's a cloud element, add it and the adrCloud attributes to the window. Ç3/24/02; 5:50:17 PM by JES ÇIf xmltext is defined in the cache table, use that text instead of reading the URL, and then delete the cached text. Ç3/24/02; 12:58:27 AM by JES ÇNew optional parameter, adroutline, specifies the address of the object to load the outline into. Ç3/23/02; 3:40:14 PM by JES ÇOptimization: Cache the type, so we don't have to store xmltext or xstruct in the cache table. Ç3/23/02; 2:30:20 PM by JES ÇImplement size-based caching of RSS and OPML outlines. If the file's size is different from the size of the cached copy, we reload it. Size is determined by requesting only the HTTP headers from the server, if possible. Ç2001 Ç12/1/01; 5:16:14 PM by JES ÇWhen inserting sub-outlines, temporarily set outline display to false, so screen updates will be smoother. Ç11/5/01; 4:37:01 PM by JES ÇFixed a bug opening urls like http://www.scripting.com/. They have no extension, so we have to read the url to determine the docType. Ç10/28/01; 6:12:44 PM by JES ÇOnly read the url if the extension matches one of the extensionsToOpenInRadio: xml, opml, rss and rdf. (More may be added later.) Ç10/22/01; 5:04:48 PM by JES ÇFollow redirects when opening the URL. Ç10/22/01; 4:55:58 PM by JES ÇFix bug when adding Manila site node: the port and server attributes were reversed in the call to playlist.manila.commands.addManilaSiteNode. Ç08/10/01; 8:43:47 PM by JES ÇNew optional parameter, flOpenInPlace. If true, outline type windows are inserted as a sub-heading of the frontmost outline window. Ç2000 Ç12/31/00; 5:32:12 PM by JES ÇOn Macs, convert opml to Mac text when converting to an outline. Ç11/30/00; 12:16:04 AM by JES ÇDereference callback addresses in a try block in case a tool's odb is not opened Ç09/30/00; 12:37:16 PM by PBS ÇCall callbacks at user.pike.commandCallbacks.openUrl. Ç09/22/00; 4:57:55 PM by PBS ÇCheck offline status. Ç09/20/00; 2:04:28 PM by PBS ÇCall playlist.httpClient rather than tcp.httpClient. Ç09/16/00; 11:20:13 AM by PBS ÇOpen HTML files in the Web browser. Ç09/16/00; 3:42:06 PM by PBS ÇOpen OPML documents the same way outlineDocuments are opened. ÇCalled when the user chooses Open URL... from the File menu. Handle RSS, outlineDocuments, and .xml. (Have to handle .xml because we can't differentiate it from outlineDocuments based on URL alone.) ÇWed, Aug 30, 2000 at 9:15:27 PM by PBS local (flOnline = true); if defined (tcp.isOffline) { flOnline = not (tcp.isOffline ())}; if not flOnline { //PBS 09/22/00: check offline status return (false)}; if url == nil { if defined (user.tools.prefs.lastOpenedUrl) { url = user.tools.prefs.lastOpenedUrl} else { if defined (user.tools.prefs.lastRssUrl) { url = user.tools.prefs.lastRssUrl} else { if defined (user.tools.prefs.lastOutlineUrl) { url = user.tools.prefs.lastOutlineUrl}}}; if not (dialog.ask ("Open URL:", @url)) { return (false)}}; bundle { //clean up the URL if not (string.lower (url) contains "://") { url = "http://" + url}; try { //check to see if it needs a trailing slash string.urlSplit (url)} else { url = url + "/"}}; if url contains " " { url = string.replaceAll (url, " ", "%20")}; //many outlineDocument URLs have spaces in them local (frontWindow = window.frontmost ()); on runCallbacks (stringAddress) { //call callbacks if defined (stringAddress^) { local (adrScript); for adrScript in @stringAddress^ { try { //11/30/00 JES while typeOf (adrScript^) == addressType { //follow addresses adrScript = adrScript^}; if adrScript^ (url) { return (true)}}}}; return (false)}; if runCallbacks ("user.tools.commandCallbacks.openUrl") { return (true)}; if system.environment.isRadio { if runCallbacks ("user.pike.commandCallbacks.openUrl") { return (true)}}; local (urllist = string.urlsplit (url)); Çlocal (extension = string.lower (string.nthField (urllist[3], ".", string.countFields (urllist[3], ".")))) local (extensionsToOpenInRadio = {"xml", "opml", "rss", "rdf"}); local (flOpenInRadio = false); bundle { //set flOpenInRadio local (ext, lowerUrl = string.lower (url)); for ext in extensionsToOpenInRadio { if lowerUrl contains ext { flOpenInRadio = true; break}}}; if flOpenInRadio { local (adrincache); on isDocType (typeName) { if defined (adrincache^.type) { if adrincache^.type == typeName { if defined (adrincache^.xstruct) { delete (@adrincache^.xstruct)}; return (true)}}; if defined (adrincache^.xstruct) { //get the type, and cache the cloud info if available try { local (adrtopelement = xml.getAddress (@adrincache^.xstruct, typeName)); adrincache^.type = typeName; try { //if there's a cloud element, create a cloud table in the cache local (adrcloud); case adrincache^.type { "opml" { local (adrhead = xml.getAddress (adrtopelement, "head")); adrcloud = xml.getAddress (adrhead, "cloud")}; "rss" { local (adrchannel = xml.getAddress (adrtopelement, "channel")); adrcloud = xml.getAddress (adrchannel, "cloud")}}; if adrcloud != nil { local (adrcloudatts = @adrcloud^.["/atts"]); new (tableType, @adrincache^.cloud); local (nomad); for nomad in adrcloudatts { adrincache^.cloud.[nameOf (nomad^)] = nomad^}}}; delete (@adrincache^.xstruct); return (true)}}; return (false)}; on getTextFromUrl (url) { //get xmltext, set adrincache local (adrcache = @system.temp.frontier.openUrlCache); if not defined (adrcache^) { new (tableType, adrcache)}; adrincache = @adrcache^.[url]; if not defined (adrincache^) { new (tableType, adrincache)}; if not defined (adrincache^.ctXmlBytes) { adrincache^.ctXmlBytes = 0}; local (urllist = string.urlsplit (url)); local (s = "", headertext, resultheaders, flgotsizefastway = false, sizexmltext); if defined (adrincache^.xmltext) { sizexmltext = sizeOf (adrincache^.xmltext); flgotsizefastway = true} else { headertext = tcp.httpClient (server:urllist [2], path:urllist [3], ctFollowRedirects:5, flMessages:false, flJustHeaders:true, flAcceptOpml:true); new (tabletype, @resultheaders); webserver.util.parseHeaders (headertext, @resultheaders); if defined (resultheaders.["Content-Length"]) { try { sizexmltext = number (resultheaders.["Content-Length"]); flgotsizefastway = true}}}; if not flgotsizefastway { s = string.httpResultSplit (tcp.httpClient (server:urllist [2], path:urllist [3], ctFollowRedirects:5, flAcceptOpml:true)); sizexmltext = sizeof (s)}; if adrincache^.ctXmlBytes != sizexmltext { if s == "" { //we haven't read the xml yet if defined (adrincache^.xmltext) { //but we do have a cached copy someone provided for us -- use that s = adrincache^.xmltext} else { //read the url s = string.httpResultSplit (tcp.httpClient (server:urllist [2], path:urllist [3], flMEssages:false, flAcceptOpml:true, ctFollowRedirects:5))}}; if not defined (adrincache^.xmltext) { adrincache^.xmltext = s}; try { //try to compile the text xml.compile (s, @adrincache^.xstruct); local (nomad = @adrincache^.xstruct); nomad = xml.getAddress (nomad, "opml"); nomad = xml.getAddress (nomad, "head"); try {adrincache^.ownerName = xml.getValue (nomad, "ownerName") }; try {adrincache^.ownerEmail = xml.getValue (nomad, "ownerEmail") }}; if defined (adrincache^.outline) { delete (@adrincache^.outline)}; adrincache^.ctXmlBytes = sizexmltext}}; Çreturn (s) Çelse Çreturn (adrincache^.xmltext) on insertInOutline (adr) { local (oldTarget = target.get ()); target.set (frontWindow); local (oldDisplay = op.getDisplay ()); op.setDisplay (false); op.insertOutline (adr, right); op.setDisplay (oldDisplay); try {target.set (oldTarget)}}; on setCloudAttribute () { if not flOpenInPlace { if defined (adrincache^.cloud) { window.attributes.setOne ("cloudInfo", adrincache^.cloud, adr); local (adrcloud, nomad); nomad = parentOf (adr^); nomad = @nomad^.["/atts"]; adrcloud = @nomad^.cloudInfo; window.attributes.setOne ("adrCloud", adrcloud, adr)}}}; getTextFromUrl (url); if isDocType ("rss") or isDocType ("RDF") { //handle an RSS file local (adr); if adroutline == nil { Frontier.tools.windowTypes.commands.new (true, adradrwindow:@adr)} else { adr = adroutline}; if defined (adrincache^.outline) { adr^ = adrincache^.outline} else { op.rsstooutline (adrincache^.xmltext, adr, url); adrincache^.outline = adr^; delete (@adrincache^.xmltext)}; local (oldTarget = target.set (adr)); local (title = op.getlinetext ()); if adroutline == nil { // set window attributes window.attributes.setOne ("lastSaved", timeModified (adr), adr); window.attributes.setOne ("title", title, adr); window.attributes.setOne ("flReadOnly", true, adr)}; if flOpenInPlace and typeOf (frontWindow^) == outlineType { insertInOutline (adr); delete (parentOf (adr^))} else { //open the new window if adroutline == nil { edit (adr, title, true)}}; bundle { //set attributes setCloudAttribute ()}; try {target.set (oldTarget)}; if adroutline == nil { //set last read urls user.tools.prefs.lastRssUrl = url; user.tools.prefs.lastOpenedUrl = url}; return (true)}; if isDocType ("opml") or isDocType ("outlineDocument") { local (urllist = string.urlsplit (url)); local (title = string.nthField (urllist[3], '/', string.countFields (urllist[3], '/'))); if title == "" {title = nil}; //let Frontier.tools.windowTypes.commands.new set the title local (adr); if adroutline == nil { Frontier.tools.windowTypes.commands.new (true, title, @adr)} else { adr = adroutline}; if defined (adrincache^.outline) { adr^ = adrincache^.outline} else { if system.environment.isMac { //12/31/00 JES: convert to Mac text op.xmltooutline (latinToMac.convert (adrincache^.xmltext), adr)} else { op.xmltooutline (adrincache^.xmltext, adr)}; adrincache^.outline = adr^; delete (@adrincache^.xmltext)}; if adroutline == nil { // set window attributes setCloudAttribute (); window.attributes.setOne ("lastSaved", timeModified (adr), adr); if defined (adrincache^.ownerEmail) { window.attributes.setOne ("ownerEmail", adrincache^.ownerEmail, adr)}; if defined (adrincache^.ownerName) { window.attributes.setOne ("ownerName", adrincache^.ownerName, adr)}}; if flOpenInPlace and typeOf (frontWindow^) == outlineType { insertInOutline (adr); delete (parentOf (adr^))} else { //open the new window if adroutline == nil { edit (adr, title)}}; if adroutline == nil { //set last read urls user.tools.prefs.lastOutlineUrl = url; user.tools.prefs.lastOpenedUrl = url}; return (true)}; if isDocType ("externalEditorInfo") { //adding a Manila site node local (siteUrl = url); siteUrl = string.popSuffix (siteUrl, '/'); //pop externalEditorInfo.xml siteUrl = string.popSuffix (siteUrl, '/'); //pop /xml/ siteUrl = siteUrl + "/"; //add trailing slash local (adrtype); if not Frontier.tools.windowTypes.findWindowType ("manilaSite", @adrtype) { return (false)}; adrtype^.openManilaSite (siteUrl); user.tools.prefs.lastOpenedUrl = url; return (true)}}; if adroutline == nil { Frontier.tools.commands.openUrl (url); //opens the URL in the browser if defined (system.temp.frontier.openUrlCache.[url] ) { //we don't cache these delete (@system.temp.frontier.openUrlCache.[url] )}} else { scriptError ("Could not open the url, \"" + url + "\", because it could not be converted to an outline.")}; user.tools.prefs.lastOpenedUrl = url; return (true)}; Çbundle //testing Çbundle //add to existing outline ÇopenUrl ("http://radio.weblogs.com/0001000/rss.xml", true) ÇopenUrl ("http://radio.weblogs.com/0001000/gems/blogroll.opml", true) ÇopenUrl ("http://jake.editthispage.com/xml/externalEditorInfo.xml", true) Çbundle //open in new window ÇopenUrl ("http://p.moreover.com/cgi-local/page?c=CRM%20news&o=rss") ÇopenUrl ("http://radio.weblogs.com/0001000/gems/publications.opml") \ No newline at end of file --- 1,329 ---- ! FrontierVcsFile:2:scpt:system.verbs.builtins.Frontier.tools.windowTypes.commands.openUrl ! on openUrl (url = nil, flOpenInPlace = false, adroutline = nil) { ! «Changes ! «2/28/06; 12:29:32 PM by TAC ! «replace extensions.latinToMac.convert with string.latinToMac ! «2/5/06; 11:14:02 AM by TAC ! «update run callbacks to deal with the callback table not being there ! «2002 ! «6/4/02; 3:58:23 PM by JES ! «When opening an OPML file, save the ownerName and ownerEmail from the head in the cache, and set corresponding windowType attributes. ! «6/1/02; 7:31:55 PM by JES ! «Changed the requirement that the URL's extension represents a type that can be opened in the outliner, so that if a key string like rss or opml is present anywhere in the URL, Radio will get a shot at opening the URL in the outliner. Fixes opening of Moreover's RSS feeds in Radio's outliner, for example. ! «5/15/02; 6:09:24 PM by JES ! «If an address is passed in for adroutline, and the object specified by url cannot be converted to an outline, throw an error. ! «4/18/02; 4:27:35 PM by JES ! «When opening an RSS file, create the new window as read-only. ! «3/31/02; 7:36:52 PM by JES ! «Fixed a bug which would cause an error opening an outline: flAcceptOpml has already been given a value. ! «3/31/02; 6:27:06 PM by JES ! «Call tcp.httpClient with flAcceptOpml true. ! «3/26/02; 11:02:59 PM by JES ! «For opml and rss, if there's a cloud element, add it and the adrCloud attributes to the window. ! «3/24/02; 5:50:17 PM by JES ! «If xmltext is defined in the cache table, use that text instead of reading the URL, and then delete the cached text. ! «3/24/02; 12:58:27 AM by JES ! «New optional parameter, adroutline, specifies the address of the object to load the outline into. ! «3/23/02; 3:40:14 PM by JES ! «Optimization: Cache the type, so we don't have to store xmltext or xstruct in the cache table. ! «3/23/02; 2:30:20 PM by JES ! «Implement size-based caching of RSS and OPML outlines. If the file's size is different from the size of the cached copy, we reload it. Size is determined by requesting only the HTTP headers from the server, if possible. ! «2001 ! «12/1/01; 5:16:14 PM by JES ! «When inserting sub-outlines, temporarily set outline display to false, so screen updates will be smoother. ! «11/5/01; 4:37:01 PM by JES ! «Fixed a bug opening urls like http://www.scripting.com/. They have no extension, so we have to read the url to determine the docType. ! «10/28/01; 6:12:44 PM by JES ! «Only read the url if the extension matches one of the extensionsToOpenInRadio: xml, opml, rss and rdf. (More may be added later.) ! «10/22/01; 5:04:48 PM by JES ! «Follow redirects when opening the URL. ! «10/22/01; 4:55:58 PM by JES ! «Fix bug when adding Manila site node: the port and server attributes were reversed in the call to playlist.manila.commands.addManilaSiteNode. ! «08/10/01; 8:43:47 PM by JES ! «New optional parameter, flOpenInPlace. If true, outline type windows are inserted as a sub-heading of the frontmost outline window. ! «2000 ! «12/31/00; 5:32:12 PM by JES ! «On Macs, convert opml to Mac text when converting to an outline. ! «11/30/00; 12:16:04 AM by JES ! «Dereference callback addresses in a try block in case a tool's odb is not opened ! «09/30/00; 12:37:16 PM by PBS ! «Call callbacks at user.pike.commandCallbacks.openUrl. ! «09/22/00; 4:57:55 PM by PBS ! «Check offline status. ! «09/20/00; 2:04:28 PM by PBS ! «Call playlist.httpClient rather than tcp.httpClient. ! «09/16/00; 11:20:13 AM by PBS ! «Open HTML files in the Web browser. ! «09/16/00; 3:42:06 PM by PBS ! «Open OPML documents the same way outlineDocuments are opened. ! «Called when the user chooses Open URL... from the File menu. Handle RSS, outlineDocuments, and .xml. (Have to handle .xml because we can't differentiate it from outlineDocuments based on URL alone.) ! «Wed, Aug 30, 2000 at 9:15:27 PM by PBS ! ! local (flOnline = true); ! ! if defined (tcp.isOffline) { ! flOnline = not (tcp.isOffline ())}; ! if not flOnline { //PBS 09/22/00: check offline status ! return (false)}; ! if url == nil { ! if defined (user.tools.prefs.lastOpenedUrl) { ! url = user.tools.prefs.lastOpenedUrl} ! else { ! if defined (user.tools.prefs.lastRssUrl) { ! url = user.tools.prefs.lastRssUrl} ! else { ! if defined (user.tools.prefs.lastOutlineUrl) { ! url = user.tools.prefs.lastOutlineUrl}}}; ! if not (dialog.ask ("Open URL:", @url)) { ! return (false)}}; ! ! bundle { //clean up the URL ! if not (string.lower (url) contains "://") { ! url = "http://" + url}; ! try { //check to see if it needs a trailing slash ! string.urlSplit (url)} ! else { ! url = url + "/"}}; ! ! if url contains " " { ! url = string.replaceAll (url, " ", "%20")}; //many outlineDocument URLs have spaces in them ! ! local (frontWindow = window.frontmost ()); ! ! on runCallbacks (stringAddress) { //call callbacks ! if defined (stringAddress^) { ! local (adrScript); ! for adrScript in @stringAddress^ { ! try { //11/30/00 JES ! while typeOf (adrScript^) == addressType { //follow addresses ! adrScript = adrScript^}; ! if adrScript^ (url) { ! return (true)}}}}; ! return (false)}; ! ! if runCallbacks ("user.tools.commandCallbacks.openUrl") { ! return (true)}; ! ! if system.environment.isRadio { ! if runCallbacks ("user.pike.commandCallbacks.openUrl") { ! return (true)}}; ! ! local (urllist = string.urlsplit (url)); ! «local (extension = string.lower (string.nthField (urllist[3], ".", string.countFields (urllist[3], ".")))) ! local (extensionsToOpenInRadio = {"xml", "opml", "rss", "rdf"}); ! ! local (flOpenInRadio = false); ! ! bundle { //set flOpenInRadio ! local (ext, lowerUrl = string.lower (url)); ! for ext in extensionsToOpenInRadio { ! if lowerUrl contains ext { ! flOpenInRadio = true; ! break}}}; ! ! if flOpenInRadio { ! local (adrincache); ! on isDocType (typeName) { ! if defined (adrincache^.type) { ! if adrincache^.type == typeName { ! if defined (adrincache^.xstruct) { ! delete (@adrincache^.xstruct)}; ! return (true)}}; ! if defined (adrincache^.xstruct) { //get the type, and cache the cloud info if available ! try { ! local (adrtopelement = xml.getAddress (@adrincache^.xstruct, typeName)); ! adrincache^.type = typeName; ! try { //if there's a cloud element, create a cloud table in the cache ! local (adrcloud); ! case adrincache^.type { ! "opml" { ! local (adrhead = xml.getAddress (adrtopelement, "head")); ! adrcloud = xml.getAddress (adrhead, "cloud")}; ! "rss" { ! local (adrchannel = xml.getAddress (adrtopelement, "channel")); ! adrcloud = xml.getAddress (adrchannel, "cloud")}}; ! if adrcloud != nil { ! local (adrcloudatts = @adrcloud^.["/atts"]); ! new (tableType, @adrincache^.cloud); ! local (nomad); ! for nomad in adrcloudatts { ! adrincache^.cloud.[nameOf (nomad^)] = nomad^}}}; ! delete (@adrincache^.xstruct); ! return (true)}}; ! return (false)}; ! on getTextFromUrl (url) { //get xmltext, set adrincache ! local (adrcache = @system.temp.frontier.openUrlCache); ! if not defined (adrcache^) { ! new (tableType, adrcache)}; ! adrincache = @adrcache^.[url]; ! if not defined (adrincache^) { ! new (tableType, adrincache)}; ! if not defined (adrincache^.ctXmlBytes) { ! adrincache^.ctXmlBytes = 0}; ! local (urllist = string.urlsplit (url)); ! local (s = "", headertext, resultheaders, flgotsizefastway = false, sizexmltext); ! if defined (adrincache^.xmltext) { ! sizexmltext = sizeOf (adrincache^.xmltext); ! flgotsizefastway = true} ! else { ! headertext = tcp.httpClient (server:urllist [2], path:urllist [3], ctFollowRedirects:5, flMessages:false, flJustHeaders:true, flAcceptOpml:true); ! new (tabletype, @resultheaders); ! webserver.util.parseHeaders (headertext, @resultheaders); ! if defined (resultheaders.["Content-Length"]) { ! try { ! sizexmltext = number (resultheaders.["Content-Length"]); ! flgotsizefastway = true}}}; ! if not flgotsizefastway { ! s = string.httpResultSplit (tcp.httpClient (server:urllist [2], path:urllist [3], ctFollowRedirects:5, flAcceptOpml:true)); ! sizexmltext = sizeof (s)}; ! if adrincache^.ctXmlBytes != sizexmltext { ! if s == "" { //we haven't read the xml yet ! if defined (adrincache^.xmltext) { //but we do have a cached copy someone provided for us -- use that ! s = adrincache^.xmltext} ! else { //read the url ! s = string.httpResultSplit (tcp.httpClient (server:urllist [2], path:urllist [3], flMEssages:false, flAcceptOpml:true, ctFollowRedirects:5))}}; ! if not defined (adrincache^.xmltext) { ! adrincache^.xmltext = s}; ! try { //try to compile the text ! xml.compile (s, @adrincache^.xstruct); ! local (nomad = @adrincache^.xstruct); ! nomad = xml.getAddress (nomad, "opml"); ! nomad = xml.getAddress (nomad, "head"); ! try {adrincache^.ownerName = xml.getValue (nomad, "ownerName") }; ! try {adrincache^.ownerEmail = xml.getValue (nomad, "ownerEmail") }}; ! if defined (adrincache^.outline) { ! delete (@adrincache^.outline)}; ! adrincache^.ctXmlBytes = sizexmltext}}; ! «return (s) ! «else ! «return (adrincache^.xmltext) ! on insertInOutline (adr) { ! local (oldTarget = target.get ()); ! target.set (frontWindow); ! local (oldDisplay = op.getDisplay ()); ! op.setDisplay (false); ! op.insertOutline (adr, right); ! op.setDisplay (oldDisplay); ! try {target.set (oldTarget)}}; ! on setCloudAttribute () { ! if not flOpenInPlace { ! if defined (adrincache^.cloud) { ! window.attributes.setOne ("cloudInfo", adrincache^.cloud, adr); ! local (adrcloud, nomad); ! nomad = parentOf (adr^); ! nomad = @nomad^.["/atts"]; ! adrcloud = @nomad^.cloudInfo; ! window.attributes.setOne ("adrCloud", adrcloud, adr)}}}; ! ! getTextFromUrl (url); ! ! if isDocType ("rss") or isDocType ("RDF") { //handle an RSS file ! local (adr); ! if adroutline == nil { ! Frontier.tools.windowTypes.commands.new (true, adradrwindow:@adr)} ! else { ! adr = adroutline}; ! if defined (adrincache^.outline) { ! adr^ = adrincache^.outline} ! else { ! op.rsstooutline (adrincache^.xmltext, adr, url); ! adrincache^.outline = adr^; ! delete (@adrincache^.xmltext)}; ! ! local (oldTarget = target.set (adr)); ! local (title = op.getlinetext ()); ! ! if adroutline == nil { // set window attributes ! window.attributes.setOne ("lastSaved", timeModified (adr), adr); ! window.attributes.setOne ("title", title, adr); ! window.attributes.setOne ("flReadOnly", true, adr)}; ! ! if flOpenInPlace and typeOf (frontWindow^) == outlineType { ! insertInOutline (adr); ! delete (parentOf (adr^))} ! else { //open the new window ! if adroutline == nil { ! edit (adr, title, true)}}; ! ! bundle { //set attributes ! setCloudAttribute ()}; ! ! try {target.set (oldTarget)}; ! ! if adroutline == nil { //set last read urls ! user.tools.prefs.lastRssUrl = url; ! user.tools.prefs.lastOpenedUrl = url}; ! ! return (true)}; ! if isDocType ("opml") or isDocType ("outlineDocument") { ! local (urllist = string.urlsplit (url)); ! local (title = string.nthField (urllist[3], '/', string.countFields (urllist[3], '/'))); ! if title == "" {title = nil}; //let Frontier.tools.windowTypes.commands.new set the title ! local (adr); ! if adroutline == nil { ! Frontier.tools.windowTypes.commands.new (true, title, @adr)} ! else { ! adr = adroutline}; ! ! if defined (adrincache^.outline) { ! adr^ = adrincache^.outline} ! else { ! if system.environment.isMac { //12/31/00 JES: convert to Mac text ! op.xmltooutline (string.latinToMac (adrincache^.xmltext), adr)} ! else { ! op.xmltooutline (adrincache^.xmltext, adr)}; ! adrincache^.outline = adr^; ! delete (@adrincache^.xmltext)}; ! ! if adroutline == nil { // set window attributes ! setCloudAttribute (); ! window.attributes.setOne ("lastSaved", timeModified (adr), adr); ! if defined (adrincache^.ownerEmail) { ! window.attributes.setOne ("ownerEmail", adrincache^.ownerEmail, adr)}; ! if defined (adrincache^.ownerName) { ! window.attributes.setOne ("ownerName", adrincache^.ownerName, adr)}}; ! ! if flOpenInPlace and typeOf (frontWindow^) == outlineType { ! insertInOutline (adr); ! delete (parentOf (adr^))} ! else { //open the new window ! if adroutline == nil { ! edit (adr, title)}}; ! ! if adroutline == nil { //set last read urls ! user.tools.prefs.lastOutlineUrl = url; ! user.tools.prefs.lastOpenedUrl = url}; ! return (true)}; ! if isDocType ("externalEditorInfo") { //adding a Manila site node ! local (siteUrl = url); ! siteUrl = string.popSuffix (siteUrl, '/'); //pop externalEditorInfo.xml ! siteUrl = string.popSuffix (siteUrl, '/'); //pop /xml/ ! siteUrl = siteUrl + "/"; //add trailing slash ! ! local (adrtype); ! if not Frontier.tools.windowTypes.findWindowType ("manilaSite", @adrtype) { ! return (false)}; ! adrtype^.openManilaSite (siteUrl); ! user.tools.prefs.lastOpenedUrl = url; ! return (true)}}; ! ! if adroutline == nil { ! Frontier.tools.commands.openUrl (url); //opens the URL in the browser ! if defined (system.temp.frontier.openUrlCache.[url] ) { //we don't cache these ! delete (@system.temp.frontier.openUrlCache.[url] )}} ! else { ! scriptError ("Could not open the url, \"" + url + "\", because it could not be converted to an outline.")}; ! ! user.tools.prefs.lastOpenedUrl = url; ! ! return (true)}; ! ! «bundle // testing ! «bundle //add to existing outline ! «openUrl ("http://radio.weblogs.com/0001000/rss.xml", true) ! «openUrl ("http://radio.weblogs.com/0001000/gems/blogroll.opml", true) ! «openUrl ("http://jake.editthispage.com/xml/externalEditorInfo.xml", true) ! «bundle //open in new window ! «openUrl ("http://p.moreover.com/cgi-local/page?c=CRM%20news&o=rss") ! «openUrl ("http://radio.weblogs.com/0001000/gems/publications.opml") \ No newline at end of file |
|
From: creecode <icr...@us...> - 2006-03-07 05:38:57
|
Update of /cvsroot/frontierkernel/odbs/frontierRoot/system/verbs/builtins/xml/aggregator In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6487 Modified Files: getServicesXml saveServicesXml Log Message: replace calls to verbs at extensions.latinToMac with string.(latin/mac)To(Latin/Mac) verbs Index: getServicesXml =================================================================== RCS file: /cvsroot/frontierkernel/odbs/frontierRoot/system/verbs/builtins/xml/aggregator/getServicesXml,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** getServicesXml 26 Mar 2005 19:44:16 -0000 1.1.1.1 --- getServicesXml 7 Mar 2006 05:38:54 -0000 1.2 *************** *** 1,3 **** ! FrontierVcsFile:1:scpt:system.verbs.builtins.xml.aggregator.getServicesXml ! on getServicesXml (adrdata=xml.aggregator.init (), adrIncludeCallback=nil) { ÇChanges Ç4/2/03; 11:31:56 PM by JES ÇCreated. Factored from xml.aggregator.saveServicesXml, this script generates the xml text for the services XML file. ÇadrCallback is the optional address of a callback script. If supplied, the callback is called with the URL of each service. If the callback returns true, the service is included. If it returns false, it's not included. local (mySubscriptions); new (outlinetype, @mySubscriptions); local (oldtarget = target.set (@mySubscriptions)); local (adrservice, atts); for adrservice in @adrdata^.services { if defined (adrservice^.compilation) { local (url = nameof (adrservice^), flcontainspassword = false); local (flInclude = true); if adrIncludeCallback != nil { try { while typeOf (adrIncludeCallback^) == addressType { adrIncludeCallback = adrIncludeCallback^}; flInclude = adrIncludeCallback^ (adrservice)}}; if flInclude { bundle { //set flcontainspassword try { local (urllist = string.urlsplit (url)); flcontainspassword = urllist [2] contains "@"}}; if not flcontainspassword { try { op.insert (adrservice^.compilation.channeltitle, down); new (tabletype, @atts); atts.type = "rss"; atts.xmlUrl = url; atts.htmlUrl = adrservice^.compilation.channellink; atts.title = adrservice^.compilation.channeltitle; atts.version = adrservice^.compilation.format; atts.description = adrservice^.compilation.channeldescription; try { atts.language = adrservice^.compilation.language} else { atts.language = "unknown"}}; op.attributes.addgroup (@atts)}}}}; op.firstsummit (); op.deleteline (); try {target.set (oldtarget)}; settimecreated (@mySubscriptions, timecreated (@adrdata^.services)); local (xmltext = op.outlineToXml (@mySubscriptions)); if system.environment.isMac { //02/22/2001 JES: convert to Latin text xmltext = latinToMac.macToLatin (xmltext)}; return (xmltext)}; Çbundle //test code Çon includeCallback (adr) Çreturn (nameOf (adr^) contains "userland") Çwp.newTextObject (getServicesXml (adrIncludeCallback:@includeCallback), @scratchpad.servicesXml) Çedit (@scratchpad.servicesXml) \ No newline at end of file --- 1,59 ---- ! FrontierVcsFile:2:scpt:system.verbs.builtins.xml.aggregator.getServicesXml ! on getServicesXml (adrdata=xml.aggregator.init (), adrIncludeCallback=nil) { ! «Changes ! «2/28/06; 1:03:16 PM by TAC ! «replace latinToMac.macToLatin with string.macToLatin ! «4/2/03; 11:31:56 PM by JES ! «Created. Factored from xml.aggregator.saveServicesXml, this script generates the xml text for the services XML file. ! «adrCallback is the optional address of a callback script. If supplied, the callback is called with the URL of each service. If the callback returns true, the service is included. If it returns false, it's not included. ! ! local (mySubscriptions); ! new (outlinetype, @mySubscriptions); ! local (oldtarget = target.set (@mySubscriptions)); ! ! local (adrservice, atts); ! for adrservice in @adrdata^.services { ! if defined (adrservice^.compilation) { ! local (url = nameof (adrservice^), flcontainspassword = false); ! local (flInclude = true); ! if adrIncludeCallback != nil { ! try { ! while typeOf (adrIncludeCallback^) == addressType { ! adrIncludeCallback = adrIncludeCallback^}; ! flInclude = adrIncludeCallback^ (adrservice)}}; ! if flInclude { ! bundle { //set flcontainspassword ! try { ! local (urllist = string.urlsplit (url)); ! flcontainspassword = urllist [2] contains "@"}}; ! if not flcontainspassword { ! try { ! op.insert (adrservice^.compilation.channeltitle, down); ! new (tabletype, @atts); ! atts.type = "rss"; ! atts.xmlUrl = url; ! atts.htmlUrl = adrservice^.compilation.channellink; ! atts.title = adrservice^.compilation.channeltitle; ! atts.version = adrservice^.compilation.format; ! atts.description = adrservice^.compilation.channeldescription; ! try { ! atts.language = adrservice^.compilation.language} ! else { ! atts.language = "unknown"}}; ! op.attributes.addgroup (@atts)}}}}; ! op.firstsummit (); ! op.deleteline (); ! try {target.set (oldtarget)}; ! ! settimecreated (@mySubscriptions, timecreated (@adrdata^.services)); ! local (xmltext = op.outlineToXml (@mySubscriptions)); ! if system.environment.isMac { //02/22/2001 JES: convert to Latin text ! xmltext = string.macToLatin (xmltext)}; ! ! return (xmltext)} ! «bundle //test code ! «on includeCallback (adr) ! «return (nameOf (adr^) contains "userland") ! «wp.newTextObject (getServicesXml (adrIncludeCallback:@includeCallback), @scratchpad.servicesXml) ! «edit (@scratchpad.servicesXml) \ No newline at end of file Index: saveServicesXml =================================================================== RCS file: /cvsroot/frontierkernel/odbs/frontierRoot/system/verbs/builtins/xml/aggregator/saveServicesXml,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** saveServicesXml 26 Mar 2005 19:44:17 -0000 1.1.1.1 --- saveServicesXml 7 Mar 2006 05:38:54 -0000 1.2 *************** *** 1,3 **** ! FrontierVcsFile:1:scpt:system.verbs.builtins.xml.aggregator.saveServicesXml ! on saveServicesXml (f, adrIncludeCallback=nil) { ÇChanges Ç4/2/03; 11:44:25 PM by JES ÇFactored the code that generates the XML to a new verb, xml.aggregator.getServicesXml. New optional parameter, adrIncludeCallback, passed to xml.aggregator.getServicesXml. If supplied, the callback script is called with the address of the service table. If it returns true, the service is included; if it returns false, the service is not included. Ç12/17/01; 5:06:14 PM by DW ÇIf the url of a service has a username:password encoded, don't include it in the file. Ç3/1/01; 11:48:38 PM by JES ÇUse Frontier.id, instead of hard-coding 'Radu'. Ç2/22/01; 9:28:50 PM by JES ÇIf this is a Mac, convert the opml text to Latin before writing the file. Ç2/13/01; 3:27:29 PM by PBS ÇSave mySubscriptions.opml as a Radio UserLand document on Macs. Ç2/5/01; 6:22:03 PM by DW ÇOnly save if myUserLandData.stats.flSaveMySubscriptions is defined and true. Ç1/23/01; 11:50:02 AM by DW ÇDon't let a problem with one channel stop the rendering of all. This is a startup issue, this script is called when we're first initialized, and I can't stop to figure out what it is about which channel that's stopping us. Ç1/2/01; 5:04:10 PM by DW ÇIf a table doesn't have a compilation sub-table, don't add it to the services file. Ç1/1/01; 11:21:33 AM by DW ÇSave an OPML file containing the services the user is subscribed to the rss/misc upstreamed folder. Çbundle //old code Çlocal (mySubscriptions) Çnew (outlinetype, @mySubscriptions) Çlocal (oldtarget = target.set (@mySubscriptions)) Ç Çlocal (adrdata = xml.aggregator.init ()) Çlocal (adrservice, atts) Çfor adrservice in @adrdata^.services Çif defined (adrservice^.compilation) Çlocal (url = nameof (adrservice^), flcontainspassword = false) Çbundle //set flcontainspassword Çtry Çlocal (urllist = string.urlsplit (url)) Çflcontainspassword = urllist [2] contains "@" Çif not flcontainspassword Çtry Çop.insert (adrservice^.compilation.channeltitle, down) Çnew (tabletype, @atts) Çatts.type = "rss" Çatts.xmlUrl = url Çatts.htmlUrl = adrservice^.compilation.channellink Çatts.title = adrservice^.compilation.channeltitle Çatts.version = adrservice^.compilation.format Çatts.description = adrservice^.compilation.channeldescription Çtry Çatts.language = adrservice^.compilation.language Çelse Çatts.language = "unknown" Çop.attributes.addgroup (@atts) Çop.firstsummit () Çop.deleteline () Çtarget.set (oldtarget) Ç Çsettimecreated (@mySubscriptions, timecreated (@adrdata^.services)) Çscratchpad.mySubscriptions = mySubscriptions; edit (@scratchpad.mySubscriptions) Ç Çlocal (xmltext = op.outlineToXml (@mySubscriptions)) local (adrdata = xml.aggregator.init ()); local (xmltext = xml.aggregator.getServicesXml (adrdata, adrIncludeCallback)); if system.environment.isMac { //02/22/2001 JES: convert to Latin text xmltext = latinToMac.macToLatin (xmltext)}; file.surefilepath (f); file.writewholefile (f, xmltext, 'OPML', Frontier.id)}; Çbundle //test code Çlocal (f = file.getSystemDisk () + "mySubscriptions.xml") ÇsaveServicesXml (f) \ No newline at end of file --- 1,75 ---- ! FrontierVcsFile:2:scpt:system.verbs.builtins.xml.aggregator.saveServicesXml ! on saveServicesXml (f, adrIncludeCallback=nil) { ! «Changes ! «2/28/06; 1:03:16 PM by TAC ! «replace latinToMac.macToLatin with string.macToLatin ! «4/2/03; 11:44:25 PM by JES ! «Factored the code that generates the XML to a new verb, xml.aggregator.getServicesXml. New optional parameter, adrIncludeCallback, passed to xml.aggregator.getServicesXml. If supplied, the callback script is called with the address of the service table. If it returns true, the service is included; if it returns false, the service is not included. ! «2001 ! «12/17/01; 5:06:14 PM by DW ! «If the url of a service has a username:password encoded, don't include it in the file. ! «3/1/01; 11:48:38 PM by JES ! «Use Frontier.id, instead of hard-coding 'Radu'. ! «2/22/01; 9:28:50 PM by JES ! «If this is a Mac, convert the opml text to Latin before writing the file. ! «2/13/01; 3:27:29 PM by PBS ! «Save mySubscriptions.opml as a Radio UserLand document on Macs. ! «2/5/01; 6:22:03 PM by DW ! «Only save if myUserLandData.stats.flSaveMySubscriptions is defined and true. ! «1/23/01; 11:50:02 AM by DW ! «Don't let a problem with one channel stop the rendering of all. This is a startup issue, this script is called when we're first initialized, and I can't stop to figure out what it is about which channel that's stopping us. ! «1/2/01; 5:04:10 PM by DW ! «If a table doesn't have a compilation sub-table, don't add it to the services file. ! «1/1/01; 11:21:33 AM by DW ! «Save an OPML file containing the services the user is subscribed to the rss/misc upstreamed folder. ! «bundle //old code ! «local (mySubscriptions) ! «new (outlinetype, @mySubscriptions) ! «local (oldtarget = target.set (@mySubscriptions)) ! « ! «local (adrdata = xml.aggregator.init ()) ! «local (adrservice, atts) ! «for adrservice in @adrdata^.services ! «if defined (adrservice^.compilation) ! «local (url = nameof (adrservice^), flcontainspassword = false) ! «bundle //set flcontainspassword ! «try ! «local (urllist = string.urlsplit (url)) ! «flcontainspassword = urllist [2] contains "@" ! «if not flcontainspassword ! «try ! «op.insert (adrservice^.compilation.channeltitle, down) ! «new (tabletype, @atts) ! «atts.type = "rss" ! «atts.xmlUrl = url ! «atts.htmlUrl = adrservice^.compilation.channellink ! «atts.title = adrservice^.compilation.channeltitle ! «atts.version = adrservice^.compilation.format ! «atts.description = adrservice^.compilation.channeldescription ! «try ! «atts.language = adrservice^.compilation.language ! «else ! «atts.language = "unknown" ! «op.attributes.addgroup (@atts) ! «op.firstsummit () ! «op.deleteline () ! «target.set (oldtarget) ! « ! «settimecreated (@mySubscriptions, timecreated (@adrdata^.services)) ! «scratchpad.mySubscriptions = mySubscriptions; edit (@scratchpad.mySubscriptions) ! « ! «local (xmltext = op.outlineToXml (@mySubscriptions)) ! ! local (adrdata = xml.aggregator.init ()); ! local (xmltext = xml.aggregator.getServicesXml (adrdata, adrIncludeCallback)); ! ! if system.environment.isMac { //02/22/2001 JES: convert to Latin text ! xmltext = string.macToLatin (xmltext)}; ! ! file.surefilepath (f); ! file.writewholefile (f, xmltext, 'OPML', Frontier.id)}; ! ! «bundle // testing ! «local (f = file.getSystemDisk () + "mySubscriptions.xml") ! «saveServicesXml (f) \ No newline at end of file |
|
From: creecode <icr...@us...> - 2006-03-07 05:38:52
|
Update of /cvsroot/frontierkernel/odbs/frontierRoot/system/verbs/apps/Manila/message In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6457 Modified Files: set get create Log Message: replace calls to verbs at extensions.latinToMac with string.(latin/mac)To(Latin/Mac) verbs Index: create =================================================================== RCS file: /cvsroot/frontierkernel/odbs/frontierRoot/system/verbs/apps/Manila/message/create,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** create 26 Mar 2005 19:42:19 -0000 1.1.1.1 --- create 7 Mar 2006 05:38:49 -0000 1.2 *************** *** 1,3 **** ! FrontierVcsFile:1:scpt:system.verbs.apps.Manila.message.create ! on create (adrSitePrefs, subject, body, bodyType, inResponseTo, windowInfoTable, rendererInfoTable=nil) { ÇCreate a new message on a Manila site. ÇChanges: Ç02/05/00; 5:28:03 PM by PBS ÇSend the windowInfoTable. If it fails, try sending without the windowInfoTable. This is needed while we transition the Manila RPC interface. Ç02/19/00; 6:52:14 PM by PBS ÇRemoved the try statement. now that manila.root has been updated. Ç03/23/00; 2:57:22 PM by PBS ÇDon't let httpClient display messages in the About Window -- Pike wants to display messges in the About Window. Ç03/23/00; 6:30:33 PM by PBS ÇNew parameter: rendererInfo. It's a table with two items: name (the name of the renderer to use) and a boolean, flRenderOnEntry, which specifies whether or not the outline can be rendered on entering the system (as opposed to rendering at request time). Ç04/09/00; 3:47:33 PM by PBS ÇConvert Ç11/20/00; 5:16:07 PM by JES ÇEnocde ampersands as & when using SOAP to transmit opml-based messages, since entities are decoded twice -- once by the SOAP decoder and once by op.xmlToOutline. Ç01/02/01; 12:44:12 AM by JES ÇOn Macs, convert the message subject to latin text. Ç9/6/01; 8:19:54 PM by JES ÇChanged params from a list to a record of named parameters, for SOAP compatibility. if system.environment.isMac { //PBS 04/09/00: convert from Mac to latin text body = latinToMac.macToLatin (body); subject = latinToMac.macToLatin (subject)}; //JES 01/02/00 with adrSitePrefs^ { if rendererInfoTable == nil { new (tableType, @rendererInfoTable); rendererInfoTable.name = "pikeRenderer"; rendererInfoTable.flRenderOnEntry = true}; if bodyType == "text/x-opml" { //11/20/00 JES: enocde quote characters as &quot; if the transport is SOAP. if defined (manila.flUseSoap) and manila.flUseSoap { body = string.replaceAll (body, "&", "&")}}; local (params = {"username":username, "password":string (password), "siteName":sitename, "subject":subject, "body":body, "bodyType":bodyType, "inResponseTo":inResponseTo, "windowInfo":windowInfoTable, "rendererInfo":rendererInfoTable}); return (manila.callHandler (host, port, "manila.message.create", @params, rpcPath:rpcPath, flShowMessages:false))}} \ No newline at end of file --- 1,39 ---- ! FrontierVcsFile:2:scpt:system.verbs.apps.Manila.message.create ! on create (adrSitePrefs, subject, body, bodyType, inResponseTo, windowInfoTable, rendererInfoTable=nil) { ! «Changes ! «2/28/06; 1:03:16 PM by TAC ! «replace latinToMac.macToLatin with string.macToLatin ! «9/6/01; 8:19:54 PM by JES ! «Changed params from a list to a record of named parameters, for SOAP compatibility. ! «01/02/01; 12:44:12 AM by JES ! «On Macs, convert the message subject to latin text. ! «2000 ! «11/20/00; 5:16:07 PM by JES ! «Enocde ampersands as & when using SOAP to transmit opml-based messages, since entities are decoded twice -- once by the SOAP decoder and once by op.xmlToOutline. ! «04/09/00; 3:47:33 PM by PBS ! «Convert ! «03/23/00; 6:30:33 PM by PBS ! «New parameter: rendererInfo. It's a table with two items: name (the name of the renderer to use) and a boolean, flRenderOnEntry, which specifies whether or not the outline can be rendered on entering the system (as opposed to rendering at request time). ! «03/23/00; 2:57:22 PM by PBS ! «Don't let httpClient display messages in the About Window -- Pike wants to display messges in the About Window. ! «02/19/00; 6:52:14 PM by PBS ! «Removed the try statement. now that manila.root has been updated. ! «02/05/00; 5:28:03 PM by PBS ! «Send the windowInfoTable. If it fails, try sending without the windowInfoTable. This is needed while we transition the Manila RPC interface. ! «Create a new message on a Manila site. ! ! if system.environment.isMac { //PBS 04/09/00: convert from Mac to latin text ! body = string.macToLatin (body); ! subject = string.macToLatin (subject)}; //JES 01/02/00 ! ! with adrSitePrefs^ { ! if rendererInfoTable == nil { ! new (tableType, @rendererInfoTable); ! rendererInfoTable.name = "pikeRenderer"; ! rendererInfoTable.flRenderOnEntry = true}; ! if bodyType == "text/x-opml" { //11/20/00 JES: enocde quote characters as &quot; if the transport is SOAP. ! if defined (manila.flUseSoap) and manila.flUseSoap { ! body = string.replaceAll (body, "&", "&")}}; ! local (params = {"username":username, "password":string (password), "siteName":sitename, "subject":subject, "body":body, "bodyType":bodyType, "inResponseTo":inResponseTo, "windowInfo":windowInfoTable, "rendererInfo":rendererInfoTable}); ! return (manila.callHandler (host, port, "manila.message.create", @params, rpcPath:rpcPath, flShowMessages:false))}} \ No newline at end of file Index: set =================================================================== RCS file: /cvsroot/frontierkernel/odbs/frontierRoot/system/verbs/apps/Manila/message/set,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** set 26 Mar 2005 19:42:19 -0000 1.1.1.1 --- set 7 Mar 2006 05:38:49 -0000 1.2 *************** *** 1,3 **** ! FrontierVcsFile:1:scpt:system.verbs.apps.Manila.message.set ! on set (adrSitePrefs, msgnum, subject, body, bodyType, windowInfoTable, rendererInfoTable=nil) { ÇSet the contents of a message. ÇChanges: Ç02/05/00; 5:31:02 PM by PBS ÇSend the windowInfoTable. If it fails, try again without the windowInfoTable. This is needed during the transition for the Manila RPC interface. Ç02/19/00; 6:48:59 PM by PBS ÇRemoved the try statement. now that manila.root has been updated. Ç03/23/00; 12:22:36 PM by PBS ÇDon't show messages -- Pike displays its own message in the About Window. Ç03/23/00; 6:24:25 PM by PBS ÇNew parameter: rendererInfo. It's a table with two items: name (the name of the renderer to use) and a boolean, flRenderOnEntry, which specifies whether or not the outline can be rendered on entering the system (as opposed to rendering at request time). Ç04/09/00; 3:45:47 PM by PBS ÇIf this is a Mac, convert the text to latin before sending. The server expects latin text, even if the server is running on a Mac. Ç11/20/00; 5:16:07 PM by JES ÇEnocde ampersands as & when using SOAP to transmit opml-based messages, since entities are decoded twice -- once by the SOAP decoder and once by op.xmlToOutline. Ç01/02/01; 12:44:12 AM by JES ÇOn Macs, convert the message subject to latin text. Ç9/6/01; 8:24:55 PM by JES ÇChanged params from a list to a record of named parameters, for SOAP compatibility. if system.environment.isMac { //PBS 04/09/00: convert from Mac to latin text body = latinToMac.macToLatin (body); subject = latinToMac.macToLatin (subject)}; //JES 01/02/00 with adrSitePrefs^ { if rendererInfoTable == nil { new (tableType, @rendererInfoTable); rendererInfoTable.name = "pikeRenderer"; rendererInfoTable.flRenderOnEntry = true}; if bodyType == "text/x-opml" { //11/20/00 JES: enocde quote characters as &quot; if the transport is SOAP. if defined (manila.flUseSoap) and manila.flUseSoap { body = string.replaceAll (body, "&", "&")}}; local (params = {"username":username, "password":string (password), "siteName":sitename, "msgnum":msgnum, "subject":subject, "body":body, "bodyType":bodyType, "windowInfo":windowInfoTable, "rendererInfo":rendererInfoTable}); return (manila.callHandler (host, port, "manila.message.set", @params, rpcPath:rpcPath, flShowMessages:false))}} \ No newline at end of file --- 1,39 ---- ! FrontierVcsFile:2:scpt:system.verbs.apps.Manila.message.set ! on set (adrSitePrefs, msgnum, subject, body, bodyType, windowInfoTable, rendererInfoTable=nil) { ! «Changes ! «2/28/06; 1:06:21 PM by TAC ! «replace latinToMac.macToLatin with string.macToLatin ! «9/6/01; 8:24:55 PM by JES ! «Changed params from a list to a record of named parameters, for SOAP compatibility. ! «01/02/01; 12:44:12 AM by JES ! «On Macs, convert the message subject to latin text. ! «2000 ! «11/20/00; 5:16:07 PM by JES ! «Enocde ampersands as & when using SOAP to transmit opml-based messages, since entities are decoded twice -- once by the SOAP decoder and once by op.xmlToOutline. ! «04/09/00; 3:45:47 PM by PBS ! «If this is a Mac, convert the text to latin before sending. The server expects latin text, even if the server is running on a Mac. ! «03/23/00; 6:24:25 PM by PBS ! «New parameter: rendererInfo. It's a table with two items: name (the name of the renderer to use) and a boolean, flRenderOnEntry, which specifies whether or not the outline can be rendered on entering the system (as opposed to rendering at request time). ! «03/23/00; 12:22:36 PM by PBS ! «Don't show messages -- Pike displays its own message in the About Window. ! «02/19/00; 6:48:59 PM by PBS ! «Removed the try statement. now that manila.root has been updated. ! «02/05/00; 5:31:02 PM by PBS ! «Send the windowInfoTable. If it fails, try again without the windowInfoTable. This is needed during the transition for the Manila RPC interface. ! «Set the contents of a message. ! ! if system.environment.isMac { //PBS 04/09/00: convert from Mac to latin text ! body = string.macToLatin (body); ! subject = string.macToLatin (subject)}; //JES 01/02/00 ! ! with adrSitePrefs^ { ! if rendererInfoTable == nil { ! new (tableType, @rendererInfoTable); ! rendererInfoTable.name = "pikeRenderer"; ! rendererInfoTable.flRenderOnEntry = true}; ! if bodyType == "text/x-opml" { //11/20/00 JES: enocde quote characters as &quot; if the transport is SOAP. ! if defined (manila.flUseSoap) and manila.flUseSoap { ! body = string.replaceAll (body, "&", "&")}}; ! local (params = {"username":username, "password":string (password), "siteName":sitename, "msgnum":msgnum, "subject":subject, "body":body, "bodyType":bodyType, "windowInfo":windowInfoTable, "rendererInfo":rendererInfoTable}); ! return (manila.callHandler (host, port, "manila.message.set", @params, rpcPath:rpcPath, flShowMessages:false))}} \ No newline at end of file Index: get =================================================================== RCS file: /cvsroot/frontierkernel/odbs/frontierRoot/system/verbs/apps/Manila/message/get,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** get 26 Mar 2005 19:42:19 -0000 1.1.1.1 --- get 7 Mar 2006 05:38:49 -0000 1.2 *************** *** 1,3 **** ! FrontierVcsFile:1:scpt:system.verbs.apps.Manila.message.get ! on get (adrSitePrefs, msgnum) { ÇChanges: Ç1/2/01; 1:47:35 AM by JES ÇOn Macs, convert the body and subject to Mac text. Ç9/6/01; 8:21:32 PM by JES ÇChanged params from a list to a record of named parameters, for SOAP compatibility. with adrSitePrefs^ { local (params = {"username":username, "password":string (password), "siteName":sitename, "msgnum":msgnum}); local (returnTable = manila.callHandler (host, port, "manila.message.get", @params, rpcPath:rpcPath)); if system.environment.isMac { //01/02/01 JES: convert body and subject to Mac text returnTable.body = latinToMac.convert (returnTable.body); returnTable.subject = latinToMac.convert (returnTable.subject)}; return (returnTable)}} \ No newline at end of file --- 1,20 ---- ! FrontierVcsFile:2:scpt:system.verbs.apps.Manila.message.get ! on get (adrSitePrefs, msgnum) { ! «Changes ! «2/28/06; 11:59:01 AM by TAC ! «replace extensions.latinToMac.convert with string.latinToMac ! «1/2/01; 1:47:35 AM by JES ! «On Macs, convert the body and subject to Mac text. ! «9/6/01; 8:21:32 PM by JES ! «Changed params from a list to a record of named parameters, for SOAP compatibility. ! ! with adrSitePrefs^ { ! local (params = {"username":username, "password":string (password), "siteName":sitename, "msgnum":msgnum}); ! local (returnTable = manila.callHandler (host, port, "manila.message.get", @params, rpcPath:rpcPath)); ! ! if system.environment.isMac { //01/02/01 JES: convert body and subject to Mac text ! returnTable.body = string.latinToMac (returnTable.body); ! returnTable.subject = string.latinToMac (returnTable.subject)}; ! ! return (returnTable)}} \ No newline at end of file |
|
From: creecode <icr...@us...> - 2006-03-07 05:38:47
|
Update of /cvsroot/frontierkernel/odbs/frontierRoot/system/verbs/builtins/webserver In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6432 Modified Files: parseArgs Log Message: replace calls to verbs at extensions.latinToMac with string.(latin/mac)To(Latin/Mac) verbs Index: parseArgs =================================================================== RCS file: /cvsroot/frontierkernel/odbs/frontierRoot/system/verbs/builtins/webserver/parseArgs,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** parseArgs 26 Mar 2005 19:44:07 -0000 1.1.1.1 --- parseArgs 7 Mar 2006 05:38:44 -0000 1.2 *************** *** 1,3 **** ! FrontierVcsFile:1:scpt:system.verbs.builtins.webserver.parseArgs ! on parseArgs (argstring, adrtable) { ÇChanges Ç9/16/04; 1:49:40 AM by JES ÇIf running on MacOS, convert argument names to mac characters. Ç8/18/98; 9:41:51 AM by DW ÇSite of a major security hole in Frontier. Closed. ÇIt goes all the way back to June 1995 local (argslist = string.parseHttpArgs (argstring)); local (i, name, value, adritem); loop (i = 1; i <= sizeof (argslist); i = i + 2) { name = argslist [i]; if system.environment.isMac { name = latinToMac.convert (name)}; value = argslist [i + 1]; adritem = @adrtable^.[name]; if defined (adritem^) { //put multiple selections into list if typeOf (adritem^) != listType { adritem^ = {adritem^}}; adritem^ = adritem^ + {value}} else { adritem^ = value}}} \ No newline at end of file --- 1,31 ---- ! FrontierVcsFile:2:scpt:system.verbs.builtins.webserver.parseArgs ! on parseArgs (argstring, adrtable) { ! «Changes ! «2/28/06; 12:09:43 PM by TAC ! «replace extensions.latinToMac.convert with string.latinToMac ! «9/16/04; 1:49:40 AM by JES ! «If running on MacOS, convert argument names to mac characters. ! «8/18/98; 9:41:51 AM by DW ! «Site of a major security hole in Frontier. Closed. ! «It goes all the way back to June 1995 ! ! local (argslist = string.parseHttpArgs (argstring)); ! local (i, name, value, adritem); ! ! loop (i = 1; i <= sizeof (argslist); i = i + 2) { ! name = argslist [i]; ! ! if system.environment.isMac { ! name = string.latinToMac (name)}; ! ! value = argslist [i + 1]; ! adritem = @adrtable^.[name]; ! ! if defined (adritem^) { //put multiple selections into list ! if typeOf (adritem^) != listType { ! adritem^ = {adritem^}}; ! ! adritem^ = adritem^ + {value}} ! else { ! adritem^ = value}}} \ No newline at end of file |
|
From: creecode <icr...@us...> - 2006-03-07 05:38:42
|
Update of /cvsroot/frontierkernel/odbs/frontierRoot/system/verbs/builtins/xml/rss In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6386 Modified Files: decodeString Log Message: replace calls to verbs at extensions.latinToMac with string.(latin/mac)To(Latin/Mac) verbs Index: decodeString =================================================================== RCS file: /cvsroot/frontierkernel/odbs/frontierRoot/system/verbs/builtins/xml/rss/decodeString,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** decodeString 26 Mar 2005 19:44:33 -0000 1.1.1.1 --- decodeString 7 Mar 2006 05:38:39 -0000 1.2 *************** *** 1,3 **** ! FrontierVcsFile:1:scpt:system.verbs.builtins.xml.rss.decodeString ! on decodeString (s, flNeuterMacros=true) { ÇChanges Ç11/30/02; 5:33:41 PM by JES ÇNew optional parameter, flNeuterMacros. Defaults to true, preserving existing behavior. Ç10/2/02; 9:04:47 PM by JES ÇDon't decode entities that were already decoded by xml.compile when the channel was loaded. Fixes the double-decoding bug where sample HTML text was being displayed in the news page as actual HTML. Ç3/15/02; 5:54:43 PM by DW ÇCreated. Factored out of xml.rss.compileService, so drivers can get at it. Çbundle //old code which caused double-decoding Çs = string.replaceAll (s, "'", "'") //work around a bug in xml.entityDecode Çs = xml.entitydecode (s, true, true) s = string.replaceAll (s, "'", "'"); s = string.replaceAll (s, """, "\""); s = xml.entityDecode (s, false, true); //false means we don't want to decide &, > and < -- they've already been decoded by xml.compile. if flNeuterMacros { s = string.replaceall (s, "{", "{"); s = string.replaceall (s, "}", "}"); s = string.replaceall (s, "<%", "<%")}; if system.environment.isMac { //02/22/2001 JES: convert to Mac text on Macintoshes s = latinToMac.convert (s)}; return (s)} \ No newline at end of file --- 1,30 ---- ! FrontierVcsFile:2:scpt:system.verbs.builtins.xml.rss.decodeString ! on decodeString (s, flNeuterMacros=true) { ! «Changes ! «2/28/06; 12:34:02 PM by TAC ! «replace extensions.latinToMac.convert with string.latinToMac ! «2002 ! «11/30/02; 5:33:41 PM by JES ! «New optional parameter, flNeuterMacros. Defaults to true, preserving existing behavior. ! «10/2/02; 9:04:47 PM by JES ! «Don't decode entities that were already decoded by xml.compile when the channel was loaded. Fixes the double-decoding bug where sample HTML text was being displayed in the news page as actual HTML. ! «3/15/02; 5:54:43 PM by DW ! «Created. Factored out of xml.rss.compileService, so drivers can get at it. ! «bundle //old code which caused double-decoding ! «s = string.replaceAll (s, "'", "'") //work around a bug in xml.entityDecode ! «s = xml.entitydecode (s, true, true) ! ! s = string.replaceAll (s, "'", "'"); ! s = string.replaceAll (s, """, "\""); ! s = xml.entityDecode (s, false, true); //false means we don't want to decide &, > and < -- they've already been decoded by xml.compile. ! ! if flNeuterMacros { ! s = string.replaceall (s, "{", "{"); ! s = string.replaceall (s, "}", "}"); ! s = string.replaceall (s, "<%", "<%")}; ! ! if system.environment.isMac { //02/22/2001 JES: convert to Mac text on Macintoshes ! s = string.latinToMac (s)}; ! ! return (s)} \ No newline at end of file |
|
From: creecode <icr...@us...> - 2006-03-07 05:38:36
|
Update of /cvsroot/frontierkernel/odbs/frontierRoot/system/verbs/apps/Manila/homepage In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6356 Modified Files: addToHomePage Log Message: replace calls to verbs at extensions.latinToMac with string.(latin/mac)To(Latin/Mac) verbs Index: addToHomePage =================================================================== RCS file: /cvsroot/frontierkernel/odbs/frontierRoot/system/verbs/apps/Manila/homepage/addToHomePage,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** addToHomePage 26 Mar 2005 19:42:18 -0000 1.1.1.1 --- addToHomePage 7 Mar 2006 05:38:33 -0000 1.2 *************** *** 1,3 **** ! FrontierVcsFile:1:scpt:system.verbs.apps.Manila.homepage.addToHomePage ! on addToHomePage (username, password, siteUrl, text) { ÇAdd text to the top of a home page. This verb is different than the others: instead of the address of a prefs table, it takes the username, password, and URL of the site directly. Ç02/19/00; 6:54:14 PM by PBS ÇChanges Ç06/22/00; 8:08:37 PM by JES ÇFixed error with manilaSiteUrl not being defined. Ç9/6/01; 8:03:04 PM by JES ÇChanged params from a list to a record of named parameters, for SOAP compatibility. ÇIf this is a mac, convert text from Mac to Latin text before sending. local (method = "manila.homePage.addToHomePage"); local (server, port = 80); local (urlParts = string.urlSplit (siteUrl)); //11/17/00 JES: siteUrl, not manilaSiteUrl server = urlParts [2]; local (ixPort = string.patternMatch (":", server)); if ixPort > 0 { server = string.mid (urlParts [2], 1, ixPort - 1); port = number (string.mid (urlParts [2], ixPort + 1, infinity))}; if system.environment.isMac { text = latinToMac.macToLatin (text)}; local (params); params = {"username":username, "password":password, "siteUrl":siteUrl, "text":text}; return (manila.callHandler (server, port, method, @params))} \ No newline at end of file --- 1,30 ---- ! FrontierVcsFile:2:scpt:system.verbs.apps.Manila.homepage.addToHomePage ! on addToHomePage (username, password, siteUrl, text) { ! «Changes ! «2/28/06; 1:00:48 PM by TAC ! «replace latinToMac.macToLatin with string.macToLatin ! «9/6/01; 8:03:04 PM by JES ! «Changed params from a list to a record of named parameters, for SOAP compatibility. ! «If this is a mac, convert text from Mac to Latin text before sending. ! «06/22/00; 8:08:37 PM by JES ! «Fixed error with manilaSiteUrl not being defined. ! «Add text to the top of a home page. This verb is different than the others: instead of the address of a prefs table, it takes the username, password, and URL of the site directly. ! «02/19/00; 6:54:14 PM by PBS ! ! local (method = "manila.homePage.addToHomePage"); ! ! local (server, port = 80); ! local (urlParts = string.urlSplit (siteUrl)); //11/17/00 JES: siteUrl, not manilaSiteUrl ! server = urlParts [2]; ! local (ixPort = string.patternMatch (":", server)); ! if ixPort > 0 { ! server = string.mid (urlParts [2], 1, ixPort - 1); ! port = number (string.mid (urlParts [2], ixPort + 1, infinity))}; ! if system.environment.isMac { ! text = string.macToLatin (text)}; ! ! local (params); ! params = {"username":username, "password":password, "siteUrl":siteUrl, "text":text}; ! ! return (manila.callHandler (server, port, method, @params))} \ No newline at end of file |
|
From: creecode <icr...@us...> - 2006-03-07 05:38:32
|
Update of /cvsroot/frontierkernel/odbs/frontierRoot/system/verbs/apps/Manila/nodeTypes/types/manilaMessageReadOnly In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6328 Modified Files: expand Log Message: replace calls to verbs at extensions.latinToMac with string.(latin/mac)To(Latin/Mac) verbs Index: expand =================================================================== RCS file: /cvsroot/frontierkernel/odbs/frontierRoot/system/verbs/apps/Manila/nodeTypes/types/manilaMessageReadOnly/expand,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** expand 26 Mar 2005 19:42:21 -0000 1.1.1.1 --- expand 7 Mar 2006 05:38:28 -0000 1.2 *************** *** 1,3 **** ! FrontierVcsFile:1:scpt:system.verbs.apps.Manila.nodeTypes.types.manilaMessageReadOnly.expand ! ÇExpand a manilaMessageReadOnly nodeType. ÇInsert the text of the message into the outline. ÇChanges ÇTue, Aug 22, 2000 at 11:31:52 AM by PBS ÇCreated. Display a Manila discussion group message in-line. ÇSaturday, September 30, 2000 at 4:09:26 PM by DW ÇWhen expanding a message add the responses after the message body. Ç11/03/00; 1:11:02 AM by JES ÇIf the message contains an opml document, use that to build the outline. Ç12/31/00; 5:06:20 PM by JES ÇOn Macs, convert opml text to Mac text before converting to an outline. local (oldTarget = target.set (window.frontmost ())); local (oldDisplay = op.getDisplay ()); op.setDisplay (false); local (atts); op.attributes.getAll (@atts); local (siteUrl = atts.siteUrl); local (msgNum = atts.msgnum); local (baseDiscussUrl = atts.baseDiscussUrl); local (username, password); on createInfoCallback (adrinfo) { if manila.windowTypes.getUsernameAndPassword (adrinfo, @username, @password) { manila.windowTypes.setUsernameAndPassword (adrinfo, username, password)} else { bundle { //don't leave stale data lying around local (adrtempinfo = @system.temp.manila.data.sites.[nameOf (adrinfo^)]); if defined (adrtempinfo^) {delete (adrtempinfo)}; delete (adrinfo)}; dialog.alert ("Can't display this message for because your username and password are not set."); return (false)}}; local (adrinfo); if not manila.windowTypes.findSiteInfo (siteUrl, @adrinfo, @createInfoCallback) { return (false)}; //the user cancelled the username/password dialog if not manila.windowTypes.getUsernameAndPassword (adrinfo, @username, @password) { return (false)}; //the user cancelled the password dialog local (siteinfo = adrinfo^); siteinfo.username = username; siteinfo.password = password; local (messageTable = manila.message.get (@siteinfo, atts.msgNum)); op.deleteSubs (); local (s); local (posted = messageTable.postTime); local (author = messageTable.memberName); if author != messageTable.member { ÇJES: changed parens to carets becuase they can be pasted into email programs -- it's a sendmail standard format author = author + " <" + messageTable.member + ">"}; if system.environment.isMac { //convert author to Mac text author = string.latinToMac (author)}; if defined (messageTable.opml) { //11/01/00 JES: insert opml instead of plain outline local (localOutline); if system.environment.isMac { //12/31/00 JES: convert to Mac text op.xmlToOutline (latinToMac.convert (messageTable.opml), @localOutline)} else { op.xmlToOutline (messageTable.opml, @localOutline)}; bundle { //delete <rules> from the outline local (oldTarget = target.set (@localOutline)); op.fullExpand (); op.firstSummit (); op.go (down, infinity); op.go (right, infinity); loop { if op.getLineText () beginsWith "<rules>" { op.deleteLine (); continue}; if not op.go (flatup, 1) { break}}; try {target.set (oldTarget)}}; op.insertOutline (@localOutline, right)} else { //tabbed outline, or html text if defined (messageTable.outline) { if system.environment.isMac { s = string.latinToMac (messageTable.outline)} else { s = messageTable.outline}; local (localOutline); op.newOutlineObject (s, @localOutline); op.insertOutline (@localOutline, right)} else { s = messageTable.body; s = string.replaceAll (s, "\r\r", "\r"); //collapse blank lines s = string.replaceAll (s, "\r\n\r\n", "\r"); //collapse blank lines op.insert (s, right); op.go (left, 1)}}; bundle { //add the responses to the message local (flGoneRight = true); on addMessage (adrTable, flLastMessage=false) { local (linetext = adrTable^.subject); local (author = adrTable^.memberName); if author != adrTable^.member { author = author + " <" + adrTable^.member + ">"}; linetext = linetext + " -- " + author; if system.environment.isMac { linetext = string.latinToMac (linetext)}; local (dir = down); if not flGoneRight { dir = right; flGoneRight = true}; op.insert (linetext, dir); adrTable^.siteUrl = siteUrl; adrTable^.baseDiscussUrl = baseDiscussUrl; adrTable^.type = "manilaMessageReadOnly"; adrTable^.flLastMessage = flLastMessage; manila.nodeTypes.addSitePrefsToAtts (adrinfo, adrTable); op.attributes.addGroup (adrTable)}; local (messageHeaders = manila.message.getResponsesHeaders (@siteinfo, msgNum)); op.go (right, 1); op.go (down, infinity); local (i); for i = 1 to sizeOf (messageHeaders) { local (flLastMessage = false); if i == 1 { flLastMessage = true}; addMessage (@messageHeaders [i], flLastMessage)}; op.go (left, 1)}; op.setDisplay (oldDisplay); try {oldTarget = target.set (oldTarget)}; return (true) \ No newline at end of file --- 1,134 ---- ! FrontierVcsFile:2:scpt:system.verbs.apps.Manila.nodeTypes.types.manilaMessageReadOnly.expand ! «Changes ! «2/28/06; 12:02:46 PM by TAC ! «replace extensions.latinToMac.convert with string.latinToMac ! «2000 ! «12/31/00; 5:06:20 PM by JES ! «On Macs, convert opml text to Mac text before converting to an outline. ! «11/03/00; 1:11:02 AM by JES ! «If the message contains an opml document, use that to build the outline. ! «9/30/00; 4:09:26 PM by DW ! «When expanding a message add the responses after the message body. ! «8/22/00; 11:31:52 AM by PBS ! «Created. Display a Manila discussion group message in-line. ! «Expand a manilaMessageReadOnly nodeType. Insert the text of the message into the outline. ! ! local (oldTarget = target.set (window.frontmost ())); ! local (oldDisplay = op.getDisplay ()); ! op.setDisplay (false); ! ! local (atts); ! op.attributes.getAll (@atts); ! local (siteUrl = atts.siteUrl); ! local (msgNum = atts.msgnum); ! local (baseDiscussUrl = atts.baseDiscussUrl); ! ! local (username, password); ! on createInfoCallback (adrinfo) { ! if manila.windowTypes.getUsernameAndPassword (adrinfo, @username, @password) { ! manila.windowTypes.setUsernameAndPassword (adrinfo, username, password)} ! else { ! bundle { //don't leave stale data lying around ! local (adrtempinfo = @system.temp.manila.data.sites.[nameOf (adrinfo^)]); ! if defined (adrtempinfo^) {delete (adrtempinfo)}; ! delete (adrinfo)}; ! dialog.alert ("Can't display this message for because your username and password are not set."); ! return (false)}}; ! ! local (adrinfo); ! if not manila.windowTypes.findSiteInfo (siteUrl, @adrinfo, @createInfoCallback) { ! return (false)}; //the user cancelled the username/password dialog ! if not manila.windowTypes.getUsernameAndPassword (adrinfo, @username, @password) { ! return (false)}; //the user cancelled the password dialog ! local (siteinfo = adrinfo^); ! siteinfo.username = username; ! siteinfo.password = password; ! ! local (messageTable = manila.message.get (@siteinfo, atts.msgNum)); ! ! op.deleteSubs (); ! ! local (s); ! ! local (posted = messageTable.postTime); ! local (author = messageTable.memberName); ! if author != messageTable.member { ! «JES: changed parens to carets becuase they can be pasted into email programs -- it's a sendmail standard format ! author = author + " <" + messageTable.member + ">"}; ! if system.environment.isMac { //convert author to Mac text ! author = string.latinToMac (author)}; ! ! if defined (messageTable.opml) { //11/01/00 JES: insert opml instead of plain outline ! local (localOutline); ! if system.environment.isMac { //12/31/00 JES: convert to Mac text ! op.xmlToOutline (string.latinToMac (messageTable.opml), @localOutline)} ! else { ! op.xmlToOutline (messageTable.opml, @localOutline)}; ! bundle { //delete <rules> from the outline ! local (oldTarget = target.set (@localOutline)); ! op.fullExpand (); ! op.firstSummit (); ! op.go (down, infinity); ! op.go (right, infinity); ! loop { ! if op.getLineText () beginsWith "<rules>" { ! op.deleteLine (); ! continue}; ! if not op.go (flatup, 1) { ! break}}; ! try {target.set (oldTarget)}}; ! op.insertOutline (@localOutline, right)} ! else { //tabbed outline, or html text ! if defined (messageTable.outline) { ! if system.environment.isMac { ! s = string.latinToMac (messageTable.outline)} ! else { ! s = messageTable.outline}; ! local (localOutline); ! op.newOutlineObject (s, @localOutline); ! op.insertOutline (@localOutline, right)} ! else { ! s = messageTable.body; ! s = string.replaceAll (s, "\r\r", "\r"); //collapse blank lines ! s = string.replaceAll (s, "\r\n\r\n", "\r"); //collapse blank lines ! op.insert (s, right); ! op.go (left, 1)}}; ! ! bundle { //add the responses to the message ! local (flGoneRight = true); ! on addMessage (adrTable, flLastMessage=false) { ! local (linetext = adrTable^.subject); ! local (author = adrTable^.memberName); ! if author != adrTable^.member { ! author = author + " <" + adrTable^.member + ">"}; ! linetext = linetext + " -- " + author; ! if system.environment.isMac { ! linetext = string.latinToMac (linetext)}; ! local (dir = down); ! if not flGoneRight { ! dir = right; ! flGoneRight = true}; ! op.insert (linetext, dir); ! ! adrTable^.siteUrl = siteUrl; ! adrTable^.baseDiscussUrl = baseDiscussUrl; ! adrTable^.type = "manilaMessageReadOnly"; ! adrTable^.flLastMessage = flLastMessage; ! manila.nodeTypes.addSitePrefsToAtts (adrinfo, adrTable); ! op.attributes.addGroup (adrTable)}; ! local (messageHeaders = manila.message.getResponsesHeaders (@siteinfo, msgNum)); ! op.go (right, 1); ! op.go (down, infinity); ! local (i); ! for i = 1 to sizeOf (messageHeaders) { ! local (flLastMessage = false); ! if i == 1 { ! flLastMessage = true}; ! addMessage (@messageHeaders [i], flLastMessage)}; ! op.go (left, 1)}; ! ! op.setDisplay (oldDisplay); ! try {oldTarget = target.set (oldTarget)}; ! ! return (true) \ No newline at end of file |
|
From: Andre R. <and...@us...> - 2006-03-06 21:54:26
|
Update of /cvsroot/frontierkernel/Frontier/Common/headers In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3470/Common/headers Modified Files: langsystem7.h Log Message: Changed some #ifs into #ifdefs for better cross-compiler compatibility. Index: langsystem7.h =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/Common/headers/langsystem7.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** langsystem7.h 11 Jan 2005 22:48:01 -0000 1.2 --- langsystem7.h 6 Mar 2006 21:54:23 -0000 1.3 *************** *** 45,53 **** ! #if MACVERSION #define filespecsize(fs) (sizeof (tyfilespec) - sizeof (Str63) + stringsize ((fs).name)) #endif ! #if WIN95VERSION #define filespecsize(fs) (sizeof (tyfilespec)) // assume all data is contiguous #endif --- 45,53 ---- ! #ifdef MACVERSION #define filespecsize(fs) (sizeof (tyfilespec) - sizeof (Str63) + stringsize ((fs).name)) #endif ! #ifdef WIN95VERSION #define filespecsize(fs) (sizeof (tyfilespec)) // assume all data is contiguous #endif |
Update of /cvsroot/frontierkernel/Frontier/Common/source In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3470/Common/source Modified Files: dockmenu.c file.c langops.c menu.c shellupdate.c shellwindowverbs.c sounds.c wpengine.c Log Message: Changed some #ifs into #ifdefs for better cross-compiler compatibility. Index: shellupdate.c =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/Common/source/shellupdate.c,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** shellupdate.c 11 Jan 2005 22:48:10 -0000 1.4 --- shellupdate.c 6 Mar 2006 21:54:23 -0000 1.5 *************** *** 247,251 **** ! #if WIN95VERSION && fldebug /****** DEBUG CODE *********/ --- 247,251 ---- ! #if defined(WIN95VERSION) && fldebug /****** DEBUG CODE *********/ Index: wpengine.c =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/Common/source/wpengine.c,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** wpengine.c 8 Feb 2006 21:35:17 -0000 1.10 --- wpengine.c 6 Mar 2006 21:54:23 -0000 1.11 *************** *** 1484,1488 **** else if (flupdating) { ! #if WIN95VERSION pgInitDevice (&ws_globals, (generic_var) getcurrentDC (), MEM_NULL, &port); port.machine_ref3 = port.machine_var; // default place to get DC --- 1484,1488 ---- else if (flupdating) { ! #ifdef WIN95VERSION pgInitDevice (&ws_globals, (generic_var) getcurrentDC (), MEM_NULL, &port); port.machine_ref3 = port.machine_var; // default place to get DC *************** *** 1829,1833 **** hdlregion updatergn = nil; ! #if WIN95VERSION graf_device port; --- 1829,1833 ---- hdlregion updatergn = nil; ! #ifdef WIN95VERSION graf_device port; *************** *** 1876,1880 **** wpframedisplay (); ! #if WIN95VERSION if (updatergn != nil) pgCloseDevice (&ws_globals, &port); --- 1876,1880 ---- wpframedisplay (); ! #ifdef WIN95VERSION if (updatergn != nil) pgCloseDevice (&ws_globals, &port); Index: sounds.c =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/Common/source/sounds.c,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** sounds.c 11 Jan 2005 22:48:10 -0000 1.4 --- sounds.c 6 Mar 2006 21:54:23 -0000 1.5 *************** *** 84,88 **** boolean dosound (short duration, short amplitude, short frequency) { ! #if MACVERSION //#if TARGET_API_MAC_CARBON //sysbeep(); --- 84,88 ---- boolean dosound (short duration, short amplitude, short frequency) { ! #ifdef MACVERSION //#if TARGET_API_MAC_CARBON //sysbeep(); *************** *** 140,144 **** #endif ! #if WIN95VERSION //NOTE: Beep does not take amplitude. // Also the parameters are ignored on Windows 95/98 --- 140,144 ---- #endif ! #ifdef WIN95VERSION //NOTE: Beep does not take amplitude. // Also the parameters are ignored on Windows 95/98 *************** *** 177,181 **** boolean playnamedsound (bigstring bsname) { ! #if MACVERSION Handle hsound; --- 177,181 ---- boolean playnamedsound (bigstring bsname) { ! #ifdef MACVERSION Handle hsound; *************** *** 188,192 **** #endif ! #if WIN95VERSION char sndname[256]; copyptocstring (bsname, sndname); --- 188,192 ---- #endif ! #ifdef WIN95VERSION char sndname[256]; copyptocstring (bsname, sndname); Index: shellwindowverbs.c =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/Common/source/shellwindowverbs.c,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** shellwindowverbs.c 1 Oct 2005 17:22:48 -0000 1.5 --- shellwindowverbs.c 6 Mar 2006 21:54:23 -0000 1.6 *************** *** 408,412 **** } /*switch*/ ! #if WIN95VERSION || TARGET_API_MAC_CARBON /*8.0.3b2: Windows and OS X only. Fixes missing scrollbar on Classic.*/ shellpushglobals ((**hinfo).macwindow); --- 408,412 ---- } /*switch*/ ! #if defined(WIN95VERSION) || TARGET_API_MAC_CARBON /*8.0.3b2: Windows and OS X only. Fixes missing scrollbar on Classic.*/ shellpushglobals ((**hinfo).macwindow); Index: file.c =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/Common/source/file.c,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** file.c 11 Jan 2005 22:48:05 -0000 1.4 --- file.c 6 Mar 2006 21:54:23 -0000 1.5 *************** *** 892,896 **** boolean filegetfilename (const tyfilespec *pfs, bigstring name) { ! #if MACVERSION /* filespecs for volumes have their strings set to the empty string. --- 892,896 ---- boolean filegetfilename (const tyfilespec *pfs, bigstring name) { ! #ifdef MACVERSION /* filespecs for volumes have their strings set to the empty string. *************** *** 905,909 **** #endif ! #if WIN95VERSION lastword ((ptrstring) fsname (pfs), '\\', name); --- 905,909 ---- #endif ! #ifdef WIN95VERSION lastword ((ptrstring) fsname (pfs), '\\', name); Index: dockmenu.c =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/Common/source/dockmenu.c,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** dockmenu.c 11 Jan 2005 22:48:05 -0000 1.4 --- dockmenu.c 6 Mar 2006 21:54:23 -0000 1.5 *************** *** 53,57 **** ! #if MACVERSION UInt32 menuid; short idsubmenu; --- 53,57 ---- ! #ifdef MACVERSION UInt32 menuid; short idsubmenu; *************** *** 61,70 **** ! #if WIN95VERSION short menuid; #endif ! #if MACVERSION typedef struct typopupinfo { --- 61,70 ---- ! #ifdef WIN95VERSION short menuid; #endif ! #ifdef MACVERSION typedef struct typopupinfo { *************** *** 95,99 **** static void dockmenuresetmenustack (void) { ! #if MACVERSION dockmenudisposemenusinstack (); --- 95,99 ---- static void dockmenuresetmenustack (void) { ! #ifdef MACVERSION dockmenudisposemenusinstack (); *************** *** 115,119 **** */ ! #if MACVERSION short ix = dockmenustack.currstackitem; --- 115,119 ---- */ ! #ifdef MACVERSION short ix = dockmenustack.currstackitem; *************** *** 157,161 **** static boolean dockmenuaddtomenustack (hdlmenu hmenu, short id) { ! #if MACVERSION short ix = dockmenustack.currstackitem + 1; --- 157,161 ---- static boolean dockmenuaddtomenustack (hdlmenu hmenu, short id) { ! #ifdef MACVERSION short ix = dockmenustack.currstackitem + 1; *************** *** 185,189 **** short id = defaultpopupmenuid; ! #if MACVERSION idsubmenu++; --- 185,189 ---- short id = defaultpopupmenuid; ! #ifdef MACVERSION idsubmenu++; *************** *** 193,197 **** hsubmenu = Newmenu (id, ""); ! #if MACVERSION InsertMenu (hsubmenu, -1); #endif --- 193,197 ---- hsubmenu = Newmenu (id, ""); ! #ifdef MACVERSION InsertMenu (hsubmenu, -1); #endif *************** *** 270,274 **** dockmenuinsertsubmenu (hmenu, itemnumber, hnode); ! #if MACVERSION flstackneedsdisposing = true; #endif --- 270,274 ---- dockmenuinsertsubmenu (hmenu, itemnumber, hnode); ! #ifdef MACVERSION flstackneedsdisposing = true; #endif *************** *** 483,487 **** #endif ! #if WIN95VERSION void rundockmenu (void) { --- 483,487 ---- #endif ! #ifdef WIN95VERSION void rundockmenu (void) { Index: langops.c =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/Common/source/langops.c,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** langops.c 11 Jan 2005 22:48:07 -0000 1.4 --- langops.c 6 Mar 2006 21:54:23 -0000 1.5 *************** *** 878,882 **** } ! #if __powerc || WIN95VERSION case doublevaluetype: --- 878,882 ---- } ! #if defined(__powerc) || defined(WIN95VERSION) case doublevaluetype: Index: menu.c =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/Common/source/menu.c,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** menu.c 4 Mar 2006 22:58:40 -0000 1.8 --- menu.c 6 Mar 2006 21:54:23 -0000 1.9 *************** *** 54,58 **** ! #if WIN95VERSION extern HWND shellframewindow; --- 54,58 ---- ! #ifdef WIN95VERSION extern HWND shellframewindow; *************** *** 342,346 **** #endif ! #if WIN95VERSION releasethreadglobals (); --- 342,346 ---- #endif ! #ifdef WIN95VERSION releasethreadglobals (); *************** *** 486,490 **** #endif ! #if WIN95VERSION MENUITEMINFO info; HMENU menubar = GetMenu (shellframewindow); --- 486,490 ---- #endif ! #ifdef WIN95VERSION MENUITEMINFO info; HMENU menubar = GetMenu (shellframewindow); *************** *** 511,515 **** #endif ! #if WIN95VERSION MENUITEMINFO info; HMENU menubar = GetMenu (shellframewindow); --- 511,515 ---- #endif ! #ifdef WIN95VERSION MENUITEMINFO info; HMENU menubar = GetMenu (shellframewindow); *************** *** 558,562 **** #endif ! #if WIN95VERSION HMENU menubar = GetMenu (shellframewindow); MENUITEMINFO info; --- 558,562 ---- #endif ! #ifdef WIN95VERSION HMENU menubar = GetMenu (shellframewindow); MENUITEMINFO info; *************** *** 583,587 **** #endif ! #if WIN95VERSION HMENU menubar = GetMenu (shellframewindow); --- 583,587 ---- #endif ! #ifdef WIN95VERSION HMENU menubar = GetMenu (shellframewindow); *************** *** 595,599 **** ! #if MACVERSION && !flruntime long trackmenu (Point mousept) { --- 595,599 ---- ! #if defined(MACVERSION) && !flruntime long trackmenu (Point mousept) { *************** *** 741,745 **** #endif ! #if WIN95VERSION HMENU menubar = GetMenu (shellframewindow); --- 741,745 ---- #endif ! #ifdef WIN95VERSION HMENU menubar = GetMenu (shellframewindow); *************** *** 782,786 **** #endif ! #if WIN95VERSION if (item < 0) /*this item has been dummied out -- do nothing*/ return; --- 782,786 ---- #endif ! #ifdef WIN95VERSION if (item < 0) /*this item has been dummied out -- do nothing*/ return; *************** *** 807,811 **** #endif ! #if WIN95VERSION MENUITEMINFO info; HMENU menubar = GetMenu (shellframewindow); --- 807,811 ---- #endif ! #ifdef WIN95VERSION MENUITEMINFO info; HMENU menubar = GetMenu (shellframewindow); *************** *** 907,911 **** #endif ! #if WIN95VERSION MENUITEMINFO info; --- 907,911 ---- #endif ! #ifdef WIN95VERSION MENUITEMINFO info; *************** *** 937,941 **** #endif ! #if WIN95VERSION MENUITEMINFO info; --- 937,941 ---- #endif ! #ifdef WIN95VERSION MENUITEMINFO info; *************** *** 964,968 **** #endif ! #if WIN95VERSION MENUITEMINFO info; --- 964,968 ---- #endif ! #ifdef WIN95VERSION MENUITEMINFO info; *************** *** 992,996 **** #endif ! #if WIN95VERSION #endif --- 992,996 ---- #endif ! #ifdef WIN95VERSION #endif *************** *** 1035,1039 **** #endif ! #if WIN95VERSION hdlmenu mainmenu, hreturn; MENUITEMINFO mi; --- 1035,1039 ---- #endif ! #ifdef WIN95VERSION hdlmenu mainmenu, hreturn; MENUITEMINFO mi; *************** *** 1076,1080 **** #endif ! #if WIN95VERSION hdlmenu mainmenu, hreturn; MENUITEMINFO info; --- 1076,1080 ---- #endif ! #ifdef WIN95VERSION hdlmenu mainmenu, hreturn; MENUITEMINFO info; *************** *** 1126,1130 **** #endif ! #if WIN95VERSION MENUITEMINFO info; char item [256]; --- 1126,1130 ---- #endif ! #ifdef WIN95VERSION MENUITEMINFO info; char item [256]; *************** *** 1171,1175 **** boolean getmenuitem (hdlmenu hmenu, short ixmenu, bigstring bs) { ! #if WIN95VERSION MENUITEMINFO info; char menuname[128]; --- 1171,1175 ---- boolean getmenuitem (hdlmenu hmenu, short ixmenu, bigstring bs) { ! #ifdef WIN95VERSION MENUITEMINFO info; char menuname[128]; *************** *** 1188,1192 **** #endif ! #if WIN95VERSION info.cbSize = sizeof (info); info.fMask = MIIM_TYPE; --- 1188,1192 ---- #endif ! #ifdef WIN95VERSION info.cbSize = sizeof (info); info.fMask = MIIM_TYPE; *************** *** 1422,1426 **** #endif ! #if WIN95VERSION MENUITEMINFO info; boolean fl; --- 1422,1426 ---- #endif ! #ifdef WIN95VERSION MENUITEMINFO info; boolean fl; *************** *** 1502,1506 **** #endif ! #if WIN95VERSION boolean fl; --- 1502,1506 ---- #endif ! #ifdef WIN95VERSION boolean fl; *************** *** 1539,1543 **** #endif ! #if WIN95VERSION if (restype == 'FONT') { --- 1539,1543 ---- #endif ! #ifdef WIN95VERSION if (restype == 'FONT') { |
|
From: Andre R. <and...@us...> - 2006-03-06 21:42:21
|
Update of /cvsroot/frontierkernel/Frontier/build_VC2K3 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29874/build_VC2K3 Modified Files: .cvsignore Log Message: Ignore *.suo files. Index: .cvsignore =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/build_VC2K3/.cvsignore,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** .cvsignore 1 Apr 2005 12:04:46 -0000 1.2 --- .cvsignore 6 Mar 2006 21:42:16 -0000 1.3 *************** *** 2,5 **** --- 2,6 ---- *.opt *.ncb + *.suo release MemTrack |
|
From: Andre R. <and...@us...> - 2006-03-06 21:40:21
|
Update of /cvsroot/frontierkernel/Frontier/build_VC2K3 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28804/build_VC2K3 Removed Files: Frontier.suo Log Message: Removed Frontier.suo, redundant file. --- Frontier.suo DELETED --- |
|
From: Andre R. <and...@us...> - 2006-03-04 22:58:46
|
Update of /cvsroot/frontierkernel/Frontier/Common/source In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16470/Common/source Modified Files: filemp3.c langdll.c menu.c popup.c shellfile.c Log Message: Fixed most Visual Studio .NET 2003 compiler warnings. Index: popup.c =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/Common/source/popup.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** popup.c 11 Jan 2005 22:48:10 -0000 1.3 --- popup.c 4 Mar 2006 22:58:40 -0000 1.4 *************** *** 86,89 **** --- 86,91 ---- Point pt; + + #ifdef MACVERSION short idmenu; short iditem; *************** *** 91,94 **** --- 93,97 ---- long commandid; hdlmenu hchosenmenu; + #endif setcursortype (cursorisarrow); /*arrow cursor is more appropriate here*/ Index: langdll.c =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/Common/source/langdll.c,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** langdll.c 8 Feb 2006 19:42:22 -0000 1.7 --- langdll.c 4 Mar 2006 22:58:40 -0000 1.8 *************** *** 1100,1106 **** */ - tyfilespec fs = (**hdll).fs; - #ifdef MACVERSION short resfile; Handle hRes; --- 1100,1105 ---- */ #ifdef MACVERSION + tyfilespec fs = (**hdll).fs; short resfile; Handle hRes; *************** *** 1453,1457 **** if (stricmp (stringbaseaddress(fn), "COMDLL.DLL") == 0) { ! (**hdll).hdllsyshandle = COMStartup(); /*** FIXME: make sure we deal properly with the COM DLL ***/ return ((**hdll).hdllsyshandle != nil); --- 1452,1456 ---- if (stricmp (stringbaseaddress(fn), "COMDLL.DLL") == 0) { ! (**hdll).hdllsyshandle = (tydllsyshandle) COMStartup(); /*** FIXME: make sure we deal properly with the COM DLL ***/ return ((**hdll).hdllsyshandle != nil); *************** *** 1511,1515 **** #if (FRONTIERCOM == 1) ! if ((**hdll).hdllsyshandle == COMSYSModule()) /*** FIXME: make sure we deal properly with the COM DLL ***/ COMShutdown(); else --- 1510,1514 ---- #if (FRONTIERCOM == 1) ! if ((**hdll).hdllsyshandle == (tydllsyshandle) COMSYSModule()) /*** FIXME: make sure we deal properly with the COM DLL ***/ COMShutdown(); else Index: filemp3.c =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/Common/source/filemp3.c,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** filemp3.c 8 Feb 2006 20:31:36 -0000 1.5 --- filemp3.c 4 Mar 2006 22:58:40 -0000 1.6 *************** *** 369,373 **** ix += sizeof(long); ! if (flags & 0x00000001 == 0) //check for frame count return (false); --- 369,373 ---- ix += sizeof(long); ! if ((flags & 0x00000001) == 0) //check for frame count return (false); Index: menu.c =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/Common/source/menu.c,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** menu.c 19 Feb 2006 16:43:30 -0000 1.7 --- menu.c 4 Mar 2006 22:58:40 -0000 1.8 *************** *** 816,820 **** GetMenuItemInfo (menubar, idmenu, false, &info); ! return (info.fState | MFS_ENABLED != 0); #endif } /*getmenuitemenable*/ --- 816,820 ---- GetMenuItemInfo (menubar, idmenu, false, &info); ! return ((info.fState | MFS_ENABLED) != 0); #endif } /*getmenuitemenable*/ *************** *** 845,849 **** GetMenuItemInfo (hmenu, item - 1, true, &info); ! return (info.fState | MFS_ENABLED != 0); #endif } /*getmenuitemenable*/ --- 845,849 ---- GetMenuItemInfo (hmenu, item - 1, true, &info); ! return ((info.fState | MFS_ENABLED) != 0); #endif } /*getmenuitemenable*/ Index: shellfile.c =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/Common/source/shellfile.c,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** shellfile.c 7 Oct 2005 04:07:42 -0000 1.7 --- shellfile.c 4 Mar 2006 22:58:40 -0000 1.8 *************** *** 150,155 **** OSType filetype; tyfindvisitinfo info; bigstring bsext; ! if (wnew != nil) *wnew = nil; --- 150,157 ---- OSType filetype; tyfindvisitinfo info; + #ifdef MACVERSION bigstring bsext; ! #endif ! if (wnew != nil) *wnew = nil; *************** *** 170,180 **** return (false); ! #ifdef MACVERSION ! ! lastword (fspec->name, '.', bsext); ! if (equalidentifiers (bsext, "\proot")) ! filetype = 'TABL'; ! #endif if (!shellpushdefaultglobals ()) --- 172,182 ---- return (false); ! #ifdef MACVERSION ! lastword (fspec->name, '.', bsext); ! ! if (equalidentifiers (bsext, "\proot")) ! filetype = 'TABL'; ! #endif if (!shellpushdefaultglobals ()) |
|
From: Andre R. <and...@us...> - 2006-03-04 22:58:44
|
Update of /cvsroot/frontierkernel/Frontier/Common/headers In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16470/Common/headers Modified Files: WinLand.h frontier.h Log Message: Fixed most Visual Studio .NET 2003 compiler warnings. Index: WinLand.h =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/Common/headers/WinLand.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** WinLand.h 11 Jan 2005 22:48:00 -0000 1.3 --- WinLand.h 4 Mar 2006 22:58:39 -0000 1.4 *************** *** 21,25 **** //#define GET_WM_COMMAND_MPS(id, hwnd, cmd) (UINT)MAKELONG(id, cmd), (LONG)(hwnd) //#define GET_EM_SETSEL_MPS(iStart, iEnd) (UINT)(iStart), (LONG)(iEnd) ! #define GET_WM_MDIACTIVATE_FACTIVATE(hwnd, wp, lp) (lp == (LONG)hwnd) #else #define GET_EM_SETSEL_MPS(iStart, iEnd) 0, MAKELONG(iStart, iEnd) --- 21,25 ---- //#define GET_WM_COMMAND_MPS(id, hwnd, cmd) (UINT)MAKELONG(id, cmd), (LONG)(hwnd) //#define GET_EM_SETSEL_MPS(iStart, iEnd) (UINT)(iStart), (LONG)(iEnd) ! //#define GET_WM_MDIACTIVATE_FACTIVATE(hwnd, wp, lp) (lp == (LONG)hwnd) #else #define GET_EM_SETSEL_MPS(iStart, iEnd) 0, MAKELONG(iStart, iEnd) Index: frontier.h =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/Common/headers/frontier.h,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** frontier.h 11 Jan 2005 22:48:01 -0000 1.5 --- frontier.h 4 Mar 2006 22:58:39 -0000 1.6 *************** *** 28,31 **** --- 28,34 ---- /* 2004-10-23 aradke: New global header file, to be included from all source files. + + 2006-03-04 aradke: disable MS Visual C++ warning about unknown pragmas + so it won't complain about "#pragma unused(foo)" */ *************** *** 40,45 **** #ifdef WIN95VERSION ! #ifndef __MWERKS__ ! #pragma warning (disable: 4244 4761; error: 4013) #endif #endif /* WIN95VERSION */ --- 43,55 ---- #ifdef WIN95VERSION ! #if (defined(_MSC_VER) && !defined(__MWERKS__)) ! /* ! 2006-03-04 aradke: Key to MS Visual C++ warning numbers ! 4244: conversion from [e.g.] 'long' to 'short', possible loss of data ! 4761: integral size mismatch in argument; conversion supplied ! 4068: unknown pragma ! 4013: 'fooBarFunction' undefined; assuming extern returning int ! */ ! #pragma warning (disable: 4244 4761 4068; error: 4013) #endif #endif /* WIN95VERSION */ |
|
From: Andre R. <and...@us...> - 2006-03-04 22:58:44
|
Update of /cvsroot/frontierkernel/Frontier/Common/Paige/headers In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16470/Common/Paige/headers Modified Files: CPUDEFS.H PGTRAPS.H Log Message: Fixed most Visual Studio .NET 2003 compiler warnings. Index: CPUDEFS.H =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/Common/Paige/headers/CPUDEFS.H,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** CPUDEFS.H 6 Feb 2006 11:24:38 -0000 1.6 --- CPUDEFS.H 4 Mar 2006 22:58:37 -0000 1.7 *************** *** 236,240 **** #define NO_OS_INLINE #endif ! #define STRICT #include <windows.h> #ifdef WIN32_COMPILE --- 236,244 ---- #define NO_OS_INLINE #endif ! #ifndef NO_STRICT ! #ifndef STRICT ! #define STRICT 1 ! #endif ! #endif #include <windows.h> #ifdef WIN32_COMPILE Index: PGTRAPS.H =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/Common/Paige/headers/PGTRAPS.H,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** PGTRAPS.H 6 Feb 2006 11:23:26 -0000 1.6 --- PGTRAPS.H 4 Mar 2006 22:58:37 -0000 1.7 *************** *** 200,204 **** #ifdef WIN32_COMPILE ! #define STRICT #endif #include <WINDOWS.H> --- 200,208 ---- #ifdef WIN32_COMPILE ! #ifndef NO_STRICT ! #ifndef STRICT ! #define STRICT 1 ! #endif ! #endif #endif #include <WINDOWS.H> |
|
From: Andre R. <and...@us...> - 2006-03-04 16:34:49
|
Update of /cvsroot/frontierkernel/Frontier/Common/stubs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22393 Modified Files: megastubs.c Log Message: Pick up application name for dialog title bar from versions.h. Index: megastubs.c =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/Common/stubs/megastubs.c,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** megastubs.c 5 Feb 2006 16:53:19 -0000 1.6 --- megastubs.c 4 Mar 2006 16:34:45 -0000 1.7 *************** *** 29,32 **** --- 29,33 ---- #include "standard.h" + #include "versions.h" /* 2006-03-04 aradke: for APPNAME */ #include "error.h" #include "font.h" *************** *** 690,702 **** } /*centerdialog*/ ! #ifdef PIKE /*7.0d8 PBS*/ ! #ifndef OPMLEDITOR ! static char frontierstring [] = "Radio UserLand"; ! #else //OPMLEDITOR ! static char frontierstring [] = "OPML"; ! #endif // OPMLEDITOR ! #else ! static char frontierstring [] = "UserLand Frontier"; ! #endif static messagebox (LPCTSTR lpText, LPCTSTR lpCaption, UINT uType) { --- 691,707 ---- } /*centerdialog*/ ! ! //#ifdef PIKE /*7.0d8 PBS*/ ! //#ifndef OPMLEDITOR ! // static char frontierstring [] = "Radio UserLand"; ! //#else //OPMLEDITOR ! // static char frontierstring [] = "OPML"; ! //#endif // OPMLEDITOR ! //#else ! // static char frontierstring [] = "UserLand Frontier"; ! //#endif ! ! static char frontierstring [] = APPNAME; /* 2006-03-04 aradke: from versions.h */ ! static messagebox (LPCTSTR lpText, LPCTSTR lpCaption, UINT uType) { |
|
From: Andre R. <and...@us...> - 2006-03-03 21:19:23
|
Update of /cvsroot/frontierkernel/Frontier/Common/source In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23101/Common/source Modified Files: opxml.c opverbs.c Log Message: Fixed data loss when making a copy of or converting a hoisted outlines to OPML. Index: opverbs.c =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/Common/source/opverbs.c,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** opverbs.c 14 Jan 2005 22:15:52 -0000 1.6 --- opverbs.c 3 Mar 2006 21:19:19 -0000 1.7 *************** *** 1099,1102 **** --- 1099,1108 ---- 5.1.5b9 dmb: preserve barcursor in copied outline + + 2006-03-03 aradke: if the source outline is hoisted, temporarily unhoist it + in order to copy all lines. this fixes data loss when making an in-memory + copy of an outline and it restores pre-5.0.2b12 behavior. until then, + obverbcopyvalue used pack/unpack to make a copy which preserves hoisted lines. + http://sourceforge.net/tracker/index.php?func=detail&aid=1259245&group_id=120666&atid=687798 */ *************** *** 1124,1131 **** --- 1130,1140 ---- register hdloutlinerecord hsource = (hdloutlinerecord) hdata; long lnumcursor; + boolean flpoppedhoists; oppushoutline (hsource); opwriteeditbuffer (); + + flpoppedhoists = oppopallhoists (); /*2006-03-03 aradke: temporarily unhoist before getting cursor position*/ opgetnodeline ((**hsource).hbarcursor, &lnumcursor); *************** *** 1159,1162 **** --- 1168,1180 ---- oppopoutline (); + + if (flpoppedhoists) { /*2006-03-03 aradke*/ + + oppushoutline (hsource); + + oprestorehoists (); + + oppopoutline (); + } } Index: opxml.c =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/Common/source/opxml.c,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** opxml.c 27 Feb 2006 21:46:29 -0000 1.5 --- opxml.c 3 Mar 2006 21:19:19 -0000 1.6 *************** *** 953,961 **** 7.0b21 PBS: Build the <body> section. - - 7.0b30 PBS: don't save children of dynamic headlines. */ boolean fl = false; --- 953,963 ---- 7.0b21 PBS: Build the <body> section. 7.0b30 PBS: don't save children of dynamic headlines. + + 2006-02-27 aradke: de-hoist outline before collecting body text to capture all nodes, avoids data loss + http://sourceforge.net/tracker/index.php?func=detail&aid=1259245&group_id=120666&atid=687798 */ + boolean flpoppedhoists; boolean fl = false; *************** *** 967,973 **** --- 969,980 ---- oppushoutline (ho); + flpoppedhoists = oppopallhoists (); /*2006-02-27 aradke: needs outline pushed*/ + if (!opxmlvisitnondynamicnodes (&opxmlbodyvisit, htext)) /*visit every headline, top to bottom, calling opxmlbodyvisit on each*/ goto exit; + if (flpoppedhoists) /*2006-02-27 aradke*/ + oprestorehoists (); + oppopoutline (); |
|
From: creecode <icr...@us...> - 2006-03-03 19:45:13
|
Update of /cvsroot/frontierkernel/odbs/mainResponderRoot/mainResponder In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19351 Modified Files: init Log Message: when installing admin site pathEvaluation and afterInstallPart.mainResponder callbacks; add as string, partial address support Index: init =================================================================== RCS file: /cvsroot/frontierkernel/odbs/mainResponderRoot/mainResponder/init,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** init 10 Feb 2006 03:20:45 -0000 1.10 --- init 3 Mar 2006 19:45:07 -0000 1.11 *************** *** 1,3 **** ! FrontierVcsFile:1:scpt:mainResponder.init ! on init () { ÇChanges Ç2/9/06; 2:21:48 PM by TAC Çdon't add any data to domains table at this time Ç2/8/06; 11:07:06 AM by TAC Çadded mainResponderWebsites.root to nightly updates Çdefault website is sampleMrWs Çtweaked script formatting Ç2005 Ç12/21/05; 1:43:35 PM by TAC Çadded init for config.mainresponder.sites Ç9/7/05; 10:53:18 PM by TAC Çchanged userlandIcons to frontierIcons Çchanged /mainResponderResources/ to /resources/ Ç8/6/05; 10:30:54 AM by TAC Çpartial path support for config.mainresponder.prefs.logFolder; config.mainresponder.prefs.discussArchiveFolder; config.mainresponder.prefs.backupFolder, more portable Ç6/19/05; 10:47:10 AM by TAC Çchanged localhost value to 127.0.0.1 Çadded config.mainResponder.callbacks.subscriptionsServer Çadded config.mainresponder.prefs.legalMacros Çadded config.mainresponder.prefs.baseUrl for adminSite setupFrontier Ç6/16/05; 1:52:08 PM by TAC Çremoved manila.root from nightly root update init Ç3/10/03; 5:53:51 PM by JES ÇMake sure that system.environment.isRadio is defined (and false). Ç3/4/03; 3:19:15 PM by JES ÇReturn @config.mainResponder. Ç2002 Ç9/3/02; 1:26:05 AM by JES ÇFixed a bonehead bug -- we were calling user.rootUpdates.init to initialize the user.rootUpdates.callbacks table. We should have called rootUpdates.init instead. Ç8/28/02; 11:18:11 PM by JES ÇRegister admin site callbacks, and config.mainResponder.prefs.flLogRootUpdates. Ç8/20/02; 12:38:52 AM by JES ÇIf the port 5335 listen configured at user.inetd.config.http2 is not installed, install it, based on the default http listen. Ç8/18/02; 5:21:19 PM by JES ÇInstall the admin site pathEvaluation callback at config.mainresponder.callbacks.pathEvaluation.frontierAdminSite. Ç8/1/02; 6:59:56 PM by JES ÇInitialize new search engine prefs at config.mainResponder.search.prefs. No longer create config.mainresponder.data.searchQueue. Ç06/22/00; 3:57:55 PM by PBS ÇSet hashed cookies to true by default. Ç06/17/00; 5:29:29 PM by PBS ÇNow false by default: flKeepParamTable, flLog, flDiscussStatsNightly Ç1999 Ç12/11/1999 at 5:29:32 AM by AR ÇCommented out the code for hooking into the scheduler. This is now handled in mainResponder.startup. Ç11/23/99; 4:10:06 PM by PBS ÇBackups and discuss archiving now false by default. Ç11/20/99; 4:29:29 PM by PBS ÇChanged some defaults. Discuss archiving is true by default. Nightly updates are on by default; the default nightly update list contains Frontier, mainResponder, manila, and prefs.root. Save databases every minute is true by default. Logging database opens to the temp table is now false by default. Ç11/16/99; 11:48:17 PM by PBS ÇSet up prefs for flUpdateNightly, updateNightlyList, and securityLevel. The first two are prefs for automated nightly updates, the third is the security level for the Control Panel. Ç10/25/99; 4:04:59 PM by PBS Çconfig.mainResponder.prefs.flControlPanel: if true, then the /controlPanel/ system website can be accessed. It's true by default. Ç8/15/99; 9:53:42 AM by DW Çconfig.mainresponder.prefs.flLogReopenHourly, if true, we close the log file every hour. It will be re-opened by the next log.add call. In our work with the 6.1 kernel, we've determined that for busy servers this helps Frontier's memory utilization significantly, and the cost of re-opening the file once an hour is relatively small. Ç8/15/99; 9:34:07 AM by DW ÇMake sure that scheduler tasks are installed. This is also handled in mainResponder.install, but I don't want to ask people to run this script to go to 6.1, so we check to see if they're defined and if they're not we link them in. Ç8/15/99; 8:26:14 AM by DW Çinitialize config.mainresponder.prefs.flArchiveDiscuss and discussArchiveFolder. ÇWed, Mar 10, 1999 at 2:34:19 PM by PBS ÇInitialize config.mainResponder.data. ÇInitialize config.mainResponder.data.searchQueue. ÇWed, Mar 10, 1999 at 2:19:48 PM by PBS ÇInitialize the config.mainresponder.search table. ÇSet config.mainResponder.prefs.flSearchEngine to false by default. ÇThis means that this machine is not, by default, a search engine server. ÇSet config.mainResponder.prefs.flLogMemAvail to false by default. ÇTue, Mar 9, 1999 at 4:12:13 PM by PBS ÇUse Frontier.getSubFolder rather than mainResponder.getFolder. ÇSat, Mar 20, 1999 at 4:48:37 PM by PBS ÇAdded flConvertToMacText pref. ÇOn Macs, convert incoming latin text to Mac. ÇOn Windows the pref has no effect. ÇInitialize mainResponder local (ps = string.popTrailing (system.verbs.builtins.Frontier.pathstring, file.getPathChar ())); // path string minus the trailing path character on sureTable (adrtable) { if not defined (adrtable^) { new (tabletype, adrtable)}}; sureTable (@config.mainresponder); bundle { //config.mainresponder.prefs sureTable (@config.mainresponder.prefs); if not defined (config.mainresponder.prefs.baseUrl) { config.mainresponder.prefs.baseUrl = "http://127.0.0.1/"}; if not defined (config.mainresponder.prefs.backupFolder) { config.mainresponder.prefs.backupFolder = Frontier.getSubFolder ("/ops/backups/") - ps}; // 8/6/05; 10:30:54 AM by TAC if not defined (config.mainresponder.prefs.defaultDiscussRoot) { config.mainresponder.prefs.defaultDiscussRoot = "discuss"}; if not defined (config.mainresponder.prefs.defaultNewsRoot) { config.mainresponder.prefs.defaultNewsRoot = "default"}; if not defined (config.mainresponder.prefs.flAllowPublicSearchSubmissions) { //PBS 3/9/99 config.mainresponder.prefs.flAllowPublicSearchSubmissions = false}; if not defined (config.mainresponder.prefs.flBackupNightly) { config.mainresponder.prefs.flBackupNightly = false}; //PBS 11/23/99: now false by default if not defined (config.mainresponder.prefs.flDiscussStatsNightly) { Çconfig.mainresponder.prefs.flDiscussStatsNightly = true config.mainresponder.prefs.flDiscussStatsNightly = false}; //PBS 06/17/00: Now false by default for 6.2. if not defined (config.mainresponder.prefs.flArchiveDiscuss) { config.mainresponder.prefs.flArchiveDiscuss = false}; //PBS 11/23/99: now false by default if not defined (config.mainresponder.prefs.discussArchiveFolder) { config.mainresponder.prefs.discussArchiveFolder = Frontier.getSubFolder ("/ops/discussArchive/") - ps}; // 8/6/05; 10:30:54 AM by TAC if not defined (config.mainresponder.prefs.flControlPanel) { //PBS 10/25/99: pref for the /controlPanel/ site config.mainresponder.prefs.flControlPanel = true}; if not defined (config.mainresponder.prefs.flDebug) { config.mainresponder.prefs.flDebug = false}; if not defined (config.mainresponder.prefs.flKeepParamTable) { Çconfig.mainresponder.prefs.flKeepParamTable = true config.mainresponder.prefs.flKeepParamTable = false}; //PBS 06/17/00: Now false by default in 6.2. if not defined (config.mainresponder.prefs.flLog) { Çconfig.mainresponder.prefs.flLog = true config.mainresponder.prefs.flLog = false}; //PBS 06/17/00: HTTP logging now off by default in 6.2. if not defined (config.mainresponder.prefs.flLogMemavail) { config.mainresponder.prefs.flLogMemavail = false}; if not defined (config.mainresponder.prefs.flLogDatabaseOpens) { config.mainresponder.prefs.flLogDatabaseOpens = false}; //PBS 11/20/99: now false by default, no to logging database opens to the temp table if not defined (config.mainresponder.prefs.flLogReopenHourly) { config.mainresponder.prefs.flLogReopenHourly = false}; if not defined (config.mainresponder.prefs.flOpenAboutWindow) { config.mainresponder.prefs.flOpenAboutWindow = true}; if not defined (config.mainresponder.prefs.flBuildPagesInBackground) { config.mainresponder.prefs.flBuildPagesInBackground = false}; //PBS 11/20/99: now false by default, no to building pages in the background if not defined (config.mainresponder.prefs.flProfiling) { config.mainresponder.prefs.flProfiling = false}; if not defined (config.mainresponder.prefs.flSaveDatabasesEveryMinute) { config.mainresponder.prefs.flSaveDatabasesEveryMinute = true}; //PBS 11/20/99: save databases every minute is now true by default if not defined (config.mainResponder.prefs.flMembershipHashedCookies) { //PBS 06/22/00: true by default config.mainResponder.prefs.flMembershipHashedCookies = true}; if not defined (config.mainresponder.prefs.flSearchEngine) { config.mainresponder.prefs.flSearchEngine = false}; if not defined (config.mainresponder.prefs.flStats) { config.mainresponder.prefs.flStats = true}; if not defined (config.mainresponder.prefs.flSubscriptions) { config.mainresponder.prefs.flSubscriptions = false}; if not defined (config.mainresponder.prefs.hitsBetweenLogSaves) { config.mainresponder.prefs.hitsBetweenLogSaves = 100}; if not defined (config.mainresponder.prefs.flConvertToMacText) { //PBS 3/20/99 config.mainresponder.prefs.flConvertToMacText = true}; if not defined (config.mainresponder.prefs.logFolder) { config.mainresponder.prefs.logFolder = Frontier.getSubFolder ("/ops/logs/") - ps}; // 8/6/05; 10:30:54 AM by TAC if not defined (config.mainresponder.prefs.legalMacros) { new (tabletype, @config.mainresponder.prefs.legalMacros)}; if not defined (config.mainresponder.prefs.legalTags) { new (tabletype, @config.mainresponder.prefs.legalTags); config.mainresponder.prefs.legalTags.i = true; config.mainresponder.prefs.legalTags.pre = true}; if not defined (config.mainresponder.prefs.flAllowByIpOnly) { //AR 11/04/1999 config.mainresponder.prefs.flAllowByIpOnly = false}; if not defined (config.mainresponder.prefs.allowedIpAddresses) { //AR 11/04/1999 config.mainresponder.prefs.allowedIpAddresses = "127.0.0.1"}; if not defined (config.mainResponder.prefs.flUpdateNightly) { //PBS 11/16/99: update various gdbs every night config.mainResponder.prefs.flUpdateNightly = true}; //PBS 11/20/99: nightly updates now true by default if not defined (config.mainResponder.prefs.updateNightlyList) { //PBS 11/16/99: list of gdbs to update nightly config.mainResponder.prefs.updateNightlyList = {"Frontier.root", "mainResponder.root", "prefs.root", "mainResponderWebsites.root"}}; if not defined (config.mainResponder.prefs.securityLevel) { //PBS 11/16/99: set up security level pref config.mainResponder.prefs.securityLevel = 0}; if not defined (config.mainResponder.prefs.flLogRootUpdates) { config.mainResponder.prefs.flLogRootUpdates = true}}; bundle { //config.mainresponder.urls local (localhost = "127.0.0.1"); sureTable (@config.mainresponder.urls); bundle { //discuss urls local (basediscussurl = "http://" + localhost + "/htmlInterfaces/discussionGroup/"); if not defined (config.mainResponder.urls.discussEditInBrowser) { config.mainResponder.urls.discussEditInBrowser = basediscussurl + "edit/editInBrowser$"}; if not defined (config.mainResponder.urls.discussEditInFrontier) { config.mainResponder.urls.discussEditInFrontier = basediscussurl + "edit/editInFrontier$"}; if not defined (config.mainResponder.urls.discussEnclosureDownloader) { config.mainResponder.urls.discussEnclosureDownloader = basediscussurl + "enclosureDownloader$"}; if not defined (config.mainResponder.urls.discussEnclosureRPCer) { config.mainResponder.urls.discussEnclosureRPCer = basediscussurl + "enclosureRPCer$"}; if not defined (config.mainResponder.urls.discussEnclosureViewer) { config.mainResponder.urls.discussEnclosureViewer = basediscussurl + "raw/messages/"}; if not defined (config.mainResponder.urls.discussGetChangesFromWorkstation) { config.mainResponder.urls.discussGetChangesFromWorkstation = basediscussurl + "edit/getChangesFromWorkstation"}; if not defined (config.mainResponder.urls.discussHomePage) { config.mainResponder.urls.discussHomePage = basediscussurl}; if not defined (config.mainResponder.urls.discussMsgReader) { config.mainResponder.urls.discussMsgReader = basediscussurl + "msgReader$"}; if not defined (config.mainResponder.urls.discussNewThread) { config.mainResponder.urls.discussNewThread = basediscussurl + "edit/newThread$"}; if not defined (config.mainResponder.urls.discussPostEditedMessage) { config.mainResponder.urls.discussPostEditedMessage = basediscussurl + "edit/postEditedMsg"}; if not defined (config.mainResponder.urls.discussPostMessage) { config.mainResponder.urls.discussPostMessage = basediscussurl + "edit/postMsg"}; if not defined (config.mainResponder.urls.discussTopics) { config.mainResponder.urls.discussTopics = basediscussurl + "topics"}}; bundle { //resources urls local (baseresourcesurl = "http://" + localhost + "/resources/"); if not defined (config.mainresponder.urls.frontierLogo) { config.mainresponder.urls.frontierLogo = baseresourcesurl + "logos/logoWinNT.gif"}; if not defined (config.mainresponder.urls.icons) { config.mainresponder.urls.icons = baseresourcesurl + "icons/"}; if not defined (config.mainresponder.urls.imageCowSkull) { config.mainresponder.urls.imageCowSkull = baseresourcesurl + "frontierIcons/skull"}}; bundle { //member urls local (basememberurl = "http://" + localhost + "/htmlInterfaces/logon/"); if not defined (config.mainResponder.urls.memberCheckMail) { config.mainResponder.urls.memberCheckMail = basememberurl + "checkYourMail"}; if not defined (config.mainResponder.urls.memberHome) { config.mainResponder.urls.memberHome = basememberurl + "welcome"}; if not defined (config.mainResponder.urls.memberLogoff) { config.mainResponder.urls.memberLogoff = basememberurl + "logoffConfirm"}; if not defined (config.mainResponder.urls.memberLogon) { config.mainResponder.urls.memberLogon = basememberurl}}; bundle { //misc urls if not defined (config.mainResponder.urls.newsHome) { config.mainResponder.urls.newsHome = "http://" + localhost + "/"}; if not defined (config.mainResponder.urls.searchHome) { config.mainResponder.urls.searchHome = "http://" + localhost + "/search/"}; local (basepeopleurl = "http://" + localhost + "/htmlInterfaces/people/"); if not defined (config.mainResponder.urls.prefsHome) { config.mainResponder.urls.prefsHome = basepeopleurl + "prefs/"}; if not defined (config.mainResponder.urls.profilesHome) { config.mainResponder.urls.profilesHome = basepeopleurl + "profiles/"}}}; bundle { //config.mainresponder.callbacks sureTable (@config.mainresponder.callbacks); sureTable (@config.mainresponder.callbacks.addMessage); sureTable (@config.mainresponder.callbacks.controlAccess); sureTable (@config.mainresponder.callbacks.editMessage); sureTable (@config.mainresponder.callbacks.lightweightMacros); sureTable (@config.mainresponder.callbacks.nightlyBackup); sureTable (@config.mainResponder.callbacks.searchEngineSecurity); //PBS 3/9/99 sureTable (@config.mainResponder.callbacks.subscriptionsServer); ÇAdd search engine callbacks. if not defined (config.mainResponder.callbacks.addMessage.index) { script.newScriptObject ("mainResponder.search.client.addMessageCallback (adrNewMsg)", @config.mainResponder.callbacks.addMessage.index); script.compile (@config.mainResponder.callbacks.addMessage.index)}; if not defined (config.mainResponder.callbacks.editMessage.index) { script.newScriptObject ("mainResponder.search.client.addMessageCallback (adrEditedMsg)", @config.mainResponder.callbacks.editMessage.index); script.compile (@config.mainResponder.callbacks.editMessage.index)}; ÇAdd security callback if not defined (config.mainResponder.callbacks.controlAccess.blockByIP) { //AR 11/04/1999 script.newScriptObject ("mainResponder.security.blockHttpByIP ()", @config.mainResponder.callbacks.controlAccess.blockByIP)}; ÇAdd pathEvaluation callback for the Admin site if not defined (config.mainresponder.callbacks.pathEvaluation) { //JES 8/18/02 new (tableType, @config.mainresponder.callbacks.pathEvaluation)}; if not defined (config.mainresponder.callbacks.pathEvaluation.frontierAdminSite) { //JES 8/18/02 config.mainresponder.callbacks.pathEvaluation.frontierAdminSite = @mainResponder.adminSite.callbacks.pathEvaluation}}; bundle { //config.mainresponder.data sureTable (@config.mainresponder.data)}; ÇsureTable (@config.mainresponder.data.searchQueue) bundle { // config.mainresponder.domains sureTable (@config.mainresponder.domains); }; Çif sizeOf (config.mainresponder.domains) == 0 Çconfig.mainresponder.domains.default = Frontier.getSubFolder ("/www/") bundle { //config.mainresponder.globals sureTable (@config.mainresponder.globals); if not defined (config.mainresponder.globals.allowDirectoryListings) { //PBS 11/19/99: default is now false config.mainresponder.globals.allowDirectoryListings = false}; if not defined (config.mainresponder.globals.allowScriptListings) { config.mainresponder.globals.allowScriptListings = false}; if not defined (config.mainresponder.globals.allowScriptsToRun) { config.mainresponder.globals.allowScriptsToRun = false}; if not defined (config.mainresponder.globals.defaultDirectoryItems) { config.mainresponder.globals.defaultDirectoryItems = {"default.html", "default", "index.html", "index"}}; if not defined (config.mainresponder.globals.defaultMembershipGroup) { config.mainresponder.globals.defaultMembershipGroup = "default"}; if not defined (config.mainresponder.globals.flRender) { config.mainresponder.globals.flRender = false}; if not defined (config.mainresponder.globals.flRenderingCache) { config.mainresponder.globals.flRenderingCache = false}}; bundle { //config.mainresponder.search sureTable (@config.mainresponder.search); if not defined (config.mainresponder.search.domain) { config.mainresponder.search.domain = "127.0.0.1"}; if not defined (config.mainresponder.search.port) { config.mainresponder.search.port = 80}; if not defined (config.mainresponder.search.addToIndex) { config.mainresponder.search.addToIndex = "mainResponder.search.index"}; if not defined (config.mainresponder.search.restartIndex) { config.mainresponder.search.restartIndex = "mainResponder.search.restartIndex"}; if not defined (config.mainresponder.search.sites) { sureTable (@config.mainresponder.search.sites)}; if not defined (config.mainResponder.search.prefs) { new (tableType, @config.mainResponder.search.prefs)}; if not defined (config.mainResponder.search.prefs.flLogEnabled) { config.mainResponder.search.prefs.flLogEnabled = false}; if not defined (config.mainResponder.search.prefs.flLogSearches) { config.mainResponder.search.prefs.flLogSearches = true}; if not defined (config.mainResponder.search.prefs.flLogIndex) { config.mainResponder.search.prefs.flLogIndex = true}; if not defined (config.mainResponder.search.prefs.flLogNoIndex) { config.mainResponder.search.prefs.flLogNoIndex = true}; if not defined (config.mainResponder.search.prefs.flStoreFullText) { config.mainResponder.search.prefs.flStoreFullText = false}; if not defined (config.mainResponder.search.prefs.minutesBetweenIndexes) { config.mainResponder.search.prefs.minutesBetweenIndexes = 60}; if not defined (config.mainResponder.search.prefs.hoursToCacheSearchResults) { config.mainResponder.search.prefs.hoursToCacheSearchResults = 24}}; bundle { //config.mainresponder.stats if not defined (config.mainResponder.stats) { new (tabletype, @config.mainResponder.stats)}; if not defined (config.mainResponder.stats.ctDiscussionGroupReads) { config.mainResponder.stats.ctDiscussionGroupReads = 0}}; bundle { // config.mainresponder.sites sureTable (@config.mainresponder.sites); if not (defined (config.mainresponder.sites.resources)) { config.mainresponder.sites.resources = @mainResponder.resources}}; bundle { // port 5336 listener if not defined (user.inetd.config.http2) { user.inetd.config.http2 = user.inetd.config.http; user.inetd.config.http2.port = 5336; if user.inetd.config.http2.startup { try { inetd.startOne (@user.inetd.config.http2)}}}}; try { //register admin site callbacks if not defined (user.rootUpdates.callbacks) { rootUpdates.init ()}; if not defined (user.rootUpdates.callbacks.afterInstallPart.mainResponder) { user.rootUpdates.callbacks.afterInstallPart.mainResponder = @mainResponder.adminSite.callbacks.logRootUpdate}}; bundle { //miscellaneous clean-up if not defined (system.environment.isRadio) { system.environment.isRadio = false}}; Çbundle //hook in to user.scheduler Çif not defined (user.scheduler.everyMinute.nirvanaServer) Çuser.scheduler.everyMinute.nirvanaServer = @mainresponder.background.everyminute Çif not defined (user.scheduler.hourly.nirvanaServer) Çuser.scheduler.hourly.nirvanaServer = @mainresponder.background.everyHour Çif not defined (user.scheduler.overnight.nirvanaServer) Çuser.scheduler.overnight.nirvanaServer = @mainresponder.background.everynight return (@config.mainResponder)}; Çbundle // testing Çlocal (ticks = clock.ticks ()) Çfor i = 1 to 100 Çinit () Çdialog.notify ((double (clock.ticks ()) - ticks) / 60 + " secs.") \ No newline at end of file --- 1,351 ---- ! FrontierVcsFile:2:scpt:mainResponder.init ! on init () { ! «Changes ! «3/1/06; 9:40:40 AM by TAC ! «when installing admin site pathEvaluation and afterInstallPart.mainResponder callbacks; add as string, partial address support ! «2/9/06; 2:21:48 PM by TAC ! «don't add any data to domains table at this time ! «2/8/06; 11:07:06 AM by TAC ! «added mainResponderWebsites.root to nightly updates ! «default website is sampleMrWs ! «tweaked script formatting ! «2005 ! «12/21/05; 1:43:35 PM by TAC ! «added init for config.mainresponder.sites ! «9/7/05; 10:53:18 PM by TAC ! «changed userlandIcons to frontierIcons ! «changed /mainResponderResources/ to /resources/ ! «8/6/05; 10:30:54 AM by TAC ! «partial path support for config.mainresponder.prefs.logFolder; config.mainresponder.prefs.discussArchiveFolder; config.mainresponder.prefs.backupFolder, more portable ! «6/19/05; 10:47:10 AM by TAC ! «changed localhost value to 127.0.0.1 ! «added config.mainResponder.callbacks.subscriptionsServer ! «added config.mainresponder.prefs.legalMacros ! «added config.mainresponder.prefs.baseUrl for adminSite setupFrontier ! «6/16/05; 1:52:08 PM by TAC ! «removed manila.root from nightly root update init ! «3/10/03; 5:53:51 PM by JES ! «Make sure that system.environment.isRadio is defined (and false). ! «3/4/03; 3:19:15 PM by JES ! «Return @config.mainResponder. ! «2002 ! «9/3/02; 1:26:05 AM by JES ! «Fixed a bonehead bug -- we were calling user.rootUpdates.init to initialize the user.rootUpdates.callbacks table. We should have called rootUpdates.init instead. ! «8/28/02; 11:18:11 PM by JES ! «Register admin site callbacks, and config.mainResponder.prefs.flLogRootUpdates. ! «8/20/02; 12:38:52 AM by JES ! «If the port 5335 listen configured at user.inetd.config.http2 is not installed, install it, based on the default http listen. ! «8/18/02; 5:21:19 PM by JES ! «Install the admin site pathEvaluation callback at config.mainresponder.callbacks.pathEvaluation.frontierAdminSite. ! «8/1/02; 6:59:56 PM by JES ! «Initialize new search engine prefs at config.mainResponder.search.prefs. No longer create config.mainresponder.data.searchQueue. ! «06/22/00; 3:57:55 PM by PBS ! «Set hashed cookies to true by default. ! «06/17/00; 5:29:29 PM by PBS ! «Now false by default: flKeepParamTable, flLog, flDiscussStatsNightly ! «1999 ! «12/11/1999 at 5:29:32 AM by AR ! «Commented out the code for hooking into the scheduler. This is now handled in mainResponder.startup. ! «11/23/99; 4:10:06 PM by PBS ! «Backups and discuss archiving now false by default. ! «11/20/99; 4:29:29 PM by PBS ! «Changed some defaults. Discuss archiving is true by default. Nightly updates are on by default; the default nightly update list contains Frontier, mainResponder, manila, and prefs.root. Save databases every minute is true by default. Logging database opens to the temp table is now false by default. ! «11/16/99; 11:48:17 PM by PBS ! «Set up prefs for flUpdateNightly, updateNightlyList, and securityLevel. The first two are prefs for automated nightly updates, the third is the security level for the Control Panel. ! «10/25/99; 4:04:59 PM by PBS ! «config.mainResponder.prefs.flControlPanel: if true, then the /controlPanel/ system website can be accessed. It's true by default. ! «8/15/99; 9:53:42 AM by DW ! «config.mainresponder.prefs.flLogReopenHourly, if true, we close the log file every hour. It will be re-opened by the next log.add call. In our work with the 6.1 kernel, we've determined that for busy servers this helps Frontier's memory utilization significantly, and the cost of re-opening the file once an hour is relatively small. ! «8/15/99; 9:34:07 AM by DW ! «Make sure that scheduler tasks are installed. This is also handled in mainResponder.install, but I don't want to ask people to run this script to go to 6.1, so we check to see if they're defined and if they're not we link them in. ! «8/15/99; 8:26:14 AM by DW ! «initialize config.mainresponder.prefs.flArchiveDiscuss and discussArchiveFolder. ! «Wed, Mar 10, 1999 at 2:34:19 PM by PBS ! «Initialize config.mainResponder.data. ! «Initialize config.mainResponder.data.searchQueue. ! «Wed, Mar 10, 1999 at 2:19:48 PM by PBS ! «Initialize the config.mainresponder.search table. ! «Set config.mainResponder.prefs.flSearchEngine to false by default. ! «This means that this machine is not, by default, a search engine server. ! «Set config.mainResponder.prefs.flLogMemAvail to false by default. ! «Tue, Mar 9, 1999 at 4:12:13 PM by PBS ! «Use Frontier.getSubFolder rather than mainResponder.getFolder. ! «Sat, Mar 20, 1999 at 4:48:37 PM by PBS ! «Added flConvertToMacText pref. ! «On Macs, convert incoming latin text to Mac. ! «On Windows the pref has no effect. ! «Initialize mainResponder ! ! local (ps = string.popTrailing (system.verbs.builtins.Frontier.pathstring, file.getPathChar ())); // path string minus the trailing path character ! ! on sureTable (adrtable) { ! if not defined (adrtable^) { ! new (tabletype, adrtable)}}; ! ! sureTable (@config.mainresponder); ! ! bundle { //config.mainresponder.prefs ! sureTable (@config.mainresponder.prefs); ! if not defined (config.mainresponder.prefs.baseUrl) { ! config.mainresponder.prefs.baseUrl = "http://127.0.0.1/"}; ! if not defined (config.mainresponder.prefs.backupFolder) { ! config.mainresponder.prefs.backupFolder = Frontier.getSubFolder ("/ops/backups/") - ps}; // 8/6/05; 10:30:54 AM by TAC ! if not defined (config.mainresponder.prefs.defaultDiscussRoot) { ! config.mainresponder.prefs.defaultDiscussRoot = "discuss"}; ! if not defined (config.mainresponder.prefs.defaultNewsRoot) { ! config.mainresponder.prefs.defaultNewsRoot = "default"}; ! if not defined (config.mainresponder.prefs.flAllowPublicSearchSubmissions) { //PBS 3/9/99 ! config.mainresponder.prefs.flAllowPublicSearchSubmissions = false}; ! if not defined (config.mainresponder.prefs.flBackupNightly) { ! config.mainresponder.prefs.flBackupNightly = false}; //PBS 11/23/99: now false by default ! if not defined (config.mainresponder.prefs.flDiscussStatsNightly) { ! «config.mainresponder.prefs.flDiscussStatsNightly = true ! config.mainresponder.prefs.flDiscussStatsNightly = false}; //PBS 06/17/00: Now false by default for 6.2. ! if not defined (config.mainresponder.prefs.flArchiveDiscuss) { ! config.mainresponder.prefs.flArchiveDiscuss = false}; //PBS 11/23/99: now false by default ! if not defined (config.mainresponder.prefs.discussArchiveFolder) { ! config.mainresponder.prefs.discussArchiveFolder = Frontier.getSubFolder ("/ops/discussArchive/") - ps}; // 8/6/05; 10:30:54 AM by TAC ! if not defined (config.mainresponder.prefs.flControlPanel) { //PBS 10/25/99: pref for the /controlPanel/ site ! config.mainresponder.prefs.flControlPanel = true}; ! if not defined (config.mainresponder.prefs.flDebug) { ! config.mainresponder.prefs.flDebug = false}; ! if not defined (config.mainresponder.prefs.flKeepParamTable) { ! «config.mainresponder.prefs.flKeepParamTable = true ! config.mainresponder.prefs.flKeepParamTable = false}; //PBS 06/17/00: Now false by default in 6.2. ! if not defined (config.mainresponder.prefs.flLog) { ! «config.mainresponder.prefs.flLog = true ! config.mainresponder.prefs.flLog = false}; //PBS 06/17/00: HTTP logging now off by default in 6.2. ! if not defined (config.mainresponder.prefs.flLogMemavail) { ! config.mainresponder.prefs.flLogMemavail = false}; ! if not defined (config.mainresponder.prefs.flLogDatabaseOpens) { ! config.mainresponder.prefs.flLogDatabaseOpens = false}; //PBS 11/20/99: now false by default, no to logging database opens to the temp table ! if not defined (config.mainresponder.prefs.flLogReopenHourly) { ! config.mainresponder.prefs.flLogReopenHourly = false}; ! if not defined (config.mainresponder.prefs.flOpenAboutWindow) { ! config.mainresponder.prefs.flOpenAboutWindow = true}; ! if not defined (config.mainresponder.prefs.flBuildPagesInBackground) { ! config.mainresponder.prefs.flBuildPagesInBackground = false}; //PBS 11/20/99: now false by default, no to building pages in the background ! if not defined (config.mainresponder.prefs.flProfiling) { ! config.mainresponder.prefs.flProfiling = false}; ! if not defined (config.mainresponder.prefs.flSaveDatabasesEveryMinute) { ! config.mainresponder.prefs.flSaveDatabasesEveryMinute = true}; //PBS 11/20/99: save databases every minute is now true by default ! if not defined (config.mainResponder.prefs.flMembershipHashedCookies) { //PBS 06/22/00: true by default ! config.mainResponder.prefs.flMembershipHashedCookies = true}; ! if not defined (config.mainresponder.prefs.flSearchEngine) { ! config.mainresponder.prefs.flSearchEngine = false}; ! if not defined (config.mainresponder.prefs.flStats) { ! config.mainresponder.prefs.flStats = true}; ! if not defined (config.mainresponder.prefs.flSubscriptions) { ! config.mainresponder.prefs.flSubscriptions = false}; ! if not defined (config.mainresponder.prefs.hitsBetweenLogSaves) { ! config.mainresponder.prefs.hitsBetweenLogSaves = 100}; ! if not defined (config.mainresponder.prefs.flConvertToMacText) { //PBS 3/20/99 ! config.mainresponder.prefs.flConvertToMacText = true}; ! if not defined (config.mainresponder.prefs.logFolder) { ! config.mainresponder.prefs.logFolder = Frontier.getSubFolder ("/ops/logs/") - ps}; // 8/6/05; 10:30:54 AM by TAC ! if not defined (config.mainresponder.prefs.legalMacros) { ! new (tabletype, @config.mainresponder.prefs.legalMacros)}; ! if not defined (config.mainresponder.prefs.legalTags) { ! new (tabletype, @config.mainresponder.prefs.legalTags); ! config.mainresponder.prefs.legalTags.i = true; ! config.mainresponder.prefs.legalTags.pre = true}; ! if not defined (config.mainresponder.prefs.flAllowByIpOnly) { //AR 11/04/1999 ! config.mainresponder.prefs.flAllowByIpOnly = false}; ! if not defined (config.mainresponder.prefs.allowedIpAddresses) { //AR 11/04/1999 ! config.mainresponder.prefs.allowedIpAddresses = "127.0.0.1"}; ! if not defined (config.mainResponder.prefs.flUpdateNightly) { //PBS 11/16/99: update various gdbs every night ! config.mainResponder.prefs.flUpdateNightly = true}; //PBS 11/20/99: nightly updates now true by default ! if not defined (config.mainResponder.prefs.updateNightlyList) { //PBS 11/16/99: list of gdbs to update nightly ! config.mainResponder.prefs.updateNightlyList = {"Frontier.root", "mainResponder.root", "prefs.root", "mainResponderWebsites.root"}}; ! if not defined (config.mainResponder.prefs.securityLevel) { //PBS 11/16/99: set up security level pref ! config.mainResponder.prefs.securityLevel = 0}; ! if not defined (config.mainResponder.prefs.flLogRootUpdates) { ! config.mainResponder.prefs.flLogRootUpdates = true}}; ! ! bundle { //config.mainresponder.urls ! local (localhost = "127.0.0.1"); ! sureTable (@config.mainresponder.urls); ! bundle { //discuss urls ! local (basediscussurl = "http://" + localhost + "/htmlInterfaces/discussionGroup/"); ! if not defined (config.mainResponder.urls.discussEditInBrowser) { ! config.mainResponder.urls.discussEditInBrowser = basediscussurl + "edit/editInBrowser$"}; ! if not defined (config.mainResponder.urls.discussEditInFrontier) { ! config.mainResponder.urls.discussEditInFrontier = basediscussurl + "edit/editInFrontier$"}; ! if not defined (config.mainResponder.urls.discussEnclosureDownloader) { ! config.mainResponder.urls.discussEnclosureDownloader = basediscussurl + "enclosureDownloader$"}; ! if not defined (config.mainResponder.urls.discussEnclosureRPCer) { ! config.mainResponder.urls.discussEnclosureRPCer = basediscussurl + "enclosureRPCer$"}; ! if not defined (config.mainResponder.urls.discussEnclosureViewer) { ! config.mainResponder.urls.discussEnclosureViewer = basediscussurl + "raw/messages/"}; ! if not defined (config.mainResponder.urls.discussGetChangesFromWorkstation) { ! config.mainResponder.urls.discussGetChangesFromWorkstation = basediscussurl + "edit/getChangesFromWorkstation"}; ! if not defined (config.mainResponder.urls.discussHomePage) { ! config.mainResponder.urls.discussHomePage = basediscussurl}; ! if not defined (config.mainResponder.urls.discussMsgReader) { ! config.mainResponder.urls.discussMsgReader = basediscussurl + "msgReader$"}; ! if not defined (config.mainResponder.urls.discussNewThread) { ! config.mainResponder.urls.discussNewThread = basediscussurl + "edit/newThread$"}; ! if not defined (config.mainResponder.urls.discussPostEditedMessage) { ! config.mainResponder.urls.discussPostEditedMessage = basediscussurl + "edit/postEditedMsg"}; ! if not defined (config.mainResponder.urls.discussPostMessage) { ! config.mainResponder.urls.discussPostMessage = basediscussurl + "edit/postMsg"}; ! if not defined (config.mainResponder.urls.discussTopics) { ! config.mainResponder.urls.discussTopics = basediscussurl + "topics"}}; ! bundle { //resources urls ! local (baseresourcesurl = "http://" + localhost + "/resources/"); ! if not defined (config.mainresponder.urls.frontierLogo) { ! config.mainresponder.urls.frontierLogo = baseresourcesurl + "logos/logoWinNT.gif"}; ! if not defined (config.mainresponder.urls.icons) { ! config.mainresponder.urls.icons = baseresourcesurl + "icons/"}; ! if not defined (config.mainresponder.urls.imageCowSkull) { ! config.mainresponder.urls.imageCowSkull = baseresourcesurl + "frontierIcons/skull"}}; ! bundle { //member urls ! local (basememberurl = "http://" + localhost + "/htmlInterfaces/logon/"); ! if not defined (config.mainResponder.urls.memberCheckMail) { ! config.mainResponder.urls.memberCheckMail = basememberurl + "checkYourMail"}; ! if not defined (config.mainResponder.urls.memberHome) { ! config.mainResponder.urls.memberHome = basememberurl + "welcome"}; ! if not defined (config.mainResponder.urls.memberLogoff) { ! config.mainResponder.urls.memberLogoff = basememberurl + "logoffConfirm"}; ! if not defined (config.mainResponder.urls.memberLogon) { ! config.mainResponder.urls.memberLogon = basememberurl}}; ! bundle { //misc urls ! if not defined (config.mainResponder.urls.newsHome) { ! config.mainResponder.urls.newsHome = "http://" + localhost + "/"}; ! if not defined (config.mainResponder.urls.searchHome) { ! config.mainResponder.urls.searchHome = "http://" + localhost + "/search/"}; ! local (basepeopleurl = "http://" + localhost + "/htmlInterfaces/people/"); ! if not defined (config.mainResponder.urls.prefsHome) { ! config.mainResponder.urls.prefsHome = basepeopleurl + "prefs/"}; ! if not defined (config.mainResponder.urls.profilesHome) { ! config.mainResponder.urls.profilesHome = basepeopleurl + "profiles/"}}}; ! ! bundle { //config.mainresponder.callbacks ! sureTable (@config.mainresponder.callbacks); ! sureTable (@config.mainresponder.callbacks.addMessage); ! sureTable (@config.mainresponder.callbacks.controlAccess); ! sureTable (@config.mainresponder.callbacks.editMessage); ! sureTable (@config.mainresponder.callbacks.lightweightMacros); ! sureTable (@config.mainresponder.callbacks.nightlyBackup); ! sureTable (@config.mainResponder.callbacks.searchEngineSecurity); //PBS 3/9/99 ! sureTable (@config.mainResponder.callbacks.subscriptionsServer); ! ! «Add search engine callbacks. ! if not defined (config.mainResponder.callbacks.addMessage.index) { ! script.newScriptObject ("mainResponder.search.client.addMessageCallback (adrNewMsg)", @config.mainResponder.callbacks.addMessage.index); ! script.compile (@config.mainResponder.callbacks.addMessage.index)}; ! if not defined (config.mainResponder.callbacks.editMessage.index) { ! script.newScriptObject ("mainResponder.search.client.addMessageCallback (adrEditedMsg)", @config.mainResponder.callbacks.editMessage.index); ! script.compile (@config.mainResponder.callbacks.editMessage.index)}; ! ! «Add security callback ! if not defined (config.mainResponder.callbacks.controlAccess.blockByIP) { //AR 11/04/1999 ! script.newScriptObject ("mainResponder.security.blockHttpByIP ()", @config.mainResponder.callbacks.controlAccess.blockByIP)}; ! ! «Add pathEvaluation callback for the Admin site ! if not defined (config.mainresponder.callbacks.pathEvaluation) { //JES 8/18/02 ! new (tableType, @config.mainresponder.callbacks.pathEvaluation)}; ! if not defined (config.mainresponder.callbacks.pathEvaluation.frontierAdminSite) { //JES 8/18/02 ! config.mainresponder.callbacks.pathEvaluation.frontierAdminSite = "mainResponder.adminSite.callbacks.pathEvaluation"}}; ! ! bundle { //config.mainresponder.data ! sureTable (@config.mainresponder.data)}; ! «sureTable (@config.mainresponder.data.searchQueue) ! ! bundle { // config.mainresponder.domains ! sureTable (@config.mainresponder.domains); ! }; ! «if sizeOf (config.mainresponder.domains) == 0 ! «config.mainresponder.domains.default = Frontier.getSubFolder ("/www/") ! ! bundle { //config.mainresponder.globals ! sureTable (@config.mainresponder.globals); ! if not defined (config.mainresponder.globals.allowDirectoryListings) { //PBS 11/19/99: default is now false ! config.mainresponder.globals.allowDirectoryListings = false}; ! if not defined (config.mainresponder.globals.allowScriptListings) { ! config.mainresponder.globals.allowScriptListings = false}; ! if not defined (config.mainresponder.globals.allowScriptsToRun) { ! config.mainresponder.globals.allowScriptsToRun = false}; ! if not defined (config.mainresponder.globals.defaultDirectoryItems) { ! config.mainresponder.globals.defaultDirectoryItems = {"default.html", "default", "index.html", "index"}}; ! if not defined (config.mainresponder.globals.defaultMembershipGroup) { ! config.mainresponder.globals.defaultMembershipGroup = "default"}; ! if not defined (config.mainresponder.globals.flRender) { ! config.mainresponder.globals.flRender = false}; ! if not defined (config.mainresponder.globals.flRenderingCache) { ! config.mainresponder.globals.flRenderingCache = false}}; ! ! bundle { //config.mainresponder.search ! sureTable (@config.mainresponder.search); ! if not defined (config.mainresponder.search.domain) { ! config.mainresponder.search.domain = "127.0.0.1"}; ! if not defined (config.mainresponder.search.port) { ! config.mainresponder.search.port = 80}; ! if not defined (config.mainresponder.search.addToIndex) { ! config.mainresponder.search.addToIndex = "mainResponder.search.index"}; ! if not defined (config.mainresponder.search.restartIndex) { ! config.mainresponder.search.restartIndex = "mainResponder.search.restartIndex"}; ! if not defined (config.mainresponder.search.sites) { ! sureTable (@config.mainresponder.search.sites)}; ! if not defined (config.mainResponder.search.prefs) { ! new (tableType, @config.mainResponder.search.prefs)}; ! if not defined (config.mainResponder.search.prefs.flLogEnabled) { ! config.mainResponder.search.prefs.flLogEnabled = false}; ! if not defined (config.mainResponder.search.prefs.flLogSearches) { ! config.mainResponder.search.prefs.flLogSearches = true}; ! if not defined (config.mainResponder.search.prefs.flLogIndex) { ! config.mainResponder.search.prefs.flLogIndex = true}; ! if not defined (config.mainResponder.search.prefs.flLogNoIndex) { ! config.mainResponder.search.prefs.flLogNoIndex = true}; ! if not defined (config.mainResponder.search.prefs.flStoreFullText) { ! config.mainResponder.search.prefs.flStoreFullText = false}; ! if not defined (config.mainResponder.search.prefs.minutesBetweenIndexes) { ! config.mainResponder.search.prefs.minutesBetweenIndexes = 60}; ! if not defined (config.mainResponder.search.prefs.hoursToCacheSearchResults) { ! config.mainResponder.search.prefs.hoursToCacheSearchResults = 24}}; ! ! bundle { //config.mainresponder.stats ! if not defined (config.mainResponder.stats) { ! new (tabletype, @config.mainResponder.stats)}; ! if not defined (config.mainResponder.stats.ctDiscussionGroupReads) { ! config.mainResponder.stats.ctDiscussionGroupReads = 0}}; ! ! bundle { // config.mainresponder.sites ! sureTable (@config.mainresponder.sites); ! if not (defined (config.mainresponder.sites.resources)) { ! config.mainresponder.sites.resources = @mainResponder.resources}}; ! ! bundle { // port 5336 listener ! if not defined (user.inetd.config.http2) { ! user.inetd.config.http2 = user.inetd.config.http; ! user.inetd.config.http2.port = 5336; ! if user.inetd.config.http2.startup { ! try { ! inetd.startOne (@user.inetd.config.http2)}}}}; ! ! try { //register admin site callbacks ! if not defined (user.rootUpdates.callbacks) { ! rootUpdates.init ()}; ! if not defined (user.rootUpdates.callbacks.afterInstallPart.mainResponder) { ! user.rootUpdates.callbacks.afterInstallPart.mainResponder = "mainResponder.adminSite.callbacks.logRootUpdate"}}; ! ! bundle { //miscellaneous clean-up ! if not defined (system.environment.isRadio) { ! system.environment.isRadio = false}}; ! ! «bundle //hook in to user.scheduler ! «if not defined (user.scheduler.everyMinute.nirvanaServer) ! «user.scheduler.everyMinute.nirvanaServer = @mainresponder.background.everyminute ! «if not defined (user.scheduler.hourly.nirvanaServer) ! «user.scheduler.hourly.nirvanaServer = @mainresponder.background.everyHour ! «if not defined (user.scheduler.overnight.nirvanaServer) ! «user.scheduler.overnight.nirvanaServer = @mainresponder.background.everynight ! ! return (@config.mainResponder)}; ! ! «bundle // testing ! «local (ticks = clock.ticks ()) ! «for i = 1 to 100 ! «init () ! «dialog.notify ((double (clock.ticks ()) - ticks) / 60 + " secs.") \ No newline at end of file |
|
From: creecode <icr...@us...> - 2006-03-03 19:41:25
|
Update of /cvsroot/frontierkernel/odbs/frontierRoot/system/verbs/builtins/webBrowser In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16445 Modified Files: supportedBrowsers Log Message: added Mozilla for Windows Index: supportedBrowsers =================================================================== RCS file: /cvsroot/frontierkernel/odbs/frontierRoot/system/verbs/builtins/webBrowser/supportedBrowsers,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** supportedBrowsers 1 Mar 2006 00:41:21 -0000 1.3 --- supportedBrowsers 3 Mar 2006 19:41:20 -0000 1.4 *************** *** 2,5 **** --- 2,7 ---- «Changes + «3/1/06; 3:59:23 PM by TAC + «added Mozilla for Windows «2/28/06; 10:49:17 AM by TAC «added Firefox for Windows *************** *** 22,24 **** "Win95"; "WinNT" { ! return ({"iexplore.exe", "firefox.exe", "netscape.exe"})}} \ No newline at end of file --- 24,26 ---- "Win95"; "WinNT" { ! return ({"firefox.exe", "iexplore.exe", "mozilla.exe", "netscape.exe"})}} \ No newline at end of file |
|
From: creecode <icr...@us...> - 2006-03-03 19:40:47
|
Update of /cvsroot/frontierkernel/odbs/frontierRoot/system/verbs/builtins/rootUpdates In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15716 Modified Files: update Log Message: minor script formatting tweaks if the value of adrCallback is of type string, coerce to address, allows for partial addresses Index: update =================================================================== RCS file: /cvsroot/frontierkernel/odbs/frontierRoot/system/verbs/builtins/rootUpdates/update,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** update 19 Feb 2006 22:51:15 -0000 1.5 --- update 3 Mar 2006 19:40:26 -0000 1.6 *************** *** 1,3 **** ! FrontierVcsFile:1:scpt:system.verbs.builtins.rootUpdates.update ! on update (adrInRoot = table.getcursoraddress (), flQuietMode=false, adrCtNewParts=nil) { ÇChanges Ç2/19/06; 1:49:03 PM by TAC Çwhen initializing a server use Frontier.data.initialLastUpdateTime to set lastupdate Çminor script formatting tweaks Çmake sure path to new part exists before trying to assign it, accommodate using a cvs repository as a backend Ç2/16/06; 6:27:30 PM by TAC Çwhen getting an update for the host database (@root) send paramaters just like when updating a guest database, except dbName is any empty string Ç12/23/05; 9:45:17 PM by TAC Çupdated root update code Ç6/13/05; 12:53:52 PM by TAC Çdisabled trial version and serial number checks Ç1/12/04; 12:48:36 AM by JES ÇChanged default updates server from madrid.userland.com to updates.userland.com. Ç2002 Ç8/28/02; 10:48:23 PM by JES ÇAdded support for two new callbacks: Çuser.rootUpdates.callbacks.beforeInstallPart -- scripts in this table are called with two parameters: the address of the part, and the change note. If any script returns false, then the part is not installed. No error is generated -- it's up to the callback script to provide feedback to the user. Çuser.rootUpdates.callbacks.afterInstallPart -- scripts in this table are called with two parameters: the address of the part, and the change note. The return value is ignored. Ç4/16/02; 4:34:53 PM by JES ÇBug fix: Store the new part count in adrCtNewParts^ even if no new parts were loaded. Ç1/21/02; 2:25:42 PM by JES ÇUse a string comparison to determine whether we're getting updates from radioupdates.userland.com, instead of a call to tcp.equalNames, since tcp.equalNames fails for some proxy server users. Ç1/7/02; 9:09:40 PM by PBS ÇIf getting Radio updates from radioupdates.userland.com, send your usernum as an additional parameter. Ç8/6/01; 2:22:37 PM by PBS ÇWhen updating Manila or mainResponder, send the serial number. Ç01/21/01; 6:03:11 PM by JES ÇAdded optional parameter, adrCtNewParts. If not nil, the number of updated parts is assigned to adrCtNewParts^. Ç08/20/00; 11:49:35 AM by PBS ÇIf the server returns a last update time, use that instead of clock.now (). This fixes problems with people missing updates due to having clocks out-of-synch with the server. This way, the server's time is always used. Ç06/17/00; 11:16:23 PM by PBS ÇUse new root updates timeout pref. Ç11/16/99; 1:43:53 AM AM by AR ÇMake sure backup folder exists before backing up GDBs. ÇAdded flQuietMode parameter, defaulting to false. If it's true, we suppress all server-unfriendly interaction like putting up dialogs or opening the outline of new parts, regardless of the settings in user.rootUpdates. Ç10/7/99; 6:43:29 PM by DW ÇNew pref, user.rootupdates.prefs.flShowUpdatesToUser, defaults true, initialized in rootUpdates.init. ÇNew pref, user.rootupdates.prefs.adrOutlineForUser, defaults to @user.rootUpdates.updateOutline. Çif flShowUpdatesToUser is true, we create the outline if it doesn't exist and add a top-level headline with the date and time and the name of the database being updated. Each subordinate entry is the address of an object that's been updated. Underneath the address is the explanation of the change, if available. Çbundle // trial Çif defined (userland.trialVersionCheck) Çif userland.trialVersionCheck () ÇscriptError ("Can't update the database because the trial period has expired.") rootUpdates.init (); local (adrroot = table.getrootaddress (adrInRoot)); local (alist = string.parseaddress (adrroot)); local (f = window.getFile (alist [1])); local (fname = file.filefrompath (f)); if not string.lower (fname) endswith ".root" { scripterror ("Can't update the file because its name doesn't end with .root.")}; local (channelname = string.mid (fname, 1, sizeof (fname) - 5)); local (adrtable = @user.rootUpdates.servers.[channelname]); if not defined (adrtable^) { new (tabletype, adrtable); adrtable^.server = "rootUpdates.frontierOpenSource.editHere.com"; adrtable^.port = 8081; adrtable^.method = "mainResponder.subscriptions.update"; adrtable^.dbname = fname; adrtable^.lastupdate = Frontier.data.initialLastUpdateTime; //indicate that it's never been updated adrtable^.autobackup = true; //if true the backup will be of docServer.root, not Frontier.root adrtable^.dialogs = true; //set this false if you're updating automatically thru the scheduler adrtable^.openLog = true; //show the log file of changes adrtable^.URL = ""}; Çelse Çif string.lower (adrtable^.server) == "madrid.userland.com" Çadrtable^.server = "updates.userland.com" Çbundle //the responder name on the server changed Çif adrtable^.method == "mainResponder.subscriptions.update" Çadrtable^.method = "nirvanaServer.subscriptions.update" on getUpdate (serverName, adrInRoot = nil) { //an enhanced version of rootupdates.getUpdate Ç10/18/98; 11:33:30 AM by DW ÇMade it guest database-aware. ÇIf adrInRoot is specified, it's assumed to point into the guest db that's getting updated ÇAdded a field to the prefs record, dbname, which names the guest database that's being shared ÇIt's an index into user.mainresponder.databases on the server. ÇThe handler for this is at mainresponder.rpchandlers.subscriptions.update. local (frontierVersion = Frontier.version ()); local (platform = string.mid (sys.os (), 1, 3)); local (ctnewparts = 0); local (flDialogs = true); local (flLogOutlineOpened = false, flNewLogOutline = false); local (adrPrefs = @user.rootUpdates.servers.[serverName]); local (flGuestDb = false, addressprefixstring); //10/18/98 DW bundle { //gather info about guest database if adrInRoot != nil and string.lower (channelname) != "frontier" { addressprefixstring = string (table.getRootAddress (adrInRoot)); flGuestDb = true}}; if defined (adrPrefs^.dialogs) and not adrPrefs^.dialogs { flDialogs = false}; if flQuietMode { //AR 11/15/1999 flDialogs = false}; Çif not defined (user.prefs.serialNumber) // 6/13/05; 12:53:52 PM by TAC - disabled Çuser.prefs.serialNumber = "" try { //try to get the root update from the server if flDialogs { local (prompt = "Connect with " + adrPrefs^.server + " to get latest update"); if flGuestDb { prompt = prompt + " of " + adrPrefs^.dbname}; prompt = prompt + "?"; if not dialog.confirm (prompt) { return (false)}}; window.about (); local (sn = 0); Çif adrPrefs == @user.rootUpdates.servers.Frontier ÇOnly send Frontier serial number when getting Frontier.root udpate. ÇThu, Mar 18, 1999 at 3:21:10 PM by PBS Çsn = user.prefs.serialNumber local (rpcPath = user.betty.prefs.rpcClientDefaultPath); Çbundle // 6/13/05; 12:53:52 PM by TAC - disabled, no serial number check needed for open source release Çcase true //PBS 08/06/01: send serial number for Frontier, Manila, and mainResponder ÇadrPrefs == @user.rootUpdates.servers.Radio ÇadrPrefs == @user.rootUpdates.servers.radioCommunityServer ÇadrPrefs == @user.rootUpdates.servers.serverMonitor ÇadrPrefs == @user.rootUpdates.servers.Prefs ÇadrPrefs == @user.rootUpdates.servers.Frontier ÇadrPrefs == @user.rootUpdates.servers.Manila ÇadrPrefs == @user.rootUpdates.servers.mainResponder Çsn = user.prefs.serialNumber Çif string.lower (adrPrefs^.server) endswith ".userland.com" Çtry //add path args to rpcPath Çlocal (args); new (tableType, @args) Çargs.org (xn--args-zoa.org) = user.prefs.organization Çargs.name = user.prefs.name Çargs.email = user.prefs.mailAddress Çargs.sn = user.prefs.serialNumber Çif defined (config.mainResponder.domains) Çargs.domains = sizeOf (config.mainResponder.domains) Çelse Çargs.domains = 0 Çif defined (config.manila.sites) Çargs.sites = sizeOf (config.manila.sites) Çelse Çargs.sites = 0 Çif defined (radioCommunityServerData.users) Çargs.rcsUsers = sizeOf (radioCommunityServerData.users) Çelse Çargs.rcsUsers = 0 ÇrpcPath = rpcPath + "?" + webserver.encodeArgs (@args) Çelse Çif defined (adrPrefs^.serialNum) Çsn = adrPrefs^.serialNum Çelse Çsn = 0 local (paramlist = {tcp.addressDecode (tcp.myAddress ()), adrPrefs^.lastupdate, platform, sn, user.prefs.name, user.prefs.mailAddress, frontierVersion}); bundle { //PBS 01/07/02: send usernum to radioupdates.userland.com Çif tcp.equalNames (adrPrefs^.server, "radioupdates.userland.com") Çparamlist = paramlist + user.radio.prefs.usernum if string.lower (adrPrefs^.server) == "radioupdates.userland.com" { paramlist = paramlist + user.radio.prefs.usernum}}; if flGuestDb { paramlist = {adrPrefs^.dbname} + paramlist} else { paramlist = {""} + paramlist}; // empty string indicates get host database (@root) update local (newpartstable); local (i); msg ("Connecting to " + adrPrefs^.server + " to get " + serverName + " update..."); newpartstable = betty.rpc.client (adrPrefs^.server, adrPrefs^.port, adrPrefs^.method, @paramlist, false, rpcPath:rpcPath, ticksToTimeOut:user.rootUpdates.prefs.timeout); Çbundle //original call Çnewpartstable = betty.rpc.client (adrPrefs^.server, adrPrefs^.port, adrPrefs^.method, @paramlist, false, ticksToTimeOut:user.rootUpdates.prefs.timeout) if not defined (newPartsTable.parts) { if newPartsTable beginsWith "There are no new or changed parts available." or newPartsTable beginsWith "Your root is already updated" { msg (""); if flDialogs { dialog.notify (newPartsTable)} else { msg (newPartsTable)}; if adrCtNewParts != nil { //4/16/02; 4:33:24 PM by JES: make the new part count available to the caller, even if there are no new parts adrCtNewParts^ = ctNewParts}; return (true)}}; if adrPrefs^.autobackup { //10/18/98; 11:36:58 AM by DW if flGuestDb { backups.init (); //make sure user.backups.folder is set local (alist = string.parseaddress (adrInRoot)); local (source = alist [1]); filemenu.save (source); local (dest); bundle { //set dest to point at the destination file dest = file.filefrompath (source); if string.lower (dest) endswith ".root" { dest = string.delete (dest, sizeof (dest) - 4, 5); //pop off .root dest = dest + "." + user.backups.nextBackup + ".root"} else { dest = dest + "." + user.backups.nextBackup}; dest = user.backups.folder + dest; user.backups.nextBackup++}; file.sureFilePath (dest); //AR 11/15/1999 file.copy (source, dest); filemenu.save (); msg (dest + " is " + string.megabytestring (file.size (dest)))} else { backups.backuproot ()}}; for i = 1 to sizeof (newpartstable.parts) { local (adrnewpart = @newpartstable.parts [i]); local (bytes = binary (base64.decode (adrnewpart^))); local (flpartinstalled = true); setBinaryType (@bytes, tableType); unpack (@bytes, adrnewpart); on installPart (adrPart) { if defined (user.rootUpdates.protected) { //Don't import into these places. local (j); for j = 1 to sizeOf (user.rootUpdates.protected) { local (oneItem = address (user.rootUpdates.protected [j])); if table.tableContains (oneItem, adrPart^.adr) { //Don't install. flpartinstalled = false; return (true)}}}; if defined (adrPart^.platform) { if string.lower (adrPart^.platform) != "both" { // Only install parts for this platform. if string.lower (adrPart^.platform) != string.lower (platform) { return (true)}}}; try { if flGuestDb { //we got a relative address, convert it to a real address adrPart^.adr = address (addressprefixstring + "." + adrPart^.adr)}; msg ("Importing " + adrPart^.adr + "."); local (adrcallback, ixcallback, ctcallbacks, flInstallPart = true); bundle { //call beforeInstallPart callbacks ctcallbacks = sizeOf (user.rootUpdates.callbacks.beforeInstallPart); for ixcallback = 1 to ctcallbacks { local (adrcallback = @user.rootUpdates.callbacks.beforeInstallPart[ixcallback] ); try { while typeOf (adrcallback^) == addressType { adrcallback = adrcallback^}; if not adrcallback^ (adrPart^.adr, string (adrPart^.changes) ) { flInstallPart = false; break}}}}; if flInstallPart { if not (defined (@adrPart^.adr^)) { // make sure path to item exists local (addressList = string.parseAddress (adrPart^.adr), ct, item, nomad); bundle { // prime nomad if flGuestDb { nomad = @[addressList [1]]; delete (@addressList [1])} else { nomad = @root}}; ct = sizeOf (addressList); if ct != 1 { delete (@addressList [ct])}; for item in addressList { nomad = @nomad^.[item]; if not (defined (nomad^)) { new (tableType, nomad)}}}; adrPart^.adr^ = adrPart^.data}; bundle { //call afterInstallPart callbacks ctcallbacks = sizeOf (user.rootUpdates.callbacks.afterInstallPart); for ixcallback = 1 to ctcallbacks { local (adrcallback = @user.rootUpdates.callbacks.afterInstallPart[ixcallback] ); try { while typeOf (adrcallback^) == addressType { adrcallback = adrcallback^}; adrcallback^ (adrPart^.adr, string (adrPart^.changes) )}}}} else { flpartinstalled = false; if flDialogs { if not dialog.yesNo ("Installation of \"" + adrPart^.adr + "\" failed. Continue installation?") { return (false)}}}; local (logline); bundle { //clean up address so you can 2click on it logline = string (adrPart^.adr); local (ix = string.patternmatch ("].", logline)); if ix != 0 { logline = string.delete (logline, 1, ix + 1)}}; bundle { //log the update on cleanNote (s) { if s != "" { s = string.replaceAll (s, "\r\n", "\r"); s = string.replace (s, ": ", ":\r"); s = string.replaceAll (s, ". ", ".\r"); s = string.replaceAll (s, "-- ", "--\r"); s = "Changed " + s; s = string.replaceAll (s, "\r\r\r\r", "\r\r"); s = string.replaceAll (s, "\r\r\r", "\r\r"); s = string.popTrailing (s, "\r")}; return (s)}; local (changenote = cleanNote (string (adrPart^.changes))); export.addToLog (logline, adrPrefs^.url, changenote); if user.rootupdates.prefs.flShowUpdatesToUser { if not flLogOutlineOpened { if not defined (user.rootupdates.prefs.adrOutlineForUser^) { new (outlinetype, user.rootupdates.prefs.adrOutlineForUser); local (oldtarget = target.set (user.rootupdates.prefs.adrOutlineForUser)); op.setLineText (user.rootupdates.prefs.adrOutlineForUser + " created on " + clock.now ()); target.set (oldtarget); flNewLogOutline = true}; local (oldtarget = target.set (user.rootupdates.prefs.adrOutlineForUser)); op.firstSummit (); op.insert ("Updated " + fname + " on " + clock.now (), up); target.set (oldtarget); flLogOutlineOpened = true}; local (oldtarget = target.set (user.rootupdates.prefs.adrOutlineForUser)); op.insert (logline, right); if sizeof (changenote) > 0 { op.insert (changenote, right); op.go (left, 1); op.collapse ()}; op.go (left, 1); target.set (oldtarget)}}; return (true)}; if not installPart (adrnewpart) { break}; if flpartinstalled { ctnewparts++}}; if defined (newPartsTable.lastUpdateTime) { //PBS 08/20/00: get last update time from server, if supplied adrPrefs^.lastUpdate = newPartsTable.lastUpdateTime} else { //PBS 08/20/00: fallback -- use clock.now () to set last update time adrPrefs^.lastUpdate = date.netStandardString (clock.now ())}; adrPrefs^.serialNum = newPartsTable.serialNum; if flGuestDb { msg ("Saving " + adrPrefs^.dbname + "..."); fileMenu.saveMyRoot (adrInRoot); msg ("")} else { menu.installMainMenu (); system.menus.buildSuitesSubMenu (); //re-build in case any new suites were imported. msg ("Saving Frontier.root..."); fileMenu.save (); msg ("")}; if flLogOutlineOpened and not flQuietMode { edit (user.rootupdates.prefs.adrOutlineForUser); if flNewLogOutline { window.zoom (user.rootupdates.prefs.adrOutlineForUser)}} else { thread.sleepFor (0); if ctnewparts == 1 { if flDialogs { dialog.alert ("1 new part loaded from \"" + adrPrefs^.server + "\".")} else { msg ("1 new part loaded from \"" + adrPrefs^.server + "\".")}} else { if flDialogs { dialog.alert (ctnewparts + " new parts loaded from \"" + adrPrefs^.server + "\".")} else { msg (ctnewparts + " new parts loaded from \"" + adrPrefs^.server + "\".")}}}} else { //handle errors on alert (message) { if flDialogs { return (dialog.alert (message))}; scriptError (message)}; local (lowerError = string.lower (tryerror)); local (errmsg = "Can't update the root because "); case true { lowerError contains "socket is not connected" { alert (errmsg + "the server is not responding.")}; lowerError contains "can't get the address of"; lowerError contains "poorly formed xml text"; lowerError contains "missing tag" { alert (errmsg + "the server timed out.")}} else { alert (errmsg + "\"" + tryError + ".\"")}; return (false)}; if adrCtNewParts != nil { //01/21/01 JES: make the new part count available to the caller adrCtNewParts^ = ctNewParts}; return (true)}; getUpdate (channelname, adrroot)}; Çbundle // testing Çupdate (@root) \ No newline at end of file --- 1,421 ---- ! FrontierVcsFile:2:scpt:system.verbs.builtins.rootUpdates.update ! on update (adrInRoot = table.getcursoraddress (), flQuietMode=false, adrCtNewParts=nil) { ! «Changes ! «3/1/06; 9:33:38 AM by TAC ! «minor script formatting tweaks ! «if the value of adrCallback is of type string, coerce to address, allows for partial addresses ! «2/19/06; 1:49:03 PM by TAC ! «when initializing a server use Frontier.data.initialLastUpdateTime to set lastupdate ! «minor script formatting tweaks ! «make sure path to new part exists before trying to assign it, accommodate using a cvs repository as a backend ! «2/16/06; 6:27:30 PM by TAC ! «when getting an update for the host database (@root) send paramaters just like when updating a guest database, except dbName is any empty string ! «12/23/05; 9:45:17 PM by TAC ! «updated root update code ! «6/13/05; 12:53:52 PM by TAC ! «disabled trial version and serial number checks ! «1/12/04; 12:48:36 AM by JES ! «Changed default updates server from madrid.userland.com to updates.userland.com. ! «2002 ! «8/28/02; 10:48:23 PM by JES ! «Added support for two new callbacks: ! «user.rootUpdates.callbacks.beforeInstallPart -- scripts in this table are called with two parameters: the address of the part, and the change note. If any script returns false, then the part is not installed. No error is generated -- it's up to the callback script to provide feedback to the user. ! «user.rootUpdates.callbacks.afterInstallPart -- scripts in this table are called with two parameters: the address of the part, and the change note. The return value is ignored. ! «4/16/02; 4:34:53 PM by JES ! «Bug fix: Store the new part count in adrCtNewParts^ even if no new parts were loaded. ! «1/21/02; 2:25:42 PM by JES ! «Use a string comparison to determine whether we're getting updates from radioupdates.userland.com, instead of a call to tcp.equalNames, since tcp.equalNames fails for some proxy server users. ! «1/7/02; 9:09:40 PM by PBS ! «If getting Radio updates from radioupdates.userland.com, send your usernum as an additional parameter. ! «8/6/01; 2:22:37 PM by PBS ! «When updating Manila or mainResponder, send the serial number. ! «01/21/01; 6:03:11 PM by JES ! «Added optional parameter, adrCtNewParts. If not nil, the number of updated parts is assigned to adrCtNewParts^. ! «08/20/00; 11:49:35 AM by PBS ! «If the server returns a last update time, use that instead of clock.now (). This fixes problems with people missing updates due to having clocks out-of-synch with the server. This way, the server's time is always used. ! «06/17/00; 11:16:23 PM by PBS ! «Use new root updates timeout pref. ! «11/16/99; 1:43:53 AM AM by AR ! «Make sure backup folder exists before backing up GDBs. ! «Added flQuietMode parameter, defaulting to false. If it's true, we suppress all server-unfriendly interaction like putting up dialogs or opening the outline of new parts, regardless of the settings in user.rootUpdates. ! «10/7/99; 6:43:29 PM by DW ! «New pref, user.rootupdates.prefs.flShowUpdatesToUser, defaults true, initialized in rootUpdates.init. ! «New pref, user.rootupdates.prefs.adrOutlineForUser, defaults to @user.rootUpdates.updateOutline. ! «if flShowUpdatesToUser is true, we create the outline if it doesn't exist and add a top-level headline with the date and time and the name of the database being updated. Each subordinate entry is the address of an object that's been updated. Underneath the address is the explanation of the change, if available. ! ! «bundle // trial ! «if defined (userland.trialVersionCheck) ! «if userland.trialVersionCheck () ! «scriptError ("Can't update the database because the trial period has expired.") ! ! rootUpdates.init (); ! ! local (adrroot = table.getrootaddress (adrInRoot)); ! local (alist = string.parseaddress (adrroot)); ! local (f = window.getFile (alist [1])); ! local (fname = file.filefrompath (f)); ! ! if not string.lower (fname) endswith ".root" { ! scripterror ("Can't update the file because its name doesn't end with .root.")}; ! ! local (channelname = string.mid (fname, 1, sizeof (fname) - 5)); ! local (adrtable = @user.rootUpdates.servers.[channelname]); ! ! if not defined (adrtable^) { ! new (tabletype, adrtable); ! ! adrtable^.server = "rootUpdates.frontierOpenSource.editHere.com"; ! adrtable^.port = 8081; ! adrtable^.method = "mainResponder.subscriptions.update"; ! adrtable^.dbname = fname; ! ! adrtable^.lastupdate = Frontier.data.initialLastUpdateTime; //indicate that it's never been updated ! ! adrtable^.autobackup = true; //if true the backup will be of docServer.root, not Frontier.root ! adrtable^.dialogs = true; //set this false if you're updating automatically thru the scheduler ! adrtable^.openLog = true; //show the log file of changes ! ! adrtable^.URL = ""}; ! «else ! «if string.lower (adrtable^.server) == "madrid.userland.com" ! «adrtable^.server = "updates.userland.com" ! «bundle //the responder name on the server changed ! «if adrtable^.method == "mainResponder.subscriptions.update" ! «adrtable^.method = "nirvanaServer.subscriptions.update" ! on getUpdate (serverName, adrInRoot = nil) { //an enhanced version of rootupdates.getUpdate ! «10/18/98; 11:33:30 AM by DW ! «Made it guest database-aware. ! «If adrInRoot is specified, it's assumed to point into the guest db that's getting updated ! «Added a field to the prefs record, dbname, which names the guest database that's being shared ! «It's an index into user.mainresponder.databases on the server. ! «The handler for this is at mainresponder.rpchandlers.subscriptions.update. ! ! local (frontierVersion = Frontier.version ()); ! local (platform = string.mid (sys.os (), 1, 3)); ! local (ctnewparts = 0); ! local (flDialogs = true); ! local (flLogOutlineOpened = false, flNewLogOutline = false); ! ! local (adrPrefs = @user.rootUpdates.servers.[serverName]); ! ! local (flGuestDb = false, addressprefixstring); //10/18/98 DW ! bundle { //gather info about guest database ! if adrInRoot != nil and string.lower (channelname) != "frontier" { ! addressprefixstring = string (table.getRootAddress (adrInRoot)); ! flGuestDb = true}}; ! ! if defined (adrPrefs^.dialogs) and not adrPrefs^.dialogs { ! flDialogs = false}; ! if flQuietMode { //AR 11/15/1999 ! flDialogs = false}; ! ! «if not defined (user.prefs.serialNumber) // 6/13/05; 12:53:52 PM by TAC - disabled ! «user.prefs.serialNumber = "" ! ! try { //try to get the root update from the server ! if flDialogs { ! local (prompt = "Connect with " + adrPrefs^.server + " to get latest update"); ! if flGuestDb { ! prompt = prompt + " of " + adrPrefs^.dbname}; ! prompt = prompt + "?"; ! if not dialog.confirm (prompt) { ! return (false)}}; ! window.about (); ! local (sn = 0); ! «if adrPrefs == @user.rootUpdates.servers.Frontier ! «Only send Frontier serial number when getting Frontier.root udpate. ! «Thu, Mar 18, 1999 at 3:21:10 PM by PBS ! «sn = user.prefs.serialNumber ! local (rpcPath = user.betty.prefs.rpcClientDefaultPath); ! «bundle // 6/13/05; 12:53:52 PM by TAC - disabled, no serial number check needed for open source release ! «case true //PBS 08/06/01: send serial number for Frontier, Manila, and mainResponder ! «adrPrefs == @user.rootUpdates.servers.Radio ! «adrPrefs == @user.rootUpdates.servers.radioCommunityServer ! «adrPrefs == @user.rootUpdates.servers.serverMonitor ! «adrPrefs == @user.rootUpdates.servers.Prefs ! «adrPrefs == @user.rootUpdates.servers.Frontier ! «adrPrefs == @user.rootUpdates.servers.Manila ! «adrPrefs == @user.rootUpdates.servers.mainResponder ! «sn = user.prefs.serialNumber ! «if string.lower (adrPrefs^.server) endswith ".userland.com" ! «try //add path args to rpcPath ! «local (args); new (tableType, @args) ! «args.org = user.prefs.organization ! «args.name = user.prefs.name ! «args.email = user.prefs.mailAddress ! «args.sn = user.prefs.serialNumber ! «if defined (config.mainResponder.domains) ! «args.domains = sizeOf (config.mainResponder.domains) ! «else ! «args.domains = 0 ! «if defined (config.manila.sites) ! «args.sites = sizeOf (config.manila.sites) ! «else ! «args.sites = 0 ! «if defined (radioCommunityServerData.users) ! «args.rcsUsers = sizeOf (radioCommunityServerData.users) ! «else ! «args.rcsUsers = 0 ! «rpcPath = rpcPath + "?" + webserver.encodeArgs (@args) ! «else ! «if defined (adrPrefs^.serialNum) ! «sn = adrPrefs^.serialNum ! «else ! «sn = 0 ! ! local (paramlist = {tcp.addressDecode (tcp.myAddress ()), adrPrefs^.lastupdate, platform, sn, user.prefs.name, user.prefs.mailAddress, frontierVersion}); ! ! bundle { //PBS 01/07/02: send usernum to radioupdates.userland.com ! «if tcp.equalNames (adrPrefs^.server, "radioupdates.userland.com") ! «paramlist = paramlist + user.radio.prefs.usernum ! if string.lower (adrPrefs^.server) == "radioupdates.userland.com" { ! paramlist = paramlist + user.radio.prefs.usernum}}; ! ! if flGuestDb { ! paramlist = {adrPrefs^.dbname} + paramlist} ! else { ! paramlist = {""} + paramlist}; // empty string indicates get host database (@root) update ! ! local (newpartstable); ! local (i); ! msg ("Connecting to " + adrPrefs^.server + " to get " + serverName + " update..."); ! newpartstable = betty.rpc.client (adrPrefs^.server, adrPrefs^.port, adrPrefs^.method, @paramlist, false, rpcPath:rpcPath, ticksToTimeOut:user.rootUpdates.prefs.timeout); ! «bundle //original call ! «newpartstable = betty.rpc.client (adrPrefs^.server, adrPrefs^.port, adrPrefs^.method, @paramlist, false, ticksToTimeOut:user.rootUpdates.prefs.timeout) ! if not defined (newPartsTable.parts) { ! if newPartsTable beginsWith "There are no new or changed parts available." or newPartsTable beginsWith "Your root is already updated" { ! msg (""); ! if flDialogs { ! dialog.notify (newPartsTable)} ! else { ! msg (newPartsTable)}; ! if adrCtNewParts != nil { //4/16/02; 4:33:24 PM by JES: make the new part count available to the caller, even if there are no new parts ! adrCtNewParts^ = ctNewParts}; ! return (true)}}; ! if adrPrefs^.autobackup { //10/18/98; 11:36:58 AM by DW ! if flGuestDb { ! backups.init (); //make sure user.backups.folder is set ! local (alist = string.parseaddress (adrInRoot)); ! local (source = alist [1]); ! filemenu.save (source); ! ! local (dest); ! bundle { //set dest to point at the destination file ! dest = file.filefrompath (source); ! if string.lower (dest) endswith ".root" { ! dest = string.delete (dest, sizeof (dest) - 4, 5); //pop off .root ! dest = dest + "." + user.backups.nextBackup + ".root"} ! else { ! dest = dest + "." + user.backups.nextBackup}; ! dest = user.backups.folder + dest; ! user.backups.nextBackup++}; ! file.sureFilePath (dest); //AR 11/15/1999 ! file.copy (source, dest); ! filemenu.save (); ! msg (dest + " is " + string.megabytestring (file.size (dest)))} ! else { ! backups.backuproot ()}}; ! for i = 1 to sizeof (newpartstable.parts) { ! local (adrnewpart = @newpartstable.parts [i]); ! local (bytes = binary (base64.decode (adrnewpart^))); ! local (flpartinstalled = true); ! ! setBinaryType (@bytes, tableType); ! unpack (@bytes, adrnewpart); ! ! on installPart (adrPart) { ! if defined (user.rootUpdates.protected) { //Don't import into these places. ! local (j); ! ! for j = 1 to sizeOf (user.rootUpdates.protected) { ! local (oneItem = address (user.rootUpdates.protected [j])); ! ! if table.tableContains (oneItem, adrPart^.adr) { //Don't install. ! flpartinstalled = false; ! ! return (true)}}}; ! ! if defined (adrPart^.platform) { ! if string.lower (adrPart^.platform) != "both" { // Only install parts for this platform. ! if string.lower (adrPart^.platform) != string.lower (platform) { ! return (true)}}}; ! try { ! if flGuestDb { //we got a relative address, convert it to a real address ! adrPart^.adr = address (addressprefixstring + "." + adrPart^.adr)}; ! ! msg ("Importing " + adrPart^.adr + "."); ! ! local (adrCallback, ixCallback, ctCallbacks, flInstallPart = true); ! ! bundle { //call beforeInstallPart callbacks ! ctCallbacks = sizeOf (user.rootUpdates.callbacks.beforeInstallPart); ! ! for ixCallback = 1 to ctCallbacks { ! local (adrCallback = @user.rootUpdates.callbacks.beforeInstallPart [ixCallback]); ! ! try { ! if typeOf (adrCallback^) == stringType { ! adrCallback^ = address (adrCallback^)}; ! ! while typeOf (adrCallback^) == addressType { ! adrCallback = adrCallback^}; ! ! if not (adrCallback^ (adrPart^.adr, string (adrPart^.changes))) { ! flInstallPart = false; ! break}}}}; ! ! if flInstallPart { ! if not (defined (@adrPart^.adr^)) { // make sure path to item exists ! local (addressList = string.parseAddress (adrPart^.adr), ct, item, nomad); ! ! bundle { // prime nomad ! if flGuestDb { ! nomad = @[addressList [1]]; ! delete (@addressList [1])} ! else { ! nomad = @root}}; ! ! ct = sizeOf (addressList); ! ! if ct != 1 { ! delete (@addressList [ct])}; ! ! for item in addressList { ! nomad = @nomad^.[item]; ! ! if not (defined (nomad^)) { ! new (tableType, nomad)}}}; ! ! adrPart^.adr^ = adrPart^.data}; ! ! bundle { //call afterInstallPart callbacks ! ctCallbacks = sizeOf (user.rootUpdates.callbacks.afterInstallPart); ! ! for ixCallback = 1 to ctCallbacks { ! local (adrCallback = @user.rootUpdates.callbacks.afterInstallPart [ixCallback]); ! ! try { ! if typeOf (adrCallback^) == stringType { ! adrCallback^ = address (adrCallback^)}; ! ! while typeOf (adrCallback^) == addressType { ! adrCallback = adrCallback^}; ! ! adrCallback^ (adrPart^.adr, string (adrPart^.changes) )}}}} ! else { ! flpartinstalled = false; ! ! if flDialogs { ! if not dialog.yesNo ("Installation of \"" + adrPart^.adr + "\" failed. Continue installation?") { ! return (false)}}}; ! ! local (logline); ! ! bundle { //clean up address so you can 2click on it ! logline = string (adrPart^.adr); ! local (ix = string.patternmatch ("].", logline)); ! if ix != 0 { ! logline = string.delete (logline, 1, ix + 1)}}; ! bundle { //log the update ! on cleanNote (s) { ! if s != "" { ! s = string.replaceAll (s, "\r\n", "\r"); ! s = string.replace (s, ": ", ":\r"); ! s = string.replaceAll (s, ". ", ".\r"); ! s = string.replaceAll (s, "-- ", "--\r"); ! s = "Changed " + s; ! s = string.replaceAll (s, "\r\r\r\r", "\r\r"); ! s = string.replaceAll (s, "\r\r\r", "\r\r"); ! s = string.popTrailing (s, "\r")}; ! return (s)}; ! local (changenote = cleanNote (string (adrPart^.changes))); ! export.addToLog (logline, adrPrefs^.url, changenote); ! ! if user.rootupdates.prefs.flShowUpdatesToUser { ! if not flLogOutlineOpened { ! if not defined (user.rootupdates.prefs.adrOutlineForUser^) { ! new (outlinetype, user.rootupdates.prefs.adrOutlineForUser); ! local (oldtarget = target.set (user.rootupdates.prefs.adrOutlineForUser)); ! op.setLineText (user.rootupdates.prefs.adrOutlineForUser + " created on " + clock.now ()); ! target.set (oldtarget); ! flNewLogOutline = true}; ! local (oldtarget = target.set (user.rootupdates.prefs.adrOutlineForUser)); ! op.firstSummit (); ! op.insert ("Updated " + fname + " on " + clock.now (), up); ! target.set (oldtarget); ! flLogOutlineOpened = true}; ! ! local (oldtarget = target.set (user.rootupdates.prefs.adrOutlineForUser)); ! op.insert (logline, right); ! if sizeof (changenote) > 0 { ! op.insert (changenote, right); ! op.go (left, 1); ! op.collapse ()}; ! op.go (left, 1); ! target.set (oldtarget)}}; ! ! return (true)}; ! if not installPart (adrnewpart) { ! break}; ! if flpartinstalled { ! ctnewparts++}}; ! if defined (newPartsTable.lastUpdateTime) { //PBS 08/20/00: get last update time from server, if supplied ! adrPrefs^.lastUpdate = newPartsTable.lastUpdateTime} ! else { //PBS 08/20/00: fallback -- use clock.now () to set last update time ! adrPrefs^.lastUpdate = date.netStandardString (clock.now ())}; ! ! adrPrefs^.serialNum = newPartsTable.serialNum; ! ! if flGuestDb { ! msg ("Saving " + adrPrefs^.dbname + "..."); ! fileMenu.saveMyRoot (adrInRoot); ! msg ("")} ! else { ! menu.installMainMenu (); ! system.menus.buildSuitesSubMenu (); //re-build in case any new suites were imported. ! msg ("Saving Frontier.root..."); ! fileMenu.save (); ! msg ("")}; ! ! if flLogOutlineOpened and not flQuietMode { ! edit (user.rootupdates.prefs.adrOutlineForUser); ! if flNewLogOutline { ! window.zoom (user.rootupdates.prefs.adrOutlineForUser)}} ! else { ! thread.sleepFor (0); ! if ctnewparts == 1 { ! if flDialogs { ! dialog.alert ("1 new part loaded from \"" + adrPrefs^.server + "\".")} ! else { ! msg ("1 new part loaded from \"" + adrPrefs^.server + "\".")}} ! else { ! if flDialogs { ! dialog.alert (ctnewparts + " new parts loaded from \"" + adrPrefs^.server + "\".")} ! else { ! msg (ctnewparts + " new parts loaded from \"" + adrPrefs^.server + "\".")}}}} ! else { //handle errors ! on alert (message) { ! if flDialogs { ! return (dialog.alert (message))}; ! scriptError (message)}; ! local (lowerError = string.lower (tryerror)); ! local (errmsg = "Can't update the root because "); ! case true { ! lowerError contains "socket is not connected" { ! alert (errmsg + "the server is not responding.")}; ! lowerError contains "can't get the address of"; ! lowerError contains "poorly formed xml text"; ! lowerError contains "missing tag" { ! alert (errmsg + "the server timed out.")}} ! else { ! alert (errmsg + "\"" + tryError + ".\"")}; ! return (false)}; ! ! if adrCtNewParts != nil { //01/21/01 JES: make the new part count available to the caller ! adrCtNewParts^ = ctNewParts}; ! return (true)}; ! getUpdate (channelname, adrroot)}; ! ! «bundle // testing ! «update (@root) \ No newline at end of file |
|
From: creecode <icr...@us...> - 2006-03-03 19:39:13
|
Update of /cvsroot/frontierkernel/odbs/frontierRoot/system/verbs/builtins/webBrowser In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14654 Modified Files: openURL Log Message: give Andre credit for working on the last rev, some how when moving things about between two versions of the script his credit went missing, no functional change from previous rev Index: openURL =================================================================== RCS file: /cvsroot/frontierkernel/odbs/frontierRoot/system/verbs/builtins/webBrowser/openURL,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** openURL 3 Mar 2006 19:31:09 -0000 1.3 --- openURL 3 Mar 2006 19:39:07 -0000 1.4 *************** *** 3,7 **** on openURL (s, openURLIn = nil) { «Changes ! «3/3/06; 8:47:39 AM by TAC «on Windows for Firefox, Mozilla, and Netscape, use the parameters as suggested by < https://bugzilla.mozilla.org/show_bug.cgi?id=255196 > (enclose url in quotes) for WWW_OpenURL, < http://help.netscape.com/kb/consumer/19980502-2.html > «2/28/06; 10:38:13 AM by TAC --- 3,7 ---- on openURL (s, openURLIn = nil) { «Changes ! «3/3/06; 8:47:39 AM by AR, TAC «on Windows for Firefox, Mozilla, and Netscape, use the parameters as suggested by < https://bugzilla.mozilla.org/show_bug.cgi?id=255196 > (enclose url in quotes) for WWW_OpenURL, < http://help.netscape.com/kb/consumer/19980502-2.html > «2/28/06; 10:38:13 AM by TAC |
|
From: creecode <icr...@us...> - 2006-03-03 19:31:15
|
Update of /cvsroot/frontierkernel/odbs/frontierRoot/system/verbs/builtins/webBrowser In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8681 Modified Files: openURL Log Message: on Windows for Firefox, Mozilla, and Netscape, use the parameters as suggested by < https://bugzilla.mozilla.org/show_bug.cgi?id=255196 > (enclose url in quotes) for WWW_OpenURL, < http://help.netscape.com/kb/consumer/19980502-2.html > Index: openURL =================================================================== RCS file: /cvsroot/frontierkernel/odbs/frontierRoot/system/verbs/builtins/webBrowser/openURL,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** openURL 1 Mar 2006 00:43:29 -0000 1.2 --- openURL 3 Mar 2006 19:31:09 -0000 1.3 *************** *** 3,6 **** --- 3,8 ---- on openURL (s, openURLIn = nil) { «Changes + «3/3/06; 8:47:39 AM by TAC + «on Windows for Firefox, Mozilla, and Netscape, use the parameters as suggested by < https://bugzilla.mozilla.org/show_bug.cgi?id=255196 > (enclose url in quotes) for WWW_OpenURL, < http://help.netscape.com/kb/consumer/19980502-2.html > «2/28/06; 10:38:13 AM by TAC «minor script formatting tweaks *************** *** 17,25 **** "Win95"; "WinNT" { ! if string.lower (id) contains "firefox" { ! s = s + " "}; ! if string.lower (id) contains "netscape" { ! return (webBrowser.callBrowser (id, "WWW_OpenURL", s + ",,-1"))}; return (webBrowser.callBrowser (id, "WWW_OpenURL", s))}}} \ No newline at end of file --- 19,48 ---- "Win95"; "WinNT" { ! local (lowerId = string.lower (id)); ! local (parameters = "\"%1\",,-1,0,,,,"); // winRegistry.read ("HKCR\\http\\shell\\open\\ddeexec\\"), this can be used to read the registry for the current browser parameters, we don't use it now because there are some issues our scripts ! case true { ! lowerId contains "firefox"; ! lowerId contains "mozilla"; ! lowerId contains "netscape" { // netscape 8.1 seems to be deaf, need code to check version and break? ! ! «bundle // parameters, this might be useful if we need to replace params ! «local (i, newParameters, s) ! « ! «for i = 1 to string.countFields (parameters, ',') ! «if i == 3 ! «s = "-1" ! «else ! «s = string.nthField (parameters, ',', i) ! « ! «newParameters = newParameters + s + "," ! « ! «delete (@newParameters [string.length (newParameters)]) ! « ! «parameters = newParameters ! ! parameters = string.replace (parameters, "%1", s); ! ! return (webBrowser.callBrowser (id, "WWW_OpenURL", parameters))}}; return (webBrowser.callBrowser (id, "WWW_OpenURL", s))}}} \ No newline at end of file |