LookupPublisherURL (open)

Find the (closest) file associated with a URL on this server

Syntax

LOADLIB "mod::publisher/lib/publisher.whlib";

RECORD FUNCTION LookupPublisherURL(STRING url, RECORD options)

Parameters

STRING url

URL to look up

RECORD options

Options

INTEGER clientwebserver

Optional ID of a specific webserver on which we should resolve this url

BOOLEAN matchproduction

Also look up sites based on their production url (live synced versions)

Return value

RECORD

A record describing our guess at the URL's location

INTEGER file

File ID.

INTEGER folder

Folder ID containing the URL. 0 if no site was hosting this folder

INTEGER site

Site ID. 0 if no site's webroot starts with this URL (not even through aliases)

INTEGER webserver

ID of the webserver associated with the URL (table system.webservers). 0 if the URL is not hosted here

Description

LookupPublisherURL finds the associated URL and is the implementation between the Publisher's "Goto URL" function. Preview and imagecache URLs are resolved back to the original file or folder.