]> sipb.mit.edu Git - ikiwiki.git/blobdiff - doc/plugins/write.mdwn
revert renamepage's hook original name
[ikiwiki.git] / doc / plugins / write.mdwn
index 7ba01ae53f1d796bf31677183492a82d485849a0..98372b33de3fb14857fc97c5a212ed000f0eac55 100644 (file)
@@ -321,28 +321,15 @@ This hook should avoid directly redirecting the user to a signin page,
 since it's sometimes used to test to see which pages in a set of pages a
 user can edit.
 
-### cansave
-
-       hook(type => "cansave", id => "foo", call => \&cansave);
-
-This hook can be used to implement arbitrary access methods to control
-when a page being edited can be saved using the web interface (commits
-from revision control bypass it).
-
-When a page is about to be saved, each registered cansave hook is
-called in turn, and passed the page name, the edited content, a CGI
-object and a session object.
-
-The return value of a cansave hook is interpreted the same as for the
-canedit hook.
-
 ### canremove
 
        hook(type => "canremove", id => "foo", call => \&canremove);
 
-This hook can be used to implement arbitrary access methods to control when
-a page can be removed using the web interface (commits from revision control
-bypass it). It works exactly like the `canedit` hook.
+This hook can be used to implement arbitrary access methods to control
+when a page can be removed using the web interface (commits from
+revision control bypass it). It works exactly like the `canedit` hook,
+but is passed the named parameters `cgi` (a CGI object), `session`
+(a session object) and `page` (the page subject to deletion).
 
 ### canrename
 
@@ -350,11 +337,9 @@ bypass it). It works exactly like the `canedit` hook.
 
 This hook can be used to implement arbitrary access methods to control when
 a page can be renamed using the web interface (commits from revision control
-bypass it). It works exactly like the `canedit` and `canremove` hook,
-but is passed:
-* a CGI object
-* a session object
-* the named parameters `src`, `srcfile`, `dest` and `destfile`.
+bypass it). It works exactly like the `canedit` hook,
+but is passed the named parameters `cgi` (a CGI object), `session` (a
+session object), `src`, `srcfile`, `dest` and `destfile`.
 
 ### checkcontent
        
@@ -416,9 +401,9 @@ This hook is called whenever ikiwiki normally saves its state, just before
 the state is saved. The function can save other state, modify values before
 they're saved, etc.
 
-### renamelink
+### renamepage
 
-       hook(type => "renamelink", id => "foo", call => \&renamelink);
+       hook(type => "renamepage", id => "foo", call => \&renamepage);
 
 This hook is called by the [[plugins/rename]] plugin when it renames
 something, once per page linking to the renamed page's old location.
@@ -576,10 +561,6 @@ the id can be controled by the user.
 Logs a debugging message. These are supressed unless verbose mode is turned
 on.
 
-#### `warning($)`
-
-Logs a warning message.
-
 #### `error($;$)`
 
 Aborts with an error message. If the second parameter is passed, it is a