NOTE: If you are a developer, please use a private wiki based on foswiki/trunk on a daily base ...or use
trunk.foswiki.org to view this page for some minimal testing.
Use
Item9693 for docu changes for 1.2 and 2.0.
Item8248: AutoViewTemplatePlugin does not work on foswiki/trunk (patch available)
... as it makes use of unpublished API's and those have been changed. In addition the below patch fixes the Config.spec to fit nicely into the new
configure interface. Oliver, can you please check?
Index: lib/Foswiki/Plugins/AutoViewTemplatePlugin.pm
===================================================================
--- lib/Foswiki/Plugins/AutoViewTemplatePlugin.pm (revision 4669)
+++ lib/Foswiki/Plugins/AutoViewTemplatePlugin.pm (working copy)
@@ -99,7 +99,11 @@
Foswiki::Func::writeDebug("- ${pluginName}: $templateVar set to: $templateName");
}
}
- $Foswiki::Plugins::SESSION->{prefs}->pushPreferenceValues( 'SESSION', { $templateVar => $templateName } );
+ if ($Foswiki::Plugins::VERSION >= 2.1 ) {
+ Foswiki::Func::setPreferencesValue($templateVar, $templateName);
+ } else {
+ $Foswiki::Plugins::SESSION->{prefs}->pushPreferenceValues( 'SESSION', { $templateVar => $templateName } );
+ }
# Plugin correctly initialized
return 1;
Index: lib/Foswiki/Plugins/AutoViewTemplatePlugin/Config.spec
===================================================================
--- lib/Foswiki/Plugins/AutoViewTemplatePlugin/Config.spec (revision 4669)
+++ lib/Foswiki/Plugins/AutoViewTemplatePlugin/Config.spec (working copy)
@@ -1,14 +1,15 @@
-# ---+ AutoViewTemplate settings
-# This is the configuration used by the <b>AutoViewTemplatePlugin</b>.
-
-# **BOOLEAN**
-# Turn on/off debugging in debug.txt
-$Foswiki::cfg{Plugins}{AutoViewTemplatePlugin}{Debug} = 0;
-
-# **BOOLEAN**
-# Override existing VIEW_TEMPLATE settings in doubt.
-$Foswiki::cfg{Plugins}{AutoViewTemplatePlugin}{Override} = 0;
-
-# **SELECT exist,section**
-# Where to find the template to be used.
-$Foswiki::cfg{Plugins}{AutoViewTemplatePlugin}{Mode} = 'exist';
\ No newline at end of file
+# ---+ Extensions
+# ---++ AutoViewTemplate settings
+# This is the configuration used by the <b>AutoViewTemplatePlugin</b>.
+
+# **BOOLEAN**
+# Turn on/off debugging in debug.txt
+$Foswiki::cfg{Plugins}{AutoViewTemplatePlugin}{Debug} = 0;
+
+# **BOOLEAN**
+# Override existing VIEW_TEMPLATE settings in doubt.
+$Foswiki::cfg{Plugins}{AutoViewTemplatePlugin}{Override} = 0;
+
+# **SELECT exist,section**
+# Where to find the template to be used.
+$Foswiki::cfg{Plugins}{AutoViewTemplatePlugin}{Mode} = 'exist';
--
MichaelDaum - 20 Aug 2009
Michael, please go ahead and just check it in. Thanks for the patch.
--
OliverKrueger - 20 Aug 2009