|
|
 |
 |
 |
manilaSuite.getCanonicalSiteName
Fix a bug where sites defined but not currently open, crash this script.
| on getCanonicalSiteName (adrSite, flUseCache=true) |
| |
«Get the canonical name for a site. Started by AR 01/12/00. |
| |
«JES 5/17/03: support static rendering |
| |
if string (adrsite) endswith ".[\"#newsSite\"].staticSite" |
| |
local (siteTableName = nameOf (adrSite^)) |
| |
local (shortSiteName = manilaSuite.getShortSiteName (siteTableName)) |
| |
if defined (config.manila.sites.[shortSiteName]) //site's table is fooManilaWebsite, and entry in config.manila.sites is named foo |
| |
if defined (config.manila.sites.[siteTableName]) //next best case: site's table is fooManilaWebsite and entry in config.manila.sites is named the same |
| |
if string.lower (siteTableName) endswith "website" |
| |
«The above were the common and best cases. If they failed, loop through config.manila.sites. |
| |
for adr in @config.manila.sites |
| |
scripterror ("Can't get the name of this site because there is no address in config.manila.sites pointing to this Manila site.") |
Relative to Frontier version 9.7b10
|