|
From: <cre...@us...> - 2007-05-22 00:37:17
|
Revision: 1658
http://svn.sourceforge.net/frontierkernel/?rev=1658&view=rev
Author: creecode
Date: 2007-05-21 17:37:17 -0700 (Mon, 21 May 2007)
Log Message:
-----------
fix for imageCowSkull url in #urls table not being changed
support site glossary
Modified Paths:
--------------
ODBs/trunk/mainResponderRoot/mainResponder/utilities/installSite.fvc
Modified: ODBs/trunk/mainResponderRoot/mainResponder/utilities/installSite.fvc
===================================================================
--- ODBs/trunk/mainResponderRoot/mainResponder/utilities/installSite.fvc 2007-05-01 16:04:10 UTC (rev 1657)
+++ ODBs/trunk/mainResponderRoot/mainResponder/utilities/installSite.fvc 2007-05-22 00:37:17 UTC (rev 1658)
@@ -1,88 +1,108 @@
-FrontierVcsFile:1:scpt:mainResponder.utilities.installSite
+FrontierVcsFile:3:scpt:mainResponder.utilities.installSite
-on installSite (adrSite, siteName, oldUrl, newUrl, flNotifySiteInstalled = true, flForceSiteTree = false) {
- \xC7Changes
- \xC72/10/06; 12:55:21 PM by TAC
- \xC7update navigation
- \xC72/9/06; 1:27:42 PM by TAC
- \xC7created, factored from mainResponder.menuCommands.installMainResponderSite
+on installSite ( adrSite, siteName, oldUrl, newUrl, flNotifySiteInstalled = true, flForceSiteTree = false ) {
- config.mainresponder.sites.[siteName] = adrSite;
+ «Changes
+ «5/21/07; 5:07:43 PM by TAC
+ «fix for imageCowSkull url in #urls table not being changed
+ «support site glossary
+ «2/10/06; 12:55:21 PM by TAC
+ «update navigation
+ «2/9/06; 1:27:42 PM by TAC
+ «created, factored from mainResponder.menuCommands.installMainResponderSite
- [system.temp.mainResponder.discussRootFile].[adrSite^.["#prefs"].discussionRoot] = @adrSite^.["#discussionGroup"];
+ config.mainresponder.sites.[ siteName ] = adrSite;
- [system.temp.mainResponder.membersRootFile].[adrSite^.["#prefs"].defaultMembershipGroup] = @adrSite^.["#membershipGroup"];
+ [ system.temp.mainResponder.discussRootFile ].[ adrSite^.[ "#prefs" ].discussionRoot ] = @adrSite^.[ "#discussionGroup" ];
- if not (newUrl endsWith "/") {
+ [ system.temp.mainResponder.membersRootFile ].[ adrSite^.[ "#prefs" ].defaultMembershipGroup ] = @adrSite^.[ "#membershipGroup" ];
+
+ if not ( newUrl endsWith "/" ) {
newUrl = newUrl + "/"};
- if not (string.lower (newUrl) beginsWith "http://") {
+ if not ( string.lower ( newUrl ) beginsWith "http://" ) {
newUrl = "http://" + newUrl};
- adrSite^.["#discussionGroup"].prefs.adrMsgReader = @adrSite^.discussionGroup.messageReader;
+ adrSite^.[ "#discussionGroup" ].prefs.adrMsgReader = @adrSite^.discussionGroup.messageReader;
- if string.lower (oldUrl) != string.lower (newUrl) { // change url
- adrSite^.["#ftpSite"].url = string.replace (adrSite^.["#ftpSite"].url, oldUrl, newUrl);
+ if string.lower ( oldUrl ) != string.lower ( newUrl ) { // change url
+ adrSite^.[ "#ftpSite" ].url = string.replace ( adrSite^.[ "#ftpSite" ].url, oldUrl, newUrl );
- adrSite^.["#discussionGroup"].prefs.msgReaderUrl = string.replace (adrSite^.["#discussionGroup"].prefs.msgReaderUrl, oldUrl, newUrl);
+ adrSite^.[ "#discussionGroup" ].prefs.msgReaderUrl = string.replace ( adrSite^.[ "#discussionGroup" ].prefs.msgReaderUrl, oldUrl, newUrl );
- adrSite^.["#prefs"].search.siteUrl = string.replace (adrSite^.["#prefs"].search.siteUrl, oldUrl, newUrl);
+ adrSite^.[ "#prefs" ].search.siteUrl = string.replace ( adrSite^.[ "#prefs" ].search.siteUrl, oldUrl, newUrl );
- local (adr, s);
+ local ( adr, s );
- for adr in @adrSite^.["#urls"] {
- s = string.lower (nameOf (adr^));
-
+ for adr in @adrSite^.[ "#glossary" ] {
+ adr^ = string.replace ( adr^, oldUrl, newUrl )};
+
+ for adr in @adrSite^.[ "#urls" ] {
if adr^ == nil {
continue};
+ s = string.lower ( nameOf ( adr^ ) );
+
case s {
"discusseditinfrontier";
"memberhome" {
+ continue};
+ "imagecowskull" {
+ local ( newUrlParts = string.urlSplit ( newUrl ) );
+ local ( oldUrlParts = string.urlSplit ( oldUrl ) );
+ local ( newUrl = newUrlParts [ 1 ] + newUrlParts [ 2 ] + '/' );
+ local ( oldUrl = oldUrlParts [ 1 ] + oldUrlParts [ 2 ] + '/' );
+
+ adr^ = string.replace ( adr^, oldUrl, newUrl );
+
continue}};
- adr^ = string.replace (adr^, oldUrl, newUrl)};
+ adr^ = string.replace ( adr^, oldUrl, newUrl )};
bundle { // update navigation
- local (oldPath, newPath, structure);
+ local ( oldPath, newPath, structure );
bundle { // old path
- oldPath = string.urlSplit (oldUrl);
- oldPath = "/" + oldPath [3]};
+ oldPath = string.urlSplit ( oldUrl );
+ oldPath = "/" + oldPath [ 3 ]};
bundle { // new path
- newPath = string.urlSplit (newUrl);
- newPath = "/" + newPath [3]};
+ newPath = string.urlSplit ( newUrl );
+ newPath = "/" + newPath [ 3 ]};
- xml.compile (string (adrSite^.["#navigator"].outline), @structure);
+ xml.compile ( string ( adrSite^.[ "#navigator" ].outline ), @structure );
- for adr in @structure [1] {
- adr^.["/atts"].pagename = string.replace (adr^.["/atts"].pagename, oldPath, newPath)};
+ for adr in @structure [ 1 ] {
+ adr^.[ "/atts" ].pagename = string.replace ( adr^.[ "/atts" ].pagename, oldPath, newPath )};
- s = xml.decompile (@structure);
- s = string.delete (s, 1, string.patternMatch ('\n', s));
+ s = xml.decompile ( @structure );
+ s = string.delete ( s, 1, string.patternMatch ( '\n', s ) );
- op.newOutlineObject (s, @adrSite^.["#navigator"].outline)}};
+ op.newOutlineObject ( s, @adrSite^.[ "#navigator" ].outline )}};
try { // config.mainResponder.domains
- local (url = adrSite^.["#ftpSite"].url);
- local (urlParts = string.urlSplit (url));
- local (path = urlParts [3]);
- local (domain = string.lower (urlParts [2]));
+ local ( url = adrSite^.[ "#ftpSite" ].url );
+ local ( urlParts = string.urlSplit ( url ) );
+ local ( path = urlParts [ 3 ] );
+ local ( domain = string.lower ( urlParts [ 2 ] ) );
- if sizeOf (path) > 0 or flForceSiteTree {
- if not defined (config.mainResponder.domains.[domain]) { // use default domain
+ if sizeOf ( path ) > 0 or flForceSiteTree {
+ if not defined ( config.mainResponder.domains.[ domain ] ) { // use default domain
domain = "default"};
- mainResponder.siteTree.addSiteToTree (domain, path, adrSite, false, true)}
+ mainResponder.siteTree.addSiteToTree ( domain, path, adrSite, false, true )}
else { // top-level site
- if not defined (config.mainResponder.domains.[domain]) {
- config.mainResponder.domains.[domain] = adrSite}}};
+ if not defined ( config.mainResponder.domains.[ domain ] ) {
+ config.mainResponder.domains.[ domain ] = adrSite}}};
if flNotifySiteInstalled {
- dialog.notify ("The mainResponder website \"" + siteName + "\" has been installed.")}};
+ dialog.notify ( "The mainResponder website \"" + siteName + "\" has been installed." )}};
-\xC7bundle // testing
- \xC7installSite (@myFirstMainresponderWebsiteMrWs, "myFirstMainresponderWebsite", "http://127.0.0.1/myFirstMainresponderWebsite/", "http://127.0.0.1/", false, true)
- \xC7installSite (@myFirstMainresponderWebsiteMrWs, "myFirstMainresponderWebsite", "http://127.0.0.1/", "http://127.0.0.1/myFirstMainresponderWebsite/", false, true)
- \xC7installSite (@sampleMrWs, "sample", "http://127.0.0.1/", "http://127.0.0.1/", false, true)
\ No newline at end of file
+«bundle // testing
+ «installSite ( @myFirstMainresponderWebsiteMrWs, "myFirstMainresponderWebsite", "http://127.0.0.1/myFirstMainresponderWebsite/", "http://127.0.0.1/", false, true )
+ «installSite ( @myFirstMainresponderWebsiteMrWs, "myFirstMainresponderWebsite", "http://127.0.0.1/", "http://127.0.0.1/myFirstMainresponderWebsite/", false, true )
+ «installSite ( @sampleMrWs, "sample", "http://127.0.0.1/", "http://127.0.0.1/", false, true )
+ «installSite ( @localDocserverMrWs, "localDocserver", "http://127.0.0.1/", "http://127.0.0.1:81/", false, true )
+ «installSite ( @localDocserverMrWs, "localDocserver", "http://127.0.0.1:81/", "http://127.0.0.1/", false, true )
+
+
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|