From: <de...@de...> - 2012-10-17 07:11:00
|
Author: HideyoImazu Date: 2012-10-17 02:10:49 -0500 (Wed, 17 Oct 2012) New Revision: 23675 Trac url: http://develop.twiki.org/trac/changeset/23675 Modified: twiki/trunk/LdapNgPlugin/data/TWiki/LdapNgPlugin.txt twiki/trunk/LdapNgPlugin/lib/TWiki/Plugins/LdapNgPlugin/Core.pm Log: Item6986: ifnull parameter has been renamed to default. Modified: twiki/trunk/LdapNgPlugin/data/TWiki/LdapNgPlugin.txt =================================================================== --- twiki/trunk/LdapNgPlugin/data/TWiki/LdapNgPlugin.txt 2012-10-17 03:21:41 UTC (rev 23674) +++ twiki/trunk/LdapNgPlugin/data/TWiki/LdapNgPlugin.txt 2012-10-17 07:10:49 UTC (rev 23675) @@ -1,4 +1,4 @@ -%META:TOPICINFO{author="TWikiContributor" date="1350294385" format="1.1" version="$Rev$"}% +%META:TOPICINFO{author="TWikiContributor" date="1350457011" format="1.1" version="$Rev$"}% ---+!! <nop>%TOPIC% <!-- Contributions to this plugin are appreciated. Please update the plugin page @@ -41,7 +41,7 @@ * =skip=: number of records in the hit set to skip before displaying them; default: 0 * =required=: a comma separated list of LDAP record attributes. If specified, the LDAP query results not having all of the specified attributes are eliminated * =hidenull=: wether to hide any output on an empty hit set; possible values: on, off; default: off - * =ifnull=: when the LDAP query yields no results, the value of this parameter is returned as the search result instead of null. Naturally, if =hidenull= is on, =ifnull= doesn't have any effect + * =default=: when the LDAP query yields no results, the value of this parameter is returned as the search result instead of null. Naturally, if =hidenull= is on, =default= doesn't have any effect * =clear=: comma separated list of attributes to be removed from the output if they are not resolved Cgi Parameters: @@ -185,8 +185,9 @@ | Plugin Author: | TWiki:Main.MichaelDaum | | Copyright: | © 2006-2007 Michael Daum http://wikiring.de <br /> © 2006-2012 TWiki:Main.TWikiContributors | | License: | GPL ([[http://www.gnu.org/copyleft/gpl.html][GNU General Public License]]) | -| Plugin Version: | 2012-10-15 | +| Plugin Version: | 2012-10-17 | | Change History: | <!-- versions below in reverse order --> | +| 2012-10-17: | TWikibug:Item6986: the =ifnull= parameter has been renamed to =default= | | 2012-10-15: | TWikibug:Item6986: Enhancements and code clean-up | | 2011-01-14: | TWikibug:Item6530: Doc improvements | | 2010-04-25: | TWikibug:Item6433: Doc improvements | Modified: twiki/trunk/LdapNgPlugin/lib/TWiki/Plugins/LdapNgPlugin/Core.pm =================================================================== --- twiki/trunk/LdapNgPlugin/lib/TWiki/Plugins/LdapNgPlugin/Core.pm 2012-10-17 03:21:41 UTC (rev 23674) +++ twiki/trunk/LdapNgPlugin/lib/TWiki/Plugins/LdapNgPlugin/Core.pm 2012-10-17 07:10:49 UTC (rev 23675) @@ -52,8 +52,8 @@ my $theHideNull = TWiki::Func::isTrue($params->{hidenull}, 0); my $theClear = $params->{clear} || ''; my $theRefresh = TWiki::Func::isTrue($query->param('refresh'), 0); - my $theIfNull = $params->{ifnull}; - $theIfNull = '' unless ( defined($theIfNull) ); + my $theDefault = $params->{default}; + $theDefault = '' unless ( defined($theDefault) ); my $theRequired = $params->{required}; $theRequired = '' unless ( defined($theRequired) ); @@ -107,7 +107,7 @@ } ); if ( ref $helperResult ) { - return $theIfNull if ( @$helperResult == 0 && $theHideNull ); + return $theDefault if ( @$helperResult == 0 && $theHideNull ); $count = @entries = @$helperResult; $entriesSet = 1; } @@ -134,7 +134,7 @@ } $count = $search->count(); - return $theIfNull if ($count <= $theSkip) && $theHideNull; + return $theDefault if ($count <= $theSkip) && $theHideNull; @entries = $search->sorted(@theSort); } @@ -173,7 +173,7 @@ } $ldap->finish() unless ( $TWiki::cfg{Plugins}{LdapNgPlugin}{UseDefaultServer} ); - my $result = @results ? join($theSep, @results) : $theIfNull; + my $result = @results ? join($theSep, @results) : $theDefault; $theHeader = expandVars($theHeader,count=>$count) if $theHeader; $theFooter = expandVars($theFooter,count=>$count) if $theFooter; |