Skip to content

Commit

Permalink
Item13625: Don't use INCLUDE warning as a template name
Browse files Browse the repository at this point in the history
  • Loading branch information
gac410 committed Aug 18, 2015
1 parent 32d326a commit 40b77a9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
@@ -1,4 +1,4 @@
%META:TOPICINFO{author="ProjectContributor" date="1437770082" format="1.1" version="1"}%
%META:TOPICINFO{author="ProjectContributor" date="1439917164" format="1.1" version="1"}%
---+ <nop>AutoViewTemplatePlugin
%SHORTDESCRIPTION%

Expand Down Expand Up @@ -77,6 +77,7 @@ The following settings can be defined in configure
%JQREQUIRE{"chili"}%
-->
| Change History: | <!-- versions below in reverse order -->&nbsp; |
| 18 Aug 2015: | Item13625: AutoViewTemplatePlugin: reports Invalid template name ( Warning: Can't find named section viewtemplate in topic...) when used in "section" mode and no section exists. |
| 24 Jul 2015: | Released with Foswiki 2.0.1. Foswikitask:Item13554: Warn if invalid template name generated. |
| 16 Dec 2012: | Version released with Foswiki 1.1.7. Foswikitask:Item12297: Minor perllcritic change.|
| 10 Apr 2011: | Version released with Foswiki 1.1.3. Only a minor change related to how the plugin is being upgraded |
Expand Down
Expand Up @@ -5,8 +5,8 @@ use strict;
use warnings;
use vars qw( $debug $mode $override $isEditAction $pluginName);

our $VERSION = '1.21';
our $RELEASE = '2015-07-24';
our $VERSION = '1.22';
our $RELEASE = '2015-08-18';
our $SHORTDESCRIPTION = 'Automatically sets VIEW_TEMPLATE and EDIT_TEMPLATE';
our $NO_PREFS_IN_TOPIC = 1;

Expand Down Expand Up @@ -142,7 +142,7 @@ sub _getTemplateFromSectionInclude {
# SMELL: This can be done much faster, if the formdefinition topic is read directly
my $sectionName = $isEditAction ? 'edittemplate' : 'viewtemplate';
my $templateName =
"%INCLUDE{ \"$formweb.$formtopic\" section=\"$sectionName\"}%";
"%INCLUDE{ \"$formweb.$formtopic\" section=\"$sectionName\" warn=\"off\"}%";
$templateName =
Foswiki::Func::expandCommonVariables( $templateName, $topic, $web );

Expand Down Expand Up @@ -174,7 +174,7 @@ __END__
Foswiki - The Free and Open Source Wiki, http://foswiki.org/
Copyright (C) 2008 Oliver Krueger <oliver@wiki-one.net>
Copyright (C) 2008-2014 Foswiki Contributors. Foswiki Contributors
Copyright (C) 2008-2015 Foswiki Contributors. Foswiki Contributors
are listed in the AUTHORS file in the root of this distribution.
NOTE: Please extend that file, not this notice.
Expand Down

0 comments on commit 40b77a9

Please sign in to comment.