yuri/sputnik — pull request #3 by martina-if (2011-10-15 19:09:55+00:00)
Title: Fix URL generation (sputnik:make_url).

Now the "nice" urls are created with a valid query string:

http://localhost/wiki/sputnik/login?next=sputnik%2Fregister

instead of:

http://localhost/wiki/sputnik/login&next=sputnik%2Fregister

The config variable NICE_URL (string) has been changed to USE_NICE_URL
(boolean) and the following strategy has been used for creating the URL:

```
if USE_NICE_URL then
-- e.g. http://localhost/wiki/somepage.edit
url = BASE_URL + node_id + "." + action
else
-- put node_id + "." + action as a parameter
-- e.g. http://localhost/cgi-bin/sputnik.cgi?p=somepage.edit
url = self.config.BASE_URL
params["p"] = node
end
-- encode query string and create url
url = wsapi.request.methods:link(url, params)
```

Also, the index node content has been changed to explain the new config
variable.

**Note:** since this commit is necessary to use wsapi 1.5.

**More info:**
http://lists.luaforge.net/pipermail/sputnik-list/2011-August/thread.html
http://groups.google.com/group/sputnik-list/browse_thread/thread/ff3d0ba7f7665c7f