Skip to content

Commit

Permalink
Item13897: Minor changes to PerlDoc
Browse files Browse the repository at this point in the history
 - Show smells was based upon public/private instead of guest / logged
 - Fix some typos in Foswiki::App, and organize the headings a bit.
  • Loading branch information
gac410 committed Oct 18, 2016
1 parent e3423f4 commit c442117
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 10 deletions.
15 changes: 9 additions & 6 deletions core/lib/Foswiki/App.pm
Expand Up @@ -591,7 +591,7 @@ sub handleRequest {

=begin TML
--++ ObjectMethod create($className, %initArgs)
---++ ObjectMethod create($className, %initArgs)
Creates a new object of class =$className=. If the class does =Foswiki::App=
role then constructor gets called with =app= key pointing to the Foswiki::App
Expand Down Expand Up @@ -1915,6 +1915,7 @@ sub popTopicContext {

=begin TML
---++ API Methods - User related
---+++ ObjectMethod getDefaultUserName -> $loginName
Get default user name as defined in the configuration as =DefaultUserLogin=
Expand Down Expand Up @@ -2172,6 +2173,7 @@ sub isAnAdmin {

=begin TML
---++ API Methods - Group related
---+++ ObjectMethod isGroupMember( $group, $id, $options ) -> $boolean
Find out if $id is in the named group. The expand option controls whether or not nested groups are searched.
Expand Down Expand Up @@ -2269,7 +2271,7 @@ sub eachMembership {

=begin TML
---+++ eachGroupMember($group) -> $iterator
---+++ ObjectMethod eachGroupMember($group) -> $iterator
Get an iterator over all the members of the named group. Returns undef if
$group is not a valid group. Nested groups are expanded unless the
expand option is set to false.
Expand Down Expand Up @@ -2310,7 +2312,7 @@ sub eachGroupMember {

=begin TML
---+++ addUserToGroup( $id, $group, $create ) -> $boolean
---+++ ObjectMethod addUserToGroup( $id, $group, $create ) -> $boolean
* $id can be a login name or a WikiName
Expand All @@ -2332,7 +2334,7 @@ sub addUserToGroup {

=begin TML
---+++ removeUserFromGroup( $group, $id ) -> $boolean
---+++ ObjectMethod removeUserFromGroup( $group, $id ) -> $boolean
* $id can be a login name or a WikiName
Expand All @@ -2355,6 +2357,7 @@ sub removeUserFromGroup {

=begin TML
---++ API Methods - Web / Topic / Attachment - reading
---+++ ObjectMethod checkAccessPermission( $type, $id, $text, $topic, $web, $meta ) -> $boolean
Check access permission for a topic based on the
Expand Down Expand Up @@ -2780,7 +2783,7 @@ sub readAttachment {

=begin TML
---++ Manipulating
---++ API Methods - Web / Topic / Attachment - Manipulating
=cut

Expand Down Expand Up @@ -3789,7 +3792,7 @@ sub writeEvent {

=begin TML
---+++ ObjectMethof writeWarning( $text )
---+++ ObjectMethod writeWarning( $text )
Log a warning that may require admin intervention to the warnings log (=data/warn*.txt=)
* =$text= - Text to write; timestamp gets added
Expand Down
9 changes: 5 additions & 4 deletions core/lib/Foswiki/IncludeHandlers/doc.pm
Expand Up @@ -93,11 +93,11 @@ sub INCLUDE {
_With => $withRx . $paramsRx,
_FoswikiClass => $fwClassRx . $paramsRx,
(
$publicOnly # Don't even parse FIXME comments if public only mode.
? ()
: ( _FixmeComment =>
$showSmells # Don't even parse FIXME comments to non-admin users.
? ( _FixmeComment =>
'\n\h*?(?<commentLine>#\h*?(?<commentType>SMELL|TODO|FIXME)\b\h*(?<commentText>.+?))(?=\n)'
)
)
: ()
),
},
);
Expand Down Expand Up @@ -353,6 +353,7 @@ sub _makeCtx {
. $rxStr . "/\n"
. Foswiki::Exception::errorStr($@) )
if $@;

return \%ctxData;
}

Expand Down

0 comments on commit c442117

Please sign in to comment.