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: creedon <icr...@us...> - 2005-07-05 18:11:39
|
Update of /cvsroot/frontierkernel/odbs/mainResponderRoot/mainResponder/localization/languages/english/strings/setupFrontier In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31002 Added Files: portForwarding personalize Log Message: for use by setupFrontier script --- NEW FILE: personalize --- FrontierVcsFile:1:optx:mainResponder.localization.languages.english.strings.setupFrontier.personalize [[errorMessage]] <p> There are just a few more easy steps -- to personalize this copy of Frontier, configure your network settings, and complete the installation. </p> <form method="POST"> <table border="0" cellspacing="1" cellpadding="5"> <tr> <td align="left">Name:</td> <td valign="top" colspan="1"><input type="text" name="name" size="50" maxlength="255" value="[[username]]"></td> </tr> <tr> <td align="left">Organization:</td> <td valign="top" colspan="1"><input type="text" name="organization" size="50" maxlength="255" value="[[userorganization]]"></td> </tr> <tr> <td align="left">Email address: </td> <td valign="top" colspan="1"><input type="text" name="email" size="50" maxlength="255" value="[[useremail]]"></td> </tr> <tr> <td align="left">Outgoing (SMTP) mail server:</td> <td valign="top" colspan="1"><input type="text" name="mailHost" size="50" maxlength="255" value="[[mailhost]]"></td> </tr> <tr> <td align="left"> [[webserverdomainlabel]]: </td> <td valign="top" colspan="1"><input type="text" name="webServerDomain" size="50" maxlength="255" value="[[webserverdomain]]"></td> </tr> <tr> <td align="left">Web server port: </td> <td valign="top" colspan="1"><input type="text" name="webServerPort" size="50" maxlength="255" value="[[webserverport]]"></td> </tr> <tr> <td align="left">Admin password:</td> <td valign="top" colspan="1"><input type="password" name="password" size="25" maxlength="255" value="[[userpassword]]"></td> </tr> <tr> <td align="left">Repeat:</td> <td valign="top" colspan="1"><input type="password" name="repeatPassword" size="25" maxlength="255" value="[[userpassword]]"></td> </tr> <tr> <td> </td> <td> <input type="submit" name="personalize" value="Submit"> </td> </tr> </table> </form> --- NEW FILE: portForwarding --- FrontierVcsFile:1:optx:mainResponder.localization.languages.english.strings.setupFrontier.portForwarding [[errorMessage]] <form method="POST"> <p> Because you use Mac OS X, you can optionally enable port forwarding. Port forwarding is recommended, unless you use a custom server configuration or you want Frontier to respond on a port higher than 1024. </p> <table border="0" cellspacing="1" cellpadding="5"> <tr> <td colspan="2"> <input type="checkbox" name="flEnablePortForwarding" value=xxx [[enablePortForwarding]]> Check this box if you want to enable port forwarding. </td> </tr> <tr> <td align="left" valign="top"> Actual web server port: </td> <td valign="top"> <input type="text" name="actualPort" value="[[actualPort]]"> </td> </tr> <tr> <td align="left" valign="top"> Apparent web server port: </td> <td valign="top"> <input type="text" name="apparentPort" value="[[apparentPort]]"> </td> </tr> </table> <p> <br/> Port forwarding requires your Mac OS X administrator password. Frontier can optionally remember this password for you, so that you don't have to re-enter it each time Frontier is launched. This is recommended, especially if you plan to run Frontier on an unattended computer. </p> <table border="0" cellspacing="1" cellpadding="5"> <tr> <td align="left" valign="top"> Mac OS X administrator password: </td> <td valign="top"> <input type="password" name="password" size="25" maxlength="100" value="[[adminPassword]]"> </td> </tr> <tr> <td colspan="2"> <input type="checkbox" name="flRememberAdminPassword" value=xxx [[rememberAdminPassword]]> Check this box if you want Frontier to remember your administrator password. <br/> <br/> </td> </tr> <tr><td><input type="submit" name="portForwarding" value="Submit"></td><td></td></tr> </table> <p> Note: If you choose to have Frontier remember your Mac OS X administrator password, it will be stored in Frontier's object database. When your server's screen is not locked, it's possible for someone to open Frontier, and find your administrator password. If you choose this option, make sure that physical access to your server is restricted. </p> </form> |
|
From: creedon <icr...@us...> - 2005-07-05 18:01:36
|
Update of /cvsroot/frontierkernel/odbs/mainResponderRoot/mainResponder/localization/languages/english/strings/setupFrontier In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26064 Removed Files: main Log Message: replaced by personalize --- main DELETED --- |
|
From: creedon <icr...@us...> - 2005-07-05 17:29:43
|
Update of /cvsroot/frontierkernel/odbs/mainResponderRoot/mainResponder/adminSite/macros In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8946 Modified Files: databaseInfo Log Message: fix date error for year Index: databaseInfo =================================================================== RCS file: /cvsroot/frontierkernel/odbs/mainResponderRoot/mainResponder/adminSite/macros/databaseInfo,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** databaseInfo 26 Mar 2005 21:45:10 -0000 1.1.1.1 --- databaseInfo 5 Jul 2005 17:29:18 -0000 1.2 *************** *** 1,3 **** FrontierVcsFile:1:scpt:mainResponder.adminSite.macros.databaseInfo ! on databaseInfo () { ÇChanges Ç8/14/02; 5:43:24 PM by JES ÇCreated. local (htmltext); on add (s) { htmltext = htmltext + (s + "\r");}; local (pta = html.getPageTableAddress ()); local (bgcolors = {pta^.trbg1, pta^.trbg2}); local (t); new (tableType, @t); bundle { //build sorted table of databases local (adr); for adr in @system.compiler.files { local (f = nameOf (adr^)); local (dbname = file.fileFromPath (f)); local (dbsize = file.size (f)); local (modified = file.modified (f)); local (folder = file.folderFromPath (f)); local (foldername = file.fileFromPath (folder)); local (adrdb = @[f] ); local (dbtables = sizeOf (adrdb^)); local (adrfolder = @t.[foldername]); if not defined (adrfolder^) { new (tableType, adrfolder)}; local (adrdbinfo = @adrfolder^.[dbname]); new (tableType, adrdbinfo); adrdbinfo^.size = dbsize; adrdbinfo^.modified = modified; adrdbinfo^.tables = dbtables}; local (rootpath = window.getFile (@root)); local (adrrootfolder = @t.[" "]); new (tableType, adrrootfolder); local (rootname = file.fileFromPath (rootpath)); local (adrroot = @adrrootfolder^.[rootname] ); new (tableType, adrroot); adrroot^.size = file.size (rootpath); adrroot^.modified = file.modified (rootpath); adrroot^.tables = sizeOf (root)}; add ("<table cellpadding=\"0\" cellspacing=\"0\" border=\"0\" width=\"92%\">"); bundle { //headers add ("<tr><td><b>Folder</b></td><td><b>Database</b></td><td align=\"right\"><b>Size</b></td><td align=\"right\"><b>Tables</b></td><td align=\"right\"><b>Modified</b></td></tr>")}; on datestring (d) { on pad (n) { return (string.padWithZeros (n, 2))}; local (day, month, year, hour, minute, second); date.get (d, @day, @month, @year, @hour, @minute, @second); local (meridian); if hour > 12 { hour = hour - 12; meridian = " PM"} else { if hour == 0 { hour = 12}; meridian = " AM"}; return (pad (month) + "/" + pad (day) + "/" + string.mid (year, 2, 2) + "; " + pad (hour) + ":" + pad (minute) + ":" + pad (second) + meridian)}; local (ct = 0, adrfolder, adrdb); for adrfolder in @t { local (folder = nameOf (adrfolder^)); for adrdb in adrfolder { add ("<tr bgcolor=\"" + bgcolors[(ct++% 2) + 1] + "\">"); add ("<td class=\"small\">" + folder + "</td>"); folder = ""; //only display the folder once add ("<td class=\"small\">" + nameOf (adrdb^) + "</td>"); add ("<td class=\"small\" align=\"right\">" + string.gigabyteString (adrdb^.size) + "</td>"); add ("<td class=\"small\" align=\"right\">" + adrdb^.tables + "</td>"); add ("<td class=\"small\" align=\"right\">" + datestring (adrdb^.modified) + "</td>"); add ("</tr>")}; add ("<tr><td> </td></tr>"); ct = 0}; add ("</table>"); return (htmltext)} \ No newline at end of file --- 1,3 ---- FrontierVcsFile:1:scpt:mainResponder.adminSite.macros.databaseInfo ! on databaseInfo () { ÇChanges Ç7/5/05; 10:13:51 AM by TAC Çfix date error for year Ç8/14/02; 5:43:24 PM by JES ÇCreated. local (htmltext); on add (s) { htmltext = htmltext + (s + "\r");}; local (pta = html.getPageTableAddress ()); local (bgcolors = {pta^.trbg1, pta^.trbg2}); local (t); new (tableType, @t); bundle { //build sorted table of databases local (adr); for adr in @system.compiler.files { local (f = nameOf (adr^)); local (dbname = file.fileFromPath (f)); local (dbsize = file.size (f)); local (modified = file.modified (f)); local (folder = file.folderFromPath (f)); local (foldername = file.fileFromPath (folder)); local (adrdb = @[f] ); local (dbtables = sizeOf (adrdb^)); local (adrfolder = @t.[foldername]); if not defined (adrfolder^) { new (tableType, adrfolder)}; local (adrdbinfo = @adrfolder^.[dbname]); new (tableType, adrdbinfo); adrdbinfo^.size = dbsize; adrdbinfo^.modified = modified; adrdbinfo^.tables = dbtables}; local (rootpath = window.getFile (@root)); local (adrrootfolder = @t.[" "]); new (tableType, adrrootfolder); local (rootname = file.fileFromPath (rootpath)); local (adrroot = @adrrootfolder^.[rootname] ); new (tableType, adrroot); adrroot^.size = file.size (rootpath); adrroot^.modified = file.modified (rootpath); adrroot^.tables = sizeOf (root)}; add ("<table cellpadding=\"0\" cellspacing=\"0\" border=\"0\" width=\"92%\">"); bundle { //headers add ("<tr><td><b>Folder</b></td><td><b>Database</b></td><td align=\"right\"><b>Size</b></td><td align=\"right\"><b>Tables</b></td><td align=\"right\"><b>Modified</b></td></tr>")}; on datestring (d) { on pad (n) { return (string.padWithZeros (n, 2))}; local (day, month, year, hour, minute, second); date.get (d, @day, @month, @year, @hour, @minute, @second); local (meridian); if hour > 12 { hour = hour - 12; meridian = " PM"} else { if hour == 0 { hour = 12}; meridian = " AM"}; return (pad (month) + "/" + pad (day) + "/" + string.mid (year, 3, 2) + "; " + pad (hour) + ":" + pad (minute) + ":" + pad (second) + meridian)}; local (ct = 0, adrfolder, adrdb); for adrfolder in @t { local (folder = nameOf (adrfolder^)); for adrdb in adrfolder { add ("<tr bgcolor=\"" + bgcolors[(ct++% 2) + 1] + "\">"); add ("<td class=\"small\">" + folder + "</td>"); folder = ""; //only display the folder once add ("<td class=\"small\">" + nameOf (adrdb^) + "</td>"); add ("<td class=\"small\" align=\"right\">" + string.gigabyteString (adrdb^.size) + "</td>"); add ("<td class=\"small\" align=\"right\">" + adrdb^.tables + "</td>"); add ("<td class=\"small\" align=\"right\">" + datestring (adrdb^.modified) + "</td>"); add ("</tr>")}; add ("<tr><td> </td></tr>"); ct = 0}; add ("</table>"); return (htmltext)} \ No newline at end of file |
|
From: creedon <icr...@us...> - 2005-07-03 17:02:20
|
Update of /cvsroot/frontierkernel/odbs/frontierRoot/system/verbs/builtins/html/data/renderers In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31229/renderers Log Message: Directory /cvsroot/frontierkernel/odbs/frontierRoot/system/verbs/builtins/html/data/renderers added to the repository |
|
From: creedon <icr...@us...> - 2005-06-22 00:50:26
|
Update of /cvsroot/frontierkernel/odbs/mainResponderRoot/mainResponder/resources/userlandIcons In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20198 Removed Files: createSiteHeader Log Message: remove userland icons --- createSiteHeader DELETED --- |
|
From: creedon <icr...@us...> - 2005-06-22 00:41:27
|
Update of /cvsroot/frontierkernel/odbs/mainResponderRoot/mainResponder/resources/userlandIcons In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15227 Removed Files: radioDisabled thisIsAManilaSite radio pike userlandLogo pikeGray controlPanelHeader Log Message: remove userland icons --- pike DELETED --- --- controlPanelHeader DELETED --- --- radio DELETED --- --- userlandLogo DELETED --- --- radioDisabled DELETED --- --- pikeGray DELETED --- --- thisIsAManilaSite DELETED --- |
|
From: creedon <icr...@us...> - 2005-06-20 02:41:21
|
Update of /cvsroot/frontierkernel/odbs/mainResponderRoot/mainResponder/utilities In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32411 Modified Files: getConfigInfo Log Message: script wasn't dealing with undefined user.prefs.portForwardingAdminPassword properly Index: getConfigInfo =================================================================== RCS file: /cvsroot/frontierkernel/odbs/mainResponderRoot/mainResponder/utilities/getConfigInfo,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** getConfigInfo 19 Jun 2005 18:28:10 -0000 1.3 --- getConfigInfo 20 Jun 2005 02:41:09 -0000 1.4 *************** *** 1,3 **** FrontierVcsFile:1:scpt:mainResponder.utilities.getConfigInfo ! on getConfigInfo (flIncludeHeader=true, fldebug = false) { ÇGet general config info about Frontier and mainResponder. ÇChanges Ç6/19/05; 10:44:09 AM by TAC ÇMac OS X port forwarding info is sent even if port forwarding isn't enable, could be useful for diagnostics Çmoved fldebug into parameters for call, added test bundle, less likely to leave debug flag set to true this way Çadded section for Mac OS X Port Forwarding and ipfw configuration Çwhen building simple table, get size of object in try in case object has no size as in the case of nil value Çdisabled Manila specific code local (mailtext = "", indentlevel = 0); on add (s) { mailtext = mailtext + string.filledstring (" ", indentlevel) + s + "\r\n"}; on addOnOff (label, bool) { local (s = label + ": "); if bool { s = s + "On"} else { s = s + "Off"}; add (s)}; add ("Frontier configuration on " + clock.now () + "."); indentlevel++; add (""); bundle { //Installation information if flIncludeHeader { add ("Installation information:"); indentlevel++; add (""); add ("Frontier version: " + Frontier.version ()); local (os = "Windows"); if system.environment.isMac { if system.environment.isCarbon { os = "Mac OS X"} else { os = "Mac OS"}}; add ("Operating System: " + os); local (osVersion = system.environment.osVersionString); if system.environment.isCarbon { osVersion = string.replace (osVersion, "16", "10")}; add ("OS Version: " + osVersion); add ("IP address: " + tcp.dns.getMyDottedId ()); add ("Frontier folder: " + file.folderfrompath (frontier.getprogrampath ())); add (""); indentlevel--}}; bundle { //About you and your computer add ("About you and your computer:"); indentlevel++; add (""); add ("Name: " + user.prefs.name); add ("Organization: " + user.prefs.organization); add ("Mail address: " + user.prefs.mailAddress); add ("Outgoing mail server: " + user.prefs.mailHost); addOnOff ("Web server", inetd.isDaemonRunning (@user.inetd.config.http)); add ("Port: " + user.inetd.config.http.port); add ("Log folder: " + user.log.prefs.folder); add (""); indentlevel--}; bundle { //Safety and performance add ("Safety and performance:"); indentlevel++; add (""); addOnOff ("Save changed databases every minute", config.mainResponder.prefs.flSaveDatabasesEveryMinute); add (""); indentlevel--}; bundle { //Proxy server add ("Proxy server:"); indentlevel++; add (""); add ("Domain: " + user.webbrowser.proxy.domain); add ("Port: " + user.webbrowser.proxy.port); add ("Username: " + user.webbrowser.proxy.username); add (""); indentlevel--}; bundle { //Installed tools add ("Installed tools:"); indentlevel++; add (""); local (adrItem); for adrItem in @user.tools.databases { if adrItem^.flInstalled { add (nameOf (adrItem^))}}; add (""); indentlevel--}; bundle { //Open Databases add ("Open Databases:"); indentlevel++; add (""); on visit (f) { local (fname = file.fileFromPath (f)); local (folder = file.folderFromPath (f)); local (folderName = file.fileFromPath (folder)); folderName = string.popTrailing (folderName, file.getPathChar ()); local (size = string.megabyteString (file.size (f))); add (folderName + "/" + fname + ": " + size)}; table.visitOpenDatabases (@visit); add (""); indentlevel--}; bundle { //Tools folder contents add ("Tools folder:"); indentlevel++; add (""); local (f); fileloop (f in Frontier.tools.getToolsFolderPath ()) { local (fname = file.fileFromPath (f)); local (size = string.megabyteString (file.size (f))); add (fname + ": " + size)}; add (""); indentlevel--}; bundle { //agents add ("Agents:"); indentlevel++; add (""); local (adrItem); for adrItem in @system.agents { add (nameOf (adrItem^))}; add (""); indentlevel--}; bundle { //threads add ("Threads:"); indentlevel++; add (""); local (adrItem); for adrItem in @user.scheduler.threads { local (flDefined = true, flEnabled = true); if not defined (adrItem^) { flDefined = false} else { if not (adrItem^^.enabled) { flEnabled = false}}; local (threadName = nameOf (adrItem^)); if not flDefined { add (threadName + ": [not defined]")} else { if not flEnabled { add (threadName + ": [disabled]")} else { add (threadName + ": " + adrItem^)}}}; add (""); indentlevel--}; bundle { //XML-RPC add ("XML-RPC:"); indentlevel++; add (""); local (ctOutgoingAsynchMessages = 0); if defined (user.betty.queueOutgoing.table) { ctOutgoingAsynchMessages = sizeOf (user.betty.queueOutgoing.table)}; addOnOff ("Allow by IP Only", user.betty.prefs.flAllowByIPOnly); ÇaddOnOff ("Keep Asynch Client Log", user.betty.prefs.flKeepAsynchClientLog) addOnOff ("Keep Server Log", user.betty.prefs.flKeepServerLog); add ("RPC Client Default Path: " + user.betty.prefs.rpcClientDefaultPath); add ("RPC Client Default Timeout: " + user.betty.prefs.rpcClientDefaultTimeout); add ("# Pending Asynch Messages: " + ctOutgoingAsynchMessages); add (""); add ("Handlers:"); indentlevel++; add (""); local (adr); for adr in @user.betty.rpcHandlers { local (name = nameOf (adr^)); local (type = typeOf (adr^)); local (val = ""); case type { tableType { val = sizeOf (adr^) + " items"}; scriptType { val = sizeOf (adr^) + " lines"}; addressType { val = adr^}}; if val == "" { add (name)} else { add (name + ": " + val)}}; add (""); indentlevel--; addOnOff ("RPC2 responder enabled", defined (user.webserver.responders.RPC2.enabled) and user.webserver.responders.RPC2.enabled); add (""); indentlevel--}; bundle { //SOAP add ("SOAP:"); indentlevel++; add (""); add ("RPC Client Default Timeout: " + user.soap.prefs.rpcClientDefaultTimeout); add (""); add ("Handlers:"); indentlevel++; add (""); local (adr); for adr in @user.soap.rpcHandlers { local (name = nameOf (adr^)); local (type = typeOf (adr^)); local (val = ""); case type { tableType { val = sizeOf (adr^) + " items"}; scriptType { val = sizeOf (adr^) + " lines"}; addressType { val = adr^}}; if val == "" { add (name)} else { add (name + ": " + val)}}; add (""); indentlevel--; addOnOff ("SOAP responder enabled", defined (user.webserver.responders.soap.enabled) and user.webserver.responders.soap.enabled); add (""); indentlevel--}; on doSimpleTable (adrTable) { local (adrItem); for adrItem in adrTable { local (name = nameOf (adrItem^)); local (lowerName = string.lower (name)); if lowerName contains "password" or lowerName contains "serialnum" { continue}; local (value); local (size); try { size = sizeOf (adrItem^)}; case typeOf (adrItem^) { outlineType { value = "outline: " + size + " lines"}; scriptType { value = "script: " + size + " lines"}; wpTextType { value = "wp-text: " + size + " characters"}; tableType { value = "table: " + size + " items"}; menubarType { value = "menubar: " + size + " lines"}} else { value = string (adrItem^)}; add (name + ": " + value)}}; on addTableAsSection (title, adrTable) { local (nameAddress = string.popFileFromAddress (string (adrTable))); title = title + " (" + nameAddress + "): "; add (title); indentLevel++; add (""); doSimpleTable (adrTable); add (""); indentLevel--}; bundle { //Webserver bundle { //Responders add ("Responders:"); indentlevel++; add (""); local (adr); for adr in @user.webserver.responders { local (name = nameOf (adr^)); while (typeOf (adr^) == addressType) { adr = adr^}; local (flEnabled = adr^.enabled); addOnOff (name, flEnabled)}; add (""); indentlevel--}; bundle { //Webserver stats add ("Webserver stats:"); indentlevel++; add (""); add ("Hits: " + user.webserver.stats.hits); add ("Max connections: " + user.webserver.stats.maxConnections); add ("Max memory available: " + user.webserver.stats.maxMemAvail); add ("Min memory available: " + user.webserver.stats.minMemAvail); add ("Up since: " + user.webserver.stats.upSince); if defined (user.webserver.stats.wormHits) { add ("Worm hits: " + user.webserver.stats.wormHits)}; add (""); indentlevel--}; bundle { //Webserver prefs add ("Webserver prefs:"); indentlevel++; add (""); add ("Default responder: " + user.webserver.prefs.defaultResponder); addOnOff ("Debugging", user.webserver.prefs.fldebug); addOnOff ("Domain stats", user.webserver.prefs.flDomainStats); addOnOff ("DNS Lookups", user.webserver.prefs.flUseDns); add (""); indentlevel--}; bundle { //Webserver prefilters add ("Webserver PreFilters:"); indentlevel++; add (""); local (adrItem); for adrItem in @user.webserver.preFilters { if typeOf (adrItem^) == addressType { add (nameOf (adrItem^) + ": " + adrItem^)} else { add (nameOf (adrItem^))}}; add (""); indentlevel--}; bundle { //Webserver postfilters add ("Webserver PostFilters:"); indentlevel++; add (""); local (adrItem); for adrItem in @user.webserver.postFilters { if typeOf (adrItem^) == addressType { add (nameOf (adrItem^) + ": " + adrItem^)} else { add (nameOf (adrItem^))}}; add (""); indentlevel--}}; Çbundle //Manila // 6/16/05; 10:58:11 AM by TAC // disabled, eventually remove? Çon doThemesTable (adrTable) Çlocal (adrItem) Çfor adrItem in adrTable Çlocal (enabledString = "enabled") Çif not adrItem^.flEnabled ÇenabledString = "disabled" Çadd (nameOf (adrItem^) + ": " + enabledString) Çbundle //Manila callbacks Çadd ("Manila callbacks:"); indentlevel++ Çadd ("") Çlocal (adrItem) Çfor adrItem in @config.manila.callbacks Çadd (nameOf (adrItem^) + ":"); indentLevel++ Çlocal (sizeTable = sizeOf (adrItem^)) Çif sizeTable < 1 Çadd ("[Empty]") Çelse Çlocal (adrCallback) Çfor adrCallback in adrItem Çif typeOf (adrCallback^) == addressType Çadd (nameOf (adrCallback^) + ": " + adrCallback^) Çelse Çadd (nameOf (adrCallback^)) ÇindentLevel-- Çadd (""); indentlevel-- Çbundle //Manila dg themes Çadd ("Manila discussion group themes:"); indentlevel++ Çadd ("") ÇdoThemesTable (@config.manila.discussionGroupThemes) Çadd (""); indentlevel-- Çbundle //Manila hosting Çadd ("Manila hosting:"); indentlevel++ Çadd ("") Çlocal (adrItem) Çfor adrItem in @config.manila.hosting.sites Çlocal (name = nameOf (adrItem^)) Çadd (name + ":");indentLevel++ ÇdoSimpleTable (adrItem) ÇindentLevel-- Çadd (""); indentlevel-- Çbundle //Manila prefs Çadd ("Manila prefs (config.manila.prefs):"); indentlevel++ Çadd ("") ÇdoSimpleTable (@config.manila.prefs) Çadd (""); indentlevel-- Çbundle //Manila sites Çadd ("Manila sites:"); indentlevel++ Çadd ("") Çadd ("# sites in config.manila.sites: " + sizeOf (config.manila.sites)) Çadd (""); indentlevel-- Çbundle //Manila stats Çadd ("Manila stats:"); indentlevel++ Çadd ("") Çadd ("# referers tables: " + sizeOf (config.manila.stats.referers)) Çif defined (config.manila.stats.reports) Çadd ("# reports: " + sizeOf (config.manila.stats.reports)) Çif defined (config.manila.stats.sites.allTime) Çadd ("# all-time sites stats: " + sizeOf (config.manila.stats.sites.allTime)) Çif defined (config.manila.stats.sites.hourly) Çadd ("# hourly sites stats: " + sizeOf (config.manila.stats.sites.hourly)) Çif defined (config.manila.stats.sites.today) Çadd ("# today sites stats: " + sizeOf (config.manila.stats.sites.today)) Çadd (""); indentlevel-- Çbundle //Manila themes Çadd ("Manila themes:"); indentlevel++ Çadd ("") ÇdoThemesTable (@config.manila.themes) Çadd (""); indentlevel-- bundle { //mainResponder addTableAsSection ("mainResponder global URLs", @config.mainResponder.urls); addTableAsSection ("mainResponder prefs", @config.mainResponder.prefs); addTableAsSection ("mainResponder globals", @config.mainResponder.globals); bundle { //mainResponder legal macros add ("mainResponder legal macros:"); indentlevel++; add (""); local (adrItem); for adrItem in @config.mainResponder.prefs.legalMacros { local (name = nameOf (adrItem^)); case typeOf (adrItem^) { booleanType { add (name + ": " + adrItem^)}; tableType { if (sizeOf (adrItem^) == 2) and (defined (adrItem^.flLegal)) and (defined (adrItem^.flParams)) { add (name + ": [takes params]: " + adrItem^.flLegal)} else { add (name + ": [misconfigured]")}}}}; add (""); indentlevel--}; bundle { //mainResponder search queue add ("mainResponder search queue:"); indentlevel++; add (""); if defined (config.mainResponder.data.searchQueue) { add ("# items: " + sizeOf (config.mainResponder.data.searchQueue))} else { add ("Empty")}; add (""); indentlevel--}; bundle { //mainResponder callbacks add ("mainResponder callbacks:"); indentlevel++; add (""); local (adrItem); for adrItem in @config.mainResponder.callbacks { add (nameOf (adrItem^) + ":"); indentLevel++; local (sizeTable = sizeOf (adrItem^)); if sizeTable < 1 { add ("[Empty]")} else { local (adrCallback); for adrCallback in adrItem { if typeOf (adrCallback^) == addressType { add (nameOf (adrCallback^) + ": " + adrCallback^)} else { add (nameOf (adrCallback^))}}}; indentLevel--}; add (""); indentlevel--}; bundle { //mainResponder domains add ("mainResponder domains (config.mainResponder.domains):"); indentlevel++; add (""); local (adrItem); for adrItem in @config.mainResponder.domains { local (name = nameOf (adrItem^)); if typeOf (adrItem^) == tableType { if defined (adrItem^.siteTree.directory.outline) { add (name + " [siteTree]:"); indentLevel++; add (string (adrItem^.siteTree.directory.outline)); add (""); indentLevel--} else { add (name + ": table " + sizeOf (adrItem^) + " items")}} else { add (name + ": " + string (adrItem^))}}; add (""); indentlevel--}}; bundle { //user table if defined (user.applescripts.prefs) { addTableAsSection ("AppleScript", @user.applescripts.prefs)}; if defined (user.backups) { addTableAsSection ("Backups", @user.backups)}; if defined (user.batchExporter) { addTableAsSection ("BatchExporter", @user.batchExporter)}; bundle { //user.callbacks add ("user.callbacks:"); indentlevel++; add (""); local (adrItem); for adrItem in @user.callbacks { add (nameOf (adrItem^) + ":"); indentLevel++; local (sizeTable = sizeOf (adrItem^)); if sizeTable < 1 { add ("[Empty]")} else { local (adrCallback); for adrCallback in adrItem { if typeOf (adrCallback^) == addressType { add (nameOf (adrCallback^) + ": " + adrCallback^)} else { add (nameOf (adrCallback^))}}}; indentLevel--}; add (""); indentlevel--}; if defined (user.com) { addTableAsSection ("COM", @user.com)}; bundle { //user.databases add ("user.databases:"); indentlevel++; add (""); local (adrItem); for adrItem in @user.databases { add (nameOf (adrItem^) + ":"); indentLevel++; doSimpleTable (adrItem); indentLevel--}; add (""); indentlevel--}; if defined (user.export) { addTableAsSection ("Export", @user.export)}; if defined (user.html.glossary) { add ("user.html.glossary:"); indentlevel++; add (""); add ("# items: " + sizeOf (user.html.glossary)); add (""); indentlevel--}; if defined (user.html.macros) { add ("user.html.macros:"); indentlevel++; add (""); add ("# items: " + sizeOf (user.html.macros)); add (""); indentlevel--}; if defined (user.html.renderers) { add ("user.html.renderers:"); indentlevel++; add (""); add ("# items: " + sizeOf (user.html.renderers)); add (""); indentlevel--}; if defined (user.html.prefs) { addTableAsSection ("HTML prefs", @user.html.prefs)}; if defined (user.menus) { addTableAsSection ("Menus", @user.menus)}; if defined (user.prefs) { addTableAsSection ("Basic prefs", @user.prefs)}; if defined (user.prefs.dates) { addTableAsSection ("Dates", @user.prefs.dates)}; if defined (user.prefs.dialogs) { addTableAsSection ("Dialogs", @user.prefs.dialogs)}; if defined (user.prefs.fonts) { addTableAsSection ("Fonts", @user.prefs.fonts)}; if defined (user.prefs.search) { addTableAsSection ("Search", @user.prefs.search)}; if defined (user.rootUpdates.prefs) { addTableAsSection ("Root Updates prefs", @user.rootUpdates.prefs)}; if defined (user.rootUpdates.servers) { add ("user.rootUpdates.Servers:"); indentlevel++; add (""); local (adrItem); for adrItem in @user.rootUpdates.Servers { add (nameOf (adrItem^) + ":"); indentLevel++; doSimpleTable (adrItem); indentLevel--}; add (""); indentlevel--}; if defined (user.unix.scripts) { addTableAsSection ("Unix scripts", @user.unix.scripts)}; if defined (user.webBrowser) { addTableAsSection ("WebBrowser", @user.webBrowser)}}; bundle { //Misc if defined (system.verbs.traps) { addTableAsSection ("Traps", @system.verbs.traps)}; if defined (system.verbs.extensions) { addTableAsSection ("Extensions", @system.verbs.extensions)}; bundle { //root table sizes add ("Top-level table sizes:"); indentLevel++; add (""); local (adrItem); for adrItem in @root { local (name = nameOf (adrItem^)); local (size = sizeOf (adrItem^)); if typeOf (adrItem^) != tableType { add (name + ": Not a table, which surprises us.")} else { add (name + ": " + size + " items")}}; add ("");indentLevel--}; if system.environment.isCarbon { // Mac OS X port forwarding and ipfw local (s = sys.unixShellCommand ("echo \"" + user.prefs.portForwardingAdminPassword + "\" | sudo /sbin/ipfw -a list")); sys.unixShellCommand ("sudo -K"); // drop our privs add ("Mac OS X Port Forwarding and ipfw:"); indentlevel++; add (""); addOnOff ("Port Forwarding enabled", defined (user.prefs.portForwardingAdminPassword)); add (""); add ("ipfw configuration:"); indentlevel++; add (""); s = string.replaceAll (s, '\n', '\n' + string.filledstring (" ", indentLevel)); add (s); indentlevel--; add (""); indentlevel--}}; bundle { //Guest Databases folders on doFolder (name) { add (name + " folder:"); indentlevel++; add (""); local (f); fileloop (f in Frontier.getSubFolder (name)) { local (fname = file.fileFromPath (f)); fname = string.popTrailing (fname, file.getPathChar ()); if file.isFolder (f) { add (fname + ": [folder]")} else { local (size = string.megabyteString (file.size (f))); add (fname + ": " + size)}}; add (""); indentlevel--}; doFolder ("apps"); doFolder ("ops"); doFolder ("www")}; if fldebug { wp.newTextObject (mailText, @temp.FrontierConfiguration); edit (@temp.FrontierConfiguration)}; return (mailText)}; Çbundle // test ÇgetConfigInfo (fldebug: true) \ No newline at end of file --- 1,3 ---- FrontierVcsFile:1:scpt:mainResponder.utilities.getConfigInfo ! on getConfigInfo (flIncludeHeader=true, fldebug = false) { ÇGet general config info about Frontier and mainResponder. ÇChanges Ç6/19/05; 7:17:48 PM by TAC Çdidn't quite have the previous statement right, if user.prefs.portForwardingAdminPassword isn't defined then we can't provide ipfw information ÇMac OS X port forwarding info is sent even if port forwarding isn't enable, could be useful for diagnostics Çmoved fldebug into parameters for call, added test bundle, less likely to leave debug flag set to true this way Çadded section for Mac OS X Port Forwarding and ipfw configuration Çwhen building simple table, get size of object in try in case object has no size as in the case of nil value Çdisabled Manila specific code local (mailtext = "", indentlevel = 0); on add (s) { mailtext = mailtext + string.filledstring (" ", indentlevel) + s + "\r\n"}; on addOnOff (label, bool) { local (s = label + ": "); if bool { s = s + "On"} else { s = s + "Off"}; add (s)}; add ("Frontier configuration on " + clock.now () + "."); indentlevel++; add (""); bundle { //Installation information if flIncludeHeader { add ("Installation information:"); indentlevel++; add (""); add ("Frontier version: " + Frontier.version ()); local (os = "Windows"); if system.environment.isMac { if system.environment.isCarbon { os = "Mac OS X"} else { os = "Mac OS"}}; add ("Operating System: " + os); local (osVersion = system.environment.osVersionString); if system.environment.isCarbon { osVersion = string.replace (osVersion, "16", "10")}; add ("OS Version: " + osVersion); add ("IP address: " + tcp.dns.getMyDottedId ()); add ("Frontier folder: " + file.folderfrompath (frontier.getprogrampath ())); add (""); indentlevel--}}; bundle { //About you and your computer add ("About you and your computer:"); indentlevel++; add (""); add ("Name: " + user.prefs.name); add ("Organization: " + user.prefs.organization); add ("Mail address: " + user.prefs.mailAddress); add ("Outgoing mail server: " + user.prefs.mailHost); addOnOff ("Web server", inetd.isDaemonRunning (@user.inetd.config.http)); add ("Port: " + user.inetd.config.http.port); add ("Log folder: " + user.log.prefs.folder); add (""); indentlevel--}; bundle { //Safety and performance add ("Safety and performance:"); indentlevel++; add (""); addOnOff ("Save changed databases every minute", config.mainResponder.prefs.flSaveDatabasesEveryMinute); add (""); indentlevel--}; bundle { //Proxy server add ("Proxy server:"); indentlevel++; add (""); add ("Domain: " + user.webbrowser.proxy.domain); add ("Port: " + user.webbrowser.proxy.port); add ("Username: " + user.webbrowser.proxy.username); add (""); indentlevel--}; bundle { //Installed tools add ("Installed tools:"); indentlevel++; add (""); local (adrItem); for adrItem in @user.tools.databases { if adrItem^.flInstalled { add (nameOf (adrItem^))}}; add (""); indentlevel--}; bundle { //Open Databases add ("Open Databases:"); indentlevel++; add (""); on visit (f) { local (fname = file.fileFromPath (f)); local (folder = file.folderFromPath (f)); local (folderName = file.fileFromPath (folder)); folderName = string.popTrailing (folderName, file.getPathChar ()); local (size = string.megabyteString (file.size (f))); add (folderName + "/" + fname + ": " + size)}; table.visitOpenDatabases (@visit); add (""); indentlevel--}; bundle { //Tools folder contents add ("Tools folder:"); indentlevel++; add (""); local (f); fileloop (f in Frontier.tools.getToolsFolderPath ()) { local (fname = file.fileFromPath (f)); local (size = string.megabyteString (file.size (f))); add (fname + ": " + size)}; add (""); indentlevel--}; bundle { //agents add ("Agents:"); indentlevel++; add (""); local (adrItem); for adrItem in @system.agents { add (nameOf (adrItem^))}; add (""); indentlevel--}; bundle { //threads add ("Threads:"); indentlevel++; add (""); local (adrItem); for adrItem in @user.scheduler.threads { local (flDefined = true, flEnabled = true); if not defined (adrItem^) { flDefined = false} else { if not (adrItem^^.enabled) { flEnabled = false}}; local (threadName = nameOf (adrItem^)); if not flDefined { add (threadName + ": [not defined]")} else { if not flEnabled { add (threadName + ": [disabled]")} else { add (threadName + ": " + adrItem^)}}}; add (""); indentlevel--}; bundle { //XML-RPC add ("XML-RPC:"); indentlevel++; add (""); local (ctOutgoingAsynchMessages = 0); if defined (user.betty.queueOutgoing.table) { ctOutgoingAsynchMessages = sizeOf (user.betty.queueOutgoing.table)}; addOnOff ("Allow by IP Only", user.betty.prefs.flAllowByIPOnly); ÇaddOnOff ("Keep Asynch Client Log", user.betty.prefs.flKeepAsynchClientLog) addOnOff ("Keep Server Log", user.betty.prefs.flKeepServerLog); add ("RPC Client Default Path: " + user.betty.prefs.rpcClientDefaultPath); add ("RPC Client Default Timeout: " + user.betty.prefs.rpcClientDefaultTimeout); add ("# Pending Asynch Messages: " + ctOutgoingAsynchMessages); add (""); add ("Handlers:"); indentlevel++; add (""); local (adr); for adr in @user.betty.rpcHandlers { local (name = nameOf (adr^)); local (type = typeOf (adr^)); local (val = ""); case type { tableType { val = sizeOf (adr^) + " items"}; scriptType { val = sizeOf (adr^) + " lines"}; addressType { val = adr^}}; if val == "" { add (name)} else { add (name + ": " + val)}}; add (""); indentlevel--; addOnOff ("RPC2 responder enabled", defined (user.webserver.responders.RPC2.enabled) and user.webserver.responders.RPC2.enabled); add (""); indentlevel--}; bundle { //SOAP add ("SOAP:"); indentlevel++; add (""); add ("RPC Client Default Timeout: " + user.soap.prefs.rpcClientDefaultTimeout); add (""); add ("Handlers:"); indentlevel++; add (""); local (adr); for adr in @user.soap.rpcHandlers { local (name = nameOf (adr^)); local (type = typeOf (adr^)); local (val = ""); case type { tableType { val = sizeOf (adr^) + " items"}; scriptType { val = sizeOf (adr^) + " lines"}; addressType { val = adr^}}; if val == "" { add (name)} else { add (name + ": " + val)}}; add (""); indentlevel--; addOnOff ("SOAP responder enabled", defined (user.webserver.responders.soap.enabled) and user.webserver.responders.soap.enabled); add (""); indentlevel--}; on doSimpleTable (adrTable) { local (adrItem); for adrItem in adrTable { local (name = nameOf (adrItem^)); local (lowerName = string.lower (name)); if lowerName contains "password" or lowerName contains "serialnum" { continue}; local (value); local (size); try { size = sizeOf (adrItem^)}; case typeOf (adrItem^) { outlineType { value = "outline: " + size + " lines"}; scriptType { value = "script: " + size + " lines"}; wpTextType { value = "wp-text: " + size + " characters"}; tableType { value = "table: " + size + " items"}; menubarType { value = "menubar: " + size + " lines"}} else { value = string (adrItem^)}; add (name + ": " + value)}}; on addTableAsSection (title, adrTable) { local (nameAddress = string.popFileFromAddress (string (adrTable))); title = title + " (" + nameAddress + "): "; add (title); indentLevel++; add (""); doSimpleTable (adrTable); add (""); indentLevel--}; bundle { //Webserver bundle { //Responders add ("Responders:"); indentlevel++; add (""); local (adr); for adr in @user.webserver.responders { local (name = nameOf (adr^)); while (typeOf (adr^) == addressType) { adr = adr^}; local (flEnabled = adr^.enabled); addOnOff (name, flEnabled)}; add (""); indentlevel--}; bundle { //Webserver stats add ("Webserver stats:"); indentlevel++; add (""); add ("Hits: " + user.webserver.stats.hits); add ("Max connections: " + user.webserver.stats.maxConnections); add ("Max memory available: " + user.webserver.stats.maxMemAvail); add ("Min memory available: " + user.webserver.stats.minMemAvail); add ("Up since: " + user.webserver.stats.upSince); if defined (user.webserver.stats.wormHits) { add ("Worm hits: " + user.webserver.stats.wormHits)}; add (""); indentlevel--}; bundle { //Webserver prefs add ("Webserver prefs:"); indentlevel++; add (""); add ("Default responder: " + user.webserver.prefs.defaultResponder); addOnOff ("Debugging", user.webserver.prefs.fldebug); addOnOff ("Domain stats", user.webserver.prefs.flDomainStats); addOnOff ("DNS Lookups", user.webserver.prefs.flUseDns); add (""); indentlevel--}; bundle { //Webserver prefilters add ("Webserver PreFilters:"); indentlevel++; add (""); local (adrItem); for adrItem in @user.webserver.preFilters { if typeOf (adrItem^) == addressType { add (nameOf (adrItem^) + ": " + adrItem^)} else { add (nameOf (adrItem^))}}; add (""); indentlevel--}; bundle { //Webserver postfilters add ("Webserver PostFilters:"); indentlevel++; add (""); local (adrItem); for adrItem in @user.webserver.postFilters { if typeOf (adrItem^) == addressType { add (nameOf (adrItem^) + ": " + adrItem^)} else { add (nameOf (adrItem^))}}; add (""); indentlevel--}}; Çbundle //Manila // 6/16/05; 10:58:11 AM by TAC // disabled, eventually remove? Çon doThemesTable (adrTable) Çlocal (adrItem) Çfor adrItem in adrTable Çlocal (enabledString = "enabled") Çif not adrItem^.flEnabled ÇenabledString = "disabled" Çadd (nameOf (adrItem^) + ": " + enabledString) Çbundle //Manila callbacks Çadd ("Manila callbacks:"); indentlevel++ Çadd ("") Çlocal (adrItem) Çfor adrItem in @config.manila.callbacks Çadd (nameOf (adrItem^) + ":"); indentLevel++ Çlocal (sizeTable = sizeOf (adrItem^)) Çif sizeTable < 1 Çadd ("[Empty]") Çelse Çlocal (adrCallback) Çfor adrCallback in adrItem Çif typeOf (adrCallback^) == addressType Çadd (nameOf (adrCallback^) + ": " + adrCallback^) Çelse Çadd (nameOf (adrCallback^)) ÇindentLevel-- Çadd (""); indentlevel-- Çbundle //Manila dg themes Çadd ("Manila discussion group themes:"); indentlevel++ Çadd ("") ÇdoThemesTable (@config.manila.discussionGroupThemes) Çadd (""); indentlevel-- Çbundle //Manila hosting Çadd ("Manila hosting:"); indentlevel++ Çadd ("") Çlocal (adrItem) Çfor adrItem in @config.manila.hosting.sites Çlocal (name = nameOf (adrItem^)) Çadd (name + ":");indentLevel++ ÇdoSimpleTable (adrItem) ÇindentLevel-- Çadd (""); indentlevel-- Çbundle //Manila prefs Çadd ("Manila prefs (config.manila.prefs):"); indentlevel++ Çadd ("") ÇdoSimpleTable (@config.manila.prefs) Çadd (""); indentlevel-- Çbundle //Manila sites Çadd ("Manila sites:"); indentlevel++ Çadd ("") Çadd ("# sites in config.manila.sites: " + sizeOf (config.manila.sites)) Çadd (""); indentlevel-- Çbundle //Manila stats Çadd ("Manila stats:"); indentlevel++ Çadd ("") Çadd ("# referers tables: " + sizeOf (config.manila.stats.referers)) Çif defined (config.manila.stats.reports) Çadd ("# reports: " + sizeOf (config.manila.stats.reports)) Çif defined (config.manila.stats.sites.allTime) Çadd ("# all-time sites stats: " + sizeOf (config.manila.stats.sites.allTime)) Çif defined (config.manila.stats.sites.hourly) Çadd ("# hourly sites stats: " + sizeOf (config.manila.stats.sites.hourly)) Çif defined (config.manila.stats.sites.today) Çadd ("# today sites stats: " + sizeOf (config.manila.stats.sites.today)) Çadd (""); indentlevel-- Çbundle //Manila themes Çadd ("Manila themes:"); indentlevel++ Çadd ("") ÇdoThemesTable (@config.manila.themes) Çadd (""); indentlevel-- bundle { //mainResponder addTableAsSection ("mainResponder global URLs", @config.mainResponder.urls); addTableAsSection ("mainResponder prefs", @config.mainResponder.prefs); addTableAsSection ("mainResponder globals", @config.mainResponder.globals); bundle { //mainResponder legal macros add ("mainResponder legal macros:"); indentlevel++; add (""); local (adrItem); for adrItem in @config.mainResponder.prefs.legalMacros { local (name = nameOf (adrItem^)); case typeOf (adrItem^) { booleanType { add (name + ": " + adrItem^)}; tableType { if (sizeOf (adrItem^) == 2) and (defined (adrItem^.flLegal)) and (defined (adrItem^.flParams)) { add (name + ": [takes params]: " + adrItem^.flLegal)} else { add (name + ": [misconfigured]")}}}}; add (""); indentlevel--}; bundle { //mainResponder search queue add ("mainResponder search queue:"); indentlevel++; add (""); if defined (config.mainResponder.data.searchQueue) { add ("# items: " + sizeOf (config.mainResponder.data.searchQueue))} else { add ("Empty")}; add (""); indentlevel--}; bundle { //mainResponder callbacks add ("mainResponder callbacks:"); indentlevel++; add (""); local (adrItem); for adrItem in @config.mainResponder.callbacks { add (nameOf (adrItem^) + ":"); indentLevel++; local (sizeTable = sizeOf (adrItem^)); if sizeTable < 1 { add ("[Empty]")} else { local (adrCallback); for adrCallback in adrItem { if typeOf (adrCallback^) == addressType { add (nameOf (adrCallback^) + ": " + adrCallback^)} else { add (nameOf (adrCallback^))}}}; indentLevel--}; add (""); indentlevel--}; bundle { //mainResponder domains add ("mainResponder domains (config.mainResponder.domains):"); indentlevel++; add (""); local (adrItem); for adrItem in @config.mainResponder.domains { local (name = nameOf (adrItem^)); if typeOf (adrItem^) == tableType { if defined (adrItem^.siteTree.directory.outline) { add (name + " [siteTree]:"); indentLevel++; add (string (adrItem^.siteTree.directory.outline)); add (""); indentLevel--} else { add (name + ": table " + sizeOf (adrItem^) + " items")}} else { add (name + ": " + string (adrItem^))}}; add (""); indentlevel--}}; bundle { //user table if defined (user.applescripts.prefs) { addTableAsSection ("AppleScript", @user.applescripts.prefs)}; if defined (user.backups) { addTableAsSection ("Backups", @user.backups)}; if defined (user.batchExporter) { addTableAsSection ("BatchExporter", @user.batchExporter)}; bundle { //user.callbacks add ("user.callbacks:"); indentlevel++; add (""); local (adrItem); for adrItem in @user.callbacks { add (nameOf (adrItem^) + ":"); indentLevel++; local (sizeTable = sizeOf (adrItem^)); if sizeTable < 1 { add ("[Empty]")} else { local (adrCallback); for adrCallback in adrItem { if typeOf (adrCallback^) == addressType { add (nameOf (adrCallback^) + ": " + adrCallback^)} else { add (nameOf (adrCallback^))}}}; indentLevel--}; add (""); indentlevel--}; if defined (user.com) { addTableAsSection ("COM", @user.com)}; bundle { //user.databases add ("user.databases:"); indentlevel++; add (""); local (adrItem); for adrItem in @user.databases { add (nameOf (adrItem^) + ":"); indentLevel++; doSimpleTable (adrItem); indentLevel--}; add (""); indentlevel--}; if defined (user.export) { addTableAsSection ("Export", @user.export)}; if defined (user.html.glossary) { add ("user.html.glossary:"); indentlevel++; add (""); add ("# items: " + sizeOf (user.html.glossary)); add (""); indentlevel--}; if defined (user.html.macros) { add ("user.html.macros:"); indentlevel++; add (""); add ("# items: " + sizeOf (user.html.macros)); add (""); indentlevel--}; if defined (user.html.renderers) { add ("user.html.renderers:"); indentlevel++; add (""); add ("# items: " + sizeOf (user.html.renderers)); add (""); indentlevel--}; if defined (user.html.prefs) { addTableAsSection ("HTML prefs", @user.html.prefs)}; if defined (user.menus) { addTableAsSection ("Menus", @user.menus)}; if defined (user.prefs) { addTableAsSection ("Basic prefs", @user.prefs)}; if defined (user.prefs.dates) { addTableAsSection ("Dates", @user.prefs.dates)}; if defined (user.prefs.dialogs) { addTableAsSection ("Dialogs", @user.prefs.dialogs)}; if defined (user.prefs.fonts) { addTableAsSection ("Fonts", @user.prefs.fonts)}; if defined (user.prefs.search) { addTableAsSection ("Search", @user.prefs.search)}; if defined (user.rootUpdates.prefs) { addTableAsSection ("Root Updates prefs", @user.rootUpdates.prefs)}; if defined (user.rootUpdates.servers) { add ("user.rootUpdates.Servers:"); indentlevel++; add (""); local (adrItem); for adrItem in @user.rootUpdates.Servers { add (nameOf (adrItem^) + ":"); indentLevel++; doSimpleTable (adrItem); indentLevel--}; add (""); indentlevel--}; if defined (user.unix.scripts) { addTableAsSection ("Unix scripts", @user.unix.scripts)}; if defined (user.webBrowser) { addTableAsSection ("WebBrowser", @user.webBrowser)}}; bundle { //Misc if defined (system.verbs.traps) { addTableAsSection ("Traps", @system.verbs.traps)}; if defined (system.verbs.extensions) { addTableAsSection ("Extensions", @system.verbs.extensions)}; bundle { //root table sizes add ("Top-level table sizes:"); indentLevel++; add (""); local (adrItem); for adrItem in @root { local (name = nameOf (adrItem^)); local (size = sizeOf (adrItem^)); if typeOf (adrItem^) != tableType { add (name + ": Not a table, which surprises us.")} else { add (name + ": " + size + " items")}}; add ("");indentLevel--}; if system.environment.isCarbon { // Mac OS X port forwarding and ipfw local (flPortForwardingEnabled = defined (user.prefs.portForwardingAdminPassword), ipfwResults); if flPortForwardingEnabled { ipfwResults = sys.unixShellCommand ("echo \"" + user.prefs.portForwardingAdminPassword + "\" | sudo /sbin/ipfw -a list"); sys.unixShellCommand ("sudo -K")}; // drop our privs bundle { // heading local (s = "Mac OS X Port Forwarding"); if flPortForwardingEnabled { s = s + " and ipfw"}; add (s + ":"); indentlevel++}; add (""); addOnOff ("Port Forwarding enabled", flPortForwardingEnabled); if flPortForwardingEnabled { ipfwResults = string.replaceAll (ipfwResults, '\n', '\n' + string.filledstring (" ", indentLevel)); add (""); add ("ipfw configuration:"); indentlevel++; add (""); add (ipfwResults); indentlevel--}; add (""); indentlevel--}}; bundle { //Guest Databases folders on doFolder (name) { add (name + " folder:"); indentlevel++; add (""); local (f); fileloop (f in Frontier.getSubFolder (name)) { local (fname = file.fileFromPath (f)); fname = string.popTrailing (fname, file.getPathChar ()); if file.isFolder (f) { add (fname + ": [folder]")} else { local (size = string.megabyteString (file.size (f))); add (fname + ": " + size)}}; add (""); indentlevel--}; doFolder ("apps"); doFolder ("ops"); doFolder ("www")}; if fldebug { wp.newTextObject (mailText, @temp.FrontierConfiguration); edit (@temp.FrontierConfiguration)}; return (mailText)}; Çbundle // test ÇgetConfigInfo (fldebug: true) \ No newline at end of file |
|
From: creedon <icr...@us...> - 2005-06-19 18:28:19
|
Update of /cvsroot/frontierkernel/odbs/mainResponderRoot/mainResponder/utilities In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20606 Modified Files: getConfigInfo Log Message: Mac OS X port forwarding info is sent even if port forwarding isn't enable, useful for diagnostics Index: getConfigInfo =================================================================== RCS file: /cvsroot/frontierkernel/odbs/mainResponderRoot/mainResponder/utilities/getConfigInfo,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** getConfigInfo 19 Jun 2005 04:00:41 -0000 1.2 --- getConfigInfo 19 Jun 2005 18:28:10 -0000 1.3 *************** *** 1,3 **** FrontierVcsFile:1:scpt:mainResponder.utilities.getConfigInfo ! on getConfigInfo (flIncludeHeader=true, fldebug = false) { ÇGet general config info about Frontier and mainResponder. ÇChanges Ç6/18/05; 11:20:24 AM by TAC Çmoved fldebug into parameters for call, added test bundle, less likely to leave debug flag set to true this way Çadded section for Mac OS X Port Forwarding and ipfw configuration Çwhen building simple table, get size of object in try in case object has no size as in the case of nil value Çdisabled Manila specific code local (mailtext = "", indentlevel = 0); on add (s) { mailtext = mailtext + string.filledstring (" ", indentlevel) + s + "\r\n"}; on addOnOff (label, bool) { local (s = label + ": "); if bool { s = s + "On"} else { s = s + "Off"}; add (s)}; add ("Frontier configuration on " + clock.now () + "."); indentlevel++; add (""); bundle { //Installation information if flIncludeHeader { add ("Installation information:"); indentlevel++; add (""); add ("Frontier version: " + Frontier.version ()); local (os = "Windows"); if system.environment.isMac { if system.environment.isCarbon { os = "Mac OS X"} else { os = "Mac OS"}}; add ("Operating System: " + os); local (osVersion = system.environment.osVersionString); if system.environment.isCarbon { osVersion = string.replace (osVersion, "16", "10")}; add ("OS Version: " + osVersion); add ("IP address: " + tcp.dns.getMyDottedId ()); add ("Frontier folder: " + file.folderfrompath (frontier.getprogrampath ())); add (""); indentlevel--}}; bundle { //About you and your computer add ("About you and your computer:"); indentlevel++; add (""); add ("Name: " + user.prefs.name); add ("Organization: " + user.prefs.organization); add ("Mail address: " + user.prefs.mailAddress); add ("Outgoing mail server: " + user.prefs.mailHost); addOnOff ("Web server", inetd.isDaemonRunning (@user.inetd.config.http)); add ("Port: " + user.inetd.config.http.port); add ("Log folder: " + user.log.prefs.folder); add (""); indentlevel--}; bundle { //Safety and performance add ("Safety and performance:"); indentlevel++; add (""); addOnOff ("Save changed databases every minute", config.mainResponder.prefs.flSaveDatabasesEveryMinute); add (""); indentlevel--}; bundle { //Proxy server add ("Proxy server:"); indentlevel++; add (""); add ("Domain: " + user.webbrowser.proxy.domain); add ("Port: " + user.webbrowser.proxy.port); add ("Username: " + user.webbrowser.proxy.username); add (""); indentlevel--}; bundle { //Installed tools add ("Installed tools:"); indentlevel++; add (""); local (adrItem); for adrItem in @user.tools.databases { if adrItem^.flInstalled { add (nameOf (adrItem^))}}; add (""); indentlevel--}; bundle { //Open Databases add ("Open Databases:"); indentlevel++; add (""); on visit (f) { local (fname = file.fileFromPath (f)); local (folder = file.folderFromPath (f)); local (folderName = file.fileFromPath (folder)); folderName = string.popTrailing (folderName, file.getPathChar ()); local (size = string.megabyteString (file.size (f))); add (folderName + "/" + fname + ": " + size)}; table.visitOpenDatabases (@visit); add (""); indentlevel--}; bundle { //Tools folder contents add ("Tools folder:"); indentlevel++; add (""); local (f); fileloop (f in Frontier.tools.getToolsFolderPath ()) { local (fname = file.fileFromPath (f)); local (size = string.megabyteString (file.size (f))); add (fname + ": " + size)}; add (""); indentlevel--}; bundle { //agents add ("Agents:"); indentlevel++; add (""); local (adrItem); for adrItem in @system.agents { add (nameOf (adrItem^))}; add (""); indentlevel--}; bundle { //threads add ("Threads:"); indentlevel++; add (""); local (adrItem); for adrItem in @user.scheduler.threads { local (flDefined = true, flEnabled = true); if not defined (adrItem^) { flDefined = false} else { if not (adrItem^^.enabled) { flEnabled = false}}; local (threadName = nameOf (adrItem^)); if not flDefined { add (threadName + ": [not defined]")} else { if not flEnabled { add (threadName + ": [disabled]")} else { add (threadName + ": " + adrItem^)}}}; add (""); indentlevel--}; bundle { //XML-RPC add ("XML-RPC:"); indentlevel++; add (""); local (ctOutgoingAsynchMessages = 0); if defined (user.betty.queueOutgoing.table) { ctOutgoingAsynchMessages = sizeOf (user.betty.queueOutgoing.table)}; addOnOff ("Allow by IP Only", user.betty.prefs.flAllowByIPOnly); ÇaddOnOff ("Keep Asynch Client Log", user.betty.prefs.flKeepAsynchClientLog) addOnOff ("Keep Server Log", user.betty.prefs.flKeepServerLog); add ("RPC Client Default Path: " + user.betty.prefs.rpcClientDefaultPath); add ("RPC Client Default Timeout: " + user.betty.prefs.rpcClientDefaultTimeout); add ("# Pending Asynch Messages: " + ctOutgoingAsynchMessages); add (""); add ("Handlers:"); indentlevel++; add (""); local (adr); for adr in @user.betty.rpcHandlers { local (name = nameOf (adr^)); local (type = typeOf (adr^)); local (val = ""); case type { tableType { val = sizeOf (adr^) + " items"}; scriptType { val = sizeOf (adr^) + " lines"}; addressType { val = adr^}}; if val == "" { add (name)} else { add (name + ": " + val)}}; add (""); indentlevel--; addOnOff ("RPC2 responder enabled", defined (user.webserver.responders.RPC2.enabled) and user.webserver.responders.RPC2.enabled); add (""); indentlevel--}; bundle { //SOAP add ("SOAP:"); indentlevel++; add (""); add ("RPC Client Default Timeout: " + user.soap.prefs.rpcClientDefaultTimeout); add (""); add ("Handlers:"); indentlevel++; add (""); local (adr); for adr in @user.soap.rpcHandlers { local (name = nameOf (adr^)); local (type = typeOf (adr^)); local (val = ""); case type { tableType { val = sizeOf (adr^) + " items"}; scriptType { val = sizeOf (adr^) + " lines"}; addressType { val = adr^}}; if val == "" { add (name)} else { add (name + ": " + val)}}; add (""); indentlevel--; addOnOff ("SOAP responder enabled", defined (user.webserver.responders.soap.enabled) and user.webserver.responders.soap.enabled); add (""); indentlevel--}; on doSimpleTable (adrTable) { local (adrItem); for adrItem in adrTable { local (name = nameOf (adrItem^)); local (lowerName = string.lower (name)); if lowerName contains "password" or lowerName contains "serialnum" { continue}; local (value); local (size); try { size = sizeOf (adrItem^)}; case typeOf (adrItem^) { outlineType { value = "outline: " + size + " lines"}; scriptType { value = "script: " + size + " lines"}; wpTextType { value = "wp-text: " + size + " characters"}; tableType { value = "table: " + size + " items"}; menubarType { value = "menubar: " + size + " lines"}} else { value = string (adrItem^)}; add (name + ": " + value)}}; on addTableAsSection (title, adrTable) { local (nameAddress = string.popFileFromAddress (string (adrTable))); title = title + " (" + nameAddress + "): "; add (title); indentLevel++; add (""); doSimpleTable (adrTable); add (""); indentLevel--}; bundle { //Webserver bundle { //Responders add ("Responders:"); indentlevel++; add (""); local (adr); for adr in @user.webserver.responders { local (name = nameOf (adr^)); while (typeOf (adr^) == addressType) { adr = adr^}; local (flEnabled = adr^.enabled); addOnOff (name, flEnabled)}; add (""); indentlevel--}; bundle { //Webserver stats add ("Webserver stats:"); indentlevel++; add (""); add ("Hits: " + user.webserver.stats.hits); add ("Max connections: " + user.webserver.stats.maxConnections); add ("Max memory available: " + user.webserver.stats.maxMemAvail); add ("Min memory available: " + user.webserver.stats.minMemAvail); add ("Up since: " + user.webserver.stats.upSince); if defined (user.webserver.stats.wormHits) { add ("Worm hits: " + user.webserver.stats.wormHits)}; add (""); indentlevel--}; bundle { //Webserver prefs add ("Webserver prefs:"); indentlevel++; add (""); add ("Default responder: " + user.webserver.prefs.defaultResponder); addOnOff ("Debugging", user.webserver.prefs.fldebug); addOnOff ("Domain stats", user.webserver.prefs.flDomainStats); addOnOff ("DNS Lookups", user.webserver.prefs.flUseDns); add (""); indentlevel--}; bundle { //Webserver prefilters add ("Webserver PreFilters:"); indentlevel++; add (""); local (adrItem); for adrItem in @user.webserver.preFilters { if typeOf (adrItem^) == addressType { add (nameOf (adrItem^) + ": " + adrItem^)} else { add (nameOf (adrItem^))}}; add (""); indentlevel--}; bundle { //Webserver postfilters add ("Webserver PostFilters:"); indentlevel++; add (""); local (adrItem); for adrItem in @user.webserver.postFilters { if typeOf (adrItem^) == addressType { add (nameOf (adrItem^) + ": " + adrItem^)} else { add (nameOf (adrItem^))}}; add (""); indentlevel--}}; Çbundle //Manila // 6/16/05; 10:58:11 AM by TAC // disabled, eventually remove? Çon doThemesTable (adrTable) Çlocal (adrItem) Çfor adrItem in adrTable Çlocal (enabledString = "enabled") Çif not adrItem^.flEnabled ÇenabledString = "disabled" Çadd (nameOf (adrItem^) + ": " + enabledString) Çbundle //Manila callbacks Çadd ("Manila callbacks:"); indentlevel++ Çadd ("") Çlocal (adrItem) Çfor adrItem in @config.manila.callbacks Çadd (nameOf (adrItem^) + ":"); indentLevel++ Çlocal (sizeTable = sizeOf (adrItem^)) Çif sizeTable < 1 Çadd ("[Empty]") Çelse Çlocal (adrCallback) Çfor adrCallback in adrItem Çif typeOf (adrCallback^) == addressType Çadd (nameOf (adrCallback^) + ": " + adrCallback^) Çelse Çadd (nameOf (adrCallback^)) ÇindentLevel-- Çadd (""); indentlevel-- Çbundle //Manila dg themes Çadd ("Manila discussion group themes:"); indentlevel++ Çadd ("") ÇdoThemesTable (@config.manila.discussionGroupThemes) Çadd (""); indentlevel-- Çbundle //Manila hosting Çadd ("Manila hosting:"); indentlevel++ Çadd ("") Çlocal (adrItem) Çfor adrItem in @config.manila.hosting.sites Çlocal (name = nameOf (adrItem^)) Çadd (name + ":");indentLevel++ ÇdoSimpleTable (adrItem) ÇindentLevel-- Çadd (""); indentlevel-- Çbundle //Manila prefs Çadd ("Manila prefs (config.manila.prefs):"); indentlevel++ Çadd ("") ÇdoSimpleTable (@config.manila.prefs) Çadd (""); indentlevel-- Çbundle //Manila sites Çadd ("Manila sites:"); indentlevel++ Çadd ("") Çadd ("# sites in config.manila.sites: " + sizeOf (config.manila.sites)) Çadd (""); indentlevel-- Çbundle //Manila stats Çadd ("Manila stats:"); indentlevel++ Çadd ("") Çadd ("# referers tables: " + sizeOf (config.manila.stats.referers)) Çif defined (config.manila.stats.reports) Çadd ("# reports: " + sizeOf (config.manila.stats.reports)) Çif defined (config.manila.stats.sites.allTime) Çadd ("# all-time sites stats: " + sizeOf (config.manila.stats.sites.allTime)) Çif defined (config.manila.stats.sites.hourly) Çadd ("# hourly sites stats: " + sizeOf (config.manila.stats.sites.hourly)) Çif defined (config.manila.stats.sites.today) Çadd ("# today sites stats: " + sizeOf (config.manila.stats.sites.today)) Çadd (""); indentlevel-- Çbundle //Manila themes Çadd ("Manila themes:"); indentlevel++ Çadd ("") ÇdoThemesTable (@config.manila.themes) Çadd (""); indentlevel-- bundle { //mainResponder addTableAsSection ("mainResponder global URLs", @config.mainResponder.urls); addTableAsSection ("mainResponder prefs", @config.mainResponder.prefs); addTableAsSection ("mainResponder globals", @config.mainResponder.globals); bundle { //mainResponder legal macros add ("mainResponder legal macros:"); indentlevel++; add (""); local (adrItem); for adrItem in @config.mainResponder.prefs.legalMacros { local (name = nameOf (adrItem^)); case typeOf (adrItem^) { booleanType { add (name + ": " + adrItem^)}; tableType { if (sizeOf (adrItem^) == 2) and (defined (adrItem^.flLegal)) and (defined (adrItem^.flParams)) { add (name + ": [takes params]: " + adrItem^.flLegal)} else { add (name + ": [misconfigured]")}}}}; add (""); indentlevel--}; bundle { //mainResponder search queue add ("mainResponder search queue:"); indentlevel++; add (""); if defined (config.mainResponder.data.searchQueue) { add ("# items: " + sizeOf (config.mainResponder.data.searchQueue))} else { add ("Empty")}; add (""); indentlevel--}; bundle { //mainResponder callbacks add ("mainResponder callbacks:"); indentlevel++; add (""); local (adrItem); for adrItem in @config.mainResponder.callbacks { add (nameOf (adrItem^) + ":"); indentLevel++; local (sizeTable = sizeOf (adrItem^)); if sizeTable < 1 { add ("[Empty]")} else { local (adrCallback); for adrCallback in adrItem { if typeOf (adrCallback^) == addressType { add (nameOf (adrCallback^) + ": " + adrCallback^)} else { add (nameOf (adrCallback^))}}}; indentLevel--}; add (""); indentlevel--}; bundle { //mainResponder domains add ("mainResponder domains (config.mainResponder.domains):"); indentlevel++; add (""); local (adrItem); for adrItem in @config.mainResponder.domains { local (name = nameOf (adrItem^)); if typeOf (adrItem^) == tableType { if defined (adrItem^.siteTree.directory.outline) { add (name + " [siteTree]:"); indentLevel++; add (string (adrItem^.siteTree.directory.outline)); add (""); indentLevel--} else { add (name + ": table " + sizeOf (adrItem^) + " items")}} else { add (name + ": " + string (adrItem^))}}; add (""); indentlevel--}}; bundle { //user table if defined (user.applescripts.prefs) { addTableAsSection ("AppleScript", @user.applescripts.prefs)}; if defined (user.backups) { addTableAsSection ("Backups", @user.backups)}; if defined (user.batchExporter) { addTableAsSection ("BatchExporter", @user.batchExporter)}; bundle { //user.callbacks add ("user.callbacks:"); indentlevel++; add (""); local (adrItem); for adrItem in @user.callbacks { add (nameOf (adrItem^) + ":"); indentLevel++; local (sizeTable = sizeOf (adrItem^)); if sizeTable < 1 { add ("[Empty]")} else { local (adrCallback); for adrCallback in adrItem { if typeOf (adrCallback^) == addressType { add (nameOf (adrCallback^) + ": " + adrCallback^)} else { add (nameOf (adrCallback^))}}}; indentLevel--}; add (""); indentlevel--}; if defined (user.com) { addTableAsSection ("COM", @user.com)}; bundle { //user.databases add ("user.databases:"); indentlevel++; add (""); local (adrItem); for adrItem in @user.databases { add (nameOf (adrItem^) + ":"); indentLevel++; doSimpleTable (adrItem); indentLevel--}; add (""); indentlevel--}; if defined (user.export) { addTableAsSection ("Export", @user.export)}; if defined (user.html.glossary) { add ("user.html.glossary:"); indentlevel++; add (""); add ("# items: " + sizeOf (user.html.glossary)); add (""); indentlevel--}; if defined (user.html.macros) { add ("user.html.macros:"); indentlevel++; add (""); add ("# items: " + sizeOf (user.html.macros)); add (""); indentlevel--}; if defined (user.html.renderers) { add ("user.html.renderers:"); indentlevel++; add (""); add ("# items: " + sizeOf (user.html.renderers)); add (""); indentlevel--}; if defined (user.html.prefs) { addTableAsSection ("HTML prefs", @user.html.prefs)}; if defined (user.menus) { addTableAsSection ("Menus", @user.menus)}; if defined (user.prefs) { addTableAsSection ("Basic prefs", @user.prefs)}; if defined (user.prefs.dates) { addTableAsSection ("Dates", @user.prefs.dates)}; if defined (user.prefs.dialogs) { addTableAsSection ("Dialogs", @user.prefs.dialogs)}; if defined (user.prefs.fonts) { addTableAsSection ("Fonts", @user.prefs.fonts)}; if defined (user.prefs.search) { addTableAsSection ("Search", @user.prefs.search)}; if defined (user.rootUpdates.prefs) { addTableAsSection ("Root Updates prefs", @user.rootUpdates.prefs)}; if defined (user.rootUpdates.servers) { add ("user.rootUpdates.Servers:"); indentlevel++; add (""); local (adrItem); for adrItem in @user.rootUpdates.Servers { add (nameOf (adrItem^) + ":"); indentLevel++; doSimpleTable (adrItem); indentLevel--}; add (""); indentlevel--}; if defined (user.unix.scripts) { addTableAsSection ("Unix scripts", @user.unix.scripts)}; if defined (user.webBrowser) { addTableAsSection ("WebBrowser", @user.webBrowser)}}; bundle { //Misc if defined (system.verbs.traps) { addTableAsSection ("Traps", @system.verbs.traps)}; if defined (system.verbs.extensions) { addTableAsSection ("Extensions", @system.verbs.extensions)}; bundle { //root table sizes add ("Top-level table sizes:"); indentLevel++; add (""); local (adrItem); for adrItem in @root { local (name = nameOf (adrItem^)); local (size = sizeOf (adrItem^)); if typeOf (adrItem^) != tableType { add (name + ": Not a table, which surprises us.")} else { add (name + ": " + size + " items")}}; add ("");indentLevel--}; if system.environment.isCarbon { // Mac OS X port forwarding and ipfw if defined (user.prefs.portForwardingAdminPassword) { local (s = sys.unixShellCommand ("echo \"" + user.prefs.portForwardingAdminPassword + "\" | sudo /sbin/ipfw -a list")); sys.unixShellCommand ("sudo -K"); // drop our privs add ("Mac OS X Port Forwarding and ipfw:"); indentlevel++; add (""); addOnOff ("Port Forwarding enabled", defined (user.prefs.portForwardingAdminPassword)); add (""); add ("ipfw configuration:"); indentlevel++; add (""); s = string.replaceAll (s, '\n', '\n' + string.filledstring (" ", indentLevel)); add (s); indentlevel--; add (""); indentlevel--}}}; bundle { //Guest Databases folders on doFolder (name) { add (name + " folder:"); indentlevel++; add (""); local (f); fileloop (f in Frontier.getSubFolder (name)) { local (fname = file.fileFromPath (f)); fname = string.popTrailing (fname, file.getPathChar ()); if file.isFolder (f) { add (fname + ": [folder]")} else { local (size = string.megabyteString (file.size (f))); add (fname + ": " + size)}}; add (""); indentlevel--}; doFolder ("apps"); doFolder ("ops"); doFolder ("www")}; if fldebug { wp.newTextObject (mailText, @temp.FrontierConfiguration); edit (@temp.FrontierConfiguration)}; return (mailText)}; Çbundle // test ÇgetConfigInfo (fldebug: true) \ No newline at end of file --- 1,3 ---- FrontierVcsFile:1:scpt:mainResponder.utilities.getConfigInfo ! on getConfigInfo (flIncludeHeader=true, fldebug = false) { ÇGet general config info about Frontier and mainResponder. ÇChanges Ç6/19/05; 10:44:09 AM by TAC ÇMac OS X port forwarding info is sent even if port forwarding isn't enable, could be useful for diagnostics Çmoved fldebug into parameters for call, added test bundle, less likely to leave debug flag set to true this way Çadded section for Mac OS X Port Forwarding and ipfw configuration Çwhen building simple table, get size of object in try in case object has no size as in the case of nil value Çdisabled Manila specific code local (mailtext = "", indentlevel = 0); on add (s) { mailtext = mailtext + string.filledstring (" ", indentlevel) + s + "\r\n"}; on addOnOff (label, bool) { local (s = label + ": "); if bool { s = s + "On"} else { s = s + "Off"}; add (s)}; add ("Frontier configuration on " + clock.now () + "."); indentlevel++; add (""); bundle { //Installation information if flIncludeHeader { add ("Installation information:"); indentlevel++; add (""); add ("Frontier version: " + Frontier.version ()); local (os = "Windows"); if system.environment.isMac { if system.environment.isCarbon { os = "Mac OS X"} else { os = "Mac OS"}}; add ("Operating System: " + os); local (osVersion = system.environment.osVersionString); if system.environment.isCarbon { osVersion = string.replace (osVersion, "16", "10")}; add ("OS Version: " + osVersion); add ("IP address: " + tcp.dns.getMyDottedId ()); add ("Frontier folder: " + file.folderfrompath (frontier.getprogrampath ())); add (""); indentlevel--}}; bundle { //About you and your computer add ("About you and your computer:"); indentlevel++; add (""); add ("Name: " + user.prefs.name); add ("Organization: " + user.prefs.organization); add ("Mail address: " + user.prefs.mailAddress); add ("Outgoing mail server: " + user.prefs.mailHost); addOnOff ("Web server", inetd.isDaemonRunning (@user.inetd.config.http)); add ("Port: " + user.inetd.config.http.port); add ("Log folder: " + user.log.prefs.folder); add (""); indentlevel--}; bundle { //Safety and performance add ("Safety and performance:"); indentlevel++; add (""); addOnOff ("Save changed databases every minute", config.mainResponder.prefs.flSaveDatabasesEveryMinute); add (""); indentlevel--}; bundle { //Proxy server add ("Proxy server:"); indentlevel++; add (""); add ("Domain: " + user.webbrowser.proxy.domain); add ("Port: " + user.webbrowser.proxy.port); add ("Username: " + user.webbrowser.proxy.username); add (""); indentlevel--}; bundle { //Installed tools add ("Installed tools:"); indentlevel++; add (""); local (adrItem); for adrItem in @user.tools.databases { if adrItem^.flInstalled { add (nameOf (adrItem^))}}; add (""); indentlevel--}; bundle { //Open Databases add ("Open Databases:"); indentlevel++; add (""); on visit (f) { local (fname = file.fileFromPath (f)); local (folder = file.folderFromPath (f)); local (folderName = file.fileFromPath (folder)); folderName = string.popTrailing (folderName, file.getPathChar ()); local (size = string.megabyteString (file.size (f))); add (folderName + "/" + fname + ": " + size)}; table.visitOpenDatabases (@visit); add (""); indentlevel--}; bundle { //Tools folder contents add ("Tools folder:"); indentlevel++; add (""); local (f); fileloop (f in Frontier.tools.getToolsFolderPath ()) { local (fname = file.fileFromPath (f)); local (size = string.megabyteString (file.size (f))); add (fname + ": " + size)}; add (""); indentlevel--}; bundle { //agents add ("Agents:"); indentlevel++; add (""); local (adrItem); for adrItem in @system.agents { add (nameOf (adrItem^))}; add (""); indentlevel--}; bundle { //threads add ("Threads:"); indentlevel++; add (""); local (adrItem); for adrItem in @user.scheduler.threads { local (flDefined = true, flEnabled = true); if not defined (adrItem^) { flDefined = false} else { if not (adrItem^^.enabled) { flEnabled = false}}; local (threadName = nameOf (adrItem^)); if not flDefined { add (threadName + ": [not defined]")} else { if not flEnabled { add (threadName + ": [disabled]")} else { add (threadName + ": " + adrItem^)}}}; add (""); indentlevel--}; bundle { //XML-RPC add ("XML-RPC:"); indentlevel++; add (""); local (ctOutgoingAsynchMessages = 0); if defined (user.betty.queueOutgoing.table) { ctOutgoingAsynchMessages = sizeOf (user.betty.queueOutgoing.table)}; addOnOff ("Allow by IP Only", user.betty.prefs.flAllowByIPOnly); ÇaddOnOff ("Keep Asynch Client Log", user.betty.prefs.flKeepAsynchClientLog) addOnOff ("Keep Server Log", user.betty.prefs.flKeepServerLog); add ("RPC Client Default Path: " + user.betty.prefs.rpcClientDefaultPath); add ("RPC Client Default Timeout: " + user.betty.prefs.rpcClientDefaultTimeout); add ("# Pending Asynch Messages: " + ctOutgoingAsynchMessages); add (""); add ("Handlers:"); indentlevel++; add (""); local (adr); for adr in @user.betty.rpcHandlers { local (name = nameOf (adr^)); local (type = typeOf (adr^)); local (val = ""); case type { tableType { val = sizeOf (adr^) + " items"}; scriptType { val = sizeOf (adr^) + " lines"}; addressType { val = adr^}}; if val == "" { add (name)} else { add (name + ": " + val)}}; add (""); indentlevel--; addOnOff ("RPC2 responder enabled", defined (user.webserver.responders.RPC2.enabled) and user.webserver.responders.RPC2.enabled); add (""); indentlevel--}; bundle { //SOAP add ("SOAP:"); indentlevel++; add (""); add ("RPC Client Default Timeout: " + user.soap.prefs.rpcClientDefaultTimeout); add (""); add ("Handlers:"); indentlevel++; add (""); local (adr); for adr in @user.soap.rpcHandlers { local (name = nameOf (adr^)); local (type = typeOf (adr^)); local (val = ""); case type { tableType { val = sizeOf (adr^) + " items"}; scriptType { val = sizeOf (adr^) + " lines"}; addressType { val = adr^}}; if val == "" { add (name)} else { add (name + ": " + val)}}; add (""); indentlevel--; addOnOff ("SOAP responder enabled", defined (user.webserver.responders.soap.enabled) and user.webserver.responders.soap.enabled); add (""); indentlevel--}; on doSimpleTable (adrTable) { local (adrItem); for adrItem in adrTable { local (name = nameOf (adrItem^)); local (lowerName = string.lower (name)); if lowerName contains "password" or lowerName contains "serialnum" { continue}; local (value); local (size); try { size = sizeOf (adrItem^)}; case typeOf (adrItem^) { outlineType { value = "outline: " + size + " lines"}; scriptType { value = "script: " + size + " lines"}; wpTextType { value = "wp-text: " + size + " characters"}; tableType { value = "table: " + size + " items"}; menubarType { value = "menubar: " + size + " lines"}} else { value = string (adrItem^)}; add (name + ": " + value)}}; on addTableAsSection (title, adrTable) { local (nameAddress = string.popFileFromAddress (string (adrTable))); title = title + " (" + nameAddress + "): "; add (title); indentLevel++; add (""); doSimpleTable (adrTable); add (""); indentLevel--}; bundle { //Webserver bundle { //Responders add ("Responders:"); indentlevel++; add (""); local (adr); for adr in @user.webserver.responders { local (name = nameOf (adr^)); while (typeOf (adr^) == addressType) { adr = adr^}; local (flEnabled = adr^.enabled); addOnOff (name, flEnabled)}; add (""); indentlevel--}; bundle { //Webserver stats add ("Webserver stats:"); indentlevel++; add (""); add ("Hits: " + user.webserver.stats.hits); add ("Max connections: " + user.webserver.stats.maxConnections); add ("Max memory available: " + user.webserver.stats.maxMemAvail); add ("Min memory available: " + user.webserver.stats.minMemAvail); add ("Up since: " + user.webserver.stats.upSince); if defined (user.webserver.stats.wormHits) { add ("Worm hits: " + user.webserver.stats.wormHits)}; add (""); indentlevel--}; bundle { //Webserver prefs add ("Webserver prefs:"); indentlevel++; add (""); add ("Default responder: " + user.webserver.prefs.defaultResponder); addOnOff ("Debugging", user.webserver.prefs.fldebug); addOnOff ("Domain stats", user.webserver.prefs.flDomainStats); addOnOff ("DNS Lookups", user.webserver.prefs.flUseDns); add (""); indentlevel--}; bundle { //Webserver prefilters add ("Webserver PreFilters:"); indentlevel++; add (""); local (adrItem); for adrItem in @user.webserver.preFilters { if typeOf (adrItem^) == addressType { add (nameOf (adrItem^) + ": " + adrItem^)} else { add (nameOf (adrItem^))}}; add (""); indentlevel--}; bundle { //Webserver postfilters add ("Webserver PostFilters:"); indentlevel++; add (""); local (adrItem); for adrItem in @user.webserver.postFilters { if typeOf (adrItem^) == addressType { add (nameOf (adrItem^) + ": " + adrItem^)} else { add (nameOf (adrItem^))}}; add (""); indentlevel--}}; Çbundle //Manila // 6/16/05; 10:58:11 AM by TAC // disabled, eventually remove? Çon doThemesTable (adrTable) Çlocal (adrItem) Çfor adrItem in adrTable Çlocal (enabledString = "enabled") Çif not adrItem^.flEnabled ÇenabledString = "disabled" Çadd (nameOf (adrItem^) + ": " + enabledString) Çbundle //Manila callbacks Çadd ("Manila callbacks:"); indentlevel++ Çadd ("") Çlocal (adrItem) Çfor adrItem in @config.manila.callbacks Çadd (nameOf (adrItem^) + ":"); indentLevel++ Çlocal (sizeTable = sizeOf (adrItem^)) Çif sizeTable < 1 Çadd ("[Empty]") Çelse Çlocal (adrCallback) Çfor adrCallback in adrItem Çif typeOf (adrCallback^) == addressType Çadd (nameOf (adrCallback^) + ": " + adrCallback^) Çelse Çadd (nameOf (adrCallback^)) ÇindentLevel-- Çadd (""); indentlevel-- Çbundle //Manila dg themes Çadd ("Manila discussion group themes:"); indentlevel++ Çadd ("") ÇdoThemesTable (@config.manila.discussionGroupThemes) Çadd (""); indentlevel-- Çbundle //Manila hosting Çadd ("Manila hosting:"); indentlevel++ Çadd ("") Çlocal (adrItem) Çfor adrItem in @config.manila.hosting.sites Çlocal (name = nameOf (adrItem^)) Çadd (name + ":");indentLevel++ ÇdoSimpleTable (adrItem) ÇindentLevel-- Çadd (""); indentlevel-- Çbundle //Manila prefs Çadd ("Manila prefs (config.manila.prefs):"); indentlevel++ Çadd ("") ÇdoSimpleTable (@config.manila.prefs) Çadd (""); indentlevel-- Çbundle //Manila sites Çadd ("Manila sites:"); indentlevel++ Çadd ("") Çadd ("# sites in config.manila.sites: " + sizeOf (config.manila.sites)) Çadd (""); indentlevel-- Çbundle //Manila stats Çadd ("Manila stats:"); indentlevel++ Çadd ("") Çadd ("# referers tables: " + sizeOf (config.manila.stats.referers)) Çif defined (config.manila.stats.reports) Çadd ("# reports: " + sizeOf (config.manila.stats.reports)) Çif defined (config.manila.stats.sites.allTime) Çadd ("# all-time sites stats: " + sizeOf (config.manila.stats.sites.allTime)) Çif defined (config.manila.stats.sites.hourly) Çadd ("# hourly sites stats: " + sizeOf (config.manila.stats.sites.hourly)) Çif defined (config.manila.stats.sites.today) Çadd ("# today sites stats: " + sizeOf (config.manila.stats.sites.today)) Çadd (""); indentlevel-- Çbundle //Manila themes Çadd ("Manila themes:"); indentlevel++ Çadd ("") ÇdoThemesTable (@config.manila.themes) Çadd (""); indentlevel-- bundle { //mainResponder addTableAsSection ("mainResponder global URLs", @config.mainResponder.urls); addTableAsSection ("mainResponder prefs", @config.mainResponder.prefs); addTableAsSection ("mainResponder globals", @config.mainResponder.globals); bundle { //mainResponder legal macros add ("mainResponder legal macros:"); indentlevel++; add (""); local (adrItem); for adrItem in @config.mainResponder.prefs.legalMacros { local (name = nameOf (adrItem^)); case typeOf (adrItem^) { booleanType { add (name + ": " + adrItem^)}; tableType { if (sizeOf (adrItem^) == 2) and (defined (adrItem^.flLegal)) and (defined (adrItem^.flParams)) { add (name + ": [takes params]: " + adrItem^.flLegal)} else { add (name + ": [misconfigured]")}}}}; add (""); indentlevel--}; bundle { //mainResponder search queue add ("mainResponder search queue:"); indentlevel++; add (""); if defined (config.mainResponder.data.searchQueue) { add ("# items: " + sizeOf (config.mainResponder.data.searchQueue))} else { add ("Empty")}; add (""); indentlevel--}; bundle { //mainResponder callbacks add ("mainResponder callbacks:"); indentlevel++; add (""); local (adrItem); for adrItem in @config.mainResponder.callbacks { add (nameOf (adrItem^) + ":"); indentLevel++; local (sizeTable = sizeOf (adrItem^)); if sizeTable < 1 { add ("[Empty]")} else { local (adrCallback); for adrCallback in adrItem { if typeOf (adrCallback^) == addressType { add (nameOf (adrCallback^) + ": " + adrCallback^)} else { add (nameOf (adrCallback^))}}}; indentLevel--}; add (""); indentlevel--}; bundle { //mainResponder domains add ("mainResponder domains (config.mainResponder.domains):"); indentlevel++; add (""); local (adrItem); for adrItem in @config.mainResponder.domains { local (name = nameOf (adrItem^)); if typeOf (adrItem^) == tableType { if defined (adrItem^.siteTree.directory.outline) { add (name + " [siteTree]:"); indentLevel++; add (string (adrItem^.siteTree.directory.outline)); add (""); indentLevel--} else { add (name + ": table " + sizeOf (adrItem^) + " items")}} else { add (name + ": " + string (adrItem^))}}; add (""); indentlevel--}}; bundle { //user table if defined (user.applescripts.prefs) { addTableAsSection ("AppleScript", @user.applescripts.prefs)}; if defined (user.backups) { addTableAsSection ("Backups", @user.backups)}; if defined (user.batchExporter) { addTableAsSection ("BatchExporter", @user.batchExporter)}; bundle { //user.callbacks add ("user.callbacks:"); indentlevel++; add (""); local (adrItem); for adrItem in @user.callbacks { add (nameOf (adrItem^) + ":"); indentLevel++; local (sizeTable = sizeOf (adrItem^)); if sizeTable < 1 { add ("[Empty]")} else { local (adrCallback); for adrCallback in adrItem { if typeOf (adrCallback^) == addressType { add (nameOf (adrCallback^) + ": " + adrCallback^)} else { add (nameOf (adrCallback^))}}}; indentLevel--}; add (""); indentlevel--}; if defined (user.com) { addTableAsSection ("COM", @user.com)}; bundle { //user.databases add ("user.databases:"); indentlevel++; add (""); local (adrItem); for adrItem in @user.databases { add (nameOf (adrItem^) + ":"); indentLevel++; doSimpleTable (adrItem); indentLevel--}; add (""); indentlevel--}; if defined (user.export) { addTableAsSection ("Export", @user.export)}; if defined (user.html.glossary) { add ("user.html.glossary:"); indentlevel++; add (""); add ("# items: " + sizeOf (user.html.glossary)); add (""); indentlevel--}; if defined (user.html.macros) { add ("user.html.macros:"); indentlevel++; add (""); add ("# items: " + sizeOf (user.html.macros)); add (""); indentlevel--}; if defined (user.html.renderers) { add ("user.html.renderers:"); indentlevel++; add (""); add ("# items: " + sizeOf (user.html.renderers)); add (""); indentlevel--}; if defined (user.html.prefs) { addTableAsSection ("HTML prefs", @user.html.prefs)}; if defined (user.menus) { addTableAsSection ("Menus", @user.menus)}; if defined (user.prefs) { addTableAsSection ("Basic prefs", @user.prefs)}; if defined (user.prefs.dates) { addTableAsSection ("Dates", @user.prefs.dates)}; if defined (user.prefs.dialogs) { addTableAsSection ("Dialogs", @user.prefs.dialogs)}; if defined (user.prefs.fonts) { addTableAsSection ("Fonts", @user.prefs.fonts)}; if defined (user.prefs.search) { addTableAsSection ("Search", @user.prefs.search)}; if defined (user.rootUpdates.prefs) { addTableAsSection ("Root Updates prefs", @user.rootUpdates.prefs)}; if defined (user.rootUpdates.servers) { add ("user.rootUpdates.Servers:"); indentlevel++; add (""); local (adrItem); for adrItem in @user.rootUpdates.Servers { add (nameOf (adrItem^) + ":"); indentLevel++; doSimpleTable (adrItem); indentLevel--}; add (""); indentlevel--}; if defined (user.unix.scripts) { addTableAsSection ("Unix scripts", @user.unix.scripts)}; if defined (user.webBrowser) { addTableAsSection ("WebBrowser", @user.webBrowser)}}; bundle { //Misc if defined (system.verbs.traps) { addTableAsSection ("Traps", @system.verbs.traps)}; if defined (system.verbs.extensions) { addTableAsSection ("Extensions", @system.verbs.extensions)}; bundle { //root table sizes add ("Top-level table sizes:"); indentLevel++; add (""); local (adrItem); for adrItem in @root { local (name = nameOf (adrItem^)); local (size = sizeOf (adrItem^)); if typeOf (adrItem^) != tableType { add (name + ": Not a table, which surprises us.")} else { add (name + ": " + size + " items")}}; add ("");indentLevel--}; if system.environment.isCarbon { // Mac OS X port forwarding and ipfw local (s = sys.unixShellCommand ("echo \"" + user.prefs.portForwardingAdminPassword + "\" | sudo /sbin/ipfw -a list")); sys.unixShellCommand ("sudo -K"); // drop our privs add ("Mac OS X Port Forwarding and ipfw:"); indentlevel++; add (""); addOnOff ("Port Forwarding enabled", defined (user.prefs.portForwardingAdminPassword)); add (""); add ("ipfw configuration:"); indentlevel++; add (""); s = string.replaceAll (s, '\n', '\n' + string.filledstring (" ", indentLevel)); add (s); indentlevel--; add (""); indentlevel--}}; bundle { //Guest Databases folders on doFolder (name) { add (name + " folder:"); indentlevel++; add (""); local (f); fileloop (f in Frontier.getSubFolder (name)) { local (fname = file.fileFromPath (f)); fname = string.popTrailing (fname, file.getPathChar ()); if file.isFolder (f) { add (fname + ": [folder]")} else { local (size = string.megabyteString (file.size (f))); add (fname + ": " + size)}}; add (""); indentlevel--}; doFolder ("apps"); doFolder ("ops"); doFolder ("www")}; if fldebug { wp.newTextObject (mailText, @temp.FrontierConfiguration); edit (@temp.FrontierConfiguration)}; return (mailText)}; Çbundle // test ÇgetConfigInfo (fldebug: true) \ No newline at end of file |
|
From: creedon <icr...@us...> - 2005-06-19 18:27:52
|
Update of /cvsroot/frontierkernel/odbs/mainResponderRoot/mainResponder/discuss In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20301 Modified Files: sendMessageToClient getMessageFromClient Log Message: changed localhost to 127.0.0.1 Index: sendMessageToClient =================================================================== RCS file: /cvsroot/frontierkernel/odbs/mainResponderRoot/mainResponder/discuss/sendMessageToClient,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** sendMessageToClient 26 Mar 2005 21:45:43 -0000 1.1.1.1 --- sendMessageToClient 19 Jun 2005 18:27:43 -0000 1.2 *************** *** 1,3 **** FrontierVcsFile:1:scpt:mainResponder.discuss.sendMessageToClient ! on sendMessageToClient (msgnum, client, port) { if client == "127.0.0.1" { client = "localhost"}; local (adrtable = mainResponder.discuss.getMessageTable (msgnum)); local (adrmemberinfo = html.getpagetableaddress ()^.adrmemberinfo); local (cookie = mainResponder.discuss.getchecksum (msgnum, adrmemberinfo)); local (params = {base64.encode (mainResponder.discuss.tableToXml (adrtable, cookie), infinity)}); return (betty.rpc.client (client, port, "editorial.receiveMessage", @params))}; Çbundle //test code ÇsendMessageToClient (800, "pebbles.userland.com") \ No newline at end of file --- 1,3 ---- FrontierVcsFile:1:scpt:mainResponder.discuss.sendMessageToClient ! on sendMessageToClient (msgnum, client, port) { ÇChanges Ç6/19/05; 10:15:41 AM by TAC Çdisabled client 127.0.0.1 check and change to localhost Çif client == "127.0.0.1" Çclient = "localhost" local (adrtable = mainResponder.discuss.getMessageTable (msgnum)); local (adrmemberinfo = html.getpagetableaddress ()^.adrmemberinfo); local (cookie = mainResponder.discuss.getchecksum (msgnum, adrmemberinfo)); local (params = {base64.encode (mainResponder.discuss.tableToXml (adrtable, cookie), infinity)}); return (betty.rpc.client (client, port, "editorial.receiveMessage", @params))}; Çbundle //test code ÇsendMessageToClient (800, "pebbles.userland.com") \ No newline at end of file Index: getMessageFromClient =================================================================== RCS file: /cvsroot/frontierkernel/odbs/mainResponderRoot/mainResponder/discuss/getMessageFromClient,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** getMessageFromClient 26 Mar 2005 21:45:35 -0000 1.1.1.1 --- getMessageFromClient 19 Jun 2005 18:27:43 -0000 1.2 *************** *** 1,3 **** FrontierVcsFile:1:scpt:mainResponder.discuss.getMessageFromClient ! on getMessageFromClient (client, port) { ÇChanges ÇSat, 06 Mar 1999 17:21:35 GMT by AR ÇDeactivated adrmsg^.htmlCache code. Ç11/6/99; 7:59:01 PM by PBS ÇPass incoming text through mainResponder.neuterText, to make extra sure that unwanted macros and tags are neutered. Ç11/16/99; 11:31:59 AM by PBS ÇUse mainResponder's memberCanEdit callback to allow managing editors of Manila sites to edit pages using the Edit in Frontier button. Ç05/01/00; 7:48:38 PM by JES ÇChanged getString calls to use a replacement table address instead of a lists if client == "127.0.0.1" { client = "localhost"}; local (xmltext = base64.decode (betty.rpc.client (client, port, "editorial.returnMessage"))); local (xtable); xml.compile (xmltext, @xtable); on cookieError (explanation) { local (replacementTable); new (tableType, @replacementTable); // 05/01/00 JES: use replacement table instead of a list replacementTable.explanation = explanation; scriptError (mainResponder.getString ("discuss.cantReceiveMsgBadAuthentication", @replacementTable))}; on formatError (fieldname) { local (replacementTable); new (tableType, @replacementTable); // 05/01/00 JES: use replacement table instead of a list replacementTable.fieldname = fieldname; scriptError (mainResponder.getString ("discuss.cantReceiveMsgMissingField", @replacementTable))}; local (adrcookie, adrmsgnum); if not xml.getpathaddress (@xtable, "ticket/cookie", @adrcookie) { cookieError (mainResponder.getString ("discuss.theCookieIsMissing"))}; if not xml.getpathaddress (@xtable, "ticket/header/msgNum", @adrmsgnum) { cookieError (mainResponder.getString ("discuss.theMsgnumIsMissing"))}; local (adrsubject, adrposttime, adrmember, adrctreads, adrinresponseto, adrresponses, adrbody); if not xml.getpathaddress (@xtable, "ticket/header/subject", @adrsubject) { formatError ("subject")}; if not xml.getpathaddress (@xtable, "ticket/header/member", @adrmember) { formatError ("member")}; if not xml.getpathaddress (@xtable, "ticket/body", @adrbody) { formatError ("body")}; local (alsoListedList, flalsolist = false); bundle { //get alsoListedIn local (adrlist); if xml.getpathaddress (@xtable, "ticket/header/alsoListedIn", @adrlist) { local (i); alsoListedList = xml.getAddressList (adrlist, "category"); for i = 1 to sizeof (alsoListedList) { //turn addresses into values alsoListedList [i] = alsoListedList [i]^; flalsolist = true}}}; local (flenclosure = false, enclosureAddress, enclosureBits, enclosureType); bundle { //check for an enclosure local (adrenclosure); if xml.getpathaddress (@xtable, "ticket/header/enclosure", @adrenclosure) { enclosureAddress = xml.getvalue (adrenclosure, "enclosureAddress"); enclosureType = xml.getvalue (adrenclosure, "enclosureType"); enclosureBits = xml.getvalue (adrenclosure, "enclosureBits"); local (prefix = "application/x-frontier-"); if enclosureType beginswith prefix { local (type = string.delete (enclosureType, 1, sizeof (prefix))); local (bits = binary (base64.decode (enclosureBits))); setBinaryType (@bits, type); unpack (@bits, @enclosureBits)}; flenclosure = true}}; local (adrmemberinfo = html.getpagetableaddress ()^.adrmemberinfo); bundle { //check the cookie if adrcookie^ != mainresponder.discuss.getCheckSum (adrmsgnum^, adrmemberinfo) { cookieError (mainResponder.getString ("discuss.theChecksumIsIncorrect"))}; delete (adrcookie)}; local (adrmsg = mainresponder.discuss.getmessagetable (adrmsgnum^)); if adrmsg^.member != nameof (adrmemberinfo^) { //not the author of the message ÇPBS 11/16/99: use the memberCanEdit callback to allow managing editors of Manila sites to use the Edit in Frontier button for all stories and messages. if defined (config.mainResponder.callbacks.memberCanEdit) { local (pta = html.getPageTableAddress ()); pta^.adrMsgToEdit = adrMsg; pta^.flMemberCanEdit = false; mainResponder.callbackLoop (@config.mainResponder.callbacks.memberCanEdit, pta); if not pta^.flMemberCanEdit { cookieError (mainResponder.getString ("discuss.theMemberIsNotAuthorOfMsg"))}}}; try {delete (@adrmsg^.body)}; adrBody^ = mainResponder.neuterText (string (adrbody^), true, true); //PBS 11/6/99: neuter text op.newoutlineobject (string (adrbody^), @adrmsg^.body); mainResponder.neuterOutline (@adrmsg^.body); //eliminate #directives in the outline adrmsg^.subject = adrsubject^; if flenclosure { adrmsg^.enclosureAddress = enclosureAddress; adrmsg^.enclosureBits = enclosureBits; adrmsg^.enclosureType = enclosureType}; if flalsolist { adrmsg^.alsoListedIn = alsoListedList}; Çtry {delete (@adrmsg^.htmlcache)} // Deactivated. try {delete (@adrmsg^.toptopicscache)}; filemenu.savemyroot (adrmsg); return (true)} \ No newline at end of file --- 1,3 ---- FrontierVcsFile:1:scpt:mainResponder.discuss.getMessageFromClient ! on getMessageFromClient (client, port) { ÇChanges Ç6/19/05; 10:15:41 AM by TAC Çdisabled client 127.0.0.1 check and change to localhost ÇSat, 06 Mar 1999 17:21:35 GMT by AR ÇDeactivated adrmsg^.htmlCache code. Ç11/6/99; 7:59:01 PM by PBS ÇPass incoming text through mainResponder.neuterText, to make extra sure that unwanted macros and tags are neutered. Ç11/16/99; 11:31:59 AM by PBS ÇUse mainResponder's memberCanEdit callback to allow managing editors of Manila sites to edit pages using the Edit in Frontier button. Ç05/01/00; 7:48:38 PM by JES ÇChanged getString calls to use a replacement table address instead of a lists Çif client == "127.0.0.1" Çclient = "localhost" local (xmltext = base64.decode (betty.rpc.client (client, port, "editorial.returnMessage"))); local (xtable); xml.compile (xmltext, @xtable); on cookieError (explanation) { local (replacementTable); new (tableType, @replacementTable); // 05/01/00 JES: use replacement table instead of a list replacementTable.explanation = explanation; scriptError (mainResponder.getString ("discuss.cantReceiveMsgBadAuthentication", @replacementTable))}; on formatError (fieldname) { local (replacementTable); new (tableType, @replacementTable); // 05/01/00 JES: use replacement table instead of a list replacementTable.fieldname = fieldname; scriptError (mainResponder.getString ("discuss.cantReceiveMsgMissingField", @replacementTable))}; local (adrcookie, adrmsgnum); if not xml.getpathaddress (@xtable, "ticket/cookie", @adrcookie) { cookieError (mainResponder.getString ("discuss.theCookieIsMissing"))}; if not xml.getpathaddress (@xtable, "ticket/header/msgNum", @adrmsgnum) { cookieError (mainResponder.getString ("discuss.theMsgnumIsMissing"))}; local (adrsubject, adrposttime, adrmember, adrctreads, adrinresponseto, adrresponses, adrbody); if not xml.getpathaddress (@xtable, "ticket/header/subject", @adrsubject) { formatError ("subject")}; if not xml.getpathaddress (@xtable, "ticket/header/member", @adrmember) { formatError ("member")}; if not xml.getpathaddress (@xtable, "ticket/body", @adrbody) { formatError ("body")}; local (alsoListedList, flalsolist = false); bundle { //get alsoListedIn local (adrlist); if xml.getpathaddress (@xtable, "ticket/header/alsoListedIn", @adrlist) { local (i); alsoListedList = xml.getAddressList (adrlist, "category"); for i = 1 to sizeof (alsoListedList) { //turn addresses into values alsoListedList [i] = alsoListedList [i]^; flalsolist = true}}}; local (flenclosure = false, enclosureAddress, enclosureBits, enclosureType); bundle { //check for an enclosure local (adrenclosure); if xml.getpathaddress (@xtable, "ticket/header/enclosure", @adrenclosure) { enclosureAddress = xml.getvalue (adrenclosure, "enclosureAddress"); enclosureType = xml.getvalue (adrenclosure, "enclosureType"); enclosureBits = xml.getvalue (adrenclosure, "enclosureBits"); local (prefix = "application/x-frontier-"); if enclosureType beginswith prefix { local (type = string.delete (enclosureType, 1, sizeof (prefix))); local (bits = binary (base64.decode (enclosureBits))); setBinaryType (@bits, type); unpack (@bits, @enclosureBits)}; flenclosure = true}}; local (adrmemberinfo = html.getpagetableaddress ()^.adrmemberinfo); bundle { //check the cookie if adrcookie^ != mainresponder.discuss.getCheckSum (adrmsgnum^, adrmemberinfo) { cookieError (mainResponder.getString ("discuss.theChecksumIsIncorrect"))}; delete (adrcookie)}; local (adrmsg = mainresponder.discuss.getmessagetable (adrmsgnum^)); if adrmsg^.member != nameof (adrmemberinfo^) { //not the author of the message ÇPBS 11/16/99: use the memberCanEdit callback to allow managing editors of Manila sites to use the Edit in Frontier button for all stories and messages. if defined (config.mainResponder.callbacks.memberCanEdit) { local (pta = html.getPageTableAddress ()); pta^.adrMsgToEdit = adrMsg; pta^.flMemberCanEdit = false; mainResponder.callbackLoop (@config.mainResponder.callbacks.memberCanEdit, pta); if not pta^.flMemberCanEdit { cookieError (mainResponder.getString ("discuss.theMemberIsNotAuthorOfMsg"))}}}; try {delete (@adrmsg^.body)}; adrBody^ = mainResponder.neuterText (string (adrbody^), true, true); //PBS 11/6/99: neuter text op.newoutlineobject (string (adrbody^), @adrmsg^.body); mainResponder.neuterOutline (@adrmsg^.body); //eliminate #directives in the outline adrmsg^.subject = adrsubject^; if flenclosure { adrmsg^.enclosureAddress = enclosureAddress; adrmsg^.enclosureBits = enclosureBits; adrmsg^.enclosureType = enclosureType}; if flalsolist { adrmsg^.alsoListedIn = alsoListedList}; Çtry {delete (@adrmsg^.htmlcache)} // Deactivated. try {delete (@adrmsg^.toptopicscache)}; filemenu.savemyroot (adrmsg); return (true)} \ No newline at end of file |
|
From: creedon <icr...@us...> - 2005-06-19 18:27:47
|
Update of /cvsroot/frontierkernel/odbs/mainResponderRoot/mainResponder In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20256 Modified Files: init Log Message: changed localhost to 127.0.0.1 Index: init =================================================================== RCS file: /cvsroot/frontierkernel/odbs/mainResponderRoot/mainResponder/init,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** init 18 Jun 2005 17:18:56 -0000 1.4 --- init 19 Jun 2005 18:27:38 -0000 1.5 *************** *** 1,3 **** FrontierVcsFile:1:scpt:mainResponder.init ! on init () { ÇInitialize mainResponder ÇChanges Ç6/16/05; 11:59:11 PM by TAC Çadded config.mainResponder.callbacks.subscriptionsServer Çadded config.mainresponder.prefs.legalMacros Çadded config.mainresponder.prefs.baseUrl for adminSite setupFrontier Ç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. Ç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 Ç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. 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/")}; 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/")}; 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/")}; 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"}}; // 6/16/05; 1:52:08 PM by TAC - removed manila.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 = "localhost"); 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 + "userlandIcons/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 = "localhost"}; 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 { //port 5335 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 //test code Ç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,3 ---- FrontierVcsFile:1:scpt:mainResponder.init ! on init () { ÇInitialize mainResponder ÇChanges Ç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 Ç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. Ç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 Ç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. 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/")}; 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/")}; 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/")}; 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"}}; // 6/16/05; 1:52:08 PM by TAC - removed manila.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 + "userlandIcons/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 { //port 5335 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 //test code Ç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: creedon <icr...@us...> - 2005-06-19 18:27:41
|
Update of /cvsroot/frontierkernel/odbs/mainResponderRoot/mainResponder/controlPanel/23ftpSite In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20191 Modified Files: url Log Message: changed localhost to 127.0.0.1 Index: url =================================================================== RCS file: /cvsroot/frontierkernel/odbs/mainResponderRoot/mainResponder/controlPanel/23ftpSite/url,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** url 26 Mar 2005 21:45:23 -0000 1.1.1.1 --- url 19 Jun 2005 18:27:32 -0000 1.2 *************** *** 1,3 **** FrontierVcsFile:1:TEXT:mainResponder.controlPanel.["#ftpSite"].url ! http://localhost/controlPanel/ \ No newline at end of file --- 1,3 ---- FrontierVcsFile:1:TEXT:mainResponder.controlPanel.["#ftpSite"].url ! http://127.0.0.1/controlPanel/ \ No newline at end of file |
|
From: creedon <icr...@us...> - 2005-06-19 18:11:33
|
Update of /cvsroot/frontierkernel/odbs/frontierRoot/system/verbs/builtins/soap/rpc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11124 Modified Files: client Log Message: changed localhost to 127.0.0.1 Index: client =================================================================== RCS file: /cvsroot/frontierkernel/odbs/frontierRoot/system/verbs/builtins/soap/rpc/client,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** client 26 Mar 2005 19:43:31 -0000 1.1.1.1 --- client 19 Jun 2005 18:11:24 -0000 1.2 *************** *** 1,3 **** FrontierVcsFile:1:scpt:system.verbs.builtins.soap.rpc.client ! on client (actionURI, methodName, adrparams, rpcServer="localhost", rpcPort=user.inetd.config.http.port, username="", password="", fldebug=false, ticksToTimeOut=nil, flShowMessages=true, soapAction=nil, methodNamespace=nil, methodNamespaceURI=nil, customStructType=nil, customNamespace=nil, customNamespaceURI=nil, charset=soap.constants.charsetUsAscii, flEnforceSimpleTypes=true) { ÇChanges: Ç02/04/01; 5:37:09 PM by JES ÇVerify that the supplied methodName is valid. Prevents generation of invalid XML. Ç03/25/01; 2:22:56 AM by JES ÇNew optional parameter, soapAction, which overrides the value of the SOAPAction HTTP header. (Normally it defaults to the value of ActionURI.) ÇNew optional parameters, methodNamespace and methodNamespaceURI, facilitate namespace declaration in the methodCall element (the first sub-element of <Body>). Ç03/25/01; 7:12:26 PM by JES ÇNew optional parameters: customArrayType, customNamespace, and customNamespaceURI -- for setting array type, namespace and namespaceURI for arrays of structs. Ç04/01/01; 1:02:03 AM by JES ÇIf there are no input parameters, don't add a parameter accessor element. Ç04/02/01; 5:10:05 PM by JES ÇFixed a bug where a closing tag for the method element wasn't generated. Ç04/02/01; 7:29:04 PM by JES ÇIf methodNamespace is given, but methodNamespaceURI is not, generate an error. If methodNamespaceURI is given, but methodNamespace is not, generate an error. Ç04/03/01; 7:21:40 PM by JES ÇNew optional parameter, charset, specifies the character encoding for the request. Default is us-ascii. Ç04/06/01; 7:05:08 PM by JES ÇFixed a bug finding the response element: find the element whose name begins with the request method name. (see Section 7.1) Ç04/07/01; 7:21:47 PM by JES ÇFixed a bug where void method calls (calls with no parameters) would not have namespace qualification on the method call element. Changed name of customArrayType parameter to customStructType. Ç04/13/01; 12:52:58 PM by JES ÇFixed a bug where void method calls made without specifying a methodNamespace would not have a closing tag on the parameter element. Ç05/29/01; 7:34:39 PM by JES ÇFixed a problem decoding entity-encoded markup. bundle { //make sure methodName is valid on methodNameError () { scriptError ("Can't encode the SOAP request because '" + methodName + "' is not a valid method name.")}; local (ch = methodName[1]); if not string.isAlpha (ch) { if (ch != '_') and (ch != ':') { methodNameError ()}}; local (i, ct = sizeOf (methodName)); on isValidNameChar (ch) { if string.isAlpha (ch) { return (true)}; if string.isNumeric (ch) { return (true)}; case ch { '.'; '-'; '_'; ':' { return (true)}}; return (false)}; if ct > 1 { for i = 2 to ct { if not isValidNameChar (methodName[i]) { methodNameError ()}}}}; soap.init (); if ticksToTimeOut == nil { ticksToTimeOut = user.soap.prefs.rpcClientDefaultTimeout}; local (returnvalue, responsename = methodname + "Response"); local (request, adrrequest = @request, requestText); local (response, adrresponse = @response, responseText, responseHeaders); local (flEntityEncodeHighAscii = false); bundle { //encode request local (adrdocument, adrenvelope, adrbody, adrmethodcall); bundle { //build document tree adrdocument = soap.xmlutils.createRequest (adrrequest); adrenvelope = soap.xmlutils.addElement (adrdocument, "Envelope"); soap.xmlutils.setNamespacePrefixOfElement (adrenvelope, soap.constants.nsEnvelopePrefix); soap.xmlutils.declareNamespaceInElement (adrenvelope, soap.constants.nsEnvelopePrefix, soap.constants.nsEnvelopeURI); soap.xmlutils.declareNamespaceInElement (adrenvelope, soap.constants.nsEncodingPrefix, soap.constants.nsEncodingURI); soap.xmlutils.declareNamespaceInElement (adrenvelope, soap.constants.nsSchemaPrefix, soap.constants.nsSchemaURI); soap.xmlutils.declareNamespaceInElement (adrenvelope, soap.constants.nsSchemaDataPrefix, soap.constants.nsSchemaDataURI); soap.xmlutils.addAttributeValue (adrenvelope, soap.constants.nsEnvelopePrefix +":" + "encodingStyle", soap.constants.nsEncodingURI); adrbody = soap.xmlutils.addElement (adrenvelope, "Body"); soap.xmlutils.setNamespacePrefixOfElement (adrbody, soap.constants.nsEnvelopePrefix); adrmethodcall = soap.xmlutils.addElement (adrbody, methodName); if methodNamespace != nil or methodNamespaceURI != nil { //04/02/2001 JES: error if both values aren't specified if methodNamespaceURI == nil { scriptError ("Can't encode the request because a methodNamespace was specified, but no methodNamespaceURI was given.")}; if methodNamespace == nil { scriptError ("Can't encode the request because a methodNamespaceURI was specified, but no methodNamespace was given.")}}; if methodNamespace != nil { //03/25/2001 JES: set the methodCall namespace soap.xmlutils.setNamespacePrefixOfElement (adrmethodcall, methodNamespace)}; if methodNamespaceURI != nil { //03/25/2001 JES: set the methodCall namespaceURI soap.xmlutils.declareNamespaceInElement (adrmethodcall, methodNamespace, methodNamespaceURI)}}; bundle { //determine character encoding, error if unsupported local (supportsUTF = true); if not defined (string.ansiToUtf16) { //check to see if we can do UTF supportsUTF = false}; case string.lower (charset) { soap.constants.charsetLatin1 { };//default behavior soap.constants.charsetUsAscii { flEntityEncodeHighAscii = true}; soap.constants.charsetUtf8 { if not supportsUTF { flEntityEncodeHighAscii = true}}; //treat UFT-8 as a super-set of US-ASCII, but encode high-ascii characters as XML entities soap.constants.charsetUtf16 { if not supportsUTF { scriptError ("Can't encode the request because you must be running at least version 7.0b42 in order to use UTF-16 character encoding.")}}} else { scriptError ("Can't encode the request because \"" + charset + "\" is not a supported character set.")}}; bundle { //encode parameters local (ix, ct = sizeOf (adrparams^)); if ct > 0 { case typeOf (adrparams^) { listType { for ix = 1 to ct { soap.encode.main (adrresponse, adrparams^[ix], adrmethodcall, "param" + ix, customStructType, customNamespace, customNamespaceURI, flEntityEncodeHighAscii)}}; recordType { for ix = 1 to ct { soap.encode.main (adrresponse, adrparams^[ix], adrmethodcall, nameOf (adrparams^[ix]), customStructType, customNamespace, customNamespaceURI, flEntityEncodeHighAscii)}}} else { scripterror ("Can't encode parameters because adrparams is not a list or record.")}} else { if methodNamespace == "" { table.assign (adrmethodcall, "")}}}; bundle { //decompile document tree into XML text requestText = xml.decompile (adrdocument)}; bundle { //convert the text to the character set specified by charset case string.lower (charset) { //assume us-ascii soap.constants.charsetUtf8 { if not flEntityEncodeHighAscii { requestText = string.ansiToUtf8 (requestText)}}; soap.constants.charsetUtf16 { requestText = string.ansiToUtf16 (requestText)}}}}; bundle { //make method call local (requestHeaders); new (tableType, @headers); if soapAction == nil { //03/25/2001 JES: default to actionURI soapAction = actionURI}; headers.SOAPAction = "\"" + soapAction + "\""; s = tcp.httpClient (method:"POST", server:rpcServer, port:rpcPort, path:actionURI, data:requestText, datatype:"text/xml; charset=\"" + charset + "\"", username:username, password:password, adrHdrTable:@headers, debug:fldebug, timeOutTicks:ticksToTimeOut, flMessages:flShowMessages); responseText = string.httpResultSplit (s, @responseHeaders)}; bundle { //decode response local (adrdocument, adrenvelope, adrheader, adrbody, adrothers, adrmethodresponse); bundle { //convert to response text to ascii, if needed local (responsecharset = "us-ascii"); //default to ascii if defined (responseHeaders.["Content-Type"]) { local (contentType = soap.stringutils.parseHeader (responseHeaders.["Content-Type"])); if defined (contentType.charset) { responsecharset = contentType.charset}}; case string.lower (responsecharset) { soap.constants.charsetUtf8; soap.constants.charsetUtf16 { if not defined (string.utf8ToAnsi) { scriptError ("Can't decode the response because \"" + responsecharset + "\" is not a supported character encoding.")}; if string.lower (responsecharset) == soap.constants.charsetUtf8 { responseText = string.utf8ToAnsi (responseText)} else { //utf16 responseText = string.utf16ToAnsi (responseText)}}}}; bundle { //build document tree from XML text on fixEntities (s) { ÇWorks around a bug in xml.compile, where both &quot; and " are decoded as ". Clearly this shouldn't be the case, but to fix xml-compile at this point is asking for trouble. s = string.replaceAll (s, "&amp;", "&amp;amp;"); s = string.replaceAll (s, "&quot;", "&amp;quot;"); s = string.replaceAll (s, "&apos;", "&amp;apos;"); s = string.replaceAll (s, "&lt;", "&amp;lt;"); s = string.replaceAll (s, "&gt;", "&amp;gt;"); return (s)}; local (xmltext = string (responseText)); xmltext = fixEntities (xmltext); adrdocument = soap.xmlutils.createResponse (adrresponse, string (xmltext))}; bundle { //locate envelope adrenvelope = soap.xmlutils.getFirstChildElement (adrdocument); soap.xmlutils.pushScope (adrresponse, adrenvelope); if not soap.xmlutils.elementMatches (adrresponse, adrenvelope, @soap.qname.envelope) { scripterror ("Can't decode the response because the Envelope element was not found.")}}; bundle { //locate header, body, and others local (adrtemp = soap.xmlutils.getFirstChildElement (adrenvelope)); soap.xmlutils.pushScope (adrresponse, adrtemp); if soap.xmlutils.elementMatches (adrresponse, adrtemp, @soap.qname.header) { adrheader = adrtemp; soap.xmlutils.popScope (adrresponse); adrtemp = soap.xmlutils.getNextSiblingElement (adrtemp); soap.xmlutils.pushScope (adrresponse, adrtemp)}; if soap.xmlutils.elementMatches (adrresponse, adrtemp, @soap.qname.body) { adrbody = adrtemp; adrothers = soap.xmlutils.getNextSiblingElement (adrtemp)} else { scripterror ("Can't decode the response because the Body element was not found.")}}; bundle { //check body for fault struct local (nomad = soap.xmlutils.getFirstChildElement (adrbody)); while (nomad) { if soap.xmlutils.elementMatches (adrresponse, nomad, @soap.qname.fault) { local (adrfaultcode = soap.xmlutils.getNamedChildElement (nomad, "faultcode")); local (adrfaultstring = soap.xmlutils.getNamedChildElement (nomad, "faultstring")); if adrfaultcode { scripterror ("The server, " + rpcServer + ", returned a " + soap.xmlutils.getCharacterData (adrfaultcode) + " fault: " + soap.xmlutils.decodeAmpersands (soap.xmlutils.getCharacterData (adrfaultstring)))} else { scripterror ("The server, " + rpcServer + ", returned a (malformed) fault with no faultcode element: " + soap.xmlutils.decodeAmpersands (soap.xmlutils.getCharacterData (adrfaultstring)))}}; nomad = soap.xmlutils.getNextSiblingElement (nomad)}}; bundle { //locate method call adrmethodresponse = soap.xmlutils.getFirstChildElement (adrbody); if not (xml.convertToDisplayName (nameOf (adrmethodresponse^)) beginsWith methodname) { scripterror ("Response name is incompatible with request method name.")}}; bundle { //decode the method response struct soap.xmlutils.pushScope (adrresponse, adrmethodresponse); local (adritem = soap.xmlutils.getFirstChildElement (adrmethodresponse)); returnvalue = soap.decode.main (adrresponse, adritem, flEnforceSimpleTypes)}}; return (returnvalue)}; Çbundle //debugging code Çbundle //examples/getStateList Çlocal (returnvalue, params = {{1, 2, 3}}) Çreturnvalue = client (actionURI:"/examples", methodName:"getStateList", adrparams:@params, rpcServer:"superhonker.userland.com", fldebug:true) Çedit (@scratchpad.httpCommand) Çedit (@scratchpad.httpResult) Çdialog.notify (returnvalue) Çbundle //examples/getStateName Çlocal (returnvalue, params = {50}) Çreturnvalue = client (actionURI:"/examples", methodName:"getStateName", adrparams:@params) Çdialog.notify (returnvalue) Çbundle //examples/getStateNames Çlocal (returnvalue, params = {11, 22, 33, 44}) Çreturnvalue = client (actionURI:"/examples", methodName:"getStateNames", rpcServer:"superhonker.userland.com", adrparams:@params) Çdialog.notify (returnvalue) Çbundle //examples/getStateStruct Çlocal (returnvalue, params, struct) Çnew (tableType, @struct) Çstruct.a = 11 Çstruct.b = 22 Çstruct.c = 33 Çstruct.d = 44 Çparams = {struct} Çreturnvalue = client (actionURI:"/examples", methodName:"getStateStruct", rpcServer:"superhonker.userland.com", adrparams:@params, fldebug:true) Çtemp.returnvalue = returnvalue Çedit (@temp.returnvalue) Çbundle //examples/getCurrentTime Çlocal (returnvalue, params = {}) Çreturnvalue = client (actionURI:"/examples", methodName:"getCurrentTime", rpcServer:"superhonker.userland.com", adrparams:@params, fldebug:true) Çdialog.notify (returnvalue) Çbundle //examples/getCurrentTime -- throws an error because there are too many parameters Çlocal (returnvalue, params = {1, 2, 3}) Çreturnvalue = client (actionURI:"/examples", methodName:"getCurrentTime", rpcServer:"superhonker.userland.com", adrparams:@params, fldebug:true) Çdialog.notify (returnvalue) \ No newline at end of file --- 1,3 ---- FrontierVcsFile:1:scpt:system.verbs.builtins.soap.rpc.client ! on client (actionURI, methodName, adrparams, rpcServer="127.0.0.1", rpcPort=user.inetd.config.http.port, username="", password="", fldebug=false, ticksToTimeOut=nil, flShowMessages=true, soapAction=nil, methodNamespace=nil, methodNamespaceURI=nil, customStructType=nil, customNamespace=nil, customNamespaceURI=nil, charset=soap.constants.charsetUsAscii, flEnforceSimpleTypes=true) { ÇChanges Ç6/19/05; 10:09:31 AM by TAC Çchanged localhost to 127.0.0.1 Ç02/04/01; 5:37:09 PM by JES ÇVerify that the supplied methodName is valid. Prevents generation of invalid XML. Ç03/25/01; 2:22:56 AM by JES ÇNew optional parameter, soapAction, which overrides the value of the SOAPAction HTTP header. (Normally it defaults to the value of ActionURI.) ÇNew optional parameters, methodNamespace and methodNamespaceURI, facilitate namespace declaration in the methodCall element (the first sub-element of <Body>). Ç03/25/01; 7:12:26 PM by JES ÇNew optional parameters: customArrayType, customNamespace, and customNamespaceURI -- for setting array type, namespace and namespaceURI for arrays of structs. Ç04/01/01; 1:02:03 AM by JES ÇIf there are no input parameters, don't add a parameter accessor element. Ç04/02/01; 5:10:05 PM by JES ÇFixed a bug where a closing tag for the method element wasn't generated. Ç04/02/01; 7:29:04 PM by JES ÇIf methodNamespace is given, but methodNamespaceURI is not, generate an error. If methodNamespaceURI is given, but methodNamespace is not, generate an error. Ç04/03/01; 7:21:40 PM by JES ÇNew optional parameter, charset, specifies the character encoding for the request. Default is us-ascii. Ç04/06/01; 7:05:08 PM by JES ÇFixed a bug finding the response element: find the element whose name begins with the request method name. (see Section 7.1) Ç04/07/01; 7:21:47 PM by JES ÇFixed a bug where void method calls (calls with no parameters) would not have namespace qualification on the method call element. Changed name of customArrayType parameter to customStructType. Ç04/13/01; 12:52:58 PM by JES ÇFixed a bug where void method calls made without specifying a methodNamespace would not have a closing tag on the parameter element. Ç05/29/01; 7:34:39 PM by JES ÇFixed a problem decoding entity-encoded markup. bundle { //make sure methodName is valid on methodNameError () { scriptError ("Can't encode the SOAP request because '" + methodName + "' is not a valid method name.")}; local (ch = methodName[1]); if not string.isAlpha (ch) { if (ch != '_') and (ch != ':') { methodNameError ()}}; local (i, ct = sizeOf (methodName)); on isValidNameChar (ch) { if string.isAlpha (ch) { return (true)}; if string.isNumeric (ch) { return (true)}; case ch { '.'; '-'; '_'; ':' { return (true)}}; return (false)}; if ct > 1 { for i = 2 to ct { if not isValidNameChar (methodName[i]) { methodNameError ()}}}}; soap.init (); if ticksToTimeOut == nil { ticksToTimeOut = user.soap.prefs.rpcClientDefaultTimeout}; local (returnvalue, responsename = methodname + "Response"); local (request, adrrequest = @request, requestText); local (response, adrresponse = @response, responseText, responseHeaders); local (flEntityEncodeHighAscii = false); bundle { //encode request local (adrdocument, adrenvelope, adrbody, adrmethodcall); bundle { //build document tree adrdocument = soap.xmlutils.createRequest (adrrequest); adrenvelope = soap.xmlutils.addElement (adrdocument, "Envelope"); soap.xmlutils.setNamespacePrefixOfElement (adrenvelope, soap.constants.nsEnvelopePrefix); soap.xmlutils.declareNamespaceInElement (adrenvelope, soap.constants.nsEnvelopePrefix, soap.constants.nsEnvelopeURI); soap.xmlutils.declareNamespaceInElement (adrenvelope, soap.constants.nsEncodingPrefix, soap.constants.nsEncodingURI); soap.xmlutils.declareNamespaceInElement (adrenvelope, soap.constants.nsSchemaPrefix, soap.constants.nsSchemaURI); soap.xmlutils.declareNamespaceInElement (adrenvelope, soap.constants.nsSchemaDataPrefix, soap.constants.nsSchemaDataURI); soap.xmlutils.addAttributeValue (adrenvelope, soap.constants.nsEnvelopePrefix +":" + "encodingStyle", soap.constants.nsEncodingURI); adrbody = soap.xmlutils.addElement (adrenvelope, "Body"); soap.xmlutils.setNamespacePrefixOfElement (adrbody, soap.constants.nsEnvelopePrefix); adrmethodcall = soap.xmlutils.addElement (adrbody, methodName); if methodNamespace != nil or methodNamespaceURI != nil { //04/02/2001 JES: error if both values aren't specified if methodNamespaceURI == nil { scriptError ("Can't encode the request because a methodNamespace was specified, but no methodNamespaceURI was given.")}; if methodNamespace == nil { scriptError ("Can't encode the request because a methodNamespaceURI was specified, but no methodNamespace was given.")}}; if methodNamespace != nil { //03/25/2001 JES: set the methodCall namespace soap.xmlutils.setNamespacePrefixOfElement (adrmethodcall, methodNamespace)}; if methodNamespaceURI != nil { //03/25/2001 JES: set the methodCall namespaceURI soap.xmlutils.declareNamespaceInElement (adrmethodcall, methodNamespace, methodNamespaceURI)}}; bundle { //determine character encoding, error if unsupported local (supportsUTF = true); if not defined (string.ansiToUtf16) { //check to see if we can do UTF supportsUTF = false}; case string.lower (charset) { soap.constants.charsetLatin1 { };//default behavior soap.constants.charsetUsAscii { flEntityEncodeHighAscii = true}; soap.constants.charsetUtf8 { if not supportsUTF { flEntityEncodeHighAscii = true}}; //treat UFT-8 as a super-set of US-ASCII, but encode high-ascii characters as XML entities soap.constants.charsetUtf16 { if not supportsUTF { scriptError ("Can't encode the request because you must be running at least version 7.0b42 in order to use UTF-16 character encoding.")}}} else { scriptError ("Can't encode the request because \"" + charset + "\" is not a supported character set.")}}; bundle { //encode parameters local (ix, ct = sizeOf (adrparams^)); if ct > 0 { case typeOf (adrparams^) { listType { for ix = 1 to ct { soap.encode.main (adrresponse, adrparams^[ix], adrmethodcall, "param" + ix, customStructType, customNamespace, customNamespaceURI, flEntityEncodeHighAscii)}}; recordType { for ix = 1 to ct { soap.encode.main (adrresponse, adrparams^[ix], adrmethodcall, nameOf (adrparams^[ix]), customStructType, customNamespace, customNamespaceURI, flEntityEncodeHighAscii)}}} else { scripterror ("Can't encode parameters because adrparams is not a list or record.")}} else { if methodNamespace == "" { table.assign (adrmethodcall, "")}}}; bundle { //decompile document tree into XML text requestText = xml.decompile (adrdocument)}; bundle { //convert the text to the character set specified by charset case string.lower (charset) { //assume us-ascii soap.constants.charsetUtf8 { if not flEntityEncodeHighAscii { requestText = string.ansiToUtf8 (requestText)}}; soap.constants.charsetUtf16 { requestText = string.ansiToUtf16 (requestText)}}}}; bundle { //make method call local (requestHeaders); new (tableType, @headers); if soapAction == nil { //03/25/2001 JES: default to actionURI soapAction = actionURI}; headers.SOAPAction = "\"" + soapAction + "\""; s = tcp.httpClient (method:"POST", server:rpcServer, port:rpcPort, path:actionURI, data:requestText, datatype:"text/xml; charset=\"" + charset + "\"", username:username, password:password, adrHdrTable:@headers, debug:fldebug, timeOutTicks:ticksToTimeOut, flMessages:flShowMessages); responseText = string.httpResultSplit (s, @responseHeaders)}; bundle { //decode response local (adrdocument, adrenvelope, adrheader, adrbody, adrothers, adrmethodresponse); bundle { //convert to response text to ascii, if needed local (responsecharset = "us-ascii"); //default to ascii if defined (responseHeaders.["Content-Type"]) { local (contentType = soap.stringutils.parseHeader (responseHeaders.["Content-Type"])); if defined (contentType.charset) { responsecharset = contentType.charset}}; case string.lower (responsecharset) { soap.constants.charsetUtf8; soap.constants.charsetUtf16 { if not defined (string.utf8ToAnsi) { scriptError ("Can't decode the response because \"" + responsecharset + "\" is not a supported character encoding.")}; if string.lower (responsecharset) == soap.constants.charsetUtf8 { responseText = string.utf8ToAnsi (responseText)} else { //utf16 responseText = string.utf16ToAnsi (responseText)}}}}; bundle { //build document tree from XML text on fixEntities (s) { ÇWorks around a bug in xml.compile, where both &quot; and " are decoded as ". Clearly this shouldn't be the case, but to fix xml-compile at this point is asking for trouble. s = string.replaceAll (s, "&amp;", "&amp;amp;"); s = string.replaceAll (s, "&quot;", "&amp;quot;"); s = string.replaceAll (s, "&apos;", "&amp;apos;"); s = string.replaceAll (s, "&lt;", "&amp;lt;"); s = string.replaceAll (s, "&gt;", "&amp;gt;"); return (s)}; local (xmltext = string (responseText)); xmltext = fixEntities (xmltext); adrdocument = soap.xmlutils.createResponse (adrresponse, string (xmltext))}; bundle { //locate envelope adrenvelope = soap.xmlutils.getFirstChildElement (adrdocument); soap.xmlutils.pushScope (adrresponse, adrenvelope); if not soap.xmlutils.elementMatches (adrresponse, adrenvelope, @soap.qname.envelope) { scripterror ("Can't decode the response because the Envelope element was not found.")}}; bundle { //locate header, body, and others local (adrtemp = soap.xmlutils.getFirstChildElement (adrenvelope)); soap.xmlutils.pushScope (adrresponse, adrtemp); if soap.xmlutils.elementMatches (adrresponse, adrtemp, @soap.qname.header) { adrheader = adrtemp; soap.xmlutils.popScope (adrresponse); adrtemp = soap.xmlutils.getNextSiblingElement (adrtemp); soap.xmlutils.pushScope (adrresponse, adrtemp)}; if soap.xmlutils.elementMatches (adrresponse, adrtemp, @soap.qname.body) { adrbody = adrtemp; adrothers = soap.xmlutils.getNextSiblingElement (adrtemp)} else { scripterror ("Can't decode the response because the Body element was not found.")}}; bundle { //check body for fault struct local (nomad = soap.xmlutils.getFirstChildElement (adrbody)); while (nomad) { if soap.xmlutils.elementMatches (adrresponse, nomad, @soap.qname.fault) { local (adrfaultcode = soap.xmlutils.getNamedChildElement (nomad, "faultcode")); local (adrfaultstring = soap.xmlutils.getNamedChildElement (nomad, "faultstring")); if adrfaultcode { scripterror ("The server, " + rpcServer + ", returned a " + soap.xmlutils.getCharacterData (adrfaultcode) + " fault: " + soap.xmlutils.decodeAmpersands (soap.xmlutils.getCharacterData (adrfaultstring)))} else { scripterror ("The server, " + rpcServer + ", returned a (malformed) fault with no faultcode element: " + soap.xmlutils.decodeAmpersands (soap.xmlutils.getCharacterData (adrfaultstring)))}}; nomad = soap.xmlutils.getNextSiblingElement (nomad)}}; bundle { //locate method call adrmethodresponse = soap.xmlutils.getFirstChildElement (adrbody); if not (xml.convertToDisplayName (nameOf (adrmethodresponse^)) beginsWith methodname) { scripterror ("Response name is incompatible with request method name.")}}; bundle { //decode the method response struct soap.xmlutils.pushScope (adrresponse, adrmethodresponse); local (adritem = soap.xmlutils.getFirstChildElement (adrmethodresponse)); returnvalue = soap.decode.main (adrresponse, adritem, flEnforceSimpleTypes)}}; return (returnvalue)}; Çbundle //debugging code Çbundle //examples/getStateList Çlocal (returnvalue, params = {{1, 2, 3}}) Çreturnvalue = client (actionURI:"/examples", methodName:"getStateList", adrparams:@params, rpcServer:"superhonker.userland.com", fldebug:true) Çedit (@scratchpad.httpCommand) Çedit (@scratchpad.httpResult) Çdialog.notify (returnvalue) Çbundle //examples/getStateName Çlocal (returnvalue, params = {50}) Çreturnvalue = client (actionURI:"/examples", methodName:"getStateName", adrparams:@params) Çdialog.notify (returnvalue) Çbundle //examples/getStateNames Çlocal (returnvalue, params = {11, 22, 33, 44}) Çreturnvalue = client (actionURI:"/examples", methodName:"getStateNames", rpcServer:"superhonker.userland.com", adrparams:@params) Çdialog.notify (returnvalue) Çbundle //examples/getStateStruct Çlocal (returnvalue, params, struct) Çnew (tableType, @struct) Çstruct.a = 11 Çstruct.b = 22 Çstruct.c = 33 Çstruct.d = 44 Çparams = {struct} Çreturnvalue = client (actionURI:"/examples", methodName:"getStateStruct", rpcServer:"superhonker.userland.com", adrparams:@params, fldebug:true) Çtemp.returnvalue = returnvalue Çedit (@temp.returnvalue) Çbundle //examples/getCurrentTime Çlocal (returnvalue, params = {}) Çreturnvalue = client (actionURI:"/examples", methodName:"getCurrentTime", rpcServer:"superhonker.userland.com", adrparams:@params, fldebug:true) Çdialog.notify (returnvalue) Çbundle //examples/getCurrentTime -- throws an error because there are too many parameters Çlocal (returnvalue, params = {1, 2, 3}) Çreturnvalue = client (actionURI:"/examples", methodName:"getCurrentTime", rpcServer:"superhonker.userland.com", adrparams:@params, fldebug:true) Çdialog.notify (returnvalue) \ No newline at end of file |
|
From: creedon <icr...@us...> - 2005-06-19 18:11:31
|
Update of /cvsroot/frontierkernel/odbs/frontierRoot/system/verbs/builtins/xml In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11046 Modified Files: rpc Log Message: changed localhost to 127.0.0.1 Index: rpc =================================================================== RCS file: /cvsroot/frontierkernel/odbs/frontierRoot/system/verbs/builtins/xml/rpc,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** rpc 26 Mar 2005 19:44:16 -0000 1.1.1.1 --- rpc 19 Jun 2005 18:11:17 -0000 1.2 *************** *** 1,3 **** FrontierVcsFile:1:scpt:system.verbs.builtins.xml.rpc ! on rpc (rpcServer="localhost", rpcPort=user.inetd.config.http.port, procedureName="", adrparamlist=nil, fldebug=false, ticksToTimeOut=nil, flShowMessages=true, rpcPath=nil, flAsynch=false, adrCallback=nil, extraInfo=nil, adrErrorCallback=nil, username="", password="", protocol="xml-rpc", soapAction="") { ÇChanges Ç4/5/01; 7:33:50 PM by DW ÇCreated. A long time ago I promised that we'd have one interface for calling out through either xml-rpc or soap. Somehow we ended up with two system calls, each with irritatingly different parameter lists. It's driving me crazy, so I made a single routine that calls either. There's a reason for this, SOAP offers a lot of options that XML-RPC doesn't. So this interface makes it possible to call SOAP handlers that behave like XML-RPC handlers (they can be called from other SOAP stacks, that's the advantage). ÇIt has the same parameter list as betty.rpc.client, by design, you can simply replace calls to betty.rpc.client with calls to xml.rpc. ÇThere are two new optional parameters, protocol and soapAction. If protocol is "soap" we call soap.rpc.client. It has other optional params, but I'm not sure it's necessary to expose them through this interface. soap.rpc.client isn't going away. ÇThere's a little strangeness when it comes to procedure names. SOAP procedure names can't have dots or any other special characters because on the wire they are XML elements. So we strip off everything to the left of the last dot in the procedure name. This probably needs to be generalized to look for characters other than dots. ÇAlso it should be said somewhere that, while we still have support for agent-based asynchronous xml-rpc, it's probably a better idea to use thread.callScript to do an asynch call. Much cleaner. The asynch implementation was done before we had thread.callScript. Ç7/23/01; 9:41:28 PM by JES ÇFor SOAP calls, include rpcPath in the call, allowing for a request to have a URI that's different from the value of the SOAPAction header. case string.lower (protocol) { "xml-rpc" { return (betty.rpc.client (rpcServer, rpcPort, procedureName, adrparamlist, fldebug, ticksToTimeOut, flShowMessages, rpcPath, flAsynch, adrCallback, extraInfo, adrErrorCallback, username, password))}; "soap" { local (procname = string.nthfield (procedureName, ".", string.countfields (procedureName, "."))); if rpcPath == nil { return (soap.rpc.client (soapAction, procname, adrparamlist, rpcServer, rpcPort, username, password, fldebug, ticksToTimeOut, flShowMessages))} else { //rpcPath was specified return (soap.rpc.client (rpcPath, procname, adrparamlist, rpcServer, rpcPort, username, password, fldebug, ticksToTimeOut, flShowMessages, soapAction))}}}; scriptError ("Can't call the remote procedure because the protocol must be either xml-rpc or soap.")} \ No newline at end of file --- 1,3 ---- FrontierVcsFile:1:scpt:system.verbs.builtins.xml.rpc ! on rpc (rpcServer="127.0.0.1", rpcPort=user.inetd.config.http.port, procedureName="", adrparamlist=nil, fldebug=false, ticksToTimeOut=nil, flShowMessages=true, rpcPath=nil, flAsynch=false, adrCallback=nil, extraInfo=nil, adrErrorCallback=nil, username="", password="", protocol="xml-rpc", soapAction="") { ÇChanges Ç6/19/05; 10:12:50 AM by TAC Çchanged localhost to 127.0.0.1 Ç4/5/01; 7:33:50 PM by DW ÇCreated. A long time ago I promised that we'd have one interface for calling out through either xml-rpc or soap. Somehow we ended up with two system calls, each with irritatingly different parameter lists. It's driving me crazy, so I made a single routine that calls either. There's a reason for this, SOAP offers a lot of options that XML-RPC doesn't. So this interface makes it possible to call SOAP handlers that behave like XML-RPC handlers (they can be called from other SOAP stacks, that's the advantage). ÇIt has the same parameter list as betty.rpc.client, by design, you can simply replace calls to betty.rpc.client with calls to xml.rpc. ÇThere are two new optional parameters, protocol and soapAction. If protocol is "soap" we call soap.rpc.client. It has other optional params, but I'm not sure it's necessary to expose them through this interface. soap.rpc.client isn't going away. ÇThere's a little strangeness when it comes to procedure names. SOAP procedure names can't have dots or any other special characters because on the wire they are XML elements. So we strip off everything to the left of the last dot in the procedure name. This probably needs to be generalized to look for characters other than dots. ÇAlso it should be said somewhere that, while we still have support for agent-based asynchronous xml-rpc, it's probably a better idea to use thread.callScript to do an asynch call. Much cleaner. The asynch implementation was done before we had thread.callScript. Ç7/23/01; 9:41:28 PM by JES ÇFor SOAP calls, include rpcPath in the call, allowing for a request to have a URI that's different from the value of the SOAPAction header. case string.lower (protocol) { "xml-rpc" { return (betty.rpc.client (rpcServer, rpcPort, procedureName, adrparamlist, fldebug, ticksToTimeOut, flShowMessages, rpcPath, flAsynch, adrCallback, extraInfo, adrErrorCallback, username, password))}; "soap" { local (procname = string.nthfield (procedureName, ".", string.countfields (procedureName, "."))); if rpcPath == nil { return (soap.rpc.client (soapAction, procname, adrparamlist, rpcServer, rpcPort, username, password, fldebug, ticksToTimeOut, flShowMessages))} else { //rpcPath was specified return (soap.rpc.client (rpcPath, procname, adrparamlist, rpcServer, rpcPort, username, password, fldebug, ticksToTimeOut, flShowMessages, soapAction))}}}; scriptError ("Can't call the remote procedure because the protocol must be either xml-rpc or soap.")} \ No newline at end of file |
|
From: creedon <icr...@us...> - 2005-06-19 18:11:22
|
Update of /cvsroot/frontierkernel/odbs/frontierRoot/system/verbs/builtins/betty/rpc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10976 Modified Files: client clientMulticall Log Message: changed localhost to 127.0.0.1 Index: client =================================================================== RCS file: /cvsroot/frontierkernel/odbs/frontierRoot/system/verbs/builtins/betty/rpc/client,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** client 26 Mar 2005 19:42:36 -0000 1.1.1.1 --- client 19 Jun 2005 18:11:12 -0000 1.2 *************** *** 1,3 **** FrontierVcsFile:1:scpt:system.verbs.builtins.betty.rpc.client ! on client (rpcServer="localhost", rpcPort=user.inetd.config.http.port, procedureName="", adrparamlist=nil, fldebug=false, ticksToTimeOut=nil, flShowMessages=true, rpcPath=nil, flAsynch=false, adrCallback=nil, extraInfo=nil, adrErrorCallback=nil, username="", password="") { ÇChange Ç8/20/02; 4:43:35 AM by JES ÇRespect user.betty.prefs.flSaveDatabaseAfterAsynchRpcCall. Ç1/4/02; 7:15:55 PM by DW ÇIf user.betty.prefs.flKeepClientCallTicks is true, keep track of call stats in system.temp.betty.clientCallTicks. ÇAdded a test code bundle at the end of the routine. Ç8/20/00 by AR ÇAdded optional username and password parameters for HTTP Basic Authentication. Ç10/8/99 by DW ÇAdded optional adrErrorCallback parameter, if specified, this script is called when there's an error sending an asynchronous XML-RPC call. Ç3/6/99 by DW ÇAdded three optional parameters to allow asynchronous RPC-ing that try until they connect. ÇflAsynch, defaults to false, if true it's an asynchronous call. ÇadrCallback, defaults to nil, if non-nil, it's the routine we call when we connect. ÇIt takes a single parameter, the value returned by the RPC server. ÇThe routine pointed to by this address must not be local to the script calling betty.rpc.client because it won't be around when the actual RPC call is made. ÇIt must be in Frontier.root or in a guest database. ÇextraInfo, defaults to nil, it's any kind of object, it's available to the callback to help it interpret the response. ÇIt will create a table at user.betty.queueOutgoing, which is watched by the agent. Ç1/17/99 by DW ÇChange default value of ticksToTimeOut to nil. If it's nil, set it to user.betty.prefs.rpcClientDefaultTimeout. ÇChange default value of rpcPath to nil. If it's nil, set it to user.betty.prefs.rpcClientDefaultPath. Ç1/15/99 by DW Çadded optional parameter, rpcPath, to facilitate communication with non-Frontier XML-RPC servers. Ç11/14/98 by DW ÇIn the 11/5 change, RPC error reporting lost a lot of its value due to a too-local declaration of adrtable. Ç11/5/98 by DW ÇAt the end of betty.rpc.client, there was some real ancient code for producing examples ÇIt was copying the XML request and the compiled XML that was returned into the params list ÇHowever, it's legal to call this routine without specifying the param list, it would fail if you did so. ÇThis code was only useful to people writing docs and testing this. ÇNow it's deployed, things will run faster if we don't do this. ÇAnd now you can leave out params if the procedure you're calling takes no parameters. Ç11/1/98 by DW ÇAdded ticksToTimeOut optional parameter, it's passed on to tcp.httpClient ÇSome operations take more than 30 seconds to complete, that's the default on tcp.httpClient ÇI imagine that some take much less than 30 seconds too... ÇAdded flShowMessages optional parameter, it's also passed on to tcp.httpClient ÇIf true, it will display messages in Frontier's About window, if false it won't. ÇPreviously, there was no way for an RPC caller to turn on tcp.httpClient messages. ÇThis is important if you want to see what's going on at the HTTP level. Ç7/17/98 by PBS ÇXML header is now lowercase to conform to spec. ÇChanged xml table from temp.rpcReturn to a local table for thread-safety. Ç4/4/98 by DW ÇA full-featured client for the RPC2 responder local (startticks = clock.ticks ()); betty.init (); //1/17/99 DW, make sure user.betty.prefs is set up bundle { //3/6/99 DW, handle asynchronous calls if flAsynch { local (adragent = @system.agents.asynchRPC); if not defined (adragent^) { new (scripttype, adragent); local (oldtarget = target.set (adragent)); op.setlinetext ("betty.rpc.agent ()"); target.set (oldtarget); script.compile (adragent)}; local (adrqueue = @user.betty.queueOutgoing); if not defined (adrqueue^) { new (tabletype, adrqueue)}; if not defined (adrqueue^.serialNum) { adrqueue^.serialNum = 1}; local (adrtable = @adrqueue^.table); if not defined (adrtable^) { new (tabletype, adrtable)}; local (adritem = @adrtable^.[string.padwithzeros (adrqueue^.serialNum++, 7)]); bundle { //populate it in a local table, don't want the agent catching it until we're ready local (localtable); new (tabletype, @localtable); localtable.rpcServer = rpcServer; localtable.rpcPort = rpcPort; localtable.procedureName = procedureName; localtable.paramlist = adrparamlist^; //have to copy the param list localtable.fldebug = fldebug; localtable.flShowMessages = flShowMessages; localtable.rpcPath = rpcPath; localtable.adrCallback = adrCallback; localtable.adrErrorCallback = adrErrorCallback; localtable.extraInfo = extraInfo; localtable.readyToRunAt = clock.now (); localtable.username = username; localtable.password = password; adritem^ = localtable}; if user.betty.prefs.flSaveDatabaseAfterAsynchRpcCall { fileMenu.save ()}; return (true)}}; bundle { //1/17/99 DW, check ticksToTimeOut, rpcPath if ticksToTimeOut == nil { ticksToTimeOut = user.betty.prefs.rpcClientDefaultTimeout}; if rpcPath == nil { rpcPath = user.betty.prefs.rpcClientDefaultPath}}; local (xmltext = ""); bundle { //build the XML request local (indentlevel = 0); on add (s) { xmltext = xmltext + string.filledString ("\t", indentlevel) + s + "\r\n"}; add ("<?xml version=\"1.0\"?>"); add ("<methodCall>"); indentlevel++; add ("<methodName>" + procedureName + "</methodName>"); add ("<params>"); indentlevel++; if adrparamlist != nil { local (item); for item in adrparamlist^ { add ("<param>"); indentlevel++; Çadd ("<name>" + nameOf (adritem^) + "</name>") add ("<value>" + xml.coercions.frontierValueToTaggedText (@item, indentlevel) + "</value>"); add ("</param>"); indentlevel--; if typeOf (item) == tableType { delete (@item)}}}; add ("</params>"); indentlevel--; add ("</methodCall>"); indentlevel--}; local (xtable); bundle { //send the HTTP request, store result in xtable local (s); s = tcp.httpClient (method:"POST", server:rpcServer, port:rpcPort, path:rpcPath, data:xmltext, datatype:"text/xml", username:username, password:password, debug:fldebug, timeOutTicks:ticksToTimeOut, flMessages:flShowMessages); if fldebug { edit (@scratchpad.httpResult); //the result of setting debug to true in the call above edit (@scratchpad.httpCommand)}; xml.compile (string.delete (s, 1, string.patternMatch ("\r\n\r\n", s) + 3), @xtable)}; local (returnedValue, adrtable); try { //walk the response structure, get returnedValue adrtable = @xtable; local (adrresponse = xml.getaddress (adrtable, "methodResponse")); local (adrparams = xml.getaddress (adrresponse, "params")); local (adrparam = xml.getaddress (adrparams, "param")); returnedValue = xml.getvalue (adrparam, "value"); if typeOf (returnedValue) == tableType { //4/16/98; 1:51:28 PM by DW local (newValue); xml.coercions.structToFrontierValue (@returnedValue [1], @newValue); table.assign (@returnedValue, newValue)}} else { //scriptError local (adrresponse = xml.getaddress (adrtable, "methodResponse")); local (adrfault = xml.getaddress (adrresponse, "fault")); local (adrvalue = xml.getaddress (adrfault, "value")); local (adrstruct = xml.getaddress (adrvalue, "struct")); local (memberlist = xml.getaddresslist (adrstruct, "member")); local (member, name, value, faultCode, faultString); for member in memberlist { name = xml.getvalue (member, "name"); value = xml.getvalue (member, "value"); case name { "faultCode" { faultCode = value}; "faultString" { faultString = value}}}; scriptError ("The server, " + rpcServer + ", returned error code " + faultCode + ": " + faultString)}; bundle { //track ticks, by procedure call in system.temp.betty.clientCallTicks if user.betty.prefs.flKeepClientCallTicks { local (adrtable = @system.temp.betty); if not defined (adrtable^) { new (tabletype, adrtable)}; adrtable = @adrtable^.clientCallTicks; if not defined (adrtable^) { new (tabletype, adrtable)}; local (adrcount = @adrtable^.[rpcServer + ":" + rpcPort + rpcPath + "/" + procedureName]); if not defined (adrcount^) { adrcount^ = 0}; adrcount^ = adrcount^ + (clock.ticks () - startticks)}}; return (returnedValue)}; Çbundle //test code Çlocal (params = {"Dave's Handsome Radio Blog", "http://radio.weblogs.com/0001015/"}) Çscratchpad.response = betty.rpc.client ("rpc.weblogs.com", 80, "weblogUpdates.ping", @params) \ No newline at end of file --- 1,3 ---- FrontierVcsFile:1:scpt:system.verbs.builtins.betty.rpc.client ! on client (rpcServer="127.0.0.1", rpcPort=user.inetd.config.http.port, procedureName="", adrparamlist=nil, fldebug=false, ticksToTimeOut=nil, flShowMessages=true, rpcPath=nil, flAsynch=false, adrCallback=nil, extraInfo=nil, adrErrorCallback=nil, username="", password="") { ÇChanges Ç6/19/05; 10:04:51 AM by TAC Çchanged localhost to 127.0.0.1 Ç8/20/02; 4:43:35 AM by JES ÇRespect user.betty.prefs.flSaveDatabaseAfterAsynchRpcCall. Ç1/4/02; 7:15:55 PM by DW ÇIf user.betty.prefs.flKeepClientCallTicks is true, keep track of call stats in system.temp.betty.clientCallTicks. ÇAdded a test code bundle at the end of the routine. Ç8/20/00 by AR ÇAdded optional username and password parameters for HTTP Basic Authentication. Ç10/8/99 by DW ÇAdded optional adrErrorCallback parameter, if specified, this script is called when there's an error sending an asynchronous XML-RPC call. Ç3/6/99 by DW ÇAdded three optional parameters to allow asynchronous RPC-ing that try until they connect. ÇflAsynch, defaults to false, if true it's an asynchronous call. ÇadrCallback, defaults to nil, if non-nil, it's the routine we call when we connect. ÇIt takes a single parameter, the value returned by the RPC server. ÇThe routine pointed to by this address must not be local to the script calling betty.rpc.client because it won't be around when the actual RPC call is made. ÇIt must be in Frontier.root or in a guest database. ÇextraInfo, defaults to nil, it's any kind of object, it's available to the callback to help it interpret the response. ÇIt will create a table at user.betty.queueOutgoing, which is watched by the agent. Ç1/17/99 by DW ÇChange default value of ticksToTimeOut to nil. If it's nil, set it to user.betty.prefs.rpcClientDefaultTimeout. ÇChange default value of rpcPath to nil. If it's nil, set it to user.betty.prefs.rpcClientDefaultPath. Ç1/15/99 by DW Çadded optional parameter, rpcPath, to facilitate communication with non-Frontier XML-RPC servers. Ç11/14/98 by DW ÇIn the 11/5 change, RPC error reporting lost a lot of its value due to a too-local declaration of adrtable. Ç11/5/98 by DW ÇAt the end of betty.rpc.client, there was some real ancient code for producing examples ÇIt was copying the XML request and the compiled XML that was returned into the params list ÇHowever, it's legal to call this routine without specifying the param list, it would fail if you did so. ÇThis code was only useful to people writing docs and testing this. ÇNow it's deployed, things will run faster if we don't do this. ÇAnd now you can leave out params if the procedure you're calling takes no parameters. Ç11/1/98 by DW ÇAdded ticksToTimeOut optional parameter, it's passed on to tcp.httpClient ÇSome operations take more than 30 seconds to complete, that's the default on tcp.httpClient ÇI imagine that some take much less than 30 seconds too... ÇAdded flShowMessages optional parameter, it's also passed on to tcp.httpClient ÇIf true, it will display messages in Frontier's About window, if false it won't. ÇPreviously, there was no way for an RPC caller to turn on tcp.httpClient messages. ÇThis is important if you want to see what's going on at the HTTP level. Ç7/17/98 by PBS ÇXML header is now lowercase to conform to spec. ÇChanged xml table from temp.rpcReturn to a local table for thread-safety. Ç4/4/98 by DW ÇA full-featured client for the RPC2 responder local (startticks = clock.ticks ()); betty.init (); //1/17/99 DW, make sure user.betty.prefs is set up bundle { //3/6/99 DW, handle asynchronous calls if flAsynch { local (adragent = @system.agents.asynchRPC); if not defined (adragent^) { new (scripttype, adragent); local (oldtarget = target.set (adragent)); op.setlinetext ("betty.rpc.agent ()"); target.set (oldtarget); script.compile (adragent)}; local (adrqueue = @user.betty.queueOutgoing); if not defined (adrqueue^) { new (tabletype, adrqueue)}; if not defined (adrqueue^.serialNum) { adrqueue^.serialNum = 1}; local (adrtable = @adrqueue^.table); if not defined (adrtable^) { new (tabletype, adrtable)}; local (adritem = @adrtable^.[string.padwithzeros (adrqueue^.serialNum++, 7)]); bundle { //populate it in a local table, don't want the agent catching it until we're ready local (localtable); new (tabletype, @localtable); localtable.rpcServer = rpcServer; localtable.rpcPort = rpcPort; localtable.procedureName = procedureName; localtable.paramlist = adrparamlist^; //have to copy the param list localtable.fldebug = fldebug; localtable.flShowMessages = flShowMessages; localtable.rpcPath = rpcPath; localtable.adrCallback = adrCallback; localtable.adrErrorCallback = adrErrorCallback; localtable.extraInfo = extraInfo; localtable.readyToRunAt = clock.now (); localtable.username = username; localtable.password = password; adritem^ = localtable}; if user.betty.prefs.flSaveDatabaseAfterAsynchRpcCall { fileMenu.save ()}; return (true)}}; bundle { //1/17/99 DW, check ticksToTimeOut, rpcPath if ticksToTimeOut == nil { ticksToTimeOut = user.betty.prefs.rpcClientDefaultTimeout}; if rpcPath == nil { rpcPath = user.betty.prefs.rpcClientDefaultPath}}; local (xmltext = ""); bundle { //build the XML request local (indentlevel = 0); on add (s) { xmltext = xmltext + string.filledString ("\t", indentlevel) + s + "\r\n"}; add ("<?xml version=\"1.0\"?>"); add ("<methodCall>"); indentlevel++; add ("<methodName>" + procedureName + "</methodName>"); add ("<params>"); indentlevel++; if adrparamlist != nil { local (item); for item in adrparamlist^ { add ("<param>"); indentlevel++; Çadd ("<name>" + nameOf (adritem^) + "</name>") add ("<value>" + xml.coercions.frontierValueToTaggedText (@item, indentlevel) + "</value>"); add ("</param>"); indentlevel--; if typeOf (item) == tableType { delete (@item)}}}; add ("</params>"); indentlevel--; add ("</methodCall>"); indentlevel--}; local (xtable); bundle { //send the HTTP request, store result in xtable local (s); s = tcp.httpClient (method:"POST", server:rpcServer, port:rpcPort, path:rpcPath, data:xmltext, datatype:"text/xml", username:username, password:password, debug:fldebug, timeOutTicks:ticksToTimeOut, flMessages:flShowMessages); if fldebug { edit (@scratchpad.httpResult); //the result of setting debug to true in the call above edit (@scratchpad.httpCommand)}; xml.compile (string.delete (s, 1, string.patternMatch ("\r\n\r\n", s) + 3), @xtable)}; local (returnedValue, adrtable); try { //walk the response structure, get returnedValue adrtable = @xtable; local (adrresponse = xml.getaddress (adrtable, "methodResponse")); local (adrparams = xml.getaddress (adrresponse, "params")); local (adrparam = xml.getaddress (adrparams, "param")); returnedValue = xml.getvalue (adrparam, "value"); if typeOf (returnedValue) == tableType { //4/16/98; 1:51:28 PM by DW local (newValue); xml.coercions.structToFrontierValue (@returnedValue [1], @newValue); table.assign (@returnedValue, newValue)}} else { //scriptError local (adrresponse = xml.getaddress (adrtable, "methodResponse")); local (adrfault = xml.getaddress (adrresponse, "fault")); local (adrvalue = xml.getaddress (adrfault, "value")); local (adrstruct = xml.getaddress (adrvalue, "struct")); local (memberlist = xml.getaddresslist (adrstruct, "member")); local (member, name, value, faultCode, faultString); for member in memberlist { name = xml.getvalue (member, "name"); value = xml.getvalue (member, "value"); case name { "faultCode" { faultCode = value}; "faultString" { faultString = value}}}; scriptError ("The server, " + rpcServer + ", returned error code " + faultCode + ": " + faultString)}; bundle { //track ticks, by procedure call in system.temp.betty.clientCallTicks if user.betty.prefs.flKeepClientCallTicks { local (adrtable = @system.temp.betty); if not defined (adrtable^) { new (tabletype, adrtable)}; adrtable = @adrtable^.clientCallTicks; if not defined (adrtable^) { new (tabletype, adrtable)}; local (adrcount = @adrtable^.[rpcServer + ":" + rpcPort + rpcPath + "/" + procedureName]); if not defined (adrcount^) { adrcount^ = 0}; adrcount^ = adrcount^ + (clock.ticks () - startticks)}}; return (returnedValue)}; Çbundle //test code Çlocal (params = {"Dave's Handsome Radio Blog", "http://radio.weblogs.com/0001015/"}) Çscratchpad.response = betty.rpc.client ("rpc.weblogs.com", 80, "weblogUpdates.ping", @params) \ No newline at end of file Index: clientMulticall =================================================================== RCS file: /cvsroot/frontierkernel/odbs/frontierRoot/system/verbs/builtins/betty/rpc/clientMulticall,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** clientMulticall 26 Mar 2005 19:42:36 -0000 1.1.1.1 --- clientMulticall 19 Jun 2005 18:11:12 -0000 1.2 *************** *** 1,3 **** FrontierVcsFile:1:scpt:system.verbs.builtins.betty.rpc.clientMulticall ! on clientMultiCall (rpcServer="localhost", rpcPort=user.inetd.config.http.port, adrCallTable=nil, fldebug=false, ticksToTimeOut=nil, flShowMessages=true, rpcPath=nil, flAsynch=false, adrCallback=nil, extraInfo=nil, adrErrorCallback=nil, username="", password="") { ÇChanges Ç4/9/01; 8:09:48 PM by DW ÇCreated. Interfaces to the multicall capability. Çhttp://frontier.userland.com/stories/storyReader$7394 local (multicallparamlist = {}, adrsub, call); for adrsub in adrCallTable { new (tabletype, @call); call.methodName = adrsub^.methodName; call.params = adrsub^.params; multicallparamlist = multicallparamlist + {call}}; local (params = {multicallparamlist}); local (returnedlist = betty.rpc.client (rpcServer, rpcPort, "system.multicall", @params, fldebug, ticksToTimeOut, flShowMessages, rpcPath, username:username, password:password)); local (returnedtable, ixlist = 1); new (tabletype, @returnedtable); for adrsub in adrCallTable { adrreturnsub = @returnedtable.[nameof (adrsub^)]; new (tabletype, adrreturnsub); case typeof (returnedlist [ixlist]) { listtype { adrreturnsub^.flError = false; adrreturnsub^.value = returnedlist [ixlist] [1]}; tabletype { local (t = returnedlist [ixlist]); adrreturnsub^.flError = true; adrreturnsub^.faultCode = t.faultCode; adrreturnsub^.faultString = t.faultString}}; ixlist++}; return (returnedtable)}; bundle { //test code ÇNote ÇFor this test we use a special version of examples.getStateName that errors if the statenum is out of range. ÇThe handler follows, copy this into a new script at user.betty.rpcHandlers.examples.getStateNameWithError. Çon getStateNameWithError (statenum) Çif (statenum < 1) or (statenum > 50) Çscripterror ("Can't get the state name because the state num is less than 1 or greater than 50.") Çreturn (states.nthState (statenum)) local (calltable, i); new (tabletype, @calltable); for i = 1 to 10 { new (tabletype, @onecall); onecall.methodName = "examples.getStateNameWithError"; onecall.params = {random (35, 65)}; calltable.[string.padwithzeros (i, 3)] = onecall}; scratchpad.multicallresult = clientMultiCall (adrCallTable:@calltable); edit (@scratchpad.multicallresult)} \ No newline at end of file --- 1,3 ---- FrontierVcsFile:1:scpt:system.verbs.builtins.betty.rpc.clientMulticall ! on clientMultiCall (rpcServer="127.0.0.1", rpcPort=user.inetd.config.http.port, adrCallTable=nil, fldebug=false, ticksToTimeOut=nil, flShowMessages=true, rpcPath=nil, flAsynch=false, adrCallback=nil, extraInfo=nil, adrErrorCallback=nil, username="", password="") { ÇChanges Ç6/19/05; 10:06:03 AM by TAC Çchanged localhost to 127.0.0.1 Ç4/9/01; 8:09:48 PM by DW ÇCreated. Interfaces to the multicall capability. Çhttp://frontier.userland.com/stories/storyReader$7394 local (multicallparamlist = {}, adrsub, call); for adrsub in adrCallTable { new (tabletype, @call); call.methodName = adrsub^.methodName; call.params = adrsub^.params; multicallparamlist = multicallparamlist + {call}}; local (params = {multicallparamlist}); local (returnedlist = betty.rpc.client (rpcServer, rpcPort, "system.multicall", @params, fldebug, ticksToTimeOut, flShowMessages, rpcPath, username:username, password:password)); local (returnedtable, ixlist = 1); new (tabletype, @returnedtable); for adrsub in adrCallTable { adrreturnsub = @returnedtable.[nameof (adrsub^)]; new (tabletype, adrreturnsub); case typeof (returnedlist [ixlist]) { listtype { adrreturnsub^.flError = false; adrreturnsub^.value = returnedlist [ixlist] [1]}; tabletype { local (t = returnedlist [ixlist]); adrreturnsub^.flError = true; adrreturnsub^.faultCode = t.faultCode; adrreturnsub^.faultString = t.faultString}}; ixlist++}; return (returnedtable)}; bundle { //test code ÇNote ÇFor this test we use a special version of examples.getStateName that errors if the statenum is out of range. ÇThe handler follows, copy this into a new script at user.betty.rpcHandlers.examples.getStateNameWithError. Çon getStateNameWithError (statenum) Çif (statenum < 1) or (statenum > 50) Çscripterror ("Can't get the state name because the state num is less than 1 or greater than 50.") Çreturn (states.nthState (statenum)) local (calltable, i); new (tabletype, @calltable); for i = 1 to 10 { new (tabletype, @onecall); onecall.methodName = "examples.getStateNameWithError"; onecall.params = {random (35, 65)}; calltable.[string.padwithzeros (i, 3)] = onecall}; scratchpad.multicallresult = clientMultiCall (adrCallTable:@calltable); edit (@scratchpad.multicallresult)} \ No newline at end of file |
|
From: creedon <icr...@us...> - 2005-06-19 18:10:56
|
Update of /cvsroot/frontierkernel/odbs/frontierRoot/system/verbs/builtins/html/directory In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10823 Modified Files: viewDirectory Log Message: changed localhost to 127.0.0.1 Index: viewDirectory =================================================================== RCS file: /cvsroot/frontierkernel/odbs/frontierRoot/system/verbs/builtins/html/directory/viewDirectory,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** viewDirectory 26 Mar 2005 19:43:11 -0000 1.1.1.1 --- viewDirectory 19 Jun 2005 18:10:46 -0000 1.2 *************** *** 1,3 **** FrontierVcsFile:1:scpt:system.verbs.builtins.html.directory.viewDirectory ! on viewDirectory (adroutline, directoryHomeUrl, remainingPath="", identifier="", opmlUrl="", flIcons=true, flLinkText=false, flTopLevel=false, flDirectoryInABox=false, title="", template="", commentTemplate="", suggestALinkTemplate="", foldericon="", linkicon="", flDisplayTitle=false, flAddOpmlUrlToSearchArgs=false, adrdirectories=nil, ownername=user.prefs.name, owneremail=user.prefs.mailAddress, flUntaint=true, miniXmlIcon="", miniXmlCoffeeMugIcon="", flAllLevels=false, cssPrefix="directory", adrInSiteInclusionCallback=nil, linktarget="") { ÇChanges Ç6/13/02; 12:53:34 PM by JES ÇNew optional parameter, linktarget, specifies the value of the target attribute for links in the directory. Needed for the directory-in-a-frame feature in RCS. Ç6/5/02; 4:54:52 PM by JES ÇNew optional parameter, adrInSiteInclusionCallback, which is passed to html.directory.walk. ÇFixed link generation for in-site inclusion for directories rendered in Manila sites. When a link is to another directory in the same site, use ~[msgnum]~ for the path to the sub-directory. ÇDon't add the Edit With Radio button here. This code is meant to run in the wsf context, and therefore doesn't know about msgNum's. Ç6/4/02; 3:24:31 PM by JES ÇAdded a few pixels of padding to the top of the table cell which contains the icon. Ç5/10/02; 2:59:13 PM by JES ÇGiven the address of an outline, and some other contextual information, render the outline as an HTML directiry. ÇCribbed from manilaSuite.directory.viewDirectory. Ç12/19/01; 2:42:16 PM by PBS ÇCall manilaSuite.sendMail rather than tcp.sendMail, so user callbacks get called, so text gets converted (bug fix from David Bayly on Frontier-Server list). Ç12/13/01; 1:40:41 PM by PBS ÇFixed a date coercion bug in international systems. The bug was that a date wasn't being coerced. See the shortDate subroutine. Ç03/20/01; 9:50:47 PM by PBS ÇThe page title of the top-level of each directory was not getting set in the cache -- the title in the cache was the empty string. Now it's cached. Ç3/13/01; 9:01:41 PM by DW ÇThe page title of the top-level of each directory was the empty string. Uck. Added a conditional test, if it's empty, set it to the subject of the topmost message, topMsgSubject. Ç3/6/01; 10:39:17 AM by DW ÇAdd {subItems} macro, says how many items are displayed at the level you're viewing. I got tired of counting the number of new SOAP implementations by hand. A good problem to have!! ÇAlso, to make it legal, I also had to add an assignment in the "directorytemplate" branch in manilaSuite.themes.getLegalMacrosForObject Ç3/1/01; 2:03:06 PM by DW ÇFix two bugs in shortDate subroutine. Ç2000: Ç11/9/2000; 6:24:10 AM by DW ÇCreated. Ç11/9/2000; 5:52:41 PM by DW ÇAdded params. If flTopLevel, we know to render the top level of the directory. In this case msgnum must be set to the msg containing the outline for the directory to render. Ç11/16/2000; 7:20:51 AM by DW ÇInclude author information, number of hits, etc; at the bottom of the directory display. Ç11/16/2000; 10:34:18 AM by DW Çmsgnum can be a path now, like 4/theWeb/publications/news/general, which allows you to start at a deeply nested point in a directory. Ç11/17/2000; 7:49:02 AM by DW ÇSuggest a link feature. Ç11/22/2000; 7:07:00 AM by DW ÇFinish up templatization. Ç11/22/00; 5:02:45 PM by PBS ÇDon't read from or save in cache if flDirectoryInABox is true. Ç11/23/2000; 4:38:25 PM by DW ÇWhen displaying in a box, don't display comments. Ç11/24/2000; 8:07:56 AM by DW ÇDon't set the page title if flDirectoryInABox is true. Ç11/24/2000; 7:19:24 PM by DW ÇRelax rule about inclusion, now included directories can be anywhere ÇAdd a new branch to the cache in each dg message, called xmlstructs ÇThe name of each item is its url. If the value is a boolean false, that means we weren't able to read or parse the file. Don't retry. ÇThe cache is filled when you display the level containing the link. Only files whose extension are .opml are checked. ÇThe url that's generated keys off the name of the item, get its link to locate the xmlstruct in the cache. ÇChanged parts ÇmanilaSuite.directory.viewDirectory ÇmanilaSuite.directory.walk ÇmanilaSuite.directory.initMessageTable Ç11/26/00; 1:21:32 PM by PBS ÇAdd the external editor button ("Pike button") below directories if the viewer has edit privileges. ÇInhibit title display, unless the pref is turned on. (It's off by default.) ÇStatic rendering fix -- check that searchArgs is defined before referencing it. This fixes the viewDirectoryBox macro on the static version of pages. ÇFixed HTML errors -- there were tags being added that are in the directory template. They were hard-coded, they needed to be removed. Ç11/26/2000; 7:48:14 PM by DW ÇAdded support for the directories table. Ç11/26/00; 9:57:01 PM by PBS ÇFixed an HTML bug -- with the suggest a link page, the table was not being closed. Now it is. (An earlier HTML fix was half-right -- I had commented out a closing table tag, but the wrong one.) Ç11/27/2000; 9:11:14 AM by DW ÇGetting directories displaying correctly again. ÇIt seems clear to me that the change that Brent made can't work. He's commenting out a closing-table tag without commenting the balancing opening-table tag. If this works, the previous code must have been wrong in some way. It clearly doesn't work, this screen shot illustrates. Çhttp://www.scripting.com/images/misalignedDirectory.gif ÇIt seems clear to me that the directory items must be a table. Each item is a row in a table, if it's not a table, what table will enclose them? I just don't see the logic. ÇAnyway, I think what we're generating now is right. Ç11/27/00; 12:37:46 PM by PBS ÇThere were a number of small bugs fixed. Ç1. The outer table didn't also add outer tr and td tags. So you could have <table..><table..>, which is illegal. Now it does add tr and td tags (and close them later). Ç2. The suggest-a-link page page was adding outer tr and td tags, but the directory rendering was not. So now neither do. (See above.) Ç3. When building a directory page, the outer table was getting tossed. A line that read htmltext = s should have read htmltext = htmltext + s. But the closing outer table tag was still being added, so you had an extra closing table tag with directories, but not with the suggest-a-link page. Ç4. An HTML validation issue was fixed -- a tr tag cannot have a height attribute. The height attribute was moved to the enclosed td tag. There's still a validation issue with the textarea tag -- wrap is not allowed. But that's all throughout Manila, and no good solution exists for removing it. Ç12/5/2000; 8:43:53 PM by DW ÇAdd an expiration facility for cached pages. Search the script for adrexpires to see how it works. Quite simple. Ç12/12/2000; 5:17:10 PM by DW ÇWhen rendering a directory box, hand-construct the URL for linking to included directories. Ç12/14/2000; 9:01:05 AM by DW ÇAdd support for {opmlUrl} feature. Ç12/15/2000; 1:37:10 AM by DW ÇSuggest-a-link email comes from the submitter local (flusecache = true); //set this false if you're debugging local (linktargetstring = ""); bundle { //set defaults for optional parameters if identifier == "" { identifier = string.popFileFromAddress (adroutline)}; if template == "" { template = html.directory.data.defaultPrefs.template}; if commentTemplate == "" { commentTemplate = html.directory.data.defaultPrefs.commentTemplate}; if suggestALinkTemplate == "" { suggestALinkTemplate = html.directory.data.defaultPrefs.suggestALinkTemplate}; if foldericon == "" { foldericon = html.directory.data.defaultPrefs.foldericon}; if linkicon == "" { linkicon = html.directory.data.defaultPrefs.linkicon}; if miniXmlIcon == "" { miniXmlIcon = html.directory.data.defaultPrefs.miniXmlIcon}; if miniXmlCoffeeMugIcon == "" { miniXmlCoffeeMugIcon = html.directory.data.defaultPrefs.miniXmlCoffeeMugIcon}; if adrdirectories == nil { //store in system.temp.opmlDirectories adrdirectories = @system.temp.opmlDirectories}; if linktarget != "" { linktargetstring = " target=\"" + linktarget + "\""}}; local (flDirectoryHomeUrlEndsWithSlash = false); bundle { //make sure directoryHomeUrl does not end with a '/', and set flDirectoryHomeUrlEndsWithSlash if directoryHomeUrl endswith "/" { directoryHomeUrl = string.delete (directoryHomeUrl, sizeOf (directoryHomeUrl), 1); flDirectoryHomeUrlEndsWithSlash = true}}; local (directoriesUrl); //used for determining in-site inclusions for Manila sites bundle { //set lowerDirectoriesUrl ÇExplanation ÇIn a Manila site, a directory's url is always [siteUrl]/directory/[msgnum]. ÇmanilaSuite.directory.viewDirectory passes in this URL for the value of directoryHomeUrl. What we do is strip off the [msgnum] part, so that we can check to see if a link node begins with [siteUrl]/directory/. If so, then we know that the link is actually an in-site inclusion -- an inclusion of a directory in another message in this site. ÇThis broke when the meaning of directoryHomeUrl changed in order to be able to support directories rendered outside of Manila. local (s = string.lower (directoryHomeUrl)); local (sizeLastPart = sizeOf (string.nthField (s, "/", string.countFields (s, "/")))); directoriesUrl = string.delete (s, sizeOf (s) - sizeLastPart + 1, sizeLastPart)}; Çlocal (thisPageUrl = string.delete (homePageUrl, sizeof (homePageUrl), 1) + pta^.uri) local (pta = html.getPageTableAddress ()); local (thisPageUrl = "http://" + pta^.host + pta^.uri); local (flOuterTables = not flDirectoryInABox, flShowStatsLine = not flDirectoryInABox); local (flSkipLeadingComment = false); //if true we don't display the first comment at the current level local (searchArgs, linkArgs=""); bundle { //if the method is GET, fill searchArgs, and set linkArgs new (tabletype, @searchArgs); if pta^.method == "GET" { if defined (pta^.searchArgs) { //PBS 11/26/00: search args not defined when static rendering webserver.parseargs (pta^.searchargs, @searchArgs)}}; bundle { //set linkArgs -- these are appended to folder-links local (linkArgsTable); new (tableType, @linkArgsTable); if defined (searchArgs.url) { linkArgsTable.url = searchArgs.url} else { if flAddOpmlUrlToSearchArgs { linkArgsTable.url = opmlUrl}}; if defined (searchArgs.remoteInclude) { if linkArgs != "" { linkArgs = linkArgs + "&"}; linkArgsTable.remoteInclude = searchArgs.remoteInclude}; if defined (searchArgs.cssUrl) { linkArgsTable.cssUrl = searchArgs.cssUrl}; if defined (searchArgs.flIcons) { linkArgsTable.flIcons = searchArgs.flIcons}; if defined (searchArgs.flMinimalTemplate) { linkArgsTable.flMinimalTemplate = searchArgs.flMinimalTemplate}; if defined (searchArgs.flXmlButton) { linkArgsTable.flXmlButton = searchArgs.flXmlButton}; if defined (searchArgs.flLinkText) { linkArgsTable.flLinkText = searchArgs.flLinkText}; linkArgs = webserver.encodeArgs (@linkArgsTable); if sizeOf (linkArgs) > 0 { //prepend a '?' linkArgs = "?" + linkArgs}}}; local (messagetouser = ""); bundle { //get the message from search args if it's present if defined (searchArgs.message) { messagetouser = searchArgs.message}}; local (path, origpath); bundle { //set path, origpath path = remainingpath; origpath = path}; local (adrdirectoryinfo = html.directory.initDirectoryTable (identifier, adrdirectories)); html.directory.compileIfDirty (adroutline, identifier, adrdirectoryinfo, ownername, owneremail); local (ctpagehits = 0); bundle { //bump hit counter for page local (adrhit = @adrdirectoryinfo^.hits.[pta^.uri]); if defined (adrhit^) { adrhit^++} else { adrhit^ = 1}; ctpagehits = adrhit^}; on postprocess (s) { //fast macro substitution s = string.replaceall (s, "[[hits]]", ctpagehits); if sizeof (messagetouser) > 0 { s = "<font color=\"red\">" + messagetouser + "</font><br><br>" + s}; Çif not flDirectoryInABox //PBS 11/26/00: add the external editor button Çif defined (pta^.adrMemberInfo) Çif mainResponder.discuss.memberCanEdit (adrMsg, pta^.adrMemberInfo, pta) Çs = s + "\r<p>" + manilaSuite.pike.editMessageButton (adrMsg, "Edit this directory in an outline in Radio UserLand.", pta) if not flDisplayTitle { //PBS 11/26/00: possibly turn off display of the title html.directory.stripTitle (pta)}; return (s)}; local (adrcachepage, adrcachetitle, adrexpires); bundle { //serve from cache if possible adrcachepage = @adrdirectoryinfo^.cache.pages.[pta^.uri]; adrcachetitle = @adrdirectoryinfo^.cache.titles.[pta^.uri]; adrexpires = @adrdirectoryinfo^.cache.expires.[pta^.uri]; if flusecache { if pta^.method == "GET" { if not flDirectoryInABox { if not defined (searchArgs.command) { ÇNote ÇIf we didn't check for the command, the suggest-a-link feature wouldn't work. ÇWe'd return the cached "content page" for the URL. ÇIf a command is present that's a clue that we can't use the cache. local (flexpired = true); if defined (adrexpires^) { if clock.now () < adrexpires^ { flexpired = false}}; if not flexpired { if defined (adrcachepage^) and defined (adrcachetitle^) { //serve from cache pta^.title = adrcachetitle^; return (postprocess (adrcachepage^))}}}}}}}; local (crumblist = {}, adrlastxstruct, rules); local (adritem = html.directory.walk (adroutline, identifier, path, @crumblist, @adrlastxstruct, @rules, @opmlUrl, adrdirectories, ownername, owneremail, adrInSiteInclusionCallback)); bundle { //build the page title if not flDirectoryInABox { local (s = ""); for crumb in crumblist { s = s + crumb + " > "}; s = string.mid (s, 1, sizeof (s) - 3); if sizeof (s) == 0 { if sizeOf (title) > 0 { pta^.title = title; adrcachetitle^ = title}} //PBS 03/20/01: cache title of top-level page else { pta^.title = s; adrcachetitle^ = s}}}; local (htmltext = "", indentlevel = 0); on add (s) { htmltext = htmltext + string.filledString ("\t", indentlevel) + s + "\r"}; if flOuterTables { add ("<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\">"); indentlevel++; add ("<tr><td>");indentlevel++}; //PBS 11/27/00: outer tr and td tags needed, to avoid <table..><table..> local (crumbstring); bundle { //set crumbstring if sizeof (crumblist) == 0 { local (comment = html.directory.getFirstComment (adritem)); if sizeof (comment) == 0 { crumbstring = "<b>Top</b>"} else { crumbstring = "<b>Top</b>: " + comment; flSkipLeadingComment = true}} else { crumbstring = html.directory.getBreadcrumbString (crumblist, pta^.uri, linkArgs, flDirectoryHomeUrlEndsWithSlash)}}; local (flsaveincache = false); local (macroStartChars = "{", macroEndChars = "}"); bundle { //build the directory page body in htmltext bundle { //get macroStartChars and macroEndChars if defined (pta^.macroStartCharacters) { macroStartChars = pta^.macroStartCharacters}; if defined (pta^.macroEndCharacters) { macroEndChars = pta^.macroEndCharacters}}; local (ownername, owneremail, modified, created); bundle { //get ownername, owneremail, etc on shortdate (d) { d = date (d); //PBS 12/13/01: d is a string but it needs to be a date local (day, month, year, hour, minute, second); date.get (d, @day, @month, @year, @hour, @minute, @second); return (month + "/" + day + "/" + string.mid (year, 3, 2))}; local (nomad = xml.getaddress (adrlastxstruct, "opml")); nomad = xml.getaddress (nomad, "head"); ownername = xml.getvalue (nomad, "ownerName"); owneremail = xml.getvalue (nomad, "ownerEmail"); modified = shortdate (xml.getvalue (nomad, "dateModified")); created = shortdate (xml.getvalue (nomad, "dateCreated"))}; local (command = "normal"); case pta^.method { "GET" { if defined (searchArgs.command) { command = searchArgs.command}}; "POST" { if defined (pta^.postargs.command) { command = pta^.postargs.command}}}; case command { "normal" { local (flAtLeastOneLink = false, directoryBodyText, ctsubitems = 0); bundle { //render the current level into directoryBodyText directoryBodyText = ""; local (indentlevel = 0); on add (s) { directoryBodyText = directoryBodyText + string.filledString ("\t", indentlevel) + s + "\r"}; if flOuterTables { add ("<table class=\"" + cssPrefix + "Table\" cellspacing=\"0\" cellpadding=\"5\" border=\"0\">"); indentlevel++}; if path beginswith "/" { path = string.delete (path, 1, 1)}; local (itemlist = {}); on addtoitemlist (s) { ctsubitems++; itemlist = itemlist + {s}}; on addItem (adr, flLinkFolders=true) { if nameof (adr^) beginswith "/" { //it's not an outline return ("")}; local (text = adr^.["/atts"].text, url = "", icon = "", flfolder = false, type = "text"); bundle { //decode any entities in the XML text text = xml.entityDecode (text, flAlphaEntities:true)}; bundle { //skip over rules if string.lower (text) beginswith "<rules>" { Çadd ("<tr><td valign=\"top\"> </td><td>" + rules.columns.value + "</td></tr>") return}}; for adrsub in adr { //see if it has subs if not (nameof (adrsub^) beginswith "/") { //it's an outline local (title); bundle { //set the url if flTopLevel { url = homePageUrl + "directory/" + origpath + "/" + html.directory.getcanonicalname (text); Çbundle //unnecessarily verbose Çurl = homePageUrl + "directory" Çif not ((url endsWith "/") or (origpath beginsWith "/")) Çurl = url + "/" Çurl = url + origpath Çif not (origpath endsWith "/") Çurl = url + "/" Çurl = url + html.directory.getcanonicalname (text)} else { Çurl = directoryHomeUrl + "/" + html.directory.getcanonicalname (text) Çurl = pta^.uri url = directoryHomeUrl; if not (remainingPath beginsWith "/") { url = url + "/"}; url = url + remainingPath; if not (url endsWith "/") { url = url + "/"}; url = url + html.directory.getcanonicalname (text)}; url = url + linkArgs}; bundle { //set the title title = ""; try { if adrsub^.["/atts"].isComment { local (s = xml.entityDecode (adrsub^.["/atts"].text, flAlphaEntities:true)); if not (s beginswith "<") { title = " title=\"" + s + "\""}}}}; if flLinkFolders { icon = "<a class=\"" + cssPrefix + "IconLink\" href=\"" + url + "\"" + title + ">" + foldericon + "</a>"}; flfolder = true; type = "folder"; break}}; if not flfolder { //might be a comment or a link (or..?) try { //handle comment if adr^.["/atts"].isComment { if flDirectoryInABox { //skip comments in boxes return}; if flSkipLeadingComment { flSkipLeadingComment = false; return}; text = string.replaceall (commentTemplate, macrostartchars + "comment" + macroendchars, text); Çtext = "<i>" + text + "<br><br></i>" type = "comment"}}; try { //handle link if defined (adr^.["/atts"].url) or defined (adr^.["/atts"].htmlUrl) { //new version which understands all kinds of nodes with URLs if defined (adr^.["/atts"].url) { url = adr^.["/atts"].url} else { url = adr^.["/atts"].htmlUrl}; if string.lower (url) beginswith string.lower (directoriesUrl) { //it's a link into the directory on this site local (linkremainder = string.delete (url, 1, sizeof (directoriesUrl))); if flTopLevel { url = directoriesUrl + origpath + "/~" + linkremainder + "~"} else { url = pta^.uri + "/~" + linkremainder + "~"}; icon = "<a class=\"" + cssPrefix + "IconLink\" href=\"" + url + "\">" + foldericon + "</a>"; type = "folder"} else { if string.lower (url) endswith ".opml" { local (adrincache = html.directory.getInclusionFromCache (identifier, url, adrdirectories)); if typeof (adrincache^) == stringtype { text = text + " (Error: " + adrincache^ + ")"}; type = "folder"; flfolder = true; Çlocal (linkurl) Çbundle //set the linkurl Çlinkurl = html.directory.getcanonicalname (text) Çif flTopLevel Çlinkurl = homePageUrl + "directory/" + origpath + "/" + linkurl Çelse Çlinkurl = pta^.uri + "/" + linkurl Çlinkurl = linkurl + linkArgs bundle { //set the linkurl url = html.directory.getcanonicalname (text); if flTopLevel { url = homePageUrl + "directory/" + origpath + "/" + url} else { if pta^.uri endswith "/" { url = pta^.uri + url} else { url = pta^.uri + "/" + url}; url = url + linkArgs}}; icon = "<a class=\"" + cssPrefix + "IconLink\" href=\"" + url + "\">" + foldericon + "</a>"} else { icon = "<a class=\"" + cssPrefix + "IconLink\" href=\"" + url + "\"" + linktargetstring + ">" + linkicon + "</a>"; type = "link"; flAtLeastOneLink = true}}}; Çif adr^.["/atts"].type == "link" //old version Çurl = adr^.["/atts"].url Çif string.lower (url) beginswith string.lower (directoryHomeUrl) //it's a link into the directory on this site Çlocal (linkremainder = string.delete (url, 1, sizeof (directoryHomeUrl))) Çif flTopLevel Çurl = homePageUrl + "directory/" + origpath + "/~" + linkremainder + "~" Çelse Çurl = pta^.uri + "/~" + linkremainder + "~" Çicon = "<a class=\"" + cssPrefix + "IconLink\" href=\"" + url + "\">" + foldericon + "</a>" Çtype = "folder" Çelse Çif string.lower (url) endswith ".opml" Çlocal (adrincache = html.directory.getInclusionFromCache (identifier, url, adrdirectories)) Çif typeof (adrincache^) == stringtype Çtext = text + " (Error: " + adrincache^ + ")" Çtype = "folder" Çflfolder = true Çlocal (linkurl) Çbundle //set the linkurl Çlinkurl = html.directory.getcanonicalname (text) Çif flTopLevel Çlinkurl = homePageUrl + "directory/" + origpath + "/" + linkurl Çelse Çlinkurl = pta^.uri + "/" + linkurl Çlinkurl = linkurl + linkArgs Çbundle //set the linkurl Çurl = html.directory.getcanonicalname (text) Çif flTopLevel Çurl = homePageUrl + "directory/" + origpath + "/" + url Çelse Çurl = pta^.uri + "/" + url Çurl = url + linkArgs Çicon = "<a class=\"" + cssPrefix + "IconLink\" href=\"" + url + "\">" + foldericon + "</a>" Çelse Çicon = "<a class=\"" + cssPrefix + "IconLink\" href=\"" + url + "\">" + linkicon + "</a>" Çtype = "link" ÇflAtLeastOneLink = true}}; local (xmlLinks = "", itemtext); if defined (adr^.["/atts"].xmlUrl) { //set xmlLinks to the coffee mug and xml button links local (xmlurl = adr^.["/atts"].xmlUrl); local (xmlLink = "<a href=\"" + xmlurl + "\" title=\"Click to view the XML source for "" + string.replaceAll (text, "\"", """) + "".\">" + miniXmlIcon + "</a>"); local (coffeeMugLink = "<a href=\"http://127.0.0.1:5335/system/pages/subscriptions?url=" + string.urlEncode (xmlurl) + "\" title=\"Click to subscribe to "" + string.replaceAll (text, "\"", """) + "" in Radio UserLand.\">" + miniXmlCoffeeMugIcon + "</a>"); xmlLinks = coffeeMugLink + " " + xmlLink + " "}; if flIcons { if flOuterTables { if (type == "text") or (type == "comment") { itemtext = "<td> </td><td class=\"" + cssPrefix + "Comment\">" + xmlLinks + text + "</td>"} else { Çbundle //move the icon down by a few pixels; JES 5/15/02: Commented out. Now accomplished with a style attribute. Much smaller, easier to read the HTML, and renders faster in Netscape. Çexplanation ÇComments must be aligned at the top for multi-line elements, but it looks awkward for single-line items if it's flush with the top. Çicon = "<table cellspacing=\"0\" cellpadding=\"0\"><tr><td height=\"2\"></td></tr><tr><td>" + icon + "</td></tr></table>" //PBS 11/27/00: tr tags may not have height attributes -- moved height attribute to td tag (validation issue) if flLinkText { text = "<a class=\"" + cssPrefix + "ItemLink\" href=\"" + url + "\">" + text + "</a>"}; itemtext = "<td class=\"" + cssPrefix + "Icon\" align=\"center\" valign=\"top\" style=\"padding-top:5px\">" + icon + "</td><td class=\"" + cssPrefix + "Item\" valign=\"top\">" + xmlLinks + text + "</td>"}} else { itemtext = "<td class=\"" + cssPrefix + "Icon\" align=\"center\" valign=\"top\" style=\"padding-top:5px\">" + icon + "</td><td class=\"" + cssPrefix + "Item\">" + xmlLinks + text + "</td>"}} else { //no icons if (type == "text") or (type == "comment") { itemtext = "<td class=\"" + cssPrefix + "Comment\">" + xmlLinks + text + "</td>"} else { local (cssClass = cssPrefix + "Item"); if type == "folder" { cssClass = cssPrefix + "Folder"}; if type == "folder" and (not flLinkFolders) { itemtext = "<td class=\"" + cssClass + "\">" + xmlLinks + text + "</td>"} else { itemtext = "<td class=\"" + cssClass + "\">" + xmlLinks + "<a class=\"" + cssPrefix + "ItemLink\" href=\"" + url + "\"" + linktargetstring + ">" + text + "</a></td>"}}}; addtoitemlist (itemtext); return (type)}; if defined (rules.allLevels.value) { //rules in the outline can override the flAllLevels input parameter if rules.allLevels.value { flAllLevels = true}}; if flAllLevels { //add this level and all sub-levels on addlevel (adrparent) { local (adr); for adr in adrparent { if addItem (adr, false) == "folder" { addlevel (adr)}}}; addlevel (adritem)} else { //add only items at this level local (adr); for adr in adritem { addItem (adr)}}; bundle { //spew out items in itemlist if defined (rules.columns.value) { local (cols = number (rules.columns.value)); local (i, j, ix, itemsincol = (sizeof (itemlist) + (cols - 1)) / cols); for i = 1 to itemsincol { add ("<tr>"); indentlevel++; for j = 1 to rules.columns.value { ix = i + ((j - 1) * itemsincol); if ix <= sizeof (itemlist) { add (itemlist [ix] + "<td> </td>")}}; add ("</tr>"); indentlevel--}; ix = 1} else { local (item); for item in itemlist { add ("<tr>" + item + "</tr>")}}}; if flOuterTables { add ("</table>"); indentlevel--}}; local (suggestalink = ""); bundle { //build the suggest-a-link part if flShowStatsLine { if flAtLeastOneLink { //heuristic, only ask for suggestions if the page has at least one link local (args = searchArgs); Çnew (tabletype, @args) args.command = "suggestALink"; local (suggestalinkurl = pta^.uri + "?" + webserver.encodeArgs (@args)); suggestalink = string.replaceall (suggestALinkTemplate, macrostartchars + "url" + macroendchars, suggestalinkurl)}}}; bundle { //flow the computed elements through the template if flDirectoryInABox { htmltext = directoryBodyText} else { local (s = template); s = string.replaceall (s, macrostartchars + "breadcrumbs" + macroendchars, crumbstring); s = string.replaceall (s, macrostartchars + "directory" + macroendchars, directoryBodyText); s = string.replaceall (s, macrostartchars + "editor" + macroendchars, ownername); s = string.replaceall (s, macrostartchars + "lastModDate" + macroendchars, modified); s = string.replaceall (s, macrostartchars + "hits" + macroendchars, "[[hits]]"); s = string.replaceall (s, macrostartchars + "suggestLink" + macroendchars, suggestalink); s = string.replaceall (s, macrostartchars + "opmlUrl" + macroendchars, opmlUrl); //12/14/2000; 9:00:58 AM by DW s = string.replaceall (s, macrostartchars + "subItems" + macroendchars, ctsubitems); //3/6/01; 10:28:36 AM by DW htmltext = htmlText + s}}; //PBS 11/27/00: was htmltext = s -- which tossed the outer table tag if not flDirectoryInABox { flsaveincache = true}}; "suggestALink" { local (defaultname = "", defaultemail = ""); bundle { //get defaults if defined (pta^.adrmemberinfo) { defaultemail = nameof (pta^.adrmemberinfo^); try {defaultname = pta^.adrmemberinfo^.personalinfo.name}}}; add (crumbstring); add ("<p class=\"suggestALinkExplanation\">Please enter a site name, URL and (optionally) explain why you believe the site should be included in this category.</p>"); Çadd ("<form method=\"POST\" action=\"" + pta^.uri + "\">"); indentlevel++ add ("<form class=\"suggestALinkForm\" method=\"POST\">"); indentlevel++; add ("<table cellspacing=\"10\" cellpadding=\"0\">"); indentlevel++; add ("<tr><td>Site name:</td><td><input type=text size=\"50\" name=\"title\" value=\"\"></td></tr>"); add ("<tr><td>URL:</td><td><input type=text size=\"50\" name=\"suggestedUrl\" value=\"http://\"></td></tr>"); add ("<tr><td valign=\"top\" width=\"100\">Why should this link be in this category?</td><td><textarea rows=\"3\" cols=\"38\" wrap=\"virtual\" name=\"description\"></textarea></td></tr>"); add ("<tr><td>Your name:</td><td><input type=text size=\"50\" name=\"name\" value=\"" + defaultname + "\"></td></tr>"); add ("<tr><td>Your email address:</td><td><input type=text size=\"50\" name=\"email\" value=\"" + defaultemail + "\"></td></tr>"); add ("<tr><td> </td><td><input type=\"submit\" name=\"submit\" value=\"Submit\"></td></tr>"); add ("</table>"); indentlevel--; add ("<input name=\"command\" type=\"hidden\" value=\"" + "sendASuggestion" + "\">"); Çadd ("<input name=\"referer\" type=\"hidden\" value=\"" + referer + "\">") Çadd ("<input name=\"editor\" type=\"hidden\" value=\"" + base64.encode (editoremail, infinity) + "\">") add ("</form>"); indentlevel--; add ("<p class=\"suggestALinkExplanation\">When you click on Submit, an email will be sent to " + ownername + ", the editor of this directory page. <i>There is no guarantee that the suggested site will appear in this directory.</i></p>")}; "sendASuggestion" { local (mailtext = ""); on add (s) { mailtext = mailtext + s + "\r\n"}; add ("A link was suggested in this category:"); add (""); add (thisPageUrl); add (""); add ("Details follow.."); add (""); add (pta^.postargs.name + ", " + pta^.postargs.email + ", suggested adding the site named \"" + pta^.postargs.title + "\" at this URL:"); add (""); add (pta^.postargs.suggestedUrl); add (""); add ("When asked why this link would be valuable, " + pta^.postargs.name + " said: \"" + pta^.postargs.description + "\"."); add (""); add (clock.now ()); if defined (manilaSuite.sendMail) { manilaSuite.sendMail (owneremail, "Suggested Link: " + pta^.postargs.title, mailtext, pta^.postargs.email)} else { //most likely running in Radio tcp.sendMail (owneremail, "Suggested Link: " + pta^.postargs.title, mailtext, pta^.postargs.email)}; local (args = searchArgs); //start with the args we already have Çnew (tabletype, @args) if defined (pta^.searchArgs) { webserver.parseArgs (pta^.searchArgs, @args)}; args.command = "normal"; args.message = "Your suggestion was sent to the editor of this page. Thank you for participating."; mainresponder.redirect (pta^.uri + "?" + webserver.encodeArgs (@args)); return ("")}}}; if flOuterTables { add ("</td></tr>"); indentlevel--; //PBS 11/27/00: close td and tr add ("</table>"); indentlevel--}; if flUntaint { //untaint htmltext local (replaceWith = "&#" + number (macrostartchars[1]) + ";"); if sizeOf (macrostartchars) > 1 { replaceWith = replaceWith + string.delete (macrostartchars, 1, 1)}; htmltext = string.replaceAll (htmltext, macrostartchars, replaceWith)}; if flsaveincache { adrcachepage^ = htmltext; adrexpires^ = clock.now () + (60 * 15)}; //the page rendering expires every 15 minutes return (postprocess (htmltext))}; Çbundle //test code Çlocal (t); new (tableType, @t); html.setPageTableAddress (@t) Çbundle //set up pagetable Çt.uri = "/foo/testDirectory/directoriesAtUserland" Çt.method = "GET" Çlocal (adroutline = @system.temp.windowTypes.windows[1].window) ÇwebBrowser.displayText (viewDirectory (adroutline, "http://localhost/foo/testDirectory", "directoriesAtUserland/radioUserland", title:"Test directory")) Çhtml.deletePageTableAddress () \ No newline at end of file --- 1,3 ---- FrontierVcsFile:1:scpt:system.verbs.builtins.html.directory.viewDirectory ! on viewDirectory (adroutline, directoryHomeUrl, remainingPath="", identifier="", opmlUrl="", flIcons=true, flLinkText=false, flTopLevel=false, flDirectoryInABox=false, title="", template="", commentTemplate="", suggestALinkTemplate="", foldericon="", linkicon="", flDisplayTitle=false, flAddOpmlUrlToSearchArgs=false, adrdirectories=nil, ownername=user.prefs.name, owneremail=user.prefs.mailAddress, flUntaint=true, miniXmlIcon="", miniXmlCoffeeMugIcon="", flAllLevels=false, cssPrefix="directory", adrInSiteInclusionCallback=nil, linktarget="") { ÇChanges Ç6/19/05; 10:08:16 AM by TAC Çchanged localhost to 127.0.0.1 in test code bundle Ç6/13/02; 12:53:34 PM by JES ÇNew optional parameter, linktarget, specifies the value of the target attribute for links in the directory. Needed for the directory-in-a-frame feature in RCS. Ç6/5/02; 4:54:52 PM by JES ÇNew optional parameter, adrInSiteInclusionCallback, which is passed to html.directory.walk. ÇFixed link generation for in-site inclusion for directories rendered in Manila sites. When a link is to another directory in the same site, use ~[msgnum]~ for the path to the sub-directory. ÇDon't add the Edit With Radio button here. This code is meant to run in the wsf context, and therefore doesn't know about msgNum's. Ç6/4/02; 3:24:31 PM by JES ÇAdded a few pixels of padding to the top of the table cell which contains the icon. Ç5/10/02; 2:59:13 PM by JES ÇGiven the address of an outline, and some other contextual information, render the outline as an HTML directiry. ÇCribbed from manilaSuite.directory.viewDirectory. Ç12/19/01; 2:42:16 PM by PBS ÇCall manilaSuite.sendMail rather than tcp.sendMail, so user callbacks get called, so text gets converted (bug fix from David Bayly on Frontier-Server list). Ç12/13/01; 1:40:41 PM by PBS ÇFixed a date coercion bug in international systems. The bug was that a date wasn't being coerced. See the shortDate subroutine. Ç03/20/01; 9:50:47 PM by PBS ÇThe page title of the top-level of each directory was not getting set in the cache -- the title in the cache was the empty string. Now it's cached. Ç3/13/01; 9:01:41 PM by DW ÇThe page title of the top-level of each directory was the empty string. Uck. Added a conditional test, if it's empty, set it to the subject of the topmost message, topMsgSubject. Ç3/6/01; 10:39:17 AM by DW ÇAdd {subItems} macro, says how many items are displayed at the level you're viewing. I got tired of counting the number of new SOAP implementations by hand. A good problem to have!! ÇAlso, to make it legal, I also had to add an assignment in the "directorytemplate" branch in manilaSuite.themes.getLegalMacrosForObject Ç3/1/01; 2:03:06 PM by DW ÇFix two bugs in shortDate subroutine. Ç2000: Ç11/9/2000; 6:24:10 AM by DW ÇCreated. Ç11/9/2000; 5:52:41 PM by DW ÇAdded params. If flTopLevel, we know to render the top level of the directory. In this case msgnum must be set to the msg containing the outline for the directory to render. Ç11/16/2000; 7:20:51 AM by DW ÇInclude author information, number of hits, etc; at the bottom of the directory display. Ç11/16/2000; 10:34:18 AM by DW Çmsgnum can be a path now, like 4/theWeb/publications/news/general, which allows you to start at a deeply nested point in a directory. Ç11/17/2000; 7:49:02 AM by DW ÇSuggest a link feature. Ç11/22/2000; 7:07:00 AM by DW ÇFinish up templatization. Ç11/22/00; 5:02:45 PM by PBS ÇDon't read from or save in cache if flDirectoryInABox is true. Ç11/23/2000; 4:38:25 PM by DW ÇWhen displaying in a box, don't display comments. Ç11/24/2000; 8:07:56 AM by DW ÇDon't set the page title if flDirectoryInABox is true. Ç11/24/2000; 7:19:24 PM by DW ÇRelax rule about inclusion, now included directories can be anywhere ÇAdd a new branch to the cache in each dg message, called xmlstructs ÇThe name of each item is its url. If the value is a boolean false, that means we weren't able to read or parse the file. Don't retry. ÇThe cache is filled when you display the level containing the link. Only files whose extension are .opml are checked. ÇThe url that's generated keys off the name of the item, get its link to locate the xmlstruct in the cache. ÇChanged parts ÇmanilaSuite.directory.viewDirectory ÇmanilaSuite.directory.walk ÇmanilaSuite.directory.initMessageTable Ç11/26/00; 1:21:32 PM by PBS ÇAdd the external editor button ("Pike button") below directories if the viewer has edit privileges. ÇInhibit title display, unless the pref is turned on. (It's off by default.) ÇStatic rendering fix -- check that searchArgs is defined before referencing it. This fixes the viewDirectoryBox macro on the static version of pages. ÇFixed HTML errors -- there were tags being added that are in the directory template. They were hard-coded, they needed to be removed. Ç11/26/2000; 7:48:14 PM by DW ÇAdded support for the directories table. Ç11/26/00; 9:57:01 PM by PBS ÇFixed an HTML bug -- with the suggest a link page, the table was not being closed. Now it is. (An earlier HTML fix was half-right -- I had commented out a closing table tag, but the wrong one.) Ç11/27/2000; 9:11:14 AM by DW ÇGetting directories displaying correctly again. ÇIt seems clear to me that the change that Brent made can't work. He's commenting out a closing-table tag without commenting the balancing opening-table tag. If this works, the previous code must have been wrong in some way. It clearly doesn't work, this screen shot illustrates. Çhttp://www.scripting.com/images/misalignedDirectory.gif ÇIt seems clear to me that the directory items must be a table. Each item is a row in a table, if it's not a table, what table will enclose them? I just don't see the logic. ÇAnyway, I think what we're generating now is right. Ç11/27/00; 12:37:46 PM by PBS ÇThere were a number of small bugs fixed. Ç1. The outer table didn't also add outer tr and td tags. So you could have <table..><table..>, which is illegal. Now it does add tr and td tags (and close them later). Ç2. The suggest-a-link page page was adding outer tr and td tags, but the directory rendering was not. So now neither do. (See above.) Ç3. When building a directory page, the outer table was getting tossed. A line that read htmltext = s should have read htmltext = htmltext + s. But the closing outer table tag was still being added, so you had an extra closing table tag with directories, but not with the suggest-a-link page. Ç4. An HTML validation issue was fixed -- a tr tag cannot have a height attribute. The height attribute was moved to the enclosed td tag. There's still a validation issue with the textarea tag -- wrap is not allowed. But that's all throughout Manila, and no good solution exists for removing it. Ç12/5/2000; 8:43:53 PM by DW ÇAdd an expiration facility for cached pages. Search the script for adrexpires to see how it works. Quite simple. Ç12/12/2000; 5:17:10 PM by DW ÇWhen rendering a directory box, hand-construct the URL for linking to included directories. Ç12/14/2000; 9:01:05 AM by DW ÇAdd support for {opmlUrl} feature. Ç12/15/2000; 1:37:10 AM by DW ÇSuggest-a-link email comes from the submitter local (flusecache = true); //set this false if you're debugging local (linktargetstring = ""); bundle { //set defaults for optional parameters if identifier == "" { identifier = string.popFileFromAddress (adroutline)}; if template == "" { template = html.directory.data.defaultPrefs.template}; if commentTemplate == "" { commentTemplate = html.directory.data.defaultPrefs.commentTemplate}; if suggestALinkTemplate == "" { suggestALinkTemplate = html.directory.data.defaultPrefs.suggestALinkTemplate}; if foldericon == "" { foldericon = html.directory.data.defaultPrefs.foldericon}; if linkicon == "" { linkicon = html.directory.data.defaultPrefs.linkicon}; if miniXmlIcon == "" { miniXmlIcon = html.directory.data.defaultPrefs.miniXmlIcon}; if miniXmlCoffeeMugIcon == "" { miniXmlCoffeeMugIcon = html.directory.data.defaultPrefs.miniXmlCoffeeMugIcon}; if adrdirectories == nil { //store in system.temp.opmlDirectories adrdirectories = @system.temp.opmlDirectories}; if linktarget != "" { linktargetstring = " target=\"" + linktarget + "\""}}; local (flDirectoryHomeUrlEndsWithSlash = false); bundle { //make sure directoryHomeUrl does not end with a '/', and set flDirectoryHomeUrlEndsWithSlash if directoryHomeUrl endswith "/" { directoryHomeUrl = string.delete (directoryHomeUrl, sizeOf (directoryHomeUrl), 1); flDirectoryHomeUrlEndsWithSlash = true}}; local (directoriesUrl); //used for determining in-site inclusions for Manila sites bundle { //set lowerDirectoriesUrl ÇExplanation ÇIn a Manila site, a directory's url is always [siteUrl]/directory/[msgnum]. ÇmanilaSuite.directory.viewDirectory passes in this URL for the value of directoryHomeUrl. What we do is strip off the [msgnum] part, so that we can check to see if a link node begins with [siteUrl]/directory/. If so, then we know that the link is actually an in-site inclusion -- an inclusion of a directory in another message in this site. ÇThis broke when the meaning of directoryHomeUrl changed in order to be able to support directories rendered outside of Manila. local (s = string.lower (directoryHomeUrl)); local (sizeLastPart = sizeOf (string.nthField (s, "/", string.countFields (s, "/")))); directoriesUrl = string.delete (s, sizeOf (s) - sizeLastPart + 1, sizeLastPart)}; Çlocal (thisPageUrl = string.delete (homePageUrl, sizeof (homePageUrl), 1) + pta^.uri) local (pta = html.getPageTableAddress ()); local (thisPageUrl = "http://" + pta^.host + pta^.uri); local (flOuterTables = not flDirectoryInABox, flShowStatsLine = not flDirectoryInABox); local (flSkipLeadingComment = false); //if true we don't display the first comment at the current level local (searchArgs, linkArgs=""); bundle { //if the method is GET, fill searchArgs, and set linkArgs new (tabletype, @searchArgs); if pta^.method == "GET" { if defined (pta^.searchArgs) { //PBS 11/26/00: search args not defined when static rendering webserver.parseargs (pta^.searchargs, @searchArgs)}}; bundle { //set linkArgs -- these are appended to folder-links local (linkArgsTable); new (tableType, @linkArgsTable); if defined (searchArgs.url) { linkArgsTable.url = searchArgs.url} else { if flAddOpmlUrlToSearchArgs { linkArgsTable.url = opmlUrl}}; if defined (searchArgs.remoteInclude) { if linkArgs != "" { linkArgs = linkArgs + "&"}; linkArgsTable.remoteInclude = searchArgs.remoteInclude}; if defined (searchArgs.cssUrl) { linkArgsTable.cssUrl = searchArgs.cssUrl}; if defined (searchArgs.flIcons) { linkArgsTable.flIcons = searchArgs.flIcons}; if defined (searchArgs.flMinimalTemplate) { linkArgsTable.flMinimalTemplate = searchArgs.flMinimalTemplate}; if defined (searchArgs.flXmlButton) { linkArgsTable.flXmlButton = searchArgs.flXmlButton}; if defined (searchArgs.flLinkText) { linkArgsTable.flLinkText = searchArgs.flLinkText}; linkArgs = webserver.encodeArgs (@linkArgsTable); if sizeOf (linkArgs) > 0 { //prepend a '?' linkArgs = "?" + linkArgs}}}; local (messagetouser = ""); bundle { //get the message from search args if it's present if defined (searchArgs.message) { messagetouser = searchArgs.message}}; local (path, origpath); bundle { //set path, origpath path = remainingpath; origpath = path}; local (adrdirectoryinfo = html.directory.initDirectoryTable (identifier, adrdirectories)); html.directory.compileIfDirty (adroutline, identifier, adrdirectoryinfo, ownername, owneremail); local (ctpagehits = 0); bundle { //bump hit counter for page local (adrhit = @adrdirectoryinfo^.hits.[pta^.uri]); if defined (adrhit^) { adrhit^++} else { adrhit^ = 1}; ctpagehits = adrhit^}; on postprocess (s) { //fast macro substitution s = string.replaceall (s, "[[hits]]", ctpagehits); if sizeof (messagetouser) > 0 { s = "<font color=\"red\">" + messagetouser + "</font><br><br>" + s}; Çif not flDirectoryInABox //PBS 11/26/00: add the external editor button Çif defined (pta^.adrMemberInfo) Çif mainResponder.discuss.memberCanEdit (adrMsg, pta^.adrMemberInfo, pta) Çs = s + "\r<p>" + manilaSuite.pike.editMessageButton (adrMsg, "Edit this directory in an outline in Radio UserLand.", pta) if not flDisplayTitle { //PBS 11/26/00: possibly turn off display of the title html.directory.stripTitle (pta)}; return (s)}; local (adrcachepage, adrcachetitle, adrexpires); bundle { //serve from cache if possible adrcachepage = @adrdirectoryinfo^.cache.pages.[pta^.uri]; adrcachetitle = @adrdirectoryinfo^.cache.titles.[pta^.uri]; adrexpires = @adrdirectoryinfo^.cache.expires.[pta^.uri]; if flusecache { if pta^.method == "GET" { if not flDirectoryInABox { if not defined (searchArgs.command) { ÇNote ÇIf we didn't check for the command, the suggest-a-link feature wouldn't work. ÇWe'd return the cached "content page" for the URL. ÇIf a command is present that's a clue that we can't use the cache. local (flexpired = true); if defined (adrexpires^) { if clock.now () < adrexpires^ { flexpired = false}}; if not flexpired { if defined (adrcachepage^) and defined (adrcachetitle^) { //serve from cache pta^.title = adrcachetitle^; return (postprocess (adrcachepage^))}}}}}}}; local (crumblist = {}, adrlastxstruct, rules); local (adritem = html.directory.walk (adroutline, identifier, path, @crumblist, @adrlastxstruct, @rules, @opmlUrl, adrdirectories, ownername, owneremail, adrInSiteInclusionCallback)); bundle { //build the page title if not flDirectoryInABox { local (s = ""); for crumb in crumblist { s = s + crumb + " > "}; s = string.mid (s, 1, sizeof (s) - 3); if sizeof (s) == 0 { if sizeOf (title) > 0 { pta^.title = title; adrcachetitle^ = title}} //PBS 03/20/01: cache title of top-level page else { pta^.title = s; adrcachetitle^ = s}}}; local (htmltext = "", indentlevel = 0); on add (s) { htmltext = htmltext + string.filledString ("\t", indentlevel) + s + "\r"}; if flOuterTables { add ("<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\">"); indentlevel++; add ("<tr><td>");indentlevel++}; //PBS 11/27/00: outer tr and td tags needed, to avoid <table..><table..> local (crumbstring); bundle { //set crumbstring if sizeof (crumblist) == 0 { local (comment = html.directory.getFirstComment (adritem)); if sizeof (comment) == 0 { crumbstring = "<b>Top</b>"} else { crumbstring = "<b>Top</b>: " + comment; flSkipLeadingComment = true}} else { crumbstring = html.directory.getBreadcrumbString (crumblist, pta^.uri, linkArgs, flDirectoryHomeUrlEndsWithSlash)}}; local (flsaveincache = false); local (macroStartChars = "{", macroEndChars = "}"); bundle { //build the directory page body in htmltext bundle { //get macroStartChars and macroEndChars if defined (pta^.macroStartCharacters) { macroStartChars = pta^.macroStartCharacters}; if defined (pta^.macroEndCharacters) { macroEndChars = pta^.macroEndCharacters}}; local (ownername, owneremail, modified, created); bundle { //get ownername, owneremail, etc on shortdate (d) { d = date (d); //PBS 12/13/01: d is a string but it needs to be a date local (day, month, year, hour, minute, second); date.get (d, @day, @month, @year, @hour, @minute, @second); return (month + "/" + day + "/" + string.mid (year, 3, 2))}; local (nomad = xml.getaddress (adrlastxstruct, "opml")); nomad = xml.getaddress (nomad, "head"); ownername = xml.getvalue (nomad, "ownerName"); owneremail = xml.getvalue (nomad, "ownerEmail"); modified = shortdate (xml.getvalue (nomad, "dateModified")); created = shortdate (xml.getvalue (nomad, "dateCreated"))}; local (command = "normal"); case pta^.method { "GET" { if defined (searchArgs.command) { command = searchArgs.command}}; "POST" { if defined (pta^.postargs.command) { command = pta^.postargs.command}}}; case command { "normal" { local (flAtLeastOneLink = false, directoryBodyText, ctsubitems = 0); bundle { //render the current level into directoryBodyText directoryBodyText = ""; local (indentlevel = 0); on add (s) { directoryBodyText = directoryBodyText + string.filledString ("\t", indentlevel) + s + "\r"}; if flOuterTables { add ("<table class=\"" + cssPrefix + "Table\" cellspacing=\"0\" cellpadding=\"5\" border=\"0\">"); indentlevel++}; if path beginswith "/" { path = string.delete (path, 1, 1)}; local (itemlist = {}); on addtoitemlist (s) { ctsubitems++; itemlist = itemlist + {s}}; on addItem (adr, flLinkFolders=true) { if nameof (adr^) beginswith "/" { //it's not an outline return ("")}; local (text = adr^.["/atts"].text, url = "", icon = "", flfolder = false, type = "text"); bundle { //decode any entities in the XML text text = xml.entityDecode (text, flAlphaEntities:true)}; bundle { //skip over rules if string.lower (text) beginswith "<rules>" { Çadd ("<tr><td valign=\"top\"> </td><td>" + rules.columns.value + "</td></tr>") return}}; for adrsub in adr { //see if it has subs if not (nameof (adrsub^) beginswith "/") { //it's an outline local (title); bundle { //set the url if flTopLevel { url = homePageUrl + "directory/" + origpath + "/" + html.directory.getcanonicalname (text); Çbundle //unnecessarily verbose Çurl = homePageUrl + "directory" Çif not ((url endsWith "/") or (origpath beginsWith "/")) Çurl = url + "/" Çurl = url + origpath Çif not (origpath endsWith "/") Çurl = url + "/" Çurl = url + html.directory.getcanonicalname (text)} else { Çurl = directoryHomeUrl + "/" + html.directory.getcanonicalname (text) Çurl = pta^.uri url = directoryHomeUrl; if not (remainingPath beginsWith "/") { url = url + "/"}; url = url + remainingPath; if not (url endsWith "/") { url = url + "/"}; url = url + html.directory.getcanonicalname (text)}; url = url + linkArgs}; bundle { //set the title title = ""; try { if adrsub^.["/atts"].isComment { local (s = xml.entityDecode (adrsub^.["/atts"].text, flAlphaEntities:true)); if not (s beginswith "<") { title = " title=\"" + s + "\""}}}}; if flLinkFolders { icon = "<a class=\"" + cssPrefix + "IconLink\" href=\"" + url + "\"" + title + ">" + foldericon + "</a>"}; flfolder = true; type = "folder"; break}}; if not flfolder { //might be a comment or a link (or..?) try { //handle comment if adr^.["/atts"].isComment { if flDirectoryInABox { //skip comments in boxes return}; if flSkipLeadingComment { flSkipLeadingComment = false; return}; text = string.replaceall (commentTemplate, macrostartchars + "comment" + macroendchars, text); Çtext = "<i>" + text + "<br><br></i>" type = "comment"}}; try { //handle link if defined (adr^.["/atts"].url) or defined (adr^.["/atts"].htmlUrl) { //new version which understands all kinds of nodes with URLs if defined (adr^.["/atts"].url) { url = adr^.["/atts"].url} else { url = adr^.["/atts"].htmlUrl}; if string.lower (url) beginswith string.lower (directoriesUrl) { //it's a link into the directory on this site local (linkremainder = string.delete (url, 1, sizeof (directoriesUrl))); if flTopLevel { url = directoriesUrl + origpath + "/~" + linkremainder + "~"} else { url = pta^.uri + "/~" + linkremainder + "~"}; icon = "<a class=\"" + cssPrefix + "IconLink\" href=\"" + url + "\">" + foldericon + "</a>"; type = "folder"} else { if string.lower (url) endswith ".opml" { local (adrincache = html.directory.getInclusionFromCache (identifier, url, adrdirectories)); if typeof (adrincache^) == stringtype { text = text + " (Error: " + adrincache^ + ")"}; type = "folder"; flfolder = true; Çlocal (linkurl) Çbundle //set the linkurl Çlinkurl = html.directory.getcanonicalname (text) Çif flTopLevel Çlinkurl = homePageUrl + "directory/" + origpath + "/" + linkurl Çelse Çlinkurl = pta^.uri + "/" + linkurl Çlinkurl = linkurl + linkArgs bundle { //set the linkurl url = html.directory.getcanonicalname (text); if flTopLevel { url = homePageUrl + "directory/" + origpath + "/" + url} else { if pta^.uri endswith "/" { url = pta^.uri + url} else { url = pta^.uri + "/" + url}; url = url + linkArgs}}; icon = "<a class=\"" + cssPrefix + "IconLink\" href=\"" + url + "\">" + foldericon + "</a>"} else { icon = "<a class=\"" + cssPrefix + "IconLink\" href=\"" + url + "\"" + linktargetstring + ">" + linkicon + "</a>"; type = "link"; flAtLeastOneLink = true}}}; Çif adr^.["/atts"].type == "link" //old version Çurl = adr^.["/atts"].url Çif string.lower (url) beginswith string.lower (directoryHomeUrl) //it's a link into the directory on this site Çlocal (linkremainder = string.delete (url, 1, sizeof (directoryHomeUrl))) Çif flTopLevel Çurl = homePageUrl + "directory/" + origpath + "/~" + linkremainder + "~" Çelse Çurl = pta^.uri + "/~" + linkremainder + "~" Çicon = "<a class=\"" + cssPrefix + "IconLink\" href=\"" + url + "\">" + foldericon + "</a>" Çtype = "folder" Çelse Çif string.lower (url) endswith ".opml" Çlocal (adrincache = html.directory.getInclusionFromCache (identifier, url, adrdirectories)) Çif typeof (adrincache^) == stringtype Çtext = text + " (Error: " + adrincache^ + ")" Çtype = "folder" Çflfolder = true Çlocal (linkurl) Çbundle //set the linkurl Çlinkurl = html.directory.getcanonicalname (text) Çif flTopLevel Çlinkurl = homePageUrl + "directory/" + origpath + "/" + linkurl Çelse Çlinkurl = pta^.uri + "/" + linkurl Çlinkurl = linkurl + linkArgs Çbundle //set the linkurl Çurl = html.directory.getcanonicalname (text) Çif flTopLevel Çurl = homePageUrl + "directory/" + origpath + "/" + url Çelse Çurl = pta^.uri + "/" + url Çurl = url + linkArgs Çicon = "<a class=\"" + cssPrefix + "IconLink\" href=\"" + url + "\">" + foldericon + "</a>" Çelse Çicon = "<a class=\"" + cssPrefix + "IconLink\" href=\"" + url + "\">" + linkicon + "</a>" Çtype = "link" ÇflAtLeastOneLink = true}}; local (xmlLinks = "", itemtext); if defined (adr^.["/atts"].xmlUrl) { //set xmlLinks to the coffee mug and xml button links local (xmlurl = adr^.["/atts"].xmlUrl); local (xmlLink = "<a href=\"" + xmlurl + "\" title=\"Click to view the XML source for "" + string.replaceAll (text, "\"", """) + "".\">" + miniXmlIcon + "</a>"); local (coffeeMugLink = "<a href=\"http://127.0.0.1:5335/system/pages/subscriptions?url=" + string.urlEncode (xmlurl) + "\" title=\"Click to subscribe to "" + string.replaceAll (text, "\"", """) + "" in Radio UserLand.\">" + miniXmlCoffeeMugIcon + "</a>"); xmlLinks = coffeeMugLink + " " + xmlLink + " "}; if flIcons { if flOuterTables { if (type == "text") or (type == "comment") { itemtext = "<td> </td><td class=\"" + cssPrefix + "Comment\">" + xmlLinks + text + "</td>"} else { Çbundle //move the icon down by a few pixels; JES 5/15/02: Commented out. Now accomplished with a style attribute. Much smaller, easier to read the HTML, and renders faster in Netscape. Çexplanation ÇComments must be aligned at the top for multi-line elements, but it looks awkward for single-line items if it's flush with the top. Çicon = "<table cellspacing=\"0\" cellpadding=\"0\"><tr><td height=\"2\"></td></tr><tr><td>" + icon + "</td></tr></table>" //PBS 11/27/00: tr tags may not have height attributes -- moved height attribute to td tag (validation issue) if flLinkText { text = "<a class=\"" + cssPrefix + "ItemLink\" href=\"" + url + "\">" + text + "</a>"}; itemtext = "<td class=\"" + cssPrefix + "Icon\" align=\"center\" valign=\"top\" style=\"padding-top:5px\">" + icon + "</td><td class=\"" + cssPrefix + "Item\" valign=\"top\">" + xmlLinks + text + "</td>"}} else { itemtext = "<td class=\"" + cssPrefix + "Icon\" align=\"center\" valign=\"top\" style=\"padding-top:5px\">" + icon + "</td><td class=\"" + cssPrefix + "Item\">" + xmlLinks + text + "</td>"}} else { //no icons if (type == "text") or (type == "comment") { itemtext = "<td class=\"" + cssPrefix + "Comment\">" + xmlLinks + text + "</td>"} else { local (cssClass = cssPrefix + "Item"); if type == "folder" { cssClass = cssPr... [truncated message content] |
|
From: creedon <icr...@us...> - 2005-06-19 18:10:23
|
Update of /cvsroot/frontierkernel/odbs/frontierRoot/system/verbs/apps/Manila In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10459 Modified Files: callHandler Log Message: changed localhost to 127.0.0.1 Index: callHandler =================================================================== RCS file: /cvsroot/frontierkernel/odbs/frontierRoot/system/verbs/apps/Manila/callHandler,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** callHandler 26 Mar 2005 19:42:16 -0000 1.1.1.1 --- callHandler 19 Jun 2005 18:10:14 -0000 1.2 *************** *** 1,3 **** FrontierVcsFile:1:scpt:system.verbs.apps.Manila.callHandler ! on callHandler (rpcServer="localhost", rpcPort=user.inetd.config.http.port, procedureName="", adrparamlist=nil, fldebug=false, ticksToTimeOut=nil, flShowMessages=true, rpcPath=nil, flAsynch=false, adrCallback=nil, extraInfo=nil, adrErrorCallback=nil, username="", password="") { Ç11/19/00; 11:15:19 PM by JES ÇCall either an XML-RPC handler or a SOAP handler, depending on the pref at user.manila.prefs.flUseSoap ÇChanges: Ç02/04/01; 4:56:48 PM by JES ÇCall soap.rpc.client with the correct actionUri and methodName. Prevents generation of XML with elements containing slash characters. bundle { // make sure the pref exists if not defined (user.manila) { new (tableType, @user.manila)}; if not defined (user.manila.prefs) { new (tableType, @user.manila.prefs)}; if not defined (user.manila.prefs.flUseSoap) { if defined (manila.flUseSoap) { user.manila.prefs.flUseSoap = manila.flUseSoap; delete (@manila.flUseSoap)} else { user.manila.prefs.flUseSoap = false}}}; if user.manila.prefs.flUseSoap { ÇTransform the request parameters so they can be used to call a SOAP handler. local (action, ppath); action = string.nthField (procedureName, ".", string.countFields (procedureName, ".")); ppath = "/" + string.mid (procedureName, 1, sizeof (procedureName) - (sizeof (action) + 1) ); ppath = string.replaceAll (ppath, ".", "/"); return (soap.rpc.client (ppath, action, adrparamlist, rpcServer, rpcPort, username, password, fldebug, ticksToTimeOut, flShowMessages))} else { // use XML-RPC return (betty.rpc.client (rpcServer, rpcPort, procedureName, adrparamlist, fldebug, ticksToTimeOut, flShowMessages, rpcPath, flAsynch, adrCallback, extraInfo, adrErrorCallback, username, password))}} \ No newline at end of file --- 1,3 ---- FrontierVcsFile:1:scpt:system.verbs.apps.Manila.callHandler ! on callHandler (rpcServer="127.0.0.1", rpcPort=user.inetd.config.http.port, procedureName="", adrparamlist=nil, fldebug=false, ticksToTimeOut=nil, flShowMessages=true, rpcPath=nil, flAsynch=false, adrCallback=nil, extraInfo=nil, adrErrorCallback=nil, username="", password="") { ÇChanges Ç6/19/05; 10:03:52 AM by TAC Çchanged localhost to 127.0.0.1 Ç02/04/01; 4:56:48 PM by JES ÇCall soap.rpc.client with the correct actionUri and methodName. Prevents generation of XML with elements containing slash characters. Ç11/19/00; 11:15:19 PM by JES ÇCall either an XML-RPC handler or a SOAP handler, depending on the pref at user.manila.prefs.flUseSoap bundle { // make sure the pref exists if not defined (user.manila) { new (tableType, @user.manila)}; if not defined (user.manila.prefs) { new (tableType, @user.manila.prefs)}; if not defined (user.manila.prefs.flUseSoap) { if defined (manila.flUseSoap) { user.manila.prefs.flUseSoap = manila.flUseSoap; delete (@manila.flUseSoap)} else { user.manila.prefs.flUseSoap = false}}}; if user.manila.prefs.flUseSoap { ÇTransform the request parameters so they can be used to call a SOAP handler. local (action, ppath); action = string.nthField (procedureName, ".", string.countFields (procedureName, ".")); ppath = "/" + string.mid (procedureName, 1, sizeof (procedureName) - (sizeof (action) + 1) ); ppath = string.replaceAll (ppath, ".", "/"); return (soap.rpc.client (ppath, action, adrparamlist, rpcServer, rpcPort, username, password, fldebug, ticksToTimeOut, flShowMessages))} else { // use XML-RPC return (betty.rpc.client (rpcServer, rpcPort, procedureName, adrparamlist, fldebug, ticksToTimeOut, flShowMessages, rpcPath, flAsynch, adrCallback, extraInfo, adrErrorCallback, username, password))}} \ No newline at end of file |
|
From: creedon <icr...@us...> - 2005-06-19 18:10:15
|
Update of /cvsroot/frontierkernel/odbs/frontierRoot/suites/people/webAdmin/23ftpSite In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10277 Modified Files: url Log Message: changed localhost to 127.0.0.1 Index: url =================================================================== RCS file: /cvsroot/frontierkernel/odbs/frontierRoot/suites/people/webAdmin/23ftpSite/url,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** url 26 Mar 2005 19:41:15 -0000 1.1.1.1 --- url 19 Jun 2005 18:10:05 -0000 1.2 *************** *** 1,3 **** FrontierVcsFile:1:TEXT:suites.people.webAdmin.["#ftpSite"].url ! http://localhost/admin/people/ \ No newline at end of file --- 1,3 ---- FrontierVcsFile:1:TEXT:suites.people.webAdmin.["#ftpSite"].url ! http://127.0.0.1/admin/people/ \ No newline at end of file |
|
From: creedon <icr...@us...> - 2005-06-19 04:03:24
|
Update of /cvsroot/frontierkernel/odbs/mainResponderRoot/mainResponder/adminSite/website In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30067 Modified Files: 23homeTemplate 23template Log Message: changed title links to point to <http://frontierkernel.sourceforge.net/> Index: 23homeTemplate =================================================================== RCS file: /cvsroot/frontierkernel/odbs/mainResponderRoot/mainResponder/adminSite/website/23homeTemplate,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** 23homeTemplate 16 Jun 2005 06:16:55 -0000 1.2 --- 23homeTemplate 19 Jun 2005 04:03:14 -0000 1.3 *************** *** 1,3 **** FrontierVcsFile:1:optx:mainResponder.adminSite.website.["#homeTemplate"] ! <body> <div id="banner"> <a href="" style="font-family:verdana, arial, sans-serif;color:#FFF;font-size:20px;font-weight:normal;text-transform:uppercase;letter-spacing: .2em;"> Frontier </a> <br/> <span class="description"> High performance Web content management, object database, system-level and Internet scripting environment, including source code editing and debugging. </span> </div> <div id="content" style="border-right: 1px dotted #999; float: left; width: 75%;"> <div class="blogbody"> <%menu ("black")%> <br/> <p class="title"> <%viewPageTitle ()%> </p> {bodytext} <div class="footer"> <p> This Page was last update: <%timeModified (adrobject)%> <br/> Page template based on <a href="http://www.bryanbell.com/">Bryan Bell's</a> <a href="http://www.bryanbell.com/2002/07/23#a63">Moveable Manila: green</a>. <br/> © Copyright <%date.year ()%> </p> <p> <a href="http://jigsaw.w3.org/css-validator/"> <img style="border:0;width:88px;height:31px" src="http://jigsaw.w3.org/css-validator/images/vcss" alt="Valid CSS!"> </a> </p> </div> </div> </div> <div align="center" id="links"> <br/> <div align="center"> <%mainResponder.adminSite.macros.search ()%> </div> <table width="160" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="11"><img src="/mainResponderResources/adminSite/box/topLeft" width="11" height="12"></td> <td background="/mainResponderResources/adminSite/box/top"><img src="/mainResponderResources/adminSite/box/top" width="5" height="12"></td> <td width="15"><img src="/mainResponderResources/adminSite/box/topRight" width="15" height="12"></td> </tr> <tr> <td width="11" background="/mainResponderResources/adminSite/box/left"><img src="/mainResponderResources/adminSite/box/left" width="11" height="4"></td> <td bgcolor="#EEEEEE"><%mainResponder.adminSite.macros.statusCenter ()%></td> <td width="15" background="/mainResponderResources/adminSite/box/right"><img src="/mainResponderResources/adminSite/box/right" width="15" height="6"></td> </tr> <tr> <td width="11"><img src="/mainResponderResources/adminSite/box/bottomLeft" width="11" height="16"></td> <td background="/mainResponderResources/adminSite/box/bottom"><img src="/mainResponderResources/adminSite/box/bottom" width="4" height="16"></td> <td width="15"><img src="/mainResponderResources/adminSite/box/bottomRight" width="15" height="16"></td> </tr> </table> </div> </body> </html> \ No newline at end of file --- 1,3 ---- FrontierVcsFile:1:optx:mainResponder.adminSite.website.["#homeTemplate"] ! <body> <div id="banner"> <a href="http://frontierkernel.sourceforge.net/" style="font-family:verdana, arial, sans-serif;color:#FFF;font-size:20px;font-weight:normal;text-transform:uppercase;letter-spacing: .2em;"> Frontier </a> <br/> <span class="description"> High performance Web content management, object database, system-level and Internet scripting environment, including source code editing and debugging. </span> </div> <div id="content" style="border-right: 1px dotted #999; float: left; width: 75%;"> <div class="blogbody"> <%menu ("black")%> <br/> <p class="title"> <%viewPageTitle ()%> </p> {bodytext} <div class="footer"> <p> This Page was last update: <%timeModified (adrobject)%> <br/> Page template based on <a href="http://www.bryanbell.com/">Bryan Bell's</a> <a href="http://www.bryanbell.com/2002/07/23#a63">Moveable Manila: green</a>. <br/> © Copyright <%date.year ()%> </p> <p> <a href="http://jigsaw.w3.org/css-validator/"> <img style="border:0;width:88px;height:31px" src="http://jigsaw.w3.org/css-validator/images/vcss" alt="Valid CSS!"> </a> </p> </div> </div> </div> <div align="center" id="links"> <br/> <div align="center"> <%mainResponder.adminSite.macros.search ()%> </div> <table width="160" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="11"><img src="/mainResponderResources/adminSite/box/topLeft" width="11" height="12"></td> <td background="/mainResponderResources/adminSite/box/top"><img src="/mainResponderResources/adminSite/box/top" width="5" height="12"></td> <td width="15"><img src="/mainResponderResources/adminSite/box/topRight" width="15" height="12"></td> </tr> <tr> <td width="11" background="/mainResponderResources/adminSite/box/left"><img src="/mainResponderResources/adminSite/box/left" width="11" height="4"></td> <td bgcolor="#EEEEEE"><%mainResponder.adminSite.macros.statusCenter ()%></td> <td width="15" background="/mainResponderResources/adminSite/box/right"><img src="/mainResponderResources/adminSite/box/right" width="15" height="6"></td> </tr> <tr> <td width="11"><img src="/mainResponderResources/adminSite/box/bottomLeft" width="11" height="16"></td> <td background="/mainResponderResources/adminSite/box/bottom"><img src="/mainResponderResources/adminSite/box/bottom" width="4" height="16"></td> <td width="15"><img src="/mainResponderResources/adminSite/box/bottomRight" width="15" height="16"></td> </tr> </table> </div> </body> </html> \ No newline at end of file Index: 23template =================================================================== RCS file: /cvsroot/frontierkernel/odbs/mainResponderRoot/mainResponder/adminSite/website/23template,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** 23template 15 Jun 2005 23:31:51 -0000 1.2 --- 23template 19 Jun 2005 04:03:14 -0000 1.3 *************** *** 1,3 **** FrontierVcsFile:1:optx:mainResponder.adminSite.website.["#template"] ! <body> <div id="banner"> <a href="" style="font-family:verdana, arial, sans-serif;color:#FFF;font-size:20px;font-weight:normal;text-transform:uppercase;letter-spacing: .2em;"> Frontier </a> <br/> <span class="description"> High performance Web content management, object database, system-level and Internet scripting environment, including source code editing and debugging. </span> </div> <div id="content"> <div class="blogbody"> <%menu ("black")%> <br/> <p class="title"> <%viewPageTitle ()%> </p> {bodytext} <div class="footer"> <p> This Page was last update: <%timeModified (adrobject)%> <br/> Page template based on <a href="http://www.bryanbell.com/">Bryan Bell's</a> <a href="http://www.bryanbell.com/2002/07/23#a63">Moveable Manila: green</a>. <br/> © Copyright <%date.year ()%> </p> <p> <a href="http://jigsaw.w3.org/css-validator/"> <img style="border:0;width:88px;height:31px" src="http://jigsaw.w3.org/css-validator/images/vcss" alt="Valid CSS!"> </a> </p> </div> </div> </div> </body> </html> \ No newline at end of file --- 1,3 ---- FrontierVcsFile:1:optx:mainResponder.adminSite.website.["#template"] ! <body> <div id="banner"> <a href="http://frontierkernel.sourceforge.net/" style="font-family:verdana, arial, sans-serif;color:#FFF;font-size:20px;font-weight:normal;text-transform:uppercase;letter-spacing: .2em;"> Frontier </a> <br/> <span class="description"> High performance Web content management, object database, system-level and Internet scripting environment, including source code editing and debugging. </span> </div> <div id="content"> <div class="blogbody"> <%menu ("black")%> <br/> <p class="title"> <%viewPageTitle ()%> </p> {bodytext} <div class="footer"> <p> This Page was last update: <%timeModified (adrobject)%> <br/> Page template based on <a href="http://www.bryanbell.com/">Bryan Bell's</a> <a href="http://www.bryanbell.com/2002/07/23#a63">Moveable Manila: green</a>. <br/> © Copyright <%date.year ()%> </p> <p> <a href="http://jigsaw.w3.org/css-validator/"> <img style="border:0;width:88px;height:31px" src="http://jigsaw.w3.org/css-validator/images/vcss" alt="Valid CSS!"> </a> </p> </div> </div> </div> </body> </html> \ No newline at end of file |
|
From: creedon <icr...@us...> - 2005-06-19 04:03:19
|
Update of /cvsroot/frontierkernel/odbs/mainResponderRoot/mainResponder/adminSite/website/23templates In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29941 Modified Files: setup Log Message: changed title links to point to <http://frontierkernel.sourceforge.net/> Index: setup =================================================================== RCS file: /cvsroot/frontierkernel/odbs/mainResponderRoot/mainResponder/adminSite/website/23templates/setup,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** setup 15 Jun 2005 23:31:45 -0000 1.2 --- setup 19 Jun 2005 04:02:56 -0000 1.3 *************** *** 1,3 **** FrontierVcsFile:1:optx:mainResponder.adminSite.website.["#templates"].setup ! <body> <div id="banner"> <a href="" style="font-family:verdana, arial, sans-serif;color:#FFF;font-size:20px;font-weight:normal;text-transform:uppercase;letter-spacing: .2em;"> Frontier </a> <br/> <span class="description"> High performance Web content management, object database, system-level and Internet scripting environment, including source code editing and debugging. </span> </div> <div id="content" style="width: 100%;"> <div class="blogbody"> <p class="title"> <%viewPageTitle ()%> </p> {bodytext} <div class="footer"> <p> This Page was last update: <%timeModified (adrobject)%> <br/> Page template based on <a href="http://www.bryanbell.com/">Bryan Bell's</a> <a href="http://www.bryanbell.com/2002/07/23#a63">Moveable Manila: green</a>. <br/> © Copyright <%date.year ()%> </p> <p> <a href="http://jigsaw.w3.org/css-validator/"> <img style="border:0;width:88px;height:31px" src="http://jigsaw.w3.org/css-validator/images/vcss" alt="Valid CSS!"> </a> </p> </div> </div> </div> </body> </html> \ No newline at end of file --- 1,3 ---- FrontierVcsFile:1:optx:mainResponder.adminSite.website.["#templates"].setup ! <body> <div id="banner"> <a href="http://frontierkernel.sourceforge.net/" style="font-family:verdana, arial, sans-serif;color:#FFF;font-size:20px;font-weight:normal;text-transform:uppercase;letter-spacing: .2em;"> Frontier </a> <br/> <span class="description"> High performance Web content management, object database, system-level and Internet scripting environment, including source code editing and debugging. </span> </div> <div id="content" style="width: 100%;"> <div class="blogbody"> <p class="title"> <%viewPageTitle ()%> </p> {bodytext} <div class="footer"> <p> This Page was last update: <%timeModified (adrobject)%> <br/> Page template based on <a href="http://www.bryanbell.com/">Bryan Bell's</a> <a href="http://www.bryanbell.com/2002/07/23#a63">Moveable Manila: green</a>. <br/> © Copyright <%date.year ()%> </p> <p> <a href="http://jigsaw.w3.org/css-validator/"> <img style="border:0;width:88px;height:31px" src="http://jigsaw.w3.org/css-validator/images/vcss" alt="Valid CSS!"> </a> </p> </div> </div> </div> </body> </html> \ No newline at end of file |
|
From: creedon <icr...@us...> - 2005-06-19 04:00:50
|
Update of /cvsroot/frontierkernel/odbs/mainResponderRoot/mainResponder/utilities In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28110 Modified Files: getConfigInfo Log Message: moved fldebug into parameters for call, added test bundle, less likely to leave debug flag set to true this way added section for Mac OS X Port Forwarding and ipfw configuration when building simple table, get size of object in try in case object has no size as in the case of nil value Index: getConfigInfo =================================================================== RCS file: /cvsroot/frontierkernel/odbs/mainResponderRoot/mainResponder/utilities/getConfigInfo,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** getConfigInfo 26 Mar 2005 21:46:16 -0000 1.1.1.1 --- getConfigInfo 19 Jun 2005 04:00:41 -0000 1.2 *************** *** 1,3 **** FrontierVcsFile:1:scpt:mainResponder.utilities.getConfigInfo ! on getConfigInfo (flIncludeHeader=true) { ÇGet general config info about Frontier, mainResponder, and Manila. local (mailtext = "", indentlevel = 0); local (fldebug = false); //should false except when you're working on the script on add (s) { mailtext = mailtext + string.filledstring (" ", indentlevel) + s + "\r\n"}; on addOnOff (label, bool) { local (s = label + ": "); if bool { s = s + "On"} else { s = s + "Off"}; add (s)}; add ("Frontier configuration on " + clock.now () + "."); indentlevel++; add (""); bundle { //Installation information if flIncludeHeader { add ("Installation information:"); indentlevel++; add (""); add ("Frontier version: " + Frontier.version ()); local (os = "Windows"); if system.environment.isMac { if system.environment.isCarbon { os = "Mac OS X"} else { os = "Mac OS"}}; add ("Operating System: " + os); local (osVersion = system.environment.osVersionString); if system.environment.isCarbon { osVersion = string.replace (osVersion, "16", "10")}; add ("OS Version: " + osVersion); add ("IP address: " + tcp.dns.getMyDottedId ()); add ("Frontier folder: " + file.folderfrompath (frontier.getprogrampath ())); add (""); indentlevel--}}; bundle { //About you and your computer add ("About you and your computer:"); indentlevel++; add (""); add ("Name: " + user.prefs.name); add ("Organization: " + user.prefs.organization); add ("Mail address: " + user.prefs.mailAddress); add ("Outgoing mail server: " + user.prefs.mailHost); addOnOff ("Web server", inetd.isDaemonRunning (@user.inetd.config.http)); add ("Port: " + user.inetd.config.http.port); add ("Log folder: " + user.log.prefs.folder); add (""); indentlevel--}; bundle { //Safety and performance add ("Safety and performance:"); indentlevel++; add (""); addOnOff ("Save changed databases every minute", config.mainResponder.prefs.flSaveDatabasesEveryMinute); add (""); indentlevel--}; bundle { //Proxy server add ("Proxy server:"); indentlevel++; add (""); add ("Domain: " + user.webbrowser.proxy.domain); add ("Port: " + user.webbrowser.proxy.port); add ("Username: " + user.webbrowser.proxy.username); add (""); indentlevel--}; bundle { //Installed tools add ("Installed tools:"); indentlevel++; add (""); local (adrItem); for adrItem in @user.tools.databases { if adrItem^.flInstalled { add (nameOf (adrItem^))}}; add (""); indentlevel--}; bundle { //Open Databases add ("Open Databases:"); indentlevel++; add (""); on visit (f) { local (fname = file.fileFromPath (f)); local (folder = file.folderFromPath (f)); local (folderName = file.fileFromPath (folder)); folderName = string.popTrailing (folderName, file.getPathChar ()); local (size = string.megabyteString (file.size (f))); add (folderName + "/" + fname + ": " + size)}; table.visitOpenDatabases (@visit); add (""); indentlevel--}; bundle { //Tools folder contents add ("Tools folder:"); indentlevel++; add (""); local (f); fileloop (f in Frontier.tools.getToolsFolderPath ()) { local (fname = file.fileFromPath (f)); local (size = string.megabyteString (file.size (f))); add (fname + ": " + size)}; add (""); indentlevel--}; bundle { //agents add ("Agents:"); indentlevel++; add (""); local (adrItem); for adrItem in @system.agents { add (nameOf (adrItem^))}; add (""); indentlevel--}; bundle { //threads add ("Threads:"); indentlevel++; add (""); local (adrItem); for adrItem in @user.scheduler.threads { local (flDefined = true, flEnabled = true); if not defined (adrItem^) { flDefined = false} else { if not (adrItem^^.enabled) { flEnabled = false}}; local (threadName = nameOf (adrItem^)); if not flDefined { add (threadName + ": [not defined]")} else { if not flEnabled { add (threadName + ": [disabled]")} else { add (threadName + ": " + adrItem^)}}}; add (""); indentlevel--}; bundle { //XML-RPC add ("XML-RPC:"); indentlevel++; add (""); local (ctOutgoingAsynchMessages = 0); if defined (user.betty.queueOutgoing.table) { ctOutgoingAsynchMessages = sizeOf (user.betty.queueOutgoing.table)}; addOnOff ("Allow by IP Only", user.betty.prefs.flAllowByIPOnly); ÇaddOnOff ("Keep Asynch Client Log", user.betty.prefs.flKeepAsynchClientLog) addOnOff ("Keep Server Log", user.betty.prefs.flKeepServerLog); add ("RPC Client Default Path: " + user.betty.prefs.rpcClientDefaultPath); add ("RPC Client Default Timeout: " + user.betty.prefs.rpcClientDefaultTimeout); add ("# Pending Asynch Messages: " + ctOutgoingAsynchMessages); add (""); add ("Handlers:"); indentlevel++; add (""); local (adr); for adr in @user.betty.rpcHandlers { local (name = nameOf (adr^)); local (type = typeOf (adr^)); local (val = ""); case type { tableType { val = sizeOf (adr^) + " items"}; scriptType { val = sizeOf (adr^) + " lines"}; addressType { val = adr^}}; if val == "" { add (name)} else { add (name + ": " + val)}}; add (""); indentlevel--; addOnOff ("RPC2 responder enabled", defined (user.webserver.responders.RPC2.enabled) and user.webserver.responders.RPC2.enabled); add (""); indentlevel--}; bundle { //SOAP add ("SOAP:"); indentlevel++; add (""); add ("RPC Client Default Timeout: " + user.soap.prefs.rpcClientDefaultTimeout); add (""); add ("Handlers:"); indentlevel++; add (""); local (adr); for adr in @user.soap.rpcHandlers { local (name = nameOf (adr^)); local (type = typeOf (adr^)); local (val = ""); case type { tableType { val = sizeOf (adr^) + " items"}; scriptType { val = sizeOf (adr^) + " lines"}; addressType { val = adr^}}; if val == "" { add (name)} else { add (name + ": " + val)}}; add (""); indentlevel--; addOnOff ("SOAP responder enabled", defined (user.webserver.responders.soap.enabled) and user.webserver.responders.soap.enabled); add (""); indentlevel--}; on doSimpleTable (adrTable) { local (adrItem); for adrItem in adrTable { local (name = nameOf (adrItem^)); local (lowerName = string.lower (name)); if lowerName contains "password" or lowerName contains "serialnum" { continue}; local (value); local (size = sizeOf (adrItem^)); case typeOf (adrItem^) { outlineType { value = "outline: " + size + " lines"}; scriptType { value = "script: " + size + " lines"}; wpTextType { value = "wp-text: " + size + " characters"}; tableType { value = "table: " + size + " items"}; menubarType { value = "menubar: " + size + " lines"}} else { value = string (adrItem^)}; add (name + ": " + value)}}; on addTableAsSection (title, adrTable) { local (nameAddress = string.popFileFromAddress (string (adrTable))); title = title + " (" + nameAddress + "): "; add (title); indentLevel++; add (""); doSimpleTable (adrTable); add (""); indentLevel--}; bundle { //Webserver bundle { //Responders add ("Responders:"); indentlevel++; add (""); local (adr); for adr in @user.webserver.responders { local (name = nameOf (adr^)); while (typeOf (adr^) == addressType) { adr = adr^}; local (flEnabled = adr^.enabled); addOnOff (name, flEnabled)}; add (""); indentlevel--}; bundle { //Webserver stats add ("Webserver stats:"); indentlevel++; add (""); add ("Hits: " + user.webserver.stats.hits); add ("Max connections: " + user.webserver.stats.maxConnections); add ("Max memory available: " + user.webserver.stats.maxMemAvail); add ("Min memory available: " + user.webserver.stats.minMemAvail); add ("Up since: " + user.webserver.stats.upSince); if defined (user.webserver.stats.wormHits) { add ("Worm hits: " + user.webserver.stats.wormHits)}; add (""); indentlevel--}; bundle { //Webserver prefs add ("Webserver prefs:"); indentlevel++; add (""); add ("Default responder: " + user.webserver.prefs.defaultResponder); addOnOff ("Debugging", user.webserver.prefs.fldebug); addOnOff ("Domain stats", user.webserver.prefs.flDomainStats); addOnOff ("DNS Lookups", user.webserver.prefs.flUseDns); add (""); indentlevel--}; bundle { //Webserver prefilters add ("Webserver PreFilters:"); indentlevel++; add (""); local (adrItem); for adrItem in @user.webserver.preFilters { if typeOf (adrItem^) == addressType { add (nameOf (adrItem^) + ": " + adrItem^)} else { add (nameOf (adrItem^))}}; add (""); indentlevel--}; bundle { //Webserver postfilters add ("Webserver PostFilters:"); indentlevel++; add (""); local (adrItem); for adrItem in @user.webserver.postFilters { if typeOf (adrItem^) == addressType { add (nameOf (adrItem^) + ": " + adrItem^)} else { add (nameOf (adrItem^))}}; add (""); indentlevel--}}; bundle { //Manila on doThemesTable (adrTable) { local (adrItem); for adrItem in adrTable { local (enabledString = "enabled"); if not adrItem^.flEnabled { enabledString = "disabled"}; add (nameOf (adrItem^) + ": " + enabledString)}}; bundle { //Manila callbacks add ("Manila callbacks:"); indentlevel++; add (""); local (adrItem); for adrItem in @config.manila.callbacks { add (nameOf (adrItem^) + ":"); indentLevel++; local (sizeTable = sizeOf (adrItem^)); if sizeTable < 1 { add ("[Empty]")} else { local (adrCallback); for adrCallback in adrItem { if typeOf (adrCallback^) == addressType { add (nameOf (adrCallback^) + ": " + adrCallback^)} else { add (nameOf (adrCallback^))}}}; indentLevel--}; add (""); indentlevel--}; bundle { //Manila dg themes add ("Manila discussion group themes:"); indentlevel++; add (""); doThemesTable (@config.manila.discussionGroupThemes); add (""); indentlevel--}; bundle { //Manila hosting add ("Manila hosting:"); indentlevel++; add (""); local (adrItem); for adrItem in @config.manila.hosting.sites { local (name = nameOf (adrItem^)); add (name + ":");indentLevel++; doSimpleTable (adrItem); indentLevel--}; add (""); indentlevel--}; bundle { //Manila prefs add ("Manila prefs (config.manila.prefs):"); indentlevel++; add (""); doSimpleTable (@config.manila.prefs); add (""); indentlevel--}; bundle { //Manila sites add ("Manila sites:"); indentlevel++; add (""); add ("# sites in config.manila.sites: " + sizeOf (config.manila.sites)); add (""); indentlevel--}; bundle { //Manila stats add ("Manila stats:"); indentlevel++; add (""); add ("# referers tables: " + sizeOf (config.manila.stats.referers)); if defined (config.manila.stats.reports) { add ("# reports: " + sizeOf (config.manila.stats.reports))}; if defined (config.manila.stats.sites.allTime) { add ("# all-time sites stats: " + sizeOf (config.manila.stats.sites.allTime))}; if defined (config.manila.stats.sites.hourly) { add ("# hourly sites stats: " + sizeOf (config.manila.stats.sites.hourly))}; if defined (config.manila.stats.sites.today) { add ("# today sites stats: " + sizeOf (config.manila.stats.sites.today))}; add (""); indentlevel--}; bundle { //Manila themes add ("Manila themes:"); indentlevel++; add (""); doThemesTable (@config.manila.themes); add (""); indentlevel--}}; bundle { //mainResponder addTableAsSection ("mainResponder global URLs", @config.mainResponder.urls); addTableAsSection ("mainResponder prefs", @config.mainResponder.prefs); addTableAsSection ("mainResponder globals", @config.mainResponder.globals); bundle { //mainResponder legal macros add ("mainResponder legal macros:"); indentlevel++; add (""); local (adrItem); for adrItem in @config.mainResponder.prefs.legalMacros { local (name = nameOf (adrItem^)); case typeOf (adrItem^) { booleanType { add (name + ": " + adrItem^)}; tableType { if (sizeOf (adrItem^) == 2) and (defined (adrItem^.flLegal)) and (defined (adrItem^.flParams)) { add (name + ": [takes params]: " + adrItem^.flLegal)} else { add (name + ": [misconfigured]")}}}}; add (""); indentlevel--}; bundle { //mainResponder search queue add ("mainResponder search queue:"); indentlevel++; add (""); if defined (config.mainResponder.data.searchQueue) { add ("# items: " + sizeOf (config.mainResponder.data.searchQueue))} else { add ("Empty")}; add (""); indentlevel--}; bundle { //mainResponder callbacks add ("mainResponder callbacks:"); indentlevel++; add (""); local (adrItem); for adrItem in @config.mainResponder.callbacks { add (nameOf (adrItem^) + ":"); indentLevel++; local (sizeTable = sizeOf (adrItem^)); if sizeTable < 1 { add ("[Empty]")} else { local (adrCallback); for adrCallback in adrItem { if typeOf (adrCallback^) == addressType { add (nameOf (adrCallback^) + ": " + adrCallback^)} else { add (nameOf (adrCallback^))}}}; indentLevel--}; add (""); indentlevel--}; bundle { //mainResponder domains add ("mainResponder domains (config.mainResponder.domains):"); indentlevel++; add (""); local (adrItem); for adrItem in @config.mainResponder.domains { local (name = nameOf (adrItem^)); if typeOf (adrItem^) == tableType { if defined (adrItem^.siteTree.directory.outline) { add (name + " [siteTree]:"); indentLevel++; add (string (adrItem^.siteTree.directory.outline)); add (""); indentLevel--} else { add (name + ": table " + sizeOf (adrItem^) + " items")}} else { add (name + ": " + string (adrItem^))}}; add (""); indentlevel--}}; bundle { //user table if defined (user.applescripts.prefs) { addTableAsSection ("AppleScript", @user.applescripts.prefs)}; if defined (user.backups) { addTableAsSection ("Backups", @user.backups)}; if defined (user.batchExporter) { addTableAsSection ("BatchExporter", @user.batchExporter)}; bundle { //user.callbacks add ("user.callbacks:"); indentlevel++; add (""); local (adrItem); for adrItem in @user.callbacks { add (nameOf (adrItem^) + ":"); indentLevel++; local (sizeTable = sizeOf (adrItem^)); if sizeTable < 1 { add ("[Empty]")} else { local (adrCallback); for adrCallback in adrItem { if typeOf (adrCallback^) == addressType { add (nameOf (adrCallback^) + ": " + adrCallback^)} else { add (nameOf (adrCallback^))}}}; indentLevel--}; add (""); indentlevel--}; if defined (user.com) { addTableAsSection ("COM", @user.com)}; bundle { //user.databases add ("user.databases:"); indentlevel++; add (""); local (adrItem); for adrItem in @user.databases { add (nameOf (adrItem^) + ":"); indentLevel++; doSimpleTable (adrItem); indentLevel--}; add (""); indentlevel--}; if defined (user.export) { addTableAsSection ("Export", @user.export)}; if defined (user.html.glossary) { add ("user.html.glossary:"); indentlevel++; add (""); add ("# items: " + sizeOf (user.html.glossary)); add (""); indentlevel--}; if defined (user.html.macros) { add ("user.html.macros:"); indentlevel++; add (""); add ("# items: " + sizeOf (user.html.macros)); add (""); indentlevel--}; if defined (user.html.renderers) { add ("user.html.renderers:"); indentlevel++; add (""); add ("# items: " + sizeOf (user.html.renderers)); add (""); indentlevel--}; if defined (user.html.prefs) { addTableAsSection ("HTML prefs", @user.html.prefs)}; if defined (user.menus) { addTableAsSection ("Menus", @user.menus)}; if defined (user.prefs) { addTableAsSection ("Basic prefs", @user.prefs)}; if defined (user.prefs.dates) { addTableAsSection ("Dates", @user.prefs.dates)}; if defined (user.prefs.dialogs) { addTableAsSection ("Dialogs", @user.prefs.dialogs)}; if defined (user.prefs.fonts) { addTableAsSection ("Fonts", @user.prefs.fonts)}; if defined (user.prefs.search) { addTableAsSection ("Search", @user.prefs.search)}; if defined (user.rootUpdates.prefs) { addTableAsSection ("Root Updates prefs", @user.rootUpdates.prefs)}; if defined (user.rootUpdates.servers) { add ("user.rootUpdates.Servers:"); indentlevel++; add (""); local (adrItem); for adrItem in @user.rootUpdates.Servers { add (nameOf (adrItem^) + ":"); indentLevel++; doSimpleTable (adrItem); indentLevel--}; add (""); indentlevel--}; if defined (user.unix.scripts) { addTableAsSection ("Unix scripts", @user.unix.scripts)}; if defined (user.webBrowser) { addTableAsSection ("WebBrowser", @user.webBrowser)}}; bundle { //Misc if defined (system.verbs.traps) { addTableAsSection ("Traps", @system.verbs.traps)}; if defined (system.verbs.extensions) { addTableAsSection ("Extensions", @system.verbs.extensions)}; bundle { //root table sizes add ("Top-level table sizes:"); indentLevel++; add (""); local (adrItem); for adrItem in @root { local (name = nameOf (adrItem^)); local (size = sizeOf (adrItem^)); if typeOf (adrItem^) != tableType { add (name + ": Not a table, which surprises us.")} else { add (name + ": " + size + " items")}}; add ("");indentLevel--}}; bundle { //Guest Databases folders on doFolder (name) { add (name + " folder:"); indentlevel++; add (""); local (f); fileloop (f in Frontier.getSubFolder (name)) { local (fname = file.fileFromPath (f)); fname = string.popTrailing (fname, file.getPathChar ()); if file.isFolder (f) { add (fname + ": [folder]")} else { local (size = string.megabyteString (file.size (f))); add (fname + ": " + size)}}; add (""); indentlevel--}; doFolder ("apps"); doFolder ("ops"); doFolder ("www")}; if fldebug { wp.newTextObject (mailText, @temp.FrontierConfiguration); edit (@temp.FrontierConfiguration)}; return (mailText)} \ No newline at end of file --- 1,3 ---- FrontierVcsFile:1:scpt:mainResponder.utilities.getConfigInfo ! on getConfigInfo (flIncludeHeader=true, fldebug = false) { ÇGet general config info about Frontier and mainResponder. ÇChanges Ç6/18/05; 11:20:24 AM by TAC Çmoved fldebug into parameters for call, added test bundle, less likely to leave debug flag set to true this way Çadded section for Mac OS X Port Forwarding and ipfw configuration Çwhen building simple table, get size of object in try in case object has no size as in the case of nil value Çdisabled Manila specific code local (mailtext = "", indentlevel = 0); on add (s) { mailtext = mailtext + string.filledstring (" ", indentlevel) + s + "\r\n"}; on addOnOff (label, bool) { local (s = label + ": "); if bool { s = s + "On"} else { s = s + "Off"}; add (s)}; add ("Frontier configuration on " + clock.now () + "."); indentlevel++; add (""); bundle { //Installation information if flIncludeHeader { add ("Installation information:"); indentlevel++; add (""); add ("Frontier version: " + Frontier.version ()); local (os = "Windows"); if system.environment.isMac { if system.environment.isCarbon { os = "Mac OS X"} else { os = "Mac OS"}}; add ("Operating System: " + os); local (osVersion = system.environment.osVersionString); if system.environment.isCarbon { osVersion = string.replace (osVersion, "16", "10")}; add ("OS Version: " + osVersion); add ("IP address: " + tcp.dns.getMyDottedId ()); add ("Frontier folder: " + file.folderfrompath (frontier.getprogrampath ())); add (""); indentlevel--}}; bundle { //About you and your computer add ("About you and your computer:"); indentlevel++; add (""); add ("Name: " + user.prefs.name); add ("Organization: " + user.prefs.organization); add ("Mail address: " + user.prefs.mailAddress); add ("Outgoing mail server: " + user.prefs.mailHost); addOnOff ("Web server", inetd.isDaemonRunning (@user.inetd.config.http)); add ("Port: " + user.inetd.config.http.port); add ("Log folder: " + user.log.prefs.folder); add (""); indentlevel--}; bundle { //Safety and performance add ("Safety and performance:"); indentlevel++; add (""); addOnOff ("Save changed databases every minute", config.mainResponder.prefs.flSaveDatabasesEveryMinute); add (""); indentlevel--}; bundle { //Proxy server add ("Proxy server:"); indentlevel++; add (""); add ("Domain: " + user.webbrowser.proxy.domain); add ("Port: " + user.webbrowser.proxy.port); add ("Username: " + user.webbrowser.proxy.username); add (""); indentlevel--}; bundle { //Installed tools add ("Installed tools:"); indentlevel++; add (""); local (adrItem); for adrItem in @user.tools.databases { if adrItem^.flInstalled { add (nameOf (adrItem^))}}; add (""); indentlevel--}; bundle { //Open Databases add ("Open Databases:"); indentlevel++; add (""); on visit (f) { local (fname = file.fileFromPath (f)); local (folder = file.folderFromPath (f)); local (folderName = file.fileFromPath (folder)); folderName = string.popTrailing (folderName, file.getPathChar ()); local (size = string.megabyteString (file.size (f))); add (folderName + "/" + fname + ": " + size)}; table.visitOpenDatabases (@visit); add (""); indentlevel--}; bundle { //Tools folder contents add ("Tools folder:"); indentlevel++; add (""); local (f); fileloop (f in Frontier.tools.getToolsFolderPath ()) { local (fname = file.fileFromPath (f)); local (size = string.megabyteString (file.size (f))); add (fname + ": " + size)}; add (""); indentlevel--}; bundle { //agents add ("Agents:"); indentlevel++; add (""); local (adrItem); for adrItem in @system.agents { add (nameOf (adrItem^))}; add (""); indentlevel--}; bundle { //threads add ("Threads:"); indentlevel++; add (""); local (adrItem); for adrItem in @user.scheduler.threads { local (flDefined = true, flEnabled = true); if not defined (adrItem^) { flDefined = false} else { if not (adrItem^^.enabled) { flEnabled = false}}; local (threadName = nameOf (adrItem^)); if not flDefined { add (threadName + ": [not defined]")} else { if not flEnabled { add (threadName + ": [disabled]")} else { add (threadName + ": " + adrItem^)}}}; add (""); indentlevel--}; bundle { //XML-RPC add ("XML-RPC:"); indentlevel++; add (""); local (ctOutgoingAsynchMessages = 0); if defined (user.betty.queueOutgoing.table) { ctOutgoingAsynchMessages = sizeOf (user.betty.queueOutgoing.table)}; addOnOff ("Allow by IP Only", user.betty.prefs.flAllowByIPOnly); ÇaddOnOff ("Keep Asynch Client Log", user.betty.prefs.flKeepAsynchClientLog) addOnOff ("Keep Server Log", user.betty.prefs.flKeepServerLog); add ("RPC Client Default Path: " + user.betty.prefs.rpcClientDefaultPath); add ("RPC Client Default Timeout: " + user.betty.prefs.rpcClientDefaultTimeout); add ("# Pending Asynch Messages: " + ctOutgoingAsynchMessages); add (""); add ("Handlers:"); indentlevel++; add (""); local (adr); for adr in @user.betty.rpcHandlers { local (name = nameOf (adr^)); local (type = typeOf (adr^)); local (val = ""); case type { tableType { val = sizeOf (adr^) + " items"}; scriptType { val = sizeOf (adr^) + " lines"}; addressType { val = adr^}}; if val == "" { add (name)} else { add (name + ": " + val)}}; add (""); indentlevel--; addOnOff ("RPC2 responder enabled", defined (user.webserver.responders.RPC2.enabled) and user.webserver.responders.RPC2.enabled); add (""); indentlevel--}; bundle { //SOAP add ("SOAP:"); indentlevel++; add (""); add ("RPC Client Default Timeout: " + user.soap.prefs.rpcClientDefaultTimeout); add (""); add ("Handlers:"); indentlevel++; add (""); local (adr); for adr in @user.soap.rpcHandlers { local (name = nameOf (adr^)); local (type = typeOf (adr^)); local (val = ""); case type { tableType { val = sizeOf (adr^) + " items"}; scriptType { val = sizeOf (adr^) + " lines"}; addressType { val = adr^}}; if val == "" { add (name)} else { add (name + ": " + val)}}; add (""); indentlevel--; addOnOff ("SOAP responder enabled", defined (user.webserver.responders.soap.enabled) and user.webserver.responders.soap.enabled); add (""); indentlevel--}; on doSimpleTable (adrTable) { local (adrItem); for adrItem in adrTable { local (name = nameOf (adrItem^)); local (lowerName = string.lower (name)); if lowerName contains "password" or lowerName contains "serialnum" { continue}; local (value); local (size); try { size = sizeOf (adrItem^)}; case typeOf (adrItem^) { outlineType { value = "outline: " + size + " lines"}; scriptType { value = "script: " + size + " lines"}; wpTextType { value = "wp-text: " + size + " characters"}; tableType { value = "table: " + size + " items"}; menubarType { value = "menubar: " + size + " lines"}} else { value = string (adrItem^)}; add (name + ": " + value)}}; on addTableAsSection (title, adrTable) { local (nameAddress = string.popFileFromAddress (string (adrTable))); title = title + " (" + nameAddress + "): "; add (title); indentLevel++; add (""); doSimpleTable (adrTable); add (""); indentLevel--}; bundle { //Webserver bundle { //Responders add ("Responders:"); indentlevel++; add (""); local (adr); for adr in @user.webserver.responders { local (name = nameOf (adr^)); while (typeOf (adr^) == addressType) { adr = adr^}; local (flEnabled = adr^.enabled); addOnOff (name, flEnabled)}; add (""); indentlevel--}; bundle { //Webserver stats add ("Webserver stats:"); indentlevel++; add (""); add ("Hits: " + user.webserver.stats.hits); add ("Max connections: " + user.webserver.stats.maxConnections); add ("Max memory available: " + user.webserver.stats.maxMemAvail); add ("Min memory available: " + user.webserver.stats.minMemAvail); add ("Up since: " + user.webserver.stats.upSince); if defined (user.webserver.stats.wormHits) { add ("Worm hits: " + user.webserver.stats.wormHits)}; add (""); indentlevel--}; bundle { //Webserver prefs add ("Webserver prefs:"); indentlevel++; add (""); add ("Default responder: " + user.webserver.prefs.defaultResponder); addOnOff ("Debugging", user.webserver.prefs.fldebug); addOnOff ("Domain stats", user.webserver.prefs.flDomainStats); addOnOff ("DNS Lookups", user.webserver.prefs.flUseDns); add (""); indentlevel--}; bundle { //Webserver prefilters add ("Webserver PreFilters:"); indentlevel++; add (""); local (adrItem); for adrItem in @user.webserver.preFilters { if typeOf (adrItem^) == addressType { add (nameOf (adrItem^) + ": " + adrItem^)} else { add (nameOf (adrItem^))}}; add (""); indentlevel--}; bundle { //Webserver postfilters add ("Webserver PostFilters:"); indentlevel++; add (""); local (adrItem); for adrItem in @user.webserver.postFilters { if typeOf (adrItem^) == addressType { add (nameOf (adrItem^) + ": " + adrItem^)} else { add (nameOf (adrItem^))}}; add (""); indentlevel--}}; Çbundle //Manila // 6/16/05; 10:58:11 AM by TAC // disabled, eventually remove? Çon doThemesTable (adrTable) Çlocal (adrItem) Çfor adrItem in adrTable Çlocal (enabledString = "enabled") Çif not adrItem^.flEnabled ÇenabledString = "disabled" Çadd (nameOf (adrItem^) + ": " + enabledString) Çbundle //Manila callbacks Çadd ("Manila callbacks:"); indentlevel++ Çadd ("") Çlocal (adrItem) Çfor adrItem in @config.manila.callbacks Çadd (nameOf (adrItem^) + ":"); indentLevel++ Çlocal (sizeTable = sizeOf (adrItem^)) Çif sizeTable < 1 Çadd ("[Empty]") Çelse Çlocal (adrCallback) Çfor adrCallback in adrItem Çif typeOf (adrCallback^) == addressType Çadd (nameOf (adrCallback^) + ": " + adrCallback^) Çelse Çadd (nameOf (adrCallback^)) ÇindentLevel-- Çadd (""); indentlevel-- Çbundle //Manila dg themes Çadd ("Manila discussion group themes:"); indentlevel++ Çadd ("") ÇdoThemesTable (@config.manila.discussionGroupThemes) Çadd (""); indentlevel-- Çbundle //Manila hosting Çadd ("Manila hosting:"); indentlevel++ Çadd ("") Çlocal (adrItem) Çfor adrItem in @config.manila.hosting.sites Çlocal (name = nameOf (adrItem^)) Çadd (name + ":");indentLevel++ ÇdoSimpleTable (adrItem) ÇindentLevel-- Çadd (""); indentlevel-- Çbundle //Manila prefs Çadd ("Manila prefs (config.manila.prefs):"); indentlevel++ Çadd ("") ÇdoSimpleTable (@config.manila.prefs) Çadd (""); indentlevel-- Çbundle //Manila sites Çadd ("Manila sites:"); indentlevel++ Çadd ("") Çadd ("# sites in config.manila.sites: " + sizeOf (config.manila.sites)) Çadd (""); indentlevel-- Çbundle //Manila stats Çadd ("Manila stats:"); indentlevel++ Çadd ("") Çadd ("# referers tables: " + sizeOf (config.manila.stats.referers)) Çif defined (config.manila.stats.reports) Çadd ("# reports: " + sizeOf (config.manila.stats.reports)) Çif defined (config.manila.stats.sites.allTime) Çadd ("# all-time sites stats: " + sizeOf (config.manila.stats.sites.allTime)) Çif defined (config.manila.stats.sites.hourly) Çadd ("# hourly sites stats: " + sizeOf (config.manila.stats.sites.hourly)) Çif defined (config.manila.stats.sites.today) Çadd ("# today sites stats: " + sizeOf (config.manila.stats.sites.today)) Çadd (""); indentlevel-- Çbundle //Manila themes Çadd ("Manila themes:"); indentlevel++ Çadd ("") ÇdoThemesTable (@config.manila.themes) Çadd (""); indentlevel-- bundle { //mainResponder addTableAsSection ("mainResponder global URLs", @config.mainResponder.urls); addTableAsSection ("mainResponder prefs", @config.mainResponder.prefs); addTableAsSection ("mainResponder globals", @config.mainResponder.globals); bundle { //mainResponder legal macros add ("mainResponder legal macros:"); indentlevel++; add (""); local (adrItem); for adrItem in @config.mainResponder.prefs.legalMacros { local (name = nameOf (adrItem^)); case typeOf (adrItem^) { booleanType { add (name + ": " + adrItem^)}; tableType { if (sizeOf (adrItem^) == 2) and (defined (adrItem^.flLegal)) and (defined (adrItem^.flParams)) { add (name + ": [takes params]: " + adrItem^.flLegal)} else { add (name + ": [misconfigured]")}}}}; add (""); indentlevel--}; bundle { //mainResponder search queue add ("mainResponder search queue:"); indentlevel++; add (""); if defined (config.mainResponder.data.searchQueue) { add ("# items: " + sizeOf (config.mainResponder.data.searchQueue))} else { add ("Empty")}; add (""); indentlevel--}; bundle { //mainResponder callbacks add ("mainResponder callbacks:"); indentlevel++; add (""); local (adrItem); for adrItem in @config.mainResponder.callbacks { add (nameOf (adrItem^) + ":"); indentLevel++; local (sizeTable = sizeOf (adrItem^)); if sizeTable < 1 { add ("[Empty]")} else { local (adrCallback); for adrCallback in adrItem { if typeOf (adrCallback^) == addressType { add (nameOf (adrCallback^) + ": " + adrCallback^)} else { add (nameOf (adrCallback^))}}}; indentLevel--}; add (""); indentlevel--}; bundle { //mainResponder domains add ("mainResponder domains (config.mainResponder.domains):"); indentlevel++; add (""); local (adrItem); for adrItem in @config.mainResponder.domains { local (name = nameOf (adrItem^)); if typeOf (adrItem^) == tableType { if defined (adrItem^.siteTree.directory.outline) { add (name + " [siteTree]:"); indentLevel++; add (string (adrItem^.siteTree.directory.outline)); add (""); indentLevel--} else { add (name + ": table " + sizeOf (adrItem^) + " items")}} else { add (name + ": " + string (adrItem^))}}; add (""); indentlevel--}}; bundle { //user table if defined (user.applescripts.prefs) { addTableAsSection ("AppleScript", @user.applescripts.prefs)}; if defined (user.backups) { addTableAsSection ("Backups", @user.backups)}; if defined (user.batchExporter) { addTableAsSection ("BatchExporter", @user.batchExporter)}; bundle { //user.callbacks add ("user.callbacks:"); indentlevel++; add (""); local (adrItem); for adrItem in @user.callbacks { add (nameOf (adrItem^) + ":"); indentLevel++; local (sizeTable = sizeOf (adrItem^)); if sizeTable < 1 { add ("[Empty]")} else { local (adrCallback); for adrCallback in adrItem { if typeOf (adrCallback^) == addressType { add (nameOf (adrCallback^) + ": " + adrCallback^)} else { add (nameOf (adrCallback^))}}}; indentLevel--}; add (""); indentlevel--}; if defined (user.com) { addTableAsSection ("COM", @user.com)}; bundle { //user.databases add ("user.databases:"); indentlevel++; add (""); local (adrItem); for adrItem in @user.databases { add (nameOf (adrItem^) + ":"); indentLevel++; doSimpleTable (adrItem); indentLevel--}; add (""); indentlevel--}; if defined (user.export) { addTableAsSection ("Export", @user.export)}; if defined (user.html.glossary) { add ("user.html.glossary:"); indentlevel++; add (""); add ("# items: " + sizeOf (user.html.glossary)); add (""); indentlevel--}; if defined (user.html.macros) { add ("user.html.macros:"); indentlevel++; add (""); add ("# items: " + sizeOf (user.html.macros)); add (""); indentlevel--}; if defined (user.html.renderers) { add ("user.html.renderers:"); indentlevel++; add (""); add ("# items: " + sizeOf (user.html.renderers)); add (""); indentlevel--}; if defined (user.html.prefs) { addTableAsSection ("HTML prefs", @user.html.prefs)}; if defined (user.menus) { addTableAsSection ("Menus", @user.menus)}; if defined (user.prefs) { addTableAsSection ("Basic prefs", @user.prefs)}; if defined (user.prefs.dates) { addTableAsSection ("Dates", @user.prefs.dates)}; if defined (user.prefs.dialogs) { addTableAsSection ("Dialogs", @user.prefs.dialogs)}; if defined (user.prefs.fonts) { addTableAsSection ("Fonts", @user.prefs.fonts)}; if defined (user.prefs.search) { addTableAsSection ("Search", @user.prefs.search)}; if defined (user.rootUpdates.prefs) { addTableAsSection ("Root Updates prefs", @user.rootUpdates.prefs)}; if defined (user.rootUpdates.servers) { add ("user.rootUpdates.Servers:"); indentlevel++; add (""); local (adrItem); for adrItem in @user.rootUpdates.Servers { add (nameOf (adrItem^) + ":"); indentLevel++; doSimpleTable (adrItem); indentLevel--}; add (""); indentlevel--}; if defined (user.unix.scripts) { addTableAsSection ("Unix scripts", @user.unix.scripts)}; if defined (user.webBrowser) { addTableAsSection ("WebBrowser", @user.webBrowser)}}; bundle { //Misc if defined (system.verbs.traps) { addTableAsSection ("Traps", @system.verbs.traps)}; if defined (system.verbs.extensions) { addTableAsSection ("Extensions", @system.verbs.extensions)}; bundle { //root table sizes add ("Top-level table sizes:"); indentLevel++; add (""); local (adrItem); for adrItem in @root { local (name = nameOf (adrItem^)); local (size = sizeOf (adrItem^)); if typeOf (adrItem^) != tableType { add (name + ": Not a table, which surprises us.")} else { add (name + ": " + size + " items")}}; add ("");indentLevel--}; if system.environment.isCarbon { // Mac OS X port forwarding and ipfw if defined (user.prefs.portForwardingAdminPassword) { local (s = sys.unixShellCommand ("echo \"" + user.prefs.portForwardingAdminPassword + "\" | sudo /sbin/ipfw -a list")); sys.unixShellCommand ("sudo -K"); // drop our privs add ("Mac OS X Port Forwarding and ipfw:"); indentlevel++; add (""); addOnOff ("Port Forwarding enabled", defined (user.prefs.portForwardingAdminPassword)); add (""); add ("ipfw configuration:"); indentlevel++; add (""); s = string.replaceAll (s, '\n', '\n' + string.filledstring (" ", indentLevel)); add (s); indentlevel--; add (""); indentlevel--}}}; bundle { //Guest Databases folders on doFolder (name) { add (name + " folder:"); indentlevel++; add (""); local (f); fileloop (f in Frontier.getSubFolder (name)) { local (fname = file.fileFromPath (f)); fname = string.popTrailing (fname, file.getPathChar ()); if file.isFolder (f) { add (fname + ": [folder]")} else { local (size = string.megabyteString (file.size (f))); add (fname + ": " + size)}}; add (""); indentlevel--}; doFolder ("apps"); doFolder ("ops"); doFolder ("www")}; if fldebug { wp.newTextObject (mailText, @temp.FrontierConfiguration); edit (@temp.FrontierConfiguration)}; return (mailText)}; Çbundle // test ÇgetConfigInfo (fldebug: true) \ No newline at end of file |
Update of /cvsroot/frontierkernel/odbs/frontierRoot/system/callbacks In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26733 Modified Files: cmd2Click saveWindow tcpSetOffline opCursorMoved systemTrayIconRightClick opStruct2Click closeWindow opRightClick startup openWindow option2Click opReturnKey resume suspend compileChangedScript opCollapse shutdown control2Click opExpand systemTrayIcon2Click opInsert Log Message: changed to use Frontier.createUserCallbacksSubtable Index: tcpSetOffline =================================================================== RCS file: /cvsroot/frontierkernel/odbs/frontierRoot/system/callbacks/tcpSetOffline,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** tcpSetOffline 26 Mar 2005 19:41:19 -0000 1.1.1.1 --- tcpSetOffline 19 Jun 2005 03:55:46 -0000 1.2 *************** *** 1,3 **** FrontierVcsFile:1:scpt:system.callbacks.tcpSetOffline ! on tcpSetOffline (flOffline) { ÇChanges Ç10/16/01; 12:49:13 PM by DW ÇCreated. Called from tcp.setOffline. local (adrscript); if not defined (user.callbacks.tcpSetOffline) { new (tableType, @user.callbacks.tcpSetOffline)}; for adrscript in @user.callbacks.tcpSetOffline { try { while typeOf (adrScript^) == addressType { adrScript = adrScript^}; adrScript^ (flOffline)}}} \ No newline at end of file --- 1,3 ---- FrontierVcsFile:1:scpt:system.callbacks.tcpSetOffline ! on tcpSetOffline (flOffline) { ÇChanges Ç6/18/05; 1:34:38 PM by TAC Çuse Frontier.createUserCallbacksSubtable to initialize tables Ç10/16/01; 12:49:13 PM by DW ÇCreated. Called from tcp.setOffline. local (adrscript); Frontier.createUserCallbacksSubtable (nameOf (this^)); Çif not defined (user.callbacks.tcpSetOffline) // old code Çnew (tableType, @user.callbacks.tcpSetOffline) for adrscript in @user.callbacks.tcpSetOffline { try { while typeOf (adrScript^) == addressType { adrScript = adrScript^}; adrScript^ (flOffline)}}} \ No newline at end of file Index: opInsert =================================================================== RCS file: /cvsroot/frontierkernel/odbs/frontierRoot/system/callbacks/opInsert,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** opInsert 26 Mar 2005 19:41:19 -0000 1.1.1.1 --- opInsert 19 Jun 2005 03:55:46 -0000 1.2 *************** *** 1,3 **** FrontierVcsFile:1:scpt:system.callbacks.opInsert ! on opInsert () { ÇThis script is called after the user creates a new headline in any outline. In turn it calls all the scripts in user.callbacks.opInsert Ç9/20/01; 2:57:32 PM by PBS local (adrscript); if not defined (user.callbacks.opInsert) { new (tableType, @user.callbacks.opInsert)}; for adrscript in @user.callbacks.opInsert { try { while typeOf (adrScript^) == addressType { adrScript = adrScript^}; adrscript^ ()}}} \ No newline at end of file --- 1,3 ---- FrontierVcsFile:1:scpt:system.callbacks.opInsert ! on opInsert () { ÇThis script is called after the user creates a new headline in any outline. In turn it calls all the scripts in user.callbacks.opInsert ÇChanges Ç6/18/05; 1:34:38 PM by TAC Çuse Frontier.createUserCallbacksSubtable to initialize tables Ç9/20/01; 2:57:32 PM by PBS local (adrscript); Frontier.createUserCallbacksSubtable (nameOf (this^)); Çif not defined (user.callbacks.opInsert) // old code Çnew (tableType, @user.callbacks.opInsert) for adrscript in @user.callbacks.opInsert { try { while typeOf (adrScript^) == addressType { adrScript = adrScript^}; adrscript^ ()}}} \ No newline at end of file Index: suspend =================================================================== RCS file: /cvsroot/frontierkernel/odbs/frontierRoot/system/callbacks/suspend,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** suspend 26 Mar 2005 19:41:19 -0000 1.1.1.1 --- suspend 19 Jun 2005 03:55:46 -0000 1.2 *************** *** 1,3 **** FrontierVcsFile:1:scpt:system.callbacks.suspend ! on suspend () { ÇCall user's suspend scripts. ÇFor notification only. ÇChanges: ÇThursday, September 28, 2000 at 7:00:45 PM by JES ÇAllow the callback to be an address or the address of an address... local (i); if not defined (user.callbacks.suspend) { new (tabletype, @user.callbacks.suspend)}; for i = 1 to sizeof (user.callbacks.suspend) { try { local (adrScript = @user.callbacks.suspend [i]); while typeOf (adrScript^) == addressType { adrScript = adrScript^}; adrScript^ ()}}; return (true)} \ No newline at end of file --- 1,3 ---- FrontierVcsFile:1:scpt:system.callbacks.suspend ! on suspend () { ÇCall user's suspend scripts. For notification only. ÇChanges Ç6/18/05; 1:47:59 PM by TAC Çuse Frontier.createUserCallbacksSubtable to initialize tables ÇThursday, September 28, 2000 at 7:00:45 PM by JES ÇAllow the callback to be an address or the address of an address... local (i); Frontier.createUserCallbacksSubtable (nameOf (this^)); Çif not defined (user.callbacks.suspend) // old code Çnew (tabletype, @user.callbacks.suspend) for i = 1 to sizeof (user.callbacks.suspend) { try { local (adrScript = @user.callbacks.suspend [i]); while typeOf (adrScript^) == addressType { adrScript = adrScript^}; adrScript^ ()}}; return (true)} \ No newline at end of file Index: opExpand =================================================================== RCS file: /cvsroot/frontierkernel/odbs/frontierRoot/system/callbacks/opExpand,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** opExpand 26 Mar 2005 19:41:19 -0000 1.1.1.1 --- opExpand 19 Jun 2005 03:55:46 -0000 1.2 *************** *** 1,3 **** FrontierVcsFile:1:scpt:system.callbacks.opExpand ! on opExpand () { ÇCreated, Thu, Jul 13, 2000 at 11:18:23 PM by AR ÇThis script is called when the user expands a headline in an outline. It loops over scripts in user.callbacks.opExpand. ÇAdd your callback scripts to user.callbacks.opExpand. Return true if you "consume" the event, return false if you want other callback scripts to get a shot at it. ÇChanges: ÇThursday, September 28, 2000 at 6:12:13 PM by JES ÇAllow callbacks to be addresses or addresses of addresses... local (adrscript); if not defined (user.callbacks.opExpand) { new (tableType, @user.callbacks.opExpand)}; for adrscript in @user.callbacks.opExpand { try { while typeOf (adrScript^) == addressType { adrScript = adrScript^}; if adrscript^ () { return (true)}}}; //consumed return (false)} //not consumed \ No newline at end of file --- 1,3 ---- FrontierVcsFile:1:scpt:system.callbacks.opExpand ! on opExpand () { ÇChanges: Ç6/18/05; 1:34:38 PM by TAC Çuse Frontier.createUserCallbacksSubtable to initialize tables ÇThursday, September 28, 2000 at 6:12:13 PM by JES ÇAllow callbacks to be addresses or addresses of addresses... ÇThu, Jul 13, 2000 at 11:18:23 PM by AR ÇCreated. ÇThis script is called when the user expands a headline in an outline. It loops over scripts in user.callbacks.opExpand. ÇAdd your callback scripts to user.callbacks.opExpand. Return true if you "consume" the event, return false if you want other callback scripts to get a shot at it. local (adrscript); Frontier.createUserCallbacksSubtable (nameOf (this^)); Çif not defined (user.callbacks.opExpand) // old code Çnew (tableType, @user.callbacks.opExpand) for adrscript in @user.callbacks.opExpand { try { while typeOf (adrScript^) == addressType { adrScript = adrScript^}; if adrscript^ () { return (true)}}}; //consumed return (false)} //not consumed \ No newline at end of file Index: resume =================================================================== RCS file: /cvsroot/frontierkernel/odbs/frontierRoot/system/callbacks/resume,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** resume 26 Mar 2005 19:41:19 -0000 1.1.1.1 --- resume 19 Jun 2005 03:55:46 -0000 1.2 *************** *** 1,3 **** FrontierVcsFile:1:scpt:system.callbacks.resume ! on resume () { ÇCall user's resume scripts. ÇAny returned value is ignored. ÇChanges: ÇThursday, September 28, 2000 at 6:22:54 PM by JES ÇAllow the callback to be an address or the address of an address. local (i); if not defined (user.callbacks.resume) { new (tabletype, @user.callbacks.resume)}; for i = 1 to sizeof (user.callbacks.resume) { try { local (adrScript = @user.callbacks.resume [i]); while typeOf (adrScript^) == addressType { adrScript = adrScript^}; adrScript^ ()}}; return (true)} \ No newline at end of file --- 1,3 ---- FrontierVcsFile:1:scpt:system.callbacks.resume ! on resume () { ÇCall user's resume scripts. Any returned value is ignored. ÇChanges Ç6/18/05; 1:34:38 PM by TAC Çuse Frontier.createUserCallbacksSubtable to initialize tables ÇThursday, September 28, 2000 at 6:22:54 PM by JES ÇAllow the callback to be an address or the address of an address. local (i); Frontier.createUserCallbacksSubtable (nameOf (this^)); Çif not defined (user.callbacks.resume) // old code Çnew (tabletype, @user.callbacks.resume) for i = 1 to sizeof (user.callbacks.resume) { try { local (adrScript = @user.callbacks.resume [i]); while typeOf (adrScript^) == addressType { adrScript = adrScript^}; adrScript^ ()}}; return (true)} \ No newline at end of file Index: saveWindow =================================================================== RCS file: /cvsroot/frontierkernel/odbs/frontierRoot/system/callbacks/saveWindow,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** saveWindow 26 Mar 2005 19:41:19 -0000 1.1.1.1 --- saveWindow 19 Jun 2005 03:55:46 -0000 1.2 *************** *** 1,3 **** FrontierVcsFile:1:scpt:system.callbacks.saveWindow ! on saveWindow (w, runnable = false) { Çnew in Frontier 4.0b7 ÇThursday, July 17, 1997 ÇNew parameter: runnable, defaults to false. ÇIf true, this is a deskscript. ÇCall user's saveWindow scripts. ÇFor notification only. This script Çwill save the window no matter what the Çuser's scripts return. ÇChanges: ÇThursday, September 28, 2000 at 6:24:24 PM by JES ÇAllow the callback to be an address or the address of an address... local (i); if string.lower (window.getFile (w)) endsWith ".ftds" { runnable = true}; if file.exists (window.getFile (w)) and file.type (w) == 'FTds' { runnable = true}; if not defined (user.callbacks.saveWindow) { new (tabletype, @user.callbacks.saveWindow)}; for i = 1 to sizeof (user.callbacks.saveWindow) { try { local (adrScript = @user.callbacks.saveWindow [i]); while typeOf (adrScript^) == addressType { adrScript = adrScript^}; adrScript^ (w, runnable)}}; local (x = fatPages.buildFileAtts (w, runnable)); return (x)} \ No newline at end of file --- 1,3 ---- FrontierVcsFile:1:scpt:system.callbacks.saveWindow ! on saveWindow (w, runnable = false) { Çnew in Frontier 4.0b7 ÇCall user's saveWindow scripts. ÇFor notification only. This script will save the window no matter what the user's scripts return. ÇChanges Ç6/18/05; 1:34:38 PM by TAC Çuse Frontier.createUserCallbacksSubtable to initialize tables ÇThursday, September 28, 2000 at 6:24:24 PM by JES ÇAllow the callback to be an address or the address of an address... ÇThursday, July 17, 1997 ÇNew parameter: runnable, defaults to false. If true, this is a deskscript. local (i); if string.lower (window.getFile (w)) endsWith ".ftds" { runnable = true}; if file.exists (window.getFile (w)) and file.type (w) == 'FTds' { runnable = true}; Frontier.createUserCallbacksSubtable (nameOf (this^)); Çif not defined (user.callbacks.saveWindow) // old code Çnew (tabletype, @user.callbacks.saveWindow) for i = 1 to sizeof (user.callbacks.saveWindow) { try { local (adrScript = @user.callbacks.saveWindow [i]); while typeOf (adrScript^) == addressType { adrScript = adrScript^}; adrScript^ (w, runnable)}}; local (x = fatPages.buildFileAtts (w, runnable)); return (x)} \ No newline at end of file Index: systemTrayIcon2Click =================================================================== RCS file: /cvsroot/frontierkernel/odbs/frontierRoot/system/callbacks/systemTrayIcon2Click,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** systemTrayIcon2Click 26 Mar 2005 19:41:19 -0000 1.1.1.1 --- systemTrayIcon2Click 19 Jun 2005 03:55:46 -0000 1.2 *************** *** 1,3 **** FrontierVcsFile:1:scpt:system.callbacks.systemTrayIcon2Click ! on systemTrayIcon2Click () { if not defined (user.callbacks.systemTrayIcon2Click) { new (tabletype, @user.callbacks.systemTrayIcon2Click)}; local (i); for i = 1 to sizeof (user.callbacks.systemTrayIcon2Click) { try { local (adrScript = @user.callbacks.systemTrayIcon2Click [i]); while typeOf (adrScript^) == addressType { adrScript = adrScript^}; adrScript^ ()}}; return (true)} \ No newline at end of file --- 1,3 ---- FrontierVcsFile:1:scpt:system.callbacks.systemTrayIcon2Click ! on systemTrayIcon2Click () { ÇChanges Ç6/18/05; 1:34:38 PM by TAC Çuse Frontier.createUserCallbacksSubtable to initialize tables local (i); Frontier.createUserCallbacksSubtable (nameOf (this^)); Çif not defined (user.callbacks.systemTrayIcon2Click) // old code Çnew (tabletype, @user.callbacks.systemTrayIcon2Click) for i = 1 to sizeof (user.callbacks.systemTrayIcon2Click) { try { local (adrScript = @user.callbacks.systemTrayIcon2Click [i]); while typeOf (adrScript^) == addressType { adrScript = adrScript^}; adrScript^ ()}}; return (true)} \ No newline at end of file Index: opRightClick =================================================================== RCS file: /cvsroot/frontierkernel/odbs/frontierRoot/system/callbacks/opRightClick,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** opRightClick 26 Mar 2005 19:41:19 -0000 1.1.1.1 --- opRightClick 19 Jun 2005 03:55:46 -0000 1.2 *************** *** 1,3 **** FrontierVcsFile:1:scpt:system.callbacks.opRightClick ! on opRightClick () { ÇCreated, Friday, August 18, 2000 at 2:28:24 PM by DW ÇThis script is called when the user right-clicks in any outline. In turn it calls all the scripts in user.callbacks.opRightClick. ÇThe first callback that returns a menu consumes the event, and we return the address they return to us. ÇChanges: ÇThursday, September 28, 2000 at 6:15:29 PM by JES ÇAllow the callback to be an address or the address of an address... local (adrscript, adrmenu = nil); if not defined (user.callbacks.opRightClick) { new (tableType, @user.callbacks.opRightClick)}; for adrscript in @user.callbacks.opRightClick { try { while typeOf (adrScript^) == addressType { adrScript = adrScript^}; adrscript^ (@adrmenu); if adrmenu != nil { return (adrmenu)}}}} \ No newline at end of file --- 1,3 ---- FrontierVcsFile:1:scpt:system.callbacks.opRightClick ! on opRightClick () { ÇChanges Ç6/18/05; 1:34:38 PM by TAC Çuse Frontier.createUserCallbacksSubtable to initialize tables ÇThursday, September 28, 2000 at 6:15:29 PM by JES ÇAllow the callback to be an address or the address of an address... ÇFriday, August 18, 2000 at 2:28:24 PM by DW ÇCreated. ÇThis script is called when the user right-clicks in any outline. In turn it calls all the scripts in user.callbacks.opRightClick. ÇThe first callback that returns a menu consumes the event, and we return the address they return to us. local (adrscript, adrmenu = nil); Frontier.createUserCallbacksSubtable (nameOf (this^)); Çif not defined (user.callbacks.opRightClick) // old code Çnew (tableType, @user.callbacks.opRightClick) for adrscript in @user.callbacks.opRightClick { try { while typeOf (adrScript^) == addressType { adrScript = adrScript^}; adrscript^ (@adrmenu); if adrmenu != nil { return (adrmenu)}}}} \ No newline at end of file Index: startup =================================================================== RCS file: /cvsroot/frontierkernel/odbs/frontierRoot/system/callbacks/startup,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** startup 26 Mar 2005 19:41:19 -0000 1.1.1.1 --- startup 19 Jun 2005 03:55:46 -0000 1.2 *************** *** 1,3 **** FrontierVcsFile:1:scpt:system.callbacks.startup ! ÇCall user's startup scripts ÇChanges: ÇThursday, September 28, 2000 at 7:00:15 PM by JES ÇAllow the callback to be an address or the address of an address... if not defined (user.callbacks) { new (tabletype, @user.callbacks)}; if not defined (user.callbacks.startup) { new (tabletype, @user.callbacks.startup)}; local (i); for i = 1 to sizeof (user.callbacks.startup) { try { local (adrScript = @user.callbacks.startup [i]); while typeOf (adrScript^) == addressType { adrScript = adrScript^}; adrScript^ ()}} \ No newline at end of file --- 1,3 ---- FrontierVcsFile:1:scpt:system.callbacks.startup ! ÇCall user's startup scripts ÇChanges Ç6/18/05; 1:34:38 PM by TAC Çuse Frontier.createUserCallbacksSubtable to initialize tables ÇThursday, September 28, 2000 at 7:00:15 PM by JES ÇAllow the callback to be an address or the address of an address... Frontier.createUserCallbacksSubtable (nameOf (this^)); Çbundle // old code Çif not defined (user.callbacks) Çnew (tabletype, @user.callbacks) Çif not defined (user.callbacks.startup) // old code Çnew (tabletype, @user.callbacks.startup) local (i); for i = 1 to sizeof (user.callbacks.startup) { try { local (adrScript = @user.callbacks.startup [i]); while typeOf (adrScript^) == addressType { adrScript = adrScript^}; adrScript^ ()}} \ No newline at end of file Index: opStruct2Click =================================================================== RCS file: /cvsroot/frontierkernel/odbs/frontierRoot/system/callbacks/opStruct2Click,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** opStruct2Click 26 Mar 2005 19:41:19 -0000 1.1.1.1 --- opStruct2Click 19 Jun 2005 03:55:46 -0000 1.2 *************** *** 1,3 **** FrontierVcsFile:1:scpt:system.callbacks.opStruct2Click ! on opStruct2Click () { ÇCreated, 1/15/00; 7:45:16 PM by DW ÇThis script is called when the user 2clicks on a headline in an outline to expand or collapse it. It loops over scripts in user.callbacks.opStruct2Click. ÇAdd your callback scripts to user.callbacks.opStruct2Click. Return true if you "consume" the 2click, return false if you want other callback scripts to get a shot at it. ÇChanges: ÇThursday, September 28, 2000 at 6:16:58 PM by JES ÇAllow the callback to be an address or the address of an address... local (adrscript); if not defined (user.callbacks.opStruct2Click) { new (tableType, @user.callbacks.opStruct2Click)}; for adrscript in @user.callbacks.opStruct2Click { try { while typeOf (adrScript^) == addressType { adrScript = adrScript^}; if adrscript^ () { return (true)}}}; //consumed return (false)}; //not consumed Çbundle //test code ÇopStruct2Click () \ No newline at end of file --- 1,3 ---- FrontierVcsFile:1:scpt:system.callbacks.opStruct2Click ! on opStruct2Click () { ÇChanges Ç6/18/05; 1:34:38 PM by TAC Çuse Frontier.createUserCallbacksSubtable to initialize tables ÇThursday, September 28, 2000 at 6:16:58 PM by JES ÇAllow the callback to be an address or the address of an address... Ç1/15/00; 7:45:16 PM by DW ÇCreated. ÇThis script is called when the user 2clicks on a headline in an outline to expand or collapse it. It loops over scripts in user.callbacks.opStruct2Click. ÇAdd your callback scripts to user.callbacks.opStruct2Click. Return true if you "consume" the 2click, return false if you want other callback scripts to get a shot at it. local (adrscript); Frontier.createUserCallbacksSubtable (nameOf (this^)); Çif not defined (user.callbacks.opStruct2Click) // old code Çnew (tableType, @user.callbacks.opStruct2Click) for adrscript in @user.callbacks.opStruct2Click { try { while typeOf (adrScript^) == addressType { adrScript = adrScript^}; if adrscript^ () { return (true)}}}; //consumed return (false)}; //not consumed Çbundle //test code ÇopStruct2Click () \ No newline at end of file Index: opCursorMoved =================================================================== RCS file: /cvsroot/frontierkernel/odbs/frontierRoot/system/callbacks/opCursorMoved,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** opCursorMoved 26 Mar 2005 19:41:19 -0000 1.1.1.1 --- opCursorMoved 19 Jun 2005 03:55:46 -0000 1.2 *************** *** 1,3 **** FrontierVcsFile:1:scpt:system.callbacks.opCursorMoved ! on opCursorMoved () { ÇCalled when the cursor moves in an outline. Ç08/14/00; 4:22:13 PM by PBS ÇChanges: ÇThursday, September 28, 2000 at 5:07:01 PM by JES ÇAllow callback entries to be addresses or addresses of addresses... local (adrScript); if not defined (user.callbacks.opCursorMoved) { new (tableType, @user.callbacks.opCursorMoved)}; for adrScript in @user.callbacks.opCursorMoved { try { while typeOf (adrScript^) == addressType { adrScript = adrScript^}; adrScript^ ()}}; return} //this callback can't consume events, it's for notification only \ No newline at end of file --- 1,3 ---- FrontierVcsFile:1:scpt:system.callbacks.opCursorMoved ! on opCursorMoved () { ÇChanges Ç6/18/05; 1:34:38 PM by TAC Çuse Frontier.createUserCallbacksSubtable to initialize tables ÇThursday, September 28, 2000 at 5:07:01 PM by JES ÇAllow callback entries to be addresses or addresses of addresses... Ç08/14/00; 4:22:13 PM by PBS ÇCalled when the cursor moves in an outline. local (adrScript); Frontier.createUserCallbacksSubtable (nameOf (this^)); Çif not defined (user.callbacks.opCursorMoved) // old code Çnew (tableType, @user.callbacks.opCursorMoved) for adrScript in @user.callbacks.opCursorMoved { try { while typeOf (adrScript^) == addressType { adrScript = adrScript^}; adrScript^ ()}}; return} //this callback can't consume events, it's for notification only \ No newline at end of file Index: compileChangedScript =================================================================== RCS file: /cvsroot/frontierkernel/odbs/frontierRoot/system/callbacks/compileChangedScript,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** compileChangedScript 26 Mar 2005 19:41:19 -0000 1.1.1.1 --- compileChangedScript 19 Jun 2005 03:55:46 -0000 1.2 *************** *** 1,3 **** FrontierVcsFile:1:scpt:system.callbacks.compileChangedScript ! on compileChangedScript (adr) { Çsee if the user wants to compile script changes Çthis script is called by Frontier before closing a script window that had been edited Çif you never want to see the dialog, delete the dialog call, and just return true ÇCallbacks implemented: Tue, Oct 7, 1997 ÇCallback script returns to true to handle this. ÇElse default behavior. ÇChanges: ÇThursday, September 28, 2000 at 6:05:24 PM by JES ÇAllow callbacks to be addresses or addresses of addresses... local (i); if not defined (user.callbacks.compileChangedScript) { new (tabletype, @user.callbacks.compileChangedScript)}; for i = 1 to sizeof (user.callbacks.compileChangedScript) { try { local (adrScript = @user.callbacks.compileChangedScript [i]); while typeOf (adrScript^) == addressType { adrScript = adrScript^}; if adrScript^ (adr) { return (true)}}}; local (scriptname = nameOf (adr^)); speaker.beep (); return (dialog.yesNoCancel ("Compile changes to \"" + scriptname + "\" before closing?"))} \ No newline at end of file --- 1,3 ---- FrontierVcsFile:1:scpt:system.callbacks.compileChangedScript ! on compileChangedScript (adr) { Çsee if the user wants to compile script changes Çthis script is called by Frontier before closing a script window that had been edited Çif you never want to see the dialog, delete the dialog call, and just return true ÇChanges Ç6/18/05; 1:34:38 PM by TAC Çuse Frontier.createUserCallbacksSubtable to initialize tables ÇThursday, September 28, 2000 at 6:05:24 PM by JES ÇAllow callbacks to be addresses or addresses of addresses... ÇTue, Oct 7, 1997 ÇCallbacks implemented: ÇCallback script returns true to handle this else default behavior. local (i); Frontier.createUserCallbacksSubtable (nameOf (this^)); Çif not defined (user.callbacks.compileChangedScript) // old code Çnew (tabletype, @user.callbacks.compileChangedScript) for i = 1 to sizeof (user.callbacks.compileChangedScript) { try { local (adrScript = @user.callbacks.compileChangedScript [i]); while typeOf (adrScript^) == addressType { adrScript = adrScript^}; if adrScript^ (adr) { return (true)}}}; local (scriptname = nameOf (adr^)); speaker.beep (); return (dialog.yesNoCancel ("Compile changes to \"" + scriptname + "\" before closing?"))} \ No newline at end of file Index: openWindow =================================================================== RCS file: /cvsroot/frontierkernel/odbs/frontierRoot/system/callbacks/openWindow,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** openWindow 26 Mar 2005 19:41:19 -0000 1.1.1.1 --- openWindow 19 Jun 2005 03:55:46 -0000 1.2 *************** *** 1,3 **** FrontierVcsFile:1:scpt:system.callbacks.openWindow ! on openWindow (name) { ÇCall user's openWindow scripts. ÇReturned values are ignored. ÇChanges: ÇThursday, September 28, 2000 at 6:11:05 PM by JES ÇAllow callbacks to be addresses or addresses of addresses... local (i); if not defined (user.callbacks.openWindow) { new (tabletype, @user.callbacks.openWindow)}; for i = 1 to sizeof (user.callbacks.openWindow) { try { local (adrScript = @user.callbacks.openWindow [i]); while typeOf (adrScript^) == addressType { adrScript = adrScript^}; adrScript^ (name)}}; return (true)} \ No newline at end of file --- 1,3 ---- FrontierVcsFile:1:scpt:system.callbacks.openWindow ! on openWindow (name) { ÇCall user's openWindow scripts. ÇReturned values are ignored. ÇChanges Ç6/18/05; 1:34:38 PM by TAC Çuse Frontier.createUserCallbacksSubtable to initialize tables ÇThursday, September 28, 2000 at 6:11:05 PM by JES ÇAllow callbacks to be addresses or addresses of addresses... local (i); Frontier.createUserCallbacksSubtable (nameOf (this^)); Çif not defined (user.callbacks.openWindow) // old code Çnew (tabletype, @user.callbacks.openWindow) for i = 1 to sizeof (user.callbacks.openWindow) { try { local (adrScript = @user.callbacks.openWindow [i]); while typeOf (adrScript^) == addressType { adrScript = adrScript^}; adrScript^ (name)}}; return (true)} \ No newline at end of file Index: closeWindow =================================================================== RCS file: /cvsroot/frontierkernel/odbs/frontierRoot/system/callbacks/closeWindow,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** closeWindow 26 Mar 2005 19:41:18 -0000 1.1.1.1 --- closeWindow 19 Jun 2005 03:55:46 -0000 1.2 *************** *** 1,3 **** FrontierVcsFile:1:scpt:system.callbacks.closeWindow ! on closeWindow (title) { Çnew in Frontier 4.0b7 ÇSat, Apr 27, 1996 at 9:24:55 AM by DMB ÇThe script can prevent the close from happening by returning false ÇOr it can just make a note of the change ÇThe title may be the address of a database object, or "Error Info", "QuickScript", etc. ÇIt can also be called for the main window, when the database is about to be closed. Çsystem.shutdown scripts are called later, after changes have been saved. ÇThe script is only called when the user closes the window; not when a script does it. ÇHere's how to avoid the "Save Changes?" dialog: Çif title == file.fileFromPath (Frontier.getFilePath ()) ÇFileMenu.Save () ÇThu, Dec 19, 1996 at 9:08:29 AM by DW Çcall any number of scripts in user.hooks.closeWindow table Çany of these scripts can stop the window from closing Çthe last script has the last word ÇThursday, September 28, 2000 at 5:32:27 PM by JES ÇAllow callbacks to be addresses or addresses of addresses... if not defined (user.callbacks.closeWindow) { new (tabletype, @user.callbacks.closeWindow)}; bundle { //old code local (i); for i = 1 to sizeof (user.callbacks.closeWindow) { try { local (adrScript = @user.callbacks.closeWindow [i]); while typeOf (adrScript^) == addressType { adrScript = adrScript^}; if not adrScript^ (title) { return (false)}}}}; return (true)} Çreturn true to allow the window to close \ No newline at end of file --- 1,3 ---- FrontierVcsFile:1:scpt:system.callbacks.closeWindow ! on closeWindow (title) { Çnew in Frontier 4.0b7 ÇChanges Ç6/18/05; 1:34:38 PM by TAC Çuse Frontier.createUserCallbacksSubtable to initialize tables ÇThursday, September 28, 2000 at 5:32:27 PM by JES ÇAllow callbacks to be addresses or addresses of addresses... ÇThu, Dec 19, 1996 at 9:08:29 AM by DW Çcall any number of scripts in user.hooks.closeWindow table Çany of these scripts can stop the window from closing Çthe last script has the last word ÇSat, Apr 27, 1996 at 9:24:55 AM by DMB ÇThe script can prevent the close from happening by returning false ÇOr it can just make a note of the change ÇThe title may be the address of a database object, or "Error Info", "QuickScript", etc. ÇIt can also be called for the main window, when the database is about to be closed. Çsystem.shutdown scripts are called later, after changes have been saved. ÇThe script is only called when the user closes the window; not when a script does it. ÇHere's how to avoid the "Save Changes?" dialog: Çif title == file.fileFromPath (Frontier.getFilePath ()) ÇFileMenu.Save () Frontier.createUserCallbacksSubtable (nameOf (this^)); Çif not defined (user.callbacks.closeWindow) // old code Çnew (tabletype, @user.callbacks.closeWindow) bundle { //old code local (i); for i = 1 to sizeof (user.callbacks.closeWindow) { try { local (adrScript = @user.callbacks.closeWindow [i]); while typeOf (adrScript^) == addressType { adrScript = adrScript^}; if not adrScript^ (title) { return (false)}}}}; return (true)} Çreturn true to allow the window to close \ No newline at end of file Index: cmd2Click =================================================================== RCS file: /cvsroot/frontierkernel/odbs/frontierRoot/system/callbacks/cmd2Click,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** cmd2Click 26 Mar 2005 19:41:19 -0000 1.1.1.1 --- cmd2Click 19 Jun 2005 03:55:45 -0000 1.2 *************** *** 1,3 **** FrontierVcsFile:1:scpt:system.callbacks.cmd2Click ! on cmd2Click (name) { Çcalled when you cmd-double-click on an identifier ÇIt enhances the default, built-in behavior of jumping to the named object. ÇIt checks for the option key, and closes the front window if it's pressed. ÇIf the name is a file rather than a db object, it will reveal it in the Finder Çssl change notes: Çenhanced to walk up the script/outline hierarchy and check every "with" path Çin an outline window, assume it's a oneLiner Çadded support for reserved constants, keywords & builtins Ç3/19/96: moved checkWith etc. to enhanced2click table to simplify distribution Ç6/17/95: added support for local scripts (via checkScript) Çchanges are Pioneerware by Scott S. Lawton ÇInternet: ss...@pr..., http://www.tiac.net/prefab/ Çdmb 8/15/96: integrated ssl's "enhanced2click" functionality Ç4.2 -- Wed, Dec 11, 1996 at 11:16:00 PM by DW Çhandles macros in web pages ÇNew callbacks for cmd2click ÇTue, Oct 7, 1997 at 11:37:49 AM by PBS ÇCallback script returns true if it handled the click, Çthen this script immediately returns true. ÇOtherwise, this script handles the click. ÇChanges: Ç4/20/01; 4:05:40 PM by JES ÇAllow callbacks to be addresses or addresses of addresses... on checkWith (name, callbackAction) { Çwalk up the script/outline hierarchy checking in "with" for a match: "table.[name]" Çcalled by my cmd2click, control2click ÇPioneerware by Scott S. Lawton Çrevisions Ç6/13/96: handle menuscripts Ç5/16/96: now handle an "object database map" Ç3/19/96: moved to enhanced2click table, updated paths Ç1/27/96 to handle double-clicking on part of the hierarchy within a single "with" Ç5/28/95 to handle comment in the "with" Ç5/15/95 to handle hierarchy within a single "with" Çe.g. "with ObjectModel, QXP, defs" Ç(Actually, I only look at pairs. It didn't seem worth the effort to test every combination.) Çpossible improvements Çlook for nested "with" (as I do for outlines & an "object database map"), e.g. Çwith Player Çwith Keys Çlook for all combinations with multiple "fields" (not just pairs), e.g. Çwith QXP, ObjectModel, defs Çlook at every "with" in an outline oneLiner Çcall Simple.window.frontmostType to handle menuscripts Çbut then the enhanced2click package wouldn't stand on its own local { categorizedName = name; theLine; space = " "; windowType = "Unknown"; Ç modified below... windowName = window.frontmost(); whereAmI; displayStatus; leftOfSelection = 0; rightOfSelection = 0}; try { Çthe following fails for a few cases, see Simple.window.frontmostType() ... the only one we need is handled in the else windowType = typeOf(windowName^)} else { Ç 6/13/96 if window.isMenuScript(windowName) { windowType = scriptType}}; on initialize() { displayStatus = op.getDisplay(); Ç want to restore it to original state op.setDisplay(false); Ç no need to show the user our travels case windowType { outlineType; Ç added 5/16/96 ==> changed to a case statement scriptType { whereAmI = op.getCursor()}}; Ç uniqueID, to restore at end if wp.inTextMode() { Ç doesn't apply to cmd2Click, but may to Jump wp.getSelect(@leftOfSelection, @rightOfSelection)}; };Çelse: the left/right of selection are correct at zero on restoreOutline() { case windowType { outlineType; Ç added 5/16/96 ==> changed to a case statement scriptType { op.setCursor(whereAmI)}}; wp.setTextMode(true); wp.setSelect(leftOfSelection, rightOfSelection); op.setDisplay(displayStatus)}; on checkAllFields() { Çglobals ÇtheLine Ç which has the spaces removed Çname ÇwhereAmI local { comma = ","; fieldCount; previous; i}; fieldCount = string.countFields(theLine, comma); for i = 1 to fieldCount { categorizedName = string.nthField(theLine, comma, i) + "." + name; if defined (categorizedName^) { restoreOutline(); callbackAction^(categorizedName, true); Ç second parameter: yes it's in a "with" return (true)}}; for i = 1 to fieldCount { Ç 5/15/95: check pairs next (less likely) previous = string.nthField(theLine, comma, i); for j = i+1 to fieldCount { categorizedName = previous + "." + string.nthField(theLine, comma, j) + "." + name; if defined (categorizedName^) { restoreOutline(); callbackAction^(categorizedName, true); Ç second parameter: yes it's in a "with" return (true)}}}; return false}; Ç won't get here if it finds a match on handleWith() { Ç1/27/96: call twice ==> moved to a subroutine theLine = string.popLeading( string.lower(op.getLineText()), space ); if theLine beginsWith "with " { theLine = string.commentDelete(theLine); Ç 5/28/95 Çget rid of the with, then strip out spaces so they don't interfere with nthField theLine = string.replaceAll( theLine - "with", space, "" ); if checkAllFields() { Çit also performs the callbackAction return true} else { return false}} else { return false}}; on handleOutlineHierarchy() { Ç5/16/96: doesn't actually check "with", but something similar Çit's easier to add here than as a separate script since it calls initialize & restoreOutline categorizedName = string.nthField(string.popLeading(op.getLineText(), space), space, 1) + "." + categorizedName; if defined (categorizedName^) { restoreOutline(); callbackAction^(categorizedName, true); Ç second parameter: yes it's in a "with" return (true)} else { return false}}; case windowType { scriptType { initialize(); if handleWith () { Ç 1/27/96: for cases like "with Player, keys"; 2click on keys return true}; Ç i.e. out of the whole script while op.go (left, 1) { if handleWith () { return true}}; Ç i.e. out of the whole script restoreOutline (); return false}; outlineType { Ç assume it's a oneLiner (5/16/96: also handle an "object database map") initialize(); local { theLine = string.lower(op.getLineText())}; if theLine contains "with " { Ç at present: only looks at the FIRST "with" local { fromPosition = string.patternMatch("with ", theLine) + 5; toPosition = string.patternMatch("{", theLine); numChars = toPosition - fromPosition}; Çget rid of the with, then strip out spaces so they don't interfere with nthField theLine = string.replaceAll(string.mid(theLine, fromPosition, numChars), space, ""); if checkAllFields() { Çit also performs the callbackAction return true}} Ç i.e. out of the whole script else { Ç modified 5/16/96 to walk up the hierarchy Çunlike "with", do NOT check the current line ÇcategorizedName starts out as just name; that's what we want here too while op.go(left, 1) { Ç 5/16/96 if handleOutlineHierarchy() { return true}}; Ç i.e. out of the whole script restoreOutline(); return false}}} else { return false}}; on pathToBracketedPath (s) { ÇSunday, January 25, 1998 at 4:21:03 PM by PBS local (path, flinquotes, flinbrackets, fladd, flend); local (i, ch = "", lastch = "", piece); local (oneElement = "", elementList = {}); for i = 1 to sizeOf (s) { fladd = false; flend = false; lastch = ch; ch = s [i]; case ch { '"' { if lastch == '\\' { fladd = true} else { if !flinquotes { flinquotes = true} else { flinquotes = false}}}; '[' { if !flinquotes { flinbrackets = true}}; ']' { if !flinquotes { flinbrackets = false}}; '.' { if !flinquotes and !flinbrackets { flend = true} else { fladd = true}}} else { fladd = true}; if fladd { oneElement = oneElement + ch}; if flend { elementList = elementList + oneElement; oneElement = ""}}; elementList = elementList + oneElement; for oneElement in elementList { path = path + "[\"" + oneElement + "\"]."}; path = string.mid (path, 1, sizeOf (path) - 1); // strip off trailing dot return (path)}; if not defined (user.callbacks.cmd2click) { new (tabletype, @user.callbacks.cmd2click)}; local (i); local (bracketedName); for i = 1 to sizeof (user.callbacks.cmd2click) { local (adrScript = @user.callbacks.cmd2click [i]); try { while typeOf (adrScript^) == addressType { adrScript = adrScript^}; if adrScript^ (name) { return (true)}}}; on checkOtherTables (name, callbackAction) { Çlook in tables that UserTalk references, but aren't global ... to match "table.[name]" Çcalled by my cmd2click, Cmd-Jump & possibly others ÇPioneerware by Scott S. Lawton Çrevisions Ç3/19/96: moved to enhanced2click table, updated paths Ç5/15/95: handle subtables, e.g. "dialog.getFile" (in Simple) should NOT be bracketed local { jumpPaths = { "system.compiler.language.constants", "system.compiler.language.builtins", "system.compiler.language.keywords", "system.misc", "people", "system.verbs", "Simple"}; path; test}; for path in jumpPaths { test = path + "." + name; Ç added 5/15/95 if defined (test^) { callbackAction^ (test); return true}; test = path + "." + "[\"" + name + "\"]"; if defined (test^) { callbackAction^ (test); return true}}; return false}; Ç will only get here if the above fails on checkScript (name) { Çlook in the script itself for a local "handler" Çcalled by my cmd2click, control2click, Cmd-Jump & possibly others ÇPioneerware by Scott S. Lawton Çrevisions Ç3/19/96: moved to enhanced2click table, updated paths Ç6/17/95: created local { windowType = "Unknown"; Ç modified below... whereAmI; displayStatus; leftOfSelection = 0; rightOfSelection = 0}; try { Çthe following fails for a few cases, see Simple.window.frontmostType() ... though it isn't needed here windowType = typeOf (window.frontmost()^)}; on initialize() { displayStatus = op.getDisplay(); Ç want to restore it to original state op.setDisplay (false); Ç no need to show the user our travels if windowType equals scriptType { whereAmI = op.getCursor()}; Ç uniqueID, to restore at end if wp.inTextMode() { Ç doesn't apply to cmd2Click, but may to Jump wp.getSelect(@leftOfSelection, @rightOfSelection)}; };Çelse: the left/right of selection are correct at zero on restoreOutline() { if windowType equals scriptType { op.setCursor(whereAmI)}; wp.setTextMode(true); wp.setSelect(leftOfSelection, rightOfSelection); op.setDisplay(displayStatus)}; if windowType equals scriptType { initialize(); bundle { Ç set the search parameters user.prefs.search.casesensitive = false; user.prefs.search.wholewords = false; user.prefs.search.wraparound = true}; op.firstSummit (); Ç FIND seems to take current heading as its scope if op.find ("on " + name) { Ç look for the "category" text wp.setTextMode (true); op.setDisplay (displayStatus); return true} else { restoreOutline (); return false}} else { return false}}; on doIt (objectName, fromWith = false) { ÇSSL: moved standard behavior here if kb.optionKey () { local (front = window.frontMost ()); edit (address (objectName)); if window.getFile (front) == nil { window.close (front)} else { window.hide (front)}} else { edit (address (objectName))}}; if defined (name^) { Çsimple: just jump to it doIt (name); return (true)}; bracketedName = pathToBracketedPath (name); if defined (bracketedName^) { doIt (bracketedName); return (true)}; if defined (("websites." + name)^) { //it's in the websites table ÇSaturday, January 24, 1998 at 4:03:20 PM by PBS doIt ("websites." + name); return (true)}; if defined (("websites." + bracketedName)^) { //it's in the websites table ÇSaturday, January 24, 1998 at 4:03:20 PM by PBS doIt ("websites." + bracketedName); return (true)}; bundle { Ç4.2 -- make cmd-2clicking work for macros ÇWed, Dec 11, 1996 at 7:30:25 PM by DW try { if defined (websites.["#data"].tools) { if defined (websites.["#data"].tools^.[name]) { edit (@websites.["#data"].tools^.[name]); return (true)}}}; try { if defined (user.html.macros.[name]) { edit (@user.html.macros.[name]); return (true)}}; try { if defined (user.html.renderers.[name]) { edit (@user.html.renderers.[name]); return (true)}}; try { if defined (html.data.standardMacros.[name]) { edit (@html.data.standardMacros.[name]); return (true)}}}; if checkOtherTables (name, @doIt) { Çcheck reserved words return (true)}; if checkWith (name, @doIt) { Çcheck every "with" return (true)}; if checkScript (name) { Çcheck this script return (true)}; if file.exists (name) { // maybe it's a filename if sys.os () == "MacOS" { return (Finder.reveal (name))} else { return (webBrowser.openDocument (file.folderFromPath (name)))}}; if name beginsWith "http://" or name beginsWith "www." { // it's a URL if not (name beginsWith "http://") { name = "http://" + name}; if webBrowser.openURL (name) { webBrowser.bringToFront ()}; return (true)}; return (false)} \ No newline at end of file --- 1,3 ---- FrontierVcsFile:1:scpt:system.callbacks.cmd2Click ! on cmd2Click (name) { Çcalled when you cmd-double-click on an identifier ÇIt enhances the default, built-in behavior of jumping to the named object. ÇIt checks for the option key, and closes the front window if it's pressed. ÇIf the name is a file rather than a db object, it will reveal it in the Finder ÇChanges Ç6/18/05; 1:34:38 PM by TAC Çuse Frontier.createUserCallbacksSubtable to initialize tables Ç4/20/01; 4:05:40 PM by JES ÇAllow callbacks to be addresses or addresses of addresses... ÇTue, Oct 7, 1997 at 11:37:49 AM by PBS ÇNew callbacks for cmd2click. Callback script returns true if it handled the click, then this script immediately returns true. Otherwise, this script handles the click. ÇWed, Dec 11, 1996 at 11:16:00 PM by DW Ç4.2, handles macros in web pages Ç8/15/96 by dmb Ç integrated ssl's "enhanced2click" functionality Ç3/19/96 by ssl Çmoved checkWith etc. to enhanced2click table to simplify distribution Ç6/17/95 by ssl Çadded support for local scripts (via checkScript) Çssl change notes Çenhanced to walk up the script/outline hierarchy and check every "with" path in an outline window, assume it's a oneLiner Çadded support for reserved constants, keywords & builtins Çchanges are Pioneerware by Scott S. Lawton ÇInternet: ss...@pr..., http://www.tiac.net/prefab/ on checkWith (name, callbackAction) { Çwalk up the script/outline hierarchy checking in "with" for a match: "table.[name]" Çcalled by my cmd2click, control2click ÇPioneerware by Scott S. Lawton Çrevisions Ç6/13/96: handle menuscripts Ç5/16/96: now handle an "object database map" Ç3/19/96: moved to enhanced2click table, updated paths Ç1/27/96 to handle double-clicking on part of the hierarchy within a single "with" Ç5/28/95 to handle comment in the "with" Ç5/15/95 to handle hierarchy within a single "with" Çe.g. "with ObjectModel, QXP, defs" Ç(Actually, I only look at pairs. It didn't seem worth the effort to test every combination.) Çpossible improvements Çlook for nested "with" (as I do for outlines & an "object database map"), e.g. Çwith Player Çwith Keys Çlook for all combinations with multiple "fields" (not just pairs), e.g. Çwith QXP, ObjectModel, defs Çlook at every "with" in an outline oneLiner Çcall Simple.window.frontmostType to handle menuscripts Çbut then the enhanced2click package wouldn't stand on its own local { categorizedName = name; theLine; space = " "; windowType = "Unknown"; Ç modified below... windowName = window.frontmost(); whereAmI; displayStatus; leftOfSelection = 0; rightOfSelection = 0}; try { Çthe following fails for a few cases, see Simple.window.frontmostType() ... the only one we need is handled in the else windowType = typeOf(windowName^)} else { Ç 6/13/96 if window.isMenuScript(windowName) { windowType = scriptType}}; on initialize() { displayStatus = op.getDisplay(); Ç want to restore it to original state op.setDisplay(false); Ç no need to show the user our travels case windowType { outlineType; Ç added 5/16/96 ==> changed to a case statement scriptType { whereAmI = op.getCursor()}}; Ç uniqueID, to restore at end if wp.inTextMode() { Ç doesn't apply to cmd2Click, but may to Jump wp.getSelect(@leftOfSelection, @rightOfSelection)}; };Çelse: the left/right of selection are correct at zero on restoreOutline() { case windowType { outlineType; Ç added 5/16/96 ==> changed to a case statement scriptType { op.setCursor(whereAmI)}}; wp.setTextMode(true); wp.setSelect(leftOfSelection, rightOfSelection); op.setDisplay(displayStatus)}; on checkAllFields() { Çglobals ÇtheLine Ç which has the spaces removed Çname ÇwhereAmI local { comma = ","; fieldCount; previous; i}; fieldCount = string.countFields(theLine, comma); for i = 1 to fieldCount { categorizedName = string.nthField(theLine, comma, i) + "." + name; if defined (categorizedName^) { restoreOutline(); callbackAction^(categorizedName, true); Ç second parameter: yes it's in a "with" return (true)}}; for i = 1 to fieldCount { Ç 5/15/95: check pairs next (less likely) previous = string.nthField(theLine, comma, i); for j = i+1 to fieldCount { categorizedName = previous + "." + string.nthField(theLine, comma, j) + "." + name; if defined (categorizedName^) { restoreOutline(); callbackAction^(categorizedName, true); Ç second parameter: yes it's in a "with" return (true)}}}; return false}; Ç won't get here if it finds a match on handleWith() { Ç1/27/96: call twice ==> moved to a subroutine theLine = string.popLeading( string.lower(op.getLineText()), space ); if theLine beginsWith "with " { theLine = string.commentDelete(theLine); Ç 5/28/95 Çget rid of the with, then strip out spaces so they don't interfere with nthField theLine = string.replaceAll( theLine - "with", space, "" ); if checkAllFields() { Çit also performs the callbackAction return true} else { return false}} else { return false}}; on handleOutlineHierarchy() { Ç5/16/96: doesn't actually check "with", but something similar Çit's easier to add here than as a separate script since it calls initialize & restoreOutline categorizedName = string.nthField(string.popLeading(op.getLineText(), space), space, 1) + "." + categorizedName; if defined (categorizedName^) { restoreOutline(); callbackAction^(categorizedName, true); Ç second parameter: yes it's in a "with" return (true)} else { return false}}; case windowType { scriptType { initialize(); if handleWith () { Ç 1/27/96: for cases like "with Player, keys"; 2click on keys return true}; Ç i.e. out of the whole script while op.go (left, 1) { if handleWith () { return true}}; Ç i.e. out of the whole script restoreOutline (); return false}; outlineType { Ç assume it's a oneLiner (5/16/96: also handle an "object database map") initialize(); local { theLine = string.lower(op.getLineText())}; if theLine contains "with " { Ç at present: only looks at the FIRST "with" local { fromPosition = string.patternMatch("with ", theLine) + 5; toPosition = string.patternMatch("{", theLine); numChars = toPosition - fromPosition}; Çget rid of the with, then strip out spaces so they don't interfere with nthField theLine = string.replaceAll(string.mid(theLine, fromPosition, numChars), space, ""); if checkAllFields() { Çit also performs the callbackAction return true}} Ç i.e. out of the whole script else { Ç modified 5/16/96 to walk up the hierarchy Çunlike "with", do NOT check the current line ÇcategorizedName starts out as just name; that's what we want here too while op.go(left, 1) { Ç 5/16/96 if handleOutlineHierarchy() { return true}}; Ç i.e. out of the whole script restoreOutline(); return false}}} else { return false}}; on pathToBracketedPath (s) { ÇSunday, January 25, 1998 at 4:21:03 PM by PBS local (path, flinquotes, flinbrackets, fladd, flend); local (i, ch = "", lastch = "", piece); local (oneElement = "", elementList = {}); for i = 1 to sizeOf (s) { fladd = false; flend = false; lastch = ch; ch = s [i]; case ch { '"' { if lastch == '\\' { fladd = true} else { if !flinquotes { flinquotes = true} else { flinquotes = false}}}; '[' { if !flinquotes { flinbrackets = true}}; ']' { if !flinquotes { flinbrackets = false}}; '.' { if !flinquotes and !flinbrackets { flend = true} else { fladd = true}}} else { fladd = true}; if fladd { oneElement = oneElement + ch}; if flend { elementList = elementList + oneElement; oneElement = ""}}; elementList = elementList + oneElement; for oneElement in elementList { path = path + "[\"" + oneElement + "\"]."}; path = string.mid (path, 1, sizeOf (path) - 1); // strip off trailing dot return (path)}; Frontier.createUserCallbacksSubtable (nameOf (this^)); Çif not defined (user.callbacks.cmd2click) // old code Çnew (tabletype, @user.callbacks.cmd2click) local (i); local (bracketedName); for i = 1 to sizeof (user.callbacks.cmd2click) { local (adrScript = @user.callbacks.cmd2click [i]); try { while typeOf (adrScript^) == addressType { adrScript = adrScript^}; if adrScript^ (name) { return (true)}}}; on checkOtherTables (name, callbackAction) { Çlook in tables that UserTalk references, but aren't global ... to match "table.[name]" Çcalled by my cmd2click, Cmd-Jump & possibly others ÇPioneerware by Scott S. Lawton Çrevisions Ç3/19/96: moved to enhanced2click table, updated paths Ç5/15/95: handle subtables, e.g. "dialog.getFile" (in Simple) should NOT be bracketed local { jumpPaths = { "system.compiler.language.constants", "system.compiler.language.builtins", "system.compiler.language.keywords", "system.misc", "people", "system.verbs", "Simple"}; path; test}; for path in jumpPaths { test = path + "." + name; Ç added 5/15/95 if defined (test^) { callbackAction^ (test); return true}; test = path + "." + "[\"" + name + "\"]"; if defined (test^) { callbackAction^ (test); return true}}; return false}; Ç will only get here if the above fails on checkScript (name) { Çlook in the script itself for a local "handler" Çcalled by my cmd2click, control2click, Cmd-Jump & possibly others ÇPioneerware by Scott S. Lawton Çrevisions Ç3/19/96: moved to enhanced2click table, updated paths Ç6/17/95: created local { windowType = "Unknown"; Ç modified below... whereAmI; displayStatus; leftOfSelection = 0; rightOfSelection = 0}; try { Çthe following fails for a few cases, see Simple.window.frontmostType() ... though it isn't needed here windowType = typeOf (window.frontmost()^)}; on initialize() { displayStatus = op.getDisplay(); Ç want to restore it to original state op.setDisplay (false); Ç no need to show the user our travels if windowType equals scriptType { whereAmI = op.getCursor()}; Ç uniqueID, to restore at end if wp.inTextMode() { Ç doesn't apply to cmd2Click, but may to Jump wp.getSelect(@leftOfSelection, @rightOfSelection)}; };Çelse: the left/right of selection are correct at zero on restoreOutline() { if windowType equals scriptType { op.setCursor(whereAmI)}; wp.setTextMode(true); wp.setSelect(leftOfSelection, rightOfSelection); op.setDisplay(displayStatus)}; if windowType equals scriptType { initialize(); bundle { Ç set the search parameters user.prefs.search.casesensitive = false; user.prefs.search.wholewords = false; user.prefs.search.wraparound = true}; op.firstSummit (); Ç FIND seems to take current heading as its scope if op.find ("on " + name) { Ç look for the "category" text wp.setTextMode (true); op.setDisplay (displayStatus); return true} else { restoreOutline (); return false}} else { return false}}; on doIt (objectName, fromWith = false) { ÇSSL: moved standard behavior here if kb.optionKey () { local (front = window.frontMost ()); edit (address (objectName)); if window.getFile (front) == nil { window.close (front)} else { window.hide (front)}} else { edit (address (objectName))}}; if defined (name^) { Çsimple: just jump to it doIt (name); return (true)}; bracketedName = pathToBracketedPath (name); if defined (bracketedName^) { doIt (bracketedName); return (true)}; if defined (("websites." + name)^) { //it's in the websites table ÇSaturday, January 24, 1998 at 4:03:20 PM by PBS doIt ("websites." + name); return (true)}; if defined (("websites." + bracketedName)^) { //it's in the websites table ÇSaturday, January 24, 1998 at 4:03:20 PM by PBS doIt ("websites." + bracketedName); return (true)}; bundle { Ç4.2 -- make cmd-2clicking work for macros ÇWed, Dec 11, 1996 at 7:30:25 PM by DW try { if defined (websites.["#data"].tools) { if defined (websites.["#data"].tools^.[name]) { edit (@websites.["#data"].tools^.[name]); return (true)}}}; try { if defined (user.html.macros.[name]) { edit (@user.html.macros.[name]); return (true)}}; try { if defined (user.html.renderers.[name]) { edit (@user.html.renderers.[name]); return (true)}}; try { if defined (html.data.standardMacros.[name]) { edit (@html.data.standardMacros.[name]); return (true)}}}; if checkOtherTables (name, @doIt) { Çcheck reserved words return (true)}; if checkWith (name, @doIt) { Çcheck every "with" return (true)}; if checkScript (name) { Çcheck this script return (true)}; if file.exists (name) { // maybe it's a filename if sys.os () == "MacOS" { return (Finder.reveal (name))} else { return (webBrowser.openDocument (file.folderFromPath (name)))}}; if name beginsWith "http://" or name beginsWith "www." { // it's a URL if not (name beginsWith "http://") { name = "http://" + name}; if webBrowser.openURL (name) { webBrowser.bringToFront ()}; return (true)}; return (false)} \ No newline at end of file Index: shutdown =================================================================== RCS file: /cvsroot/frontierkernel/odbs/frontierRoot/system/callbacks/shutdown,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** shutdown 26 Mar 2005 19:41:19 -0000 1.1.1.1 --- shutdown 19 Jun 2005 03:55:46 -0000 1.2 *************** *** 1,3 **** FrontierVcsFile:1:scpt:system.callbacks.shutdown ! ÇCall user's shutdown scripts. ÇChanges: ÇThursday, September 28, 2000 at 6:50:39 PM by JES ÇAllow the callback to be an address or the address of an address... local (i); local (adr = @user.callbacks.shutdown); if not defined (adr^) { new (tabletype, adr)}; for i = 1 to sizeof (adr^) { try { local (adrScript = @adr^ [i]); while typeOf (adrScript^) == addressType { adrScript = adrScript^}; adrScript^ ()}} \ No newline at end of file --- 1,3 ---- FrontierVcsFile:1:scpt:system.callbacks.shutdown ! ÇCall user's shutdown scripts. ÇChanges Ç6/18/05; 1:34:38 PM by TAC Çuse Frontier.createUserCallbacksSubtable to initialize tables ÇThursday, September 28, 2000 at 6:50:39 PM by JES ÇAllow the callback to be an address or the address of an address... local (i); local (adr = Frontier.createUserCallbacksSubtable (nameOf (this^))); Çbundle // old code Çlocal (adr = @user.callbacks.shutdown) Çif not defined (adr^) Çnew (tabletype, adr) for i = 1 to sizeof (adr^) { try { local (adrScript = @adr^ [i]); while typeOf (adrScript^) == addressType { adrScript = adrScript^}; adrScript^ ()}} \ No newline at end of file Index: control2Click =================================================================== RCS file: /cvsroot/frontierkernel/odbs/frontierRoot/system/callbacks/control2Click,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** control2Click 26 Mar 2005 19:41:19 -0000 1.1.1.1 --- control2Click 19 Jun 2005 03:55:46 -0000 1.2 *************** *** 1,3 **** FrontierVcsFile:1:scpt:system.callbacks.control2Click ! on control2Click (name) { ÇThis script is called when: ÇOn Windows, you alt-2click some text. ÇOn Macintosh, you control-2click some text. ÇCall into user.callbacks.control2Click ÇCallback script returns true if it handles the click. ÇOtherwise, this script handles the click. ÇChanges: ÇThursday, September 28, 2000 at 6:05:24 PM by JES ÇAllow callbacks to be addresses or addresses of addresses... local (i); if not defined (user.callbacks.control2Click) { new (tableType, @user.callbacks.control2Click)}; for i = 1 to sizeOf (user.callbacks.control2Click) { try { local (adrScript = @user.callbacks.control2Click [i]); while typeOf (adrScript^) == addressType { adrScript = adrScript^}; if adrScript^ (n... [truncated message content] |
|
From: creedon <icr...@us...> - 2005-06-19 03:52:32
|
Update of /cvsroot/frontierkernel/odbs/frontierRoot/system/verbs/builtins/Frontier In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25628 Added Files: createUserCallbacksSubtable Log Message: a script for creating the full path to user.callbacks subtables, used by scripts at system.callbacks --- NEW FILE: createUserCallbacksSubtable --- (This appears to be a binary file; contents omitted.) |
|
From: creedon <icr...@us...> - 2005-06-19 02:18:32
|
Update of /cvsroot/frontierkernel/odbs/frontierRoot/system/verbs/builtins/webserver/data/responders/default In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13973 Added Files: methods Log Message: arg... minor frustration with CVS, this was a file, then I wanted it to be a directory, ended up encoding the table, which is probably ok as the table only has one item --- NEW FILE: methods --- FrontierVcsFile:1:tabl (data):system.verbs.builtins.webserver.data.responders.default.methods AAEDAQAAAPUAAAAaAAMAAL3PWKq94kajAAAAAAAAAAANAAAAAAQDYW55AAAAzwABBAAAAgAAAAwAAABHAAACAAAPBkdlbmV2YQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAC9z1jAvc9Y3AAAAAQAAAArAAMAjwHaTEFORP///////wAAAAAAAG1hYyAAAAAAAAAAAAAAAABvbiBhbnkgKGFkclBhcmFtVGFibGUpDQlyZXR1cm4gKG1haW5SZXNwb25kZXIucmVzcG9uZCAoYWRyUGFyYW1UYWJsZSkpDYAAAAAAAIAAAAAAAAAQAFYGR2VuZXZhAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4AAAAAAAAAAwAAAPkAXQBcAGQAZAGkAkQAAAAAAAAAAAAAAAAAAAAAAAAAAAAA |
|
From: creedon <icr...@us...> - 2005-06-18 23:47:32
|
Update of /cvsroot/frontierkernel/odbs/frontierRoot/system/verbs/builtins/webserver/data/responders/default In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9424 Removed Files: methods Log Message: mainResponder is now the default responder, these items were part of the previous default responder --- methods DELETED --- |
Update of /cvsroot/frontierkernel/odbs/frontierRoot/system/verbs/builtins/webserver/data/responders/default/data/docTree In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9389 Removed Files: aScript icons cactus userlandwords someText otherText Log Message: mainResponder is now the default responder, these items were part of the previous default responder --- cactus DELETED --- --- userlandwords DELETED --- --- icons DELETED --- --- otherText DELETED --- --- aScript DELETED --- --- someText DELETED --- |