See also Functions
This function is the main function we call to browse a page
Called by: DoWikiRequest
- 1 (true) if we manage to browse a page somehow.
- 0 (false) if we can't figure out what they want.
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
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.