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

Home

What's new

Bayly.Root

Cornershop Plugin

Career

edutools Root

Enhancements

Interests

linguist Plugin

Manila

Patches

space

mainresponder

manilaData

manilamacros

manilaSuite

space
space

admin

backups

discuss

gems

getCanonicalSiteName

hierarchyPage

hosting

html

mail

member

members

news

plugins

prefs

referer

renderNewsPage

rpcHandlers

rpcUtils

search

sendMail

siteStructure

staticRendering

storyList

space

system

Patches by Group

Papers

Sales

Sign My Guestbook

User(land) Relations.

Contact Address

Search Baylys

urlchains

space
Join Now
Login
space space space

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.
  «Changes:
 unaltered lines omitted
 
  «JES 5/17/03: support static rendering
  if string (adrsite) endswith ".[\"#newsSite\"].staticSite"
 unaltered lines omitted
 
  local (pta)
  if flUseCache
 unaltered lines omitted
 
  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
 unaltered lines omitted
  if defined (config.manila.sites.[siteTableName]) //next best case: site's table is fooManilaWebsite and entry in config.manila.sites is named the same
 unaltered lines omitted
  if string.lower (siteTableName) endswith "website"
 unaltered lines omitted
 
  «The above were the common and best cases. If they failed, loop through config.manila.sites.
  local (adr)
  for adr in @config.manila.sites
 unaltered lines omitted
 
  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