diff options
author | joey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071> | 2007-07-30 17:45:55 +0000 |
---|---|---|
committer | joey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071> | 2007-07-30 17:45:55 +0000 |
commit | d8fdc5e09a9decbe43a20be0e8b642b14bf654cd (patch) | |
tree | 97a980a75d568b2efc5df3d01d96ea4a38913ee1 | |
parent | bad740b94387d4289d6267715e09c2bedf1f210b (diff) |
web commit by http://ethan.betacantrips.com/: like this
-rw-r--r-- | doc/todo/cgi_hooks_get_session_objects.mdwn | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/doc/todo/cgi_hooks_get_session_objects.mdwn b/doc/todo/cgi_hooks_get_session_objects.mdwn new file mode 100644 index 000000000..85d37fe2b --- /dev/null +++ b/doc/todo/cgi_hooks_get_session_objects.mdwn @@ -0,0 +1,44 @@ +This patch gives CGI hooks access to the session object. This enables more +complicated CGI plugins (that require access control, for example). --Ethan + +<pre> +Index: IkiWiki/CGI.pm +=================================================================== +--- IkiWiki/CGI.pm (revision 3946) ++++ IkiWiki/CGI.pm (working copy) +@@ -636,7 +636,7 @@ + + $q=CGI->new; + +- run_hooks(cgi => sub { shift->($q) }); ++ run_hooks(cgi => sub { shift->($q, $session) }); + } + + my $do=$q->param('do'); +Index: IkiWiki/Plugin/search.pm +=================================================================== +--- IkiWiki/Plugin/search.pm (revision 3946) ++++ IkiWiki/Plugin/search.pm (working copy) +@@ -72,7 +72,7 @@ + estcfg(); + } #}}} + +-sub cgi ($) { #{{{ ++sub cgi ($$) { #{{{ + my $cgi=shift; + + if (defined $cgi->param('phrase') || defined $cgi->param("navi")) { +Index: IkiWiki/Plugin/poll.pm +=================================================================== +--- IkiWiki/Plugin/poll.pm (revision 3946) ++++ IkiWiki/Plugin/poll.pm (working copy) +@@ -74,7 +74,7 @@ + return "<div class=poll>$ret</div>"; + } # }}} + +-sub cgi ($) { #{{{ ++sub cgi ($$) { #{{{ + my $cgi=shift; + if (defined $cgi->param('do') && $cgi->param('do') eq "poll") { + my $choice=$cgi->param('choice'); +</pre>
\ No newline at end of file |