Skip to content

Commit

Permalink
Item12839: Indicate when options are undefined
Browse files Browse the repository at this point in the history
And add some descriptive info to the page.  Also fix the code to work on perl 5.8.8.

git-svn-id: http://svn.foswiki.org/trunk@17482 0b4bb1d4-4e5a-0410-9cc4-b2b747904278
  • Loading branch information
GeorgeClark authored and GeorgeClark committed Apr 4, 2014
1 parent 3c92735 commit 11cb9dc
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 8 deletions.
4 changes: 4 additions & 0 deletions core/data/System/InstalledPlugins.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ See %SYSTEMWEB%.SkinBrowser for an overview of the installed Skins.

---+++ Registered REST Handlers

This table shows all registered REST handler verbs by extension. =undef=
means the handler will use the default core handler security, which will be
changing in Foswiki 1.2

%RESTHANDLERS%


Expand Down
22 changes: 14 additions & 8 deletions core/lib/Foswiki/Plugins.pm
Original file line number Diff line number Diff line change
Expand Up @@ -413,15 +413,21 @@ DONE

foreach my $handler ( keys %$restHandlers ) {
$out .= "| $Foswiki::cfg{SystemWebName}.$handler | ||||\n";
foreach my $verb ( keys $restHandlers->{$handler} ) {
foreach my $verb ( keys %{ $restHandlers->{$handler} } ) {
my $method =
( defined $restHandlers->{$handler}{$verb}{http_allow} )
? $restHandlers->{$handler}{$verb}{http_allow}
: 'undef';
my $authenticate =
( defined $restHandlers->{$handler}{$verb}{authenticate} )
? $restHandlers->{$handler}{$verb}{authenticate}
: 'undef';
my $validate =
( defined $restHandlers->{$handler}{$verb}{validate} )
? $restHandlers->{$handler}{$verb}{validate}
: 'undef';
$out .=
"| | $verb | "
. ( $restHandlers->{$handler}{$verb}{http_allow} || 'any' )
. ' | '
. ( $restHandlers->{$handler}{$verb}{validate} || 'false' )
. ' | '
. ( $restHandlers->{$handler}{$verb}{authenticate} || 'false' )
. ' | '
"| | $verb | $method | $validate | $authenticate | "
. ( $restHandlers->{$handler}{$verb}{description} || '' )
. " |\n";
}
Expand Down

0 comments on commit 11cb9dc

Please sign in to comment.