UseModWiki | RecentChanges | Preferences

See also Functions, UseModWiki/DeveloperQuestions

This function is the main function we call to browse a page

Called by: DoWikiRequest Returns:

If the customer didn't give us any parameters at all, we BrowsePage the homepage of the wiki and return 1 (true).

If they did give us a parameter, we have to figure out what to do.

We call GetParam("keywords", "") and if this gives us an $id back, we BrowsePage that page (if ValidIdOrDie , that is) and return 1 (true).

Otherwise, if we didn't end up returning by now, we check to see if this is an action by calling GetParam("action", "") and GetParam("id", "").

The action can be any of these:

browse -- in which case we BrowsePage the id
rc -- in which case we BrowsePage this RCName (how do we know this?)
random -- in which case we DoRandom (to end up browsing a random page)
history -- in which case we DoHistory

If none of those things work out, we return 0 (false).

The caller function, DoWikiRequest then moves on to call DoOtherRequest, and other actions are considered there (eg action=version, etc.)

See also System and Actions for a full list of parameter commands.

UseModWiki | RecentChanges | Preferences
Edit text of this page | View other revisions | Search MetaWiki
Last edited May 13, 2004 9:38 am by (diff)