Changeset 811
- Timestamp:
- 11/19/08 15:00:00 (3 years ago)
- Location:
- trunk
- Files:
-
- 3 added
- 73 edited
- 36 moved
-
BehaviourContrib/data/System (moved) (moved from trunk/BehaviourContrib/data/TWiki)
-
BehaviourContrib/lib/Foswiki (moved) (moved from trunk/BehaviourContrib/lib/TWiki)
-
BehaviourContrib/lib/Foswiki/Contrib/BehaviourContrib.pm (modified) (4 diffs)
-
BehaviourContrib/lib/Foswiki/Contrib/BehaviourContrib/MANIFEST (modified) (1 diff)
-
BehaviourContrib/lib/Foswiki/Contrib/BehaviourContrib/build.pl (modified) (1 diff)
-
BehaviourContrib/pub/System (moved) (moved from trunk/BehaviourContrib/pub/TWiki)
-
CommentPlugin/data/System (moved) (moved from trunk/CommentPlugin/data/TWiki)
-
CommentPlugin/lib/Foswiki (moved) (moved from trunk/CommentPlugin/lib/TWiki)
-
CommentPlugin/lib/Foswiki/Plugins/CommentPlugin.pm (modified) (7 diffs)
-
CommentPlugin/lib/Foswiki/Plugins/CommentPlugin/Comment.pm (modified) (10 diffs)
-
CommentPlugin/lib/Foswiki/Plugins/CommentPlugin/MANIFEST (modified) (1 diff)
-
CommentPlugin/lib/Foswiki/Plugins/CommentPlugin/build.pl (modified) (1 diff)
-
CommentPlugin/pub/System (moved) (moved from trunk/CommentPlugin/pub/TWiki)
-
CommentPlugin/test/unit/CommentPlugin/CommentPluginTests.pm (modified) (12 diffs)
-
EmptyPlugin/data/System (moved) (moved from trunk/EmptyPlugin/data/TWiki)
-
EmptyPlugin/lib/Foswiki (moved) (moved from trunk/EmptyPlugin/lib/TWiki)
-
EmptyPlugin/lib/Foswiki/Plugins/EmptyPlugin.pm (modified) (45 diffs)
-
EmptyPlugin/lib/Foswiki/Plugins/EmptyPlugin/MANIFEST (modified) (1 diff)
-
EmptyPlugin/lib/Foswiki/Plugins/EmptyPlugin/build.pl (modified) (2 diffs)
-
EmptyPlugin/test/unit/EmptyPlugin/EmptyPluginTests.pm (modified) (2 diffs)
-
InterwikiPlugin/data/System (moved) (moved from trunk/InterwikiPlugin/data/TWiki)
-
InterwikiPlugin/lib/Foswiki (moved) (moved from trunk/InterwikiPlugin/lib/TWiki)
-
InterwikiPlugin/lib/Foswiki/Plugins/InterwikiPlugin.pm (modified) (5 diffs)
-
InterwikiPlugin/lib/Foswiki/Plugins/InterwikiPlugin/MANIFEST (modified) (1 diff)
-
InterwikiPlugin/lib/Foswiki/Plugins/InterwikiPlugin/build.pl (modified) (1 diff)
-
JSCalendarContrib/data/System (moved) (moved from trunk/JSCalendarContrib/data/TWiki)
-
JSCalendarContrib/lib/Foswiki (moved) (moved from trunk/JSCalendarContrib/lib/TWiki)
-
JSCalendarContrib/lib/Foswiki/Contrib/JSCalendarContrib.pm (modified) (12 diffs)
-
JSCalendarContrib/lib/Foswiki/Contrib/JSCalendarContrib/MANIFEST (modified) (1 diff)
-
JSCalendarContrib/lib/Foswiki/Contrib/JSCalendarContrib/build.pl (modified) (2 diffs)
-
JSCalendarContrib/lib/Foswiki/Form/Date.pm (modified) (3 diffs)
-
JSCalendarContrib/pub/System (moved) (moved from trunk/JSCalendarContrib/pub/TWiki)
-
MailerContrib/data/System (moved) (moved from trunk/MailerContrib/data/TWiki)
-
MailerContrib/lib/Foswiki (moved) (moved from trunk/MailerContrib/lib/TWiki)
-
MailerContrib/lib/Foswiki/Contrib/MailerContrib.pm (modified) (28 diffs)
-
MailerContrib/lib/Foswiki/Contrib/MailerContrib/Change.pm (modified) (9 diffs)
-
MailerContrib/lib/Foswiki/Contrib/MailerContrib/CompatibilityHacks.pm (modified) (2 diffs)
-
MailerContrib/lib/Foswiki/Contrib/MailerContrib/Config.spec (modified) (1 diff)
-
MailerContrib/lib/Foswiki/Contrib/MailerContrib/MANIFEST (modified) (1 diff)
-
MailerContrib/lib/Foswiki/Contrib/MailerContrib/Subscriber.pm (modified) (7 diffs)
-
MailerContrib/lib/Foswiki/Contrib/MailerContrib/Subscription.pm (modified) (5 diffs)
-
MailerContrib/lib/Foswiki/Contrib/MailerContrib/TopicContext.pm (modified) (2 diffs)
-
MailerContrib/lib/Foswiki/Contrib/MailerContrib/UpData.pm (modified) (4 diffs)
-
MailerContrib/lib/Foswiki/Contrib/MailerContrib/WebNotify.pm (modified) (22 diffs)
-
MailerContrib/lib/Foswiki/Contrib/MailerContrib/build.pl (modified) (1 diff)
-
MailerContrib/pub/System (moved) (moved from trunk/MailerContrib/pub/TWiki)
-
MailerContrib/test/unit/MailerContrib/MailerContribSuite.pm (modified) (32 diffs)
-
PatternSkin/data/System (moved) (moved from trunk/PatternSkin/data/TWiki)
-
PatternSkin/lib/Foswiki (moved) (moved from trunk/PatternSkin/lib/TWiki)
-
PatternSkin/lib/Foswiki/Contrib/PatternSkin.pm (modified) (1 diff)
-
PatternSkin/lib/Foswiki/Contrib/PatternSkin/MANIFEST (modified) (2 diffs)
-
PatternSkin/lib/Foswiki/Contrib/PatternSkin/build.pl (modified) (1 diff)
-
PatternSkin/pub/System (moved) (moved from trunk/PatternSkin/pub/TWiki)
-
PreferencesPlugin/data/System (moved) (moved from trunk/PreferencesPlugin/data/TWiki)
-
PreferencesPlugin/lib/Foswiki (moved) (moved from trunk/PreferencesPlugin/lib/TWiki)
-
PreferencesPlugin/lib/Foswiki/Plugins/PreferencesPlugin.pm (modified) (10 diffs)
-
PreferencesPlugin/lib/Foswiki/Plugins/PreferencesPlugin/MANIFEST (modified) (1 diff)
-
PreferencesPlugin/lib/Foswiki/Plugins/PreferencesPlugin/build.pl (modified) (1 diff)
-
PreferencesPlugin/test/unit/PreferencesPlugin/PreferencesPluginTests.pm (modified) (7 diffs)
-
TWikiCompatibilityPlugin/lib/TWiki/Func.pm (added)
-
TWikiCompatibilityPlugin/lib/TWiki/Plugins.pm (added)
-
TWikiCompatibilityPlugin/lib/TWiki/Plugins/TWikiCompatibilityPlugin/MANIFEST (modified) (1 diff)
-
TinyMCEPlugin/data/System (moved) (moved from trunk/TinyMCEPlugin/data/TWiki)
-
TinyMCEPlugin/lib/Foswiki (moved) (moved from trunk/TinyMCEPlugin/lib/TWiki)
-
TinyMCEPlugin/lib/Foswiki/Plugins/TinyMCEPlugin.pm (modified) (12 diffs)
-
TinyMCEPlugin/lib/Foswiki/Plugins/TinyMCEPlugin/MANIFEST (modified) (1 diff)
-
TinyMCEPlugin/lib/Foswiki/Plugins/TinyMCEPlugin/build.pl (modified) (1 diff)
-
TinyMCEPlugin/pub/System (moved) (moved from trunk/TinyMCEPlugin/pub/TWiki)
-
TopicUserMappingContrib/data/System (moved) (moved from trunk/TopicUserMappingContrib/data/TWiki)
-
TopicUserMappingContrib/lib/Foswiki (moved) (moved from trunk/TopicUserMappingContrib/lib/TWiki)
-
TopicUserMappingContrib/lib/Foswiki/Contrib/TopicUserMappingContrib.pm (modified) (1 diff)
-
TopicUserMappingContrib/lib/Foswiki/Contrib/TopicUserMappingContrib/Config.spec (modified) (1 diff)
-
TopicUserMappingContrib/lib/Foswiki/Contrib/TopicUserMappingContrib/MANIFEST (modified) (2 diffs)
-
TopicUserMappingContrib/lib/Foswiki/Contrib/TopicUserMappingContrib/build.pl (modified) (1 diff)
-
TopicUserMappingContrib/lib/Foswiki/Users/TopicUserMapping.pm (modified) (43 diffs)
-
TopicUserMappingContrib/pub/System (moved) (moved from trunk/TopicUserMappingContrib/pub/TWiki)
-
TopicUserMappingContrib/test/unit/TopicUserMappingContrib/TopicUserMappingContribTests.pm (modified) (19 diffs)
-
TopicUserMappingContrib/test/unit/TopicUserMappingContrib/TopicUserMappingTests.pm (modified) (12 diffs)
-
TopicUserMappingContrib/tools/upgrade_emails.pl (modified) (3 diffs)
-
TwistyContrib/data/System (moved) (moved from trunk/TwistyContrib/data/TWiki)
-
TwistyContrib/lib/Foswiki (moved) (moved from trunk/TwistyContrib/lib/TWiki)
-
TwistyContrib/lib/Foswiki/Contrib/TwistyContrib.pm (modified) (1 diff)
-
TwistyContrib/lib/Foswiki/Contrib/TwistyContrib/MANIFEST (modified) (1 diff)
-
TwistyContrib/lib/Foswiki/Contrib/TwistyContrib/build.pl (modified) (2 diffs)
-
TwistyContrib/pub/System (moved) (moved from trunk/TwistyContrib/pub/TWiki)
-
TwistyPlugin/data/System (moved) (moved from trunk/TwistyPlugin/data/TWiki)
-
TwistyPlugin/lib/Foswiki (moved) (moved from trunk/TwistyPlugin/lib/TWiki)
-
TwistyPlugin/lib/Foswiki/Plugins/TwistyPlugin.pm (modified) (7 diffs)
-
TwistyPlugin/lib/Foswiki/Plugins/TwistyPlugin/MANIFEST (modified) (2 diffs)
-
TwistyPlugin/lib/Foswiki/Plugins/TwistyPlugin/build.pl (modified) (1 diff)
-
TwistyPlugin/pub/System (moved) (moved from trunk/TwistyPlugin/pub/TWiki)
-
TwistyPlugin/test/unit/TwistyPlugin/TwistyPluginTests.pm (modified) (3 diffs)
-
WysiwygPlugin/data/System (moved) (moved from trunk/WysiwygPlugin/data/TWiki)
-
WysiwygPlugin/lib/Foswiki (moved) (moved from trunk/WysiwygPlugin/lib/TWiki)
-
WysiwygPlugin/lib/Foswiki/Plugins/WysiwygPlugin.pm (modified) (33 diffs)
-
WysiwygPlugin/lib/Foswiki/Plugins/WysiwygPlugin/Constants.pm (modified) (2 diffs)
-
WysiwygPlugin/lib/Foswiki/Plugins/WysiwygPlugin/HTML2TML.pm (modified) (8 diffs)
-
WysiwygPlugin/lib/Foswiki/Plugins/WysiwygPlugin/HTML2TML/Base.pm (modified) (5 diffs)
-
WysiwygPlugin/lib/Foswiki/Plugins/WysiwygPlugin/HTML2TML/Leaf.pm (modified) (4 diffs)
-
WysiwygPlugin/lib/Foswiki/Plugins/WysiwygPlugin/HTML2TML/Node.pm (modified) (8 diffs)
-
WysiwygPlugin/lib/Foswiki/Plugins/WysiwygPlugin/HTML2TML/WC.pm (modified) (1 diff)
-
WysiwygPlugin/lib/Foswiki/Plugins/WysiwygPlugin/MANIFEST (modified) (1 diff)
-
WysiwygPlugin/lib/Foswiki/Plugins/WysiwygPlugin/TML2HTML.pm (modified) (10 diffs)
-
WysiwygPlugin/lib/Foswiki/Plugins/WysiwygPlugin/build.pl (modified) (1 diff)
-
WysiwygPlugin/pub/System (moved) (moved from trunk/WysiwygPlugin/pub/TWiki)
-
WysiwygPlugin/test/unit/WysiwygPlugin/TranslatorTests.pm (modified) (9 diffs)
-
WysiwygPlugin/test/unit/WysiwygPlugin/WysiwygPluginSuite.pm (modified) (1 diff)
-
WysiwygPlugin/test/unit/WysiwygPlugin/WysiwygPluginTests.pm (modified) (11 diffs)
-
WysiwygPlugin/tools/html2tml.pl (modified) (1 diff)
-
WysiwygPlugin/tools/tml2html.pl (modified) (1 diff)
-
core/lib/Foswiki.pm (modified) (1 diff)
-
t2fos.sh (added)
Legend:
- Unmodified
- Added
- Removed
-
trunk/BehaviourContrib/lib/Foswiki/Contrib/BehaviourContrib.pm
r464 r811 1 package TWiki::Contrib::BehaviourContrib;1 package Foswiki::Contrib::BehaviourContrib; 2 2 use vars qw( $VERSION ); 3 3 $VERSION = '$Rev$'; … … 6 6 =begin twiki 7 7 8 ---+++ TWiki::Contrib::BehaviourContrib::addHEAD()8 ---+++ Foswiki::Contrib::BehaviourContrib::addHEAD() 9 9 10 10 This function will automatically add the headers for the contrib to … … 15 15 sub commonTagsHandler { 16 16 .... 17 require TWiki::Contrib::BehaviourContrib;18 TWiki::Contrib::BehaviourContrib::addHEAD();17 require Foswiki::Contrib::BehaviourContrib; 18 Foswiki::Contrib::BehaviourContrib::addHEAD(); 19 19 .... 20 20 </verbatim> … … 25 25 my $base = '%PUBURLPATH%/%SYSTEMWEB%/BehaviourContrib'; 26 26 my $USE_SRC = 27 TWiki::Func::getPreferencesValue('BEHAVIOURCONTRIB_DEBUG') ?27 Foswiki::Func::getPreferencesValue('BEHAVIOURCONTRIB_DEBUG') ? 28 28 '_src' : ''; 29 29 my $head = <<HERE; 30 30 <script type='text/javascript' src='$base/behaviour$USE_SRC.js'></script> 31 31 HERE 32 TWiki::Func::addToHEAD( 'BEHAVIOURCONTRIB', $head );32 Foswiki::Func::addToHEAD( 'BEHAVIOURCONTRIB', $head ); 33 33 } 34 34 -
trunk/BehaviourContrib/lib/Foswiki/Contrib/BehaviourContrib/MANIFEST
r14 r811 1 pub/ TWiki/BehaviourContrib/behaviour_src.js 06442 pub/ TWiki/BehaviourContrib/behaviour.js 06443 pub/ TWiki/BehaviourContrib/behaviour.compressed_src.js 06444 pub/ TWiki/BehaviourContrib/behaviour.compressed.js 06445 data/ TWiki/BehaviourContrib.txt 06446 lib/ TWiki/Contrib/BehaviourContrib.pm 06441 pub/System/BehaviourContrib/behaviour_src.js 0644 2 pub/System/BehaviourContrib/behaviour.js 0644 3 pub/System/BehaviourContrib/behaviour.compressed_src.js 0644 4 pub/System/BehaviourContrib/behaviour.compressed.js 0644 5 data/System/BehaviourContrib.txt 0644 6 lib/Foswiki/Contrib/BehaviourContrib.pm 0644 -
trunk/BehaviourContrib/lib/Foswiki/Contrib/BehaviourContrib/build.pl
r14 r811 9 9 } 10 10 11 use TWiki::Contrib::Build;11 use Foswiki::Contrib::Build; 12 12 13 13 # Create the build object 14 $build = new TWiki::Contrib::Build( 'BehaviourContrib' );14 $build = new Foswiki::Contrib::Build( 'BehaviourContrib' ); 15 15 16 16 # Build the target on the command line, or the default target -
trunk/CommentPlugin/lib/Foswiki/Plugins/CommentPlugin.pm
r781 r811 2 2 # 3 3 # Copyright (C) 2004 Crawford Currie 4 # Copyright (C) 2001-2006 TWiki Contributors. All Rights Reserved.5 # TWiki Contributors4 # Copyright (C) 2001-2006 Foswiki Contributors. All Rights Reserved. 5 # Foswiki Contributors 6 6 # are listed in the AUTHORS file in the root of this distribution. 7 7 # NOTE: Please extend that file, not this notice. … … 21 21 # See Plugin topic for history and plugin information 22 22 23 package TWiki::Plugins::CommentPlugin;23 package Foswiki::Plugins::CommentPlugin; 24 24 25 25 use strict; 26 26 27 require TWiki::Func;28 require TWiki::Plugins;27 require Foswiki::Func; 28 require Foswiki::Plugins; 29 29 30 30 use vars qw( $VERSION $RELEASE $SHORTDESCRIPTION $NO_PREFS_IN_TOPIC ); … … 45 45 #my ( $topic, $web, $user, $installWeb ) = @_; 46 46 47 if( $ TWiki::Plugins::VERSION < 1.026 ) {48 TWiki::Func::writeWarning( "CommentPlugin $VERSION requires TWiki::Plugins::VERSION >= 1.026, $TWiki::Plugins::VERSION found." );47 if( $Foswiki::Plugins::VERSION < 1.026 ) { 48 Foswiki::Func::writeWarning( "CommentPlugin $VERSION requires Foswiki::Plugins::VERSION >= 1.026, $Foswiki::Plugins::VERSION found." ); 49 49 return 0; 50 50 } … … 56 56 my ( $text, $topic, $web, $meta ) = @_; 57 57 58 require TWiki::Plugins::CommentPlugin::Comment;58 require Foswiki::Plugins::CommentPlugin::Comment; 59 59 60 my $query = TWiki::Func::getCgiQuery();60 my $query = Foswiki::Func::getCgiQuery(); 61 61 return unless( defined( $query )); 62 62 … … 67 67 # SMELL: unreliable 68 68 my $previewing = ($scriptname =~ /\/(preview|gnusave|rdiff)/); 69 TWiki::Plugins::CommentPlugin::Comment::prompt( $previewing,69 Foswiki::Plugins::CommentPlugin::Comment::prompt( $previewing, 70 70 $_[0], $web, $topic ); 71 71 } … … 74 74 #my ( $text, $topic, $web ) = @_; 75 75 76 require TWiki::Plugins::CommentPlugin::Comment;76 require Foswiki::Plugins::CommentPlugin::Comment; 77 77 78 my $query = TWiki::Func::getCgiQuery();78 my $query = Foswiki::Func::getCgiQuery(); 79 79 return unless $query; 80 80 … … 82 82 83 83 return unless( defined( $action ) && $action eq 'save' ); 84 TWiki::Plugins::CommentPlugin::Comment::save( @_ );84 Foswiki::Plugins::CommentPlugin::Comment::save( @_ ); 85 85 } 86 86 -
trunk/CommentPlugin/lib/Foswiki/Plugins/CommentPlugin/Comment.pm
r781 r811 2 2 # 3 3 # Copyright (C) 2004 Crawford Currie 4 # Copyright (C) 2001-2006 TWiki Contributors.5 # All Rights Reserved. TWiki Contributors4 # Copyright (C) 2001-2006 Foswiki Contributors. 5 # All Rights Reserved. Foswiki Contributors 6 6 # are listed in the AUTHORS file in the root of this distribution. 7 7 # NOTE: Please extend that file, not this notice. … … 23 23 # and again by Crawford Currie 24 24 # 25 # This version is specific to TWiki::Plugins::VERSION > 1.02625 # This version is specific to Foswiki::Plugins::VERSION > 1.026 26 26 27 27 use strict; 28 28 29 use TWiki;30 use TWiki::Plugins;31 use TWiki::Store;32 use TWiki::Attrs;29 use Foswiki; 30 use Foswiki::Plugins; 31 use Foswiki::Store; 32 use Foswiki::Attrs; 33 33 use CGI qw( -any ); 34 34 35 package TWiki::Plugins::CommentPlugin::Comment;35 package Foswiki::Plugins::CommentPlugin::Comment; 36 36 37 37 # PUBLIC save the given comment. … … 39 39 #my ( $text, $topic, $web ) = @_; 40 40 41 my $wikiName = TWiki::Func::getWikiName();42 if( ! TWiki::Func::checkAccessPermission( 'change', $wikiName, '',41 my $wikiName = Foswiki::Func::getWikiName(); 42 if( ! Foswiki::Func::checkAccessPermission( 'change', $wikiName, '', 43 43 $_[1], $_[2] ) ) { 44 44 # user has no permission to change the topic 45 throw TWiki::OopsException( 'accessdenied',45 throw Foswiki::OopsException( 'accessdenied', 46 46 def => 'topic_access', 47 47 web => $_[2], … … 56 56 #my ( $previewing, $text, $web, $topic ) = @_; 57 57 58 my $defaultType = TWiki::Func::getPreferencesValue('COMMENTPLUGIN_DEFAULT_TYPE') || 'above';58 my $defaultType = Foswiki::Func::getPreferencesValue('COMMENTPLUGIN_DEFAULT_TYPE') || 'above'; 59 59 60 60 my $message = ''; … … 84 84 if ( $attrtemplatetopic ) { 85 85 my ($templocweb, $temploctopic ) = 86 TWiki::Func::normalizeWebTopicName($templateweb, $attrtemplatetopic);86 Foswiki::Func::normalizeWebTopicName($templateweb, $attrtemplatetopic); 87 87 $templatetopic = "$templocweb.$temploctopic"; 88 88 } … … 97 97 $attributes =~ s/^{(.*)}$/$1/ if ( $attributes ); 98 98 99 my $attrs = new TWiki::Attrs( $attributes, 1 );99 my $attrs = new Foswiki::Attrs( $attributes, 1 ); 100 100 my $type = 101 101 $attrs->remove( 'type' ) || $attrs->remove( 'mode' ) || $defaultType; … … 143 143 my $url = ''; 144 144 if ( $disable eq '' ) { 145 $url = TWiki::Func::getScriptUrl( $web, $topic, 'save' );145 $url = Foswiki::Func::getScriptUrl( $web, $topic, 'save' ); 146 146 } 147 147 … … 213 213 # Get the templates. 214 214 my $templateFile = $templatetopic 215 || TWiki::Func::getPreferencesValue('COMMENTPLUGIN_TEMPLATES')215 || Foswiki::Func::getPreferencesValue('COMMENTPLUGIN_TEMPLATES') 216 216 || 'comments'; 217 217 218 218 my $templates = 219 TWiki::Func::loadTemplate( $templateFile );219 Foswiki::Func::loadTemplate( $templateFile ); 220 220 if (! $templates ) { 221 TWiki::Func::writeWarning("Could not read template file '$templateFile'");221 Foswiki::Func::writeWarning("Could not read template file '$templateFile'"); 222 222 return; 223 223 } 224 224 225 my $t = TWiki::Func::expandTemplate( $name );225 my $t = Foswiki::Func::expandTemplate( $name ); 226 226 return "%RED%No such template def TMPL:DEF{$name}%ENDCOLOR%" 227 227 unless ( defined($t) && $t ne '' ) || $warn eq 'off'; … … 244 244 my ( $topic, $web ) = ( $_[1], $_[2] ); 245 245 246 my $query = TWiki::Func::getCgiQuery();246 my $query = Foswiki::Func::getCgiQuery(); 247 247 return unless $query; 248 248 249 249 my $type = $query->param( 'comment_type' ) || 250 TWiki::Func::getPreferencesValue('COMMENTPLUGIN_DEFAULT_TYPE') ||250 Foswiki::Func::getPreferencesValue('COMMENTPLUGIN_DEFAULT_TYPE') || 251 251 'below'; 252 252 my $index = $query->param( 'comment_index' ) || 0; … … 270 270 # Expand common variables in the template, but don't expand other 271 271 # tags. 272 $output = TWiki::Func::expandVariablesOnTopicCreation($output);272 $output = Foswiki::Func::expandVariablesOnTopicCreation($output); 273 273 274 274 $output = '' unless defined($output); -
trunk/CommentPlugin/lib/Foswiki/Plugins/CommentPlugin/MANIFEST
r14 r811 1 data/ TWiki/CommentPlugin.txt 0644 Plugin doc page2 data/ TWiki/VarCOMMENT.txt 0644 Comment tag doc page3 data/ TWiki/CommentPluginTemplate.txt 0644 Standard templates4 data/ TWiki/CommentPluginExamples.txt 0644 Examples of standard templates1 data/System/CommentPlugin.txt 0644 Plugin doc page 2 data/System/VarCOMMENT.txt 0644 Comment tag doc page 3 data/System/CommentPluginTemplate.txt 0644 Standard templates 4 data/System/CommentPluginExamples.txt 0644 Examples of standard templates 5 5 data/Sandbox/CommentPluginExampleComments.txt 0644 Examples of target comment 6 6 data/Sandbox/CommentPluginTemplateExample.txt 0644 Example of comment template topic 7 7 templates/comments.tmpl 0444 Master comment templates 8 lib/ TWiki/Plugins/CommentPlugin.pm 0444 Plugin Perl module9 lib/ TWiki/Plugins/CommentPlugin/Comment.pm 0444 Plugin Perl module8 lib/Foswiki/Plugins/CommentPlugin.pm 0444 Plugin Perl module 9 lib/Foswiki/Plugins/CommentPlugin/Comment.pm 0444 Plugin Perl module 10 10 11 pub/ TWiki/CommentPlugin/wikiringlogo20x20.png 066011 pub/System/CommentPlugin/wikiringlogo20x20.png 0660 -
trunk/CommentPlugin/lib/Foswiki/Plugins/CommentPlugin/build.pl
r14 r811 8 8 } 9 9 } 10 use TWiki::Contrib::Build;10 use Foswiki::Contrib::Build; 11 11 12 @CommentPluginBuild::ISA = ( " TWiki::Contrib::Build" );12 @CommentPluginBuild::ISA = ( "Foswiki::Contrib::Build" ); 13 13 14 14 sub new { -
trunk/CommentPlugin/test/unit/CommentPlugin/CommentPluginTests.pm
r14 r811 8 8 use Unit::Request; 9 9 use Unit::Response; 10 use TWiki;11 use TWiki::UI::Save;12 use TWiki::Plugins::CommentPlugin;13 use TWiki::Plugins::CommentPlugin::Comment;10 use Foswiki; 11 use Foswiki::UI::Save; 12 use Foswiki::Plugins::CommentPlugin; 13 use Foswiki::Plugins::CommentPlugin::Comment; 14 14 use CGI; 15 15 … … 34 34 sub writeTopic { 35 35 my( $this, $web, $topic, $text ) = @_; 36 my $meta = new TWiki::Meta($this->{twiki}, $web, $topic);36 my $meta = new Foswiki::Meta($this->{twiki}, $web, $topic); 37 37 $this->{twiki}->{store}->saveTopic( 38 38 $this->{twiki}->{user}, $web, $topic, $text, $meta ); … … 69 69 } 70 70 71 my $url = "$ TWiki::cfg{DefaultUrlHost}$TWiki::cfg{ScriptUrlPath}/save$TWiki::cfg{ScriptSuffix}/$web/$topic";71 my $url = "$Foswiki::cfg{DefaultUrlHost}$Foswiki::cfg{ScriptUrlPath}/save$Foswiki::cfg{ScriptSuffix}/$web/$topic"; 72 72 73 73 if ( $location ) { … … 103 103 my $pidx = $eidx; 104 104 my $html = 105 TWiki::Plugins::CommentPlugin::Comment::_handleInput(105 Foswiki::Plugins::CommentPlugin::Comment::_handleInput( 106 106 $sattrs, 107 107 $this->{test_web}, … … 196 196 } 197 197 198 my $session = new TWiki( $TWiki::cfg{DefaultUserLoginName}, $query);198 my $session = new Foswiki( $Foswiki::cfg{DefaultUserLoginName}, $query); 199 199 my $text = "Ignore this text"; 200 200 201 201 # invoke the save handler 202 $this->capture(\& TWiki::UI::Save::save, $session );203 204 $text = TWiki::Func::readTopicText($web, $topic);202 $this->capture(\&Foswiki::UI::Save::save, $session ); 203 204 $text = Foswiki::Func::readTopicText($web, $topic); 205 205 $this->assert_matches(qr/$comm/, $text, "$web.$topic: $text"); 206 206 … … 278 278 my $pidx = 0; 279 279 my $html = 280 TWiki::Plugins::CommentPlugin::Comment::_handleInput280 Foswiki::Plugins::CommentPlugin::Comment::_handleInput 281 281 ("rows=99 cols=104 mode=after button=HoHo id=sausage",, 282 282 $this->{test_topic}, … … 296 296 my $pidx = 0; 297 297 my $html = 298 TWiki::Plugins::CommentPlugin::Comment::_handleInput298 Foswiki::Plugins::CommentPlugin::Comment::_handleInput 299 299 ("target=\"$this->{test_web}.ATopic#AAnchor\" location=\"AnRE\"", 300 300 $this->{test_topic}, … … 318 318 my $pidx = 0; 319 319 my $html = 320 TWiki::Plugins::CommentPlugin::Comment::_handleInput(320 Foswiki::Plugins::CommentPlugin::Comment::_handleInput( 321 321 'nopost="on"', 322 322 $this->{test_web}, … … 339 339 $query->path_info("/$this->{test_web}/$this->{test_topic}"); 340 340 341 my $session = new TWiki( $TWiki::cfg{DefaultUserLoginName}, $query);341 my $session = new Foswiki( $Foswiki::cfg{DefaultUserLoginName}, $query); 342 342 my $text = "Ignore this text"; 343 343 344 344 # invoke the save handler 345 $this->capture(\& TWiki::UI::Save::save, $session );346 347 $text = TWiki::Func::readTopicText($this->{test_web}, $this->{test_topic});345 $this->capture(\&Foswiki::UI::Save::save, $session ); 346 347 $text = Foswiki::Func::readTopicText($this->{test_web}, $this->{test_topic}); 348 348 # make sure it hasn't changed 349 349 $text =~ s/^%META.*?\n//gm; … … 362 362 my $pidx = 99; 363 363 my $html = 364 TWiki::Plugins::CommentPlugin::Comment::_handleInput(364 Foswiki::Plugins::CommentPlugin::Comment::_handleInput( 365 365 'remove="on"', 366 366 $this->{test_web}, … … 384 384 $query->path_info("/$this->{test_web}/$this->{test_topic}"); 385 385 386 my $session = new TWiki( $TWiki::cfg{DefaultUserLoginName}, $query);386 my $session = new Foswiki( $Foswiki::cfg{DefaultUserLoginName}, $query); 387 387 my $text = "Ignore this text"; 388 388 389 389 # invoke the save handler 390 $this->capture(\& TWiki::UI::Save::save, $session );391 392 $text = TWiki::Func::readTopicText($this->{test_web}, $this->{test_topic});390 $this->capture(\&Foswiki::UI::Save::save, $session ); 391 392 $text = Foswiki::Func::readTopicText($this->{test_web}, $this->{test_topic}); 393 393 # make sure it hasn't changed 394 394 $text =~ s/^%META.*?\n//gm; … … 411 411 my $pidx = 99; 412 412 my $html = 413 TWiki::Plugins::CommentPlugin::Comment::_handleInput(413 Foswiki::Plugins::CommentPlugin::Comment::_handleInput( 414 414 'default="wibble"', 415 415 $this->{test_web}, -
trunk/EmptyPlugin/lib/Foswiki/Plugins/EmptyPlugin.pm
r781 r811 3 3 # Copyright (C) 2000-2003 Andrea Sterbini, a.sterbini@flashnet.it 4 4 # Copyright (C) 2001-2006 Peter Thoeny, peter@thoeny.org 5 # and TWiki Contributors. All Rights Reserved. TWiki Contributors5 # and Foswiki Contributors. All Rights Reserved. Foswiki Contributors 6 6 # are listed in the AUTHORS file in the root of this distribution. 7 7 # NOTE: Please extend that file, not this notice. … … 28 28 29 29 This version of the !EmptyPlugin documents the handlers supported 30 by revision 1.2 of the Plugins API. See the documentation of = TWiki::Func=30 by revision 1.2 of the Plugins API. See the documentation of =Foswiki::Func= 31 31 for more information about what this revision number means, and how a 32 32 plugin can check it. 33 33 34 34 __NOTE:__ To interact with TWiki use ONLY the official API functions 35 in the TWiki::Func module. Do not reference any functions or35 in the Foswiki::Func module. Do not reference any functions or 36 36 variables elsewhere in TWiki, as these are subject to change 37 37 without prior warning, and your plugin may suddenly stop … … 64 64 65 65 # change the package name and $pluginName!!! 66 package TWiki::Plugins::EmptyPlugin;66 package Foswiki::Plugins::EmptyPlugin; 67 67 68 68 # Always use strict to enforce variable scoping 69 69 use strict; 70 70 71 require TWiki::Func; # The plugins API72 require TWiki::Plugins; # For the API version71 require Foswiki::Func; # The plugins API 72 require Foswiki::Plugins; # For the API version 73 73 74 74 # $VERSION is referred to by TWiki, and is the only global variable that … … 93 93 # stored in the plugin topic. This default is required for compatibility with 94 94 # older plugins, but imposes a significant performance penalty, and 95 # is not recommended. Instead, use $ TWiki::cfg entries set in LocalSite.cfg, or95 # is not recommended. Instead, use $Foswiki::cfg entries set in LocalSite.cfg, or 96 96 # if you want the users to be able to change settings, then use standard TWiki 97 97 # preferences that can be defined in your %USERSWEB%.SitePreferences and overridden … … 114 114 Called to initialise the plugin. If everything is OK, should return 115 115 a non-zero value. On non-fatal failure, should write a message 116 using TWiki::Func::writeWarning and return 0. In this case116 using Foswiki::Func::writeWarning and return 0. In this case 117 117 %FAILEDPLUGINS% will indicate which plugins failed. 118 118 … … 121 121 will be trapped and reported in the browser. 122 122 123 You may also call = TWiki::Func::registerTagHandler= here to register123 You may also call =Foswiki::Func::registerTagHandler= here to register 124 124 a function to handle variables that have standard TWiki syntax - for example, 125 125 =%MYTAG{"my param" myarg="My Arg"}%. You can also override internal … … 138 138 139 139 # check for Plugins.pm versions 140 if( $ TWiki::Plugins::VERSION < 1.026 ) {141 TWiki::Func::writeWarning( "Version mismatch between $pluginName and Plugins.pm" );140 if( $Foswiki::Plugins::VERSION < 1.026 ) { 141 Foswiki::Func::writeWarning( "Version mismatch between $pluginName and Plugins.pm" ); 142 142 return 0; 143 143 } … … 147 147 148 148 # Set plugin preferences in LocalSite.cfg, like this: 149 # $ TWiki::cfg{Plugins}{EmptyPlugin}{ExampleSetting} = 1;149 # $Foswiki::cfg{Plugins}{EmptyPlugin}{ExampleSetting} = 1; 150 150 # Always provide a default in case the setting is not defined in 151 151 # LocalSite.cfg. See %SYSTEMWEB%.Plugins for help in adding your plugin 152 152 # configuration to the =configure= interface. 153 my $setting = $ TWiki::cfg{Plugins}{EmptyPlugin}{ExampleSetting} || 0;154 $debug = $ TWiki::cfg{Plugins}{EmptyPlugin}{Debug} || 0;153 my $setting = $Foswiki::cfg{Plugins}{EmptyPlugin}{ExampleSetting} || 0; 154 $debug = $Foswiki::cfg{Plugins}{EmptyPlugin}{Debug} || 0; 155 155 156 156 # register the _EXAMPLETAG function to handle %EXAMPLETAG{...}% 157 157 # This will be called whenever %EXAMPLETAG% or %EXAMPLETAG{...}% is 158 158 # seen in the topic text. 159 TWiki::Func::registerTagHandler( 'EXAMPLETAG', \&_EXAMPLETAG );159 Foswiki::Func::registerTagHandler( 'EXAMPLETAG', \&_EXAMPLETAG ); 160 160 161 161 # Allow a sub to be called from the REST interface 162 162 # using the provided alias 163 TWiki::Func::registerRESTHandler('example', \&restExample);163 Foswiki::Func::registerRESTHandler('example', \&restExample); 164 164 165 165 # Plugin correctly initialized … … 173 173 # $session - a reference to the TWiki session object (if you don't know 174 174 # what this is, just ignore it) 175 # $params= - a reference to a TWiki::Attrs object containing parameters.175 # $params= - a reference to a Foswiki::Attrs object containing parameters. 176 176 # This can be used as a simple hash that maps parameter names 177 177 # to values, with _DEFAULT being the name for the default … … 215 215 This handler is called very early, immediately after =earlyInitPlugin=. 216 216 217 *Since:* TWiki::Plugins::VERSION = '1.010'217 *Since:* Foswiki::Plugins::VERSION = '1.010' 218 218 219 219 =cut … … 223 223 ### my ( $loginName, $url, $pathInfo ) = @_; 224 224 225 TWiki::Func::writeDebug( "- ${pluginName}::initializeUserHandler( $_[0], $_[1] )" ) if $debug;225 Foswiki::Func::writeDebug( "- ${pluginName}::initializeUserHandler( $_[0], $_[1] )" ) if $debug; 226 226 } 227 227 … … 235 235 Called when a new user registers with this TWiki. 236 236 237 *Since:* TWiki::Plugins::VERSION = '1.010'237 *Since:* Foswiki::Plugins::VERSION = '1.010' 238 238 239 239 =cut … … 243 243 ### my ( $web, $wikiName, $loginName ) = @_; 244 244 245 TWiki::Func::writeDebug( "- ${pluginName}::registrationHandler( $_[0], $_[1] )" ) if $debug;245 Foswiki::Func::writeDebug( "- ${pluginName}::registrationHandler( $_[0], $_[1] )" ) if $debug; 246 246 } 247 247 … … 259 259 260 260 For variables with trivial syntax it is far more efficient to use 261 = TWiki::Func::registerTagHandler= (see =initPlugin=).261 =Foswiki::Func::registerTagHandler= (see =initPlugin=). 262 262 263 263 Plugins that have to parse the entire topic content should implement 264 264 this function. Internal TWiki 265 variables (and any variables declared using = TWiki::Func::registerTagHandler=)265 variables (and any variables declared using =Foswiki::Func::registerTagHandler=) 266 266 are expanded _before_, and then again _after_, this function is called 267 267 to ensure all %<nop>TAGS% are expanded. … … 274 274 handler. Use the =$meta= object. 275 275 276 *Since:* $ TWiki::Plugins::VERSION 1.000276 *Since:* $Foswiki::Plugins::VERSION 1.000 277 277 278 278 =cut … … 288 288 # } 289 289 290 TWiki::Func::writeDebug( "- ${pluginName}::commonTagsHandler( $_[2].$_[1] )" ) if $debug;290 Foswiki::Func::writeDebug( "- ${pluginName}::commonTagsHandler( $_[2].$_[1] )" ) if $debug; 291 291 292 292 # do custom extension rule, like for example: … … 322 322 ### my ( $text, $topic, $web, $meta ) = @_; 323 323 324 TWiki::Func::writeDebug( "- ${pluginName}::beforeCommonTagsHandler( $_[2].$_[1] )" ) if $debug;324 Foswiki::Func::writeDebug( "- ${pluginName}::beforeCommonTagsHandler( $_[2].$_[1] )" ) if $debug; 325 325 } 326 326 … … 349 349 ### my ( $text, $topic, $web, $meta ) = @_; 350 350 351 TWiki::Func::writeDebug( "- ${pluginName}::afterCommonTagsHandler( $_[2].$_[1] )" ) if $debug;351 Foswiki::Func::writeDebug( "- ${pluginName}::afterCommonTagsHandler( $_[2].$_[1] )" ) if $debug; 352 352 } 353 353 … … 395 395 handler. 396 396 397 Since TWiki::Plugins::VERSION = '1.026'397 Since Foswiki::Plugins::VERSION = '1.026' 398 398 399 399 =cut … … 415 415 handler. 416 416 417 Since TWiki::Plugins::VERSION = '1.026'417 Since Foswiki::Plugins::VERSION = '1.026' 418 418 419 419 =cut … … 436 436 (using %META: tags) 437 437 438 *Since:* TWiki::Plugins::VERSION = '1.010'438 *Since:* Foswiki::Plugins::VERSION = '1.010' 439 439 440 440 =cut … … 444 444 ### my ( $text, $topic, $web ) = @_; 445 445 446 TWiki::Func::writeDebug( "- ${pluginName}::beforeEditHandler( $_[2].$_[1] )" ) if $debug;446 Foswiki::Func::writeDebug( "- ${pluginName}::beforeEditHandler( $_[2].$_[1] )" ) if $debug; 447 447 } 448 448 … … 462 462 handler. Use the =$meta= object. 463 463 464 *Since:* $ TWiki::Plugins::VERSION 1.010464 *Since:* $Foswiki::Plugins::VERSION 1.010 465 465 466 466 =cut … … 470 470 ### my ( $text, $topic, $web ) = @_; 471 471 472 TWiki::Func::writeDebug( "- ${pluginName}::afterEditHandler( $_[2].$_[1] )" ) if $debug;472 Foswiki::Func::writeDebug( "- ${pluginName}::afterEditHandler( $_[2].$_[1] )" ) if $debug; 473 473 } 474 474 … … 479 479 * =$topic= - the name of the topic in the current CGI query 480 480 * =$web= - the name of the web in the current CGI query 481 * =$meta= - the metadata of the topic being saved, represented by a TWiki::Meta object.481 * =$meta= - the metadata of the topic being saved, represented by a Foswiki::Meta object. 482 482 483 483 This handler is called each time a topic is saved. … … 490 490 text format. 491 491 492 *Since:* TWiki::Plugins::VERSION = '1.010'492 *Since:* Foswiki::Plugins::VERSION = '1.010' 493 493 494 494 =cut … … 498 498 ### my ( $text, $topic, $web ) = @_; 499 499 500 TWiki::Func::writeDebug( "- ${pluginName}::beforeSaveHandler( $_[2].$_[1] )" ) if $debug;500 Foswiki::Func::writeDebug( "- ${pluginName}::beforeSaveHandler( $_[2].$_[1] )" ) if $debug; 501 501 } 502 502 … … 509 509 * =$web= - the name of the web in the current CGI query 510 510 * =$error= - any error string returned by the save. 511 * =$meta= - the metadata of the saved topic, represented by a TWiki::Meta object511 * =$meta= - the metadata of the saved topic, represented by a Foswiki::Meta object 512 512 513 513 This handler is called each time a topic is saved. … … 515 515 __NOTE:__ meta-data is embedded in $text (using %META: tags) 516 516 517 *Since:* TWiki::Plugins::VERSION 1.025517 *Since:* Foswiki::Plugins::VERSION 1.025 518 518 519 519 =cut … … 523 523 ### my ( $text, $topic, $web, $error, $meta ) = @_; 524 524 525 TWiki::Func::writeDebug( "- ${pluginName}::afterSaveHandler( $_[2].$_[1] )" ) if $debug;525 Foswiki::Func::writeDebug( "- ${pluginName}::afterSaveHandler( $_[2].$_[1] )" ) if $debug; 526 526 } 527 527 … … 539 539 This handler is called just after the rename/move/delete action of a web, topic or attachment. 540 540 541 *Since:* TWiki::Plugins::VERSION = '1.11'541 *Since:* Foswiki::Plugins::VERSION = '1.11' 542 542 543 543 =cut … … 547 547 ### my ( $oldWeb, $oldTopic, $oldAttachment, $newWeb, $newTopic, $newAttachment ) = @_; 548 548 549 TWiki::Func::writeDebug( "- ${pluginName}::afterRenameHandler( " .549 Foswiki::Func::writeDebug( "- ${pluginName}::afterRenameHandler( " . 550 550 "$_[0].$_[1] $_[2] -> $_[3].$_[4] $_[5] )" ) if $debug; 551 551 } … … 566 566 * =tmpFilename= - name of a temporary file containing the attachment data 567 567 568 *Since:* TWiki::Plugins::VERSION = 1.025568 *Since:* Foswiki::Plugins::VERSION = 1.025 569 569 570 570 =cut … … 573 573 # do not uncomment, use $_[0], $_[1]... instead 574 574 ### my( $attrHashRef, $topic, $web ) = @_; 575 TWiki::Func::writeDebug( "- ${pluginName}::beforeAttachmentSaveHandler( $_[2].$_[1] )" ) if $debug;575 Foswiki::Func::writeDebug( "- ${pluginName}::beforeAttachmentSaveHandler( $_[2].$_[1] )" ) if $debug; 576 576 } 577 577 … … 589 589 * =user= - the user id 590 590 591 *Since:* TWiki::Plugins::VERSION = 1.025591 *Since:* Foswiki::Plugins::VERSION = 1.025 592 592 593 593 =cut … … 596 596 # do not uncomment, use $_[0], $_[1]... instead 597 597 ### my( $attrHashRef, $topic, $web ) = @_; 598 TWiki::Func::writeDebug( "- ${pluginName}::afterAttachmentSaveHandler( $_[2].$_[1] )" ) if $debug;598 Foswiki::Func::writeDebug( "- ${pluginName}::afterAttachmentSaveHandler( $_[2].$_[1] )" ) if $debug; 599 599 } 600 600 … … 641 641 required to resolve concurrent edits on a topic. 642 642 643 *Since:* TWiki::Plugins::VERSION = 1.1643 *Since:* Foswiki::Plugins::VERSION = 1.1 644 644 645 645 =cut … … 663 663 Note that this is the HTTP header which is _not_ the same as the HTML 664 664 <HEAD> tag. The contents of the <HEAD> tag may be manipulated 665 using the = TWiki::Func::addToHEAD= method.666 667 *Since:* TWiki::Plugins::VERSION 1.1665 using the =Foswiki::Func::addToHEAD= method. 666 667 *Since:* Foswiki::Plugins::VERSION 1.1 668 668 669 669 =cut … … 672 672 my ( $headers, $query ) = @_; 673 673 674 TWiki::Func::writeDebug( "- ${pluginName}::modifyHeaderHandler()" ) if $debug;674 Foswiki::Func::writeDebug( "- ${pluginName}::modifyHeaderHandler()" ) if $debug; 675 675 } 676 676 … … 687 687 the others will be ignored. 688 688 689 *Since:* TWiki::Plugins::VERSION 1.010689 *Since:* Foswiki::Plugins::VERSION 1.010 690 690 691 691 =cut … … 695 695 ### my ( $query, $url ) = @_; 696 696 697 TWiki::Func::writeDebug( "- ${pluginName}::redirectCgiQueryHandler( query, $_[1] )" ) if $debug;697 Foswiki::Func::writeDebug( "- ${pluginName}::redirectCgiQueryHandler( query, $_[1] )" ) if $debug; 698 698 } 699 699 … … 717 717 continues by considering the built-in types. 718 718 719 *Since:* TWiki::Plugins::VERSION 1.1719 *Since:* Foswiki::Plugins::VERSION 1.1 720 720 721 721 Note that since TWiki-4.2, you can also extend the range of available 722 types by providing a subclass of = TWiki::Form::FieldDefinition= to implement723 the new type (see = TWiki::Plugins.JSCalendarContrib= and724 = TWiki::Plugins.RatingContrib= for examples). This is the preferred way to722 types by providing a subclass of =Foswiki::Form::FieldDefinition= to implement 723 the new type (see =Foswiki::Plugins.JSCalendarContrib= and 724 =Foswiki::Plugins.RatingContrib= for examples). This is the preferred way to 725 725 extend the form field types, but does not work for TWiki < 4.2. 726 726 … … 743 743 Return the new link text. 744 744 745 *Since:* TWiki::Plugins::VERSION 1.1745 *Since:* Foswiki::Plugins::VERSION 1.1 746 746 747 747 =cut … … 764 764 the page is actually written. This is a string, which must end in \n\n. 765 765 766 *Since:* TWiki::Plugins::VERSION 1.2766 *Since:* Foswiki::Plugins::VERSION 1.2 767 767 768 768 =cut … … 784 784 For more information, check %SYSTEMWEB%.CommandAndCGIScripts#rest 785 785 786 *Since:* TWiki::Plugins::VERSION 1.1786 *Since:* Foswiki::Plugins::VERSION 1.1 787 787 788 788 =cut -
trunk/EmptyPlugin/lib/Foswiki/Plugins/EmptyPlugin/MANIFEST
r14 r811 1 data/ TWiki/EmptyPlugin.txt 0644 Plugin doc page2 lib/ TWiki/Plugins/EmptyPlugin.pm 0444 Plugin Perl module1 data/System/EmptyPlugin.txt 0644 Plugin doc page 2 lib/Foswiki/Plugins/EmptyPlugin.pm 0444 Plugin Perl module 3 3 data/Sandbox/PluginTestEmptyPlugin.txt 0644 Plugin examples -
trunk/EmptyPlugin/lib/Foswiki/Plugins/EmptyPlugin/build.pl
r736 r811 4 4 # plugin or contrib and edit. 5 5 # 6 # Read the comments at the top of lib/ TWiki/Contrib/Build.pm for6 # Read the comments at the top of lib/Foswiki/Contrib/Build.pm for 7 7 # details of how the build process works, and what files you 8 8 # have to provide and where. … … 23 23 } 24 24 25 use TWiki::Contrib::Build;25 use Foswiki::Contrib::Build; 26 26 27 27 # Declare our build package 28 28 package BuildBuild; 29 use base qw( TWiki::Contrib::Build );29 use base qw( Foswiki::Contrib::Build ); 30 30 31 31 sub new { -
trunk/EmptyPlugin/test/unit/EmptyPlugin/EmptyPluginTests.pm
r14 r811 6 6 7 7 use strict; 8 use TWiki;8 use Foswiki; 9 9 use CGI; 10 10 … … 22 22 $this->SUPER::set_up(); 23 23 24 $ TWiki::Plugins::SESSION = $twiki;24 $Foswiki::Plugins::SESSION = $twiki; 25 25 } 26 26 -
trunk/InterwikiPlugin/lib/Foswiki/Plugins/InterwikiPlugin.pm
r781 r811 18 18 =pod 19 19 20 ---+ package TWiki::Plugins::InterwikiPlugin20 ---+ package Foswiki::Plugins::InterwikiPlugin 21 21 22 22 Recognises and processes special links to other sites defined … … 34 34 =cut 35 35 36 package TWiki::Plugins::InterwikiPlugin;36 package Foswiki::Plugins::InterwikiPlugin; 37 37 38 38 use strict; 39 39 40 require TWiki::Func; # The plugins API41 require TWiki::Plugins; # For the API version40 require Foswiki::Func; # The plugins API 41 require Foswiki::Plugins; # For the API version 42 42 43 43 use vars qw( … … 63 63 BEGIN { 64 64 # 'Use locale' for internationalisation of Perl sorting and searching - 65 if( $ TWiki::cfg{UseLocale} ) {65 if( $Foswiki::cfg{UseLocale} ) { 66 66 require locale; 67 67 import locale (); … … 76 76 77 77 # check for Plugins.pm versions 78 if( $ TWiki::Plugins::VERSION < 1.026 ) {79 TWiki::Func::writeWarning( "Version mismatch between InterwikiPlugin and Plugins.pm" );78 if( $Foswiki::Plugins::VERSION < 1.026 ) { 79 Foswiki::Func::writeWarning( "Version mismatch between InterwikiPlugin and Plugins.pm" ); 80 80 return 0; 81 81 } 82 82 83 83 # Regexes for the Site:page format InterWiki reference 84 my $man = TWiki::Func::getRegularExpression('mixedAlphaNum');85 my $ua = TWiki::Func::getRegularExpression('upperAlpha');84 my $man = Foswiki::Func::getRegularExpression('mixedAlphaNum'); 85 my $ua = Foswiki::Func::getRegularExpression('upperAlpha'); 86 86 $sitePattern = "([$ua][$man]+)"; 87 87 $pagePattern = "([${man}_\/][$man" . '\.\/\+\_\,\;\:\!\?\%\#\@\-]*?)'; … … 89 89 # Get plugin preferences from InterwikiPlugin topic 90 90 $interLinkFormat = 91 TWiki::Func::getPreferencesValue( 'INTERWIKIPLUGIN_INTERLINKFORMAT' ) ||91 Foswiki::Func::getPreferencesValue( 'INTERWIKIPLUGIN_INTERLINKFORMAT' ) || 92 92 '<a href="$url" title="$tooltip"><noautolink>$label</noautolink></a>'; 93 93 94 94 my $interTopic = 95 TWiki::Func::getPreferencesValue( 'INTERWIKIPLUGIN_RULESTOPIC' )95 Foswiki::Func::getPreferencesValue( 'INTERWIKIPLUGIN_RULESTOPIC' ) 96 96 || 'InterWikis'; 97 97 ( $interWeb, $interTopic ) = 98 TWiki::Func::normalizeWebTopicName( $interWeb, $interTopic );98 Foswiki::Func::normalizeWebTopicName( $interWeb, $interTopic ); 99 99 if( $interTopic =~ s/^(.*)\.// ) { 100 100 $interWeb = $1; 101 101 } 102 102 103 my $text = TWiki::Func::readTopicText( $interWeb, $interTopic, undef, 1 );103 my $text = Foswiki::Func::readTopicText( $interWeb, $interTopic, undef, 1 ); 104 104 105 105 # '| alias | URL | ...' table and extract into 'alias', "URL" list -
trunk/InterwikiPlugin/lib/Foswiki/Plugins/InterwikiPlugin/MANIFEST
r14 r811 1 lib/ TWiki/Plugins/InterwikiPlugin.pm 04442 data/ TWiki/InterwikiPlugin.txt 06443 data/ TWiki/InterWikis.txt 06441 lib/Foswiki/Plugins/InterwikiPlugin.pm 0444 2 data/System/InterwikiPlugin.txt 0644 3 data/System/InterWikis.txt 0644 -
trunk/InterwikiPlugin/lib/Foswiki/Plugins/InterwikiPlugin/build.pl
r14 r811 9 9 } 10 10 11 use TWiki::Contrib::Build;11 use Foswiki::Contrib::Build; 12 12 13 13 # Create the build object 14 $build = new TWiki::Contrib::Build( 'InterwikiPlugin' );14 $build = new Foswiki::Contrib::Build( 'InterwikiPlugin' ); 15 15 16 16 # Build the target on the command line, or the default target -
trunk/JSCalendarContrib/lib/Foswiki/Contrib/JSCalendarContrib.pm
r739 r811 10 10 =cut 11 11 12 package TWiki::Contrib::JSCalendarContrib;12 package Foswiki::Contrib::JSCalendarContrib; 13 13 14 14 use strict; 15 15 16 require TWiki::Func; # The plugins API16 require Foswiki::Func; # The plugins API 17 17 18 18 use vars qw( $VERSION $RELEASE $SHORTDESCRIPTION ); … … 55 55 =begin twiki 56 56 57 ---+++ TWiki::Contrib::JSCalendarContrib::renderDateForEdit($name, $value, $format [, \%cssClass]) -> $html57 ---+++ Foswiki::Contrib::JSCalendarContrib::renderDateForEdit($name, $value, $format [, \%cssClass]) -> $html 58 58 59 59 This is the simplest way to use calendars from a plugin. … … 68 68 Example: 69 69 <verbatim> 70 use TWiki::Contrib::JSCalendarContrib;70 use Foswiki::Contrib::JSCalendarContrib; 71 71 ... 72 my $fromDate = TWiki::Contrib::JSCalendarContrib::renderDateForEdit(72 my $fromDate = Foswiki::Contrib::JSCalendarContrib::renderDateForEdit( 73 73 'from', '1 April 1999'); 74 my $toDate = TWiki::Contrib::JSCalendarContrib::renderDateForEdit(74 my $toDate = Foswiki::Contrib::JSCalendarContrib::renderDateForEdit( 75 75 'to', undef, '%Y'); 76 76 </verbatim> … … 81 81 my ($name, $value, $format, $options) = @_; 82 82 83 $format ||= $ TWiki::cfg{JSCalendarContrib}{format} || '%e %B %Y';83 $format ||= $Foswiki::cfg{JSCalendarContrib}{format} || '%e %B %Y'; 84 84 85 85 addHEAD('twiki'); … … 101 101 -onclick => 102 102 "javascript: return showCalendar('id_$name','$format')", 103 -src=> TWiki::Func::getPubUrlPath() . '/' .104 TWiki::Func::getTwikiWebname() .103 -src=> Foswiki::Func::getPubUrlPath() . '/' . 104 Foswiki::Func::getTwikiWebname() . 105 105 '/JSCalendarContrib/img.gif', 106 106 -alt => 'Calendar', … … 110 110 =begin twiki 111 111 112 ---+++ TWiki::Contrib::JSCalendarContrib::addHEAD($setup)112 ---+++ Foswiki::Contrib::JSCalendarContrib::addHEAD($setup) 113 113 114 114 This function will automatically add the headers for the calendar to the page … … 124 124 <verbatim> 125 125 # Add styles and javascript for the calendar 126 use TWiki::Contrib::JSCalendarContrib;126 use Foswiki::Contrib::JSCalendarContrib; 127 127 ... 128 128 … … 130 130 .... 131 131 # Enable 'showCalendar' 132 TWiki::Contrib::JSCalendarContrib::addHEAD( 'twiki' );132 Foswiki::Contrib::JSCalendarContrib::addHEAD( 'twiki' ); 133 133 134 134 my $cal = CGI::image_button( … … 136 136 -onclick => 137 137 "return showCalendar('id_datefield','%Y %b %e')", 138 -src=> TWiki::Func::getPubUrlPath() . '/' .139 TWiki::Func::getTwikiWebname() .138 -src=> Foswiki::Func::getPubUrlPath() . '/' . 139 Foswiki::Func::getTwikiWebname() . 140 140 '/JSCalendarContrib/img.gif', 141 141 -alt => 'Calendar', … … 188 188 my $setup = shift; 189 189 $setup ||= 'calendar-setup'; 190 my $style = $ TWiki::cfg{JSCalendarContrib}{style} || 'blue';191 my $lang = $ TWiki::cfg{JSCalendarContrib}{lang} || 'en';190 my $style = $Foswiki::cfg{JSCalendarContrib}{style} || 'blue'; 191 my $lang = $Foswiki::cfg{JSCalendarContrib}{lang} || 'en'; 192 192 my $base = '%PUBURLPATH%/%SYSTEMWEB%/JSCalendarContrib'; 193 193 eval { 194 require TWiki::Contrib::BehaviourContrib;195 if (defined(& TWiki::Contrib::BehaviourContrib::addHEAD)) {196 TWiki::Contrib::BehaviourContrib::addHEAD();194 require Foswiki::Contrib::BehaviourContrib; 195 if (defined(&Foswiki::Contrib::BehaviourContrib::addHEAD)) { 196 Foswiki::Contrib::BehaviourContrib::addHEAD(); 197 197 } else { 198 TWiki::Func::addToHEAD(198 Foswiki::Func::addToHEAD( 199 199 'BEHAVIOURCONTRIB', 200 200 '<script type="text/javascript" src="%PUBURLPATH%/%SYSTEMWEB%/BehaviourContrib/behaviour.compressed.js"></script>'); … … 209 209 <script type='text/javascript' src='$base/lang/calendar-$lang.js'></script> 210 210 HERE 211 TWiki::Func::addToHEAD( 'JSCALENDARCONTRIB', $head );211 Foswiki::Func::addToHEAD( 'JSCALENDARCONTRIB', $head ); 212 212 213 213 # Add the setup separately; there might be different setups required … … 216 216 <script type='text/javascript' src='$base/$setup.js'></script> 217 217 HERE 218 TWiki::Func::addToHEAD( 'JSCALENDARCONTRIB_'.$setup, $head );218 Foswiki::Func::addToHEAD( 'JSCALENDARCONTRIB_'.$setup, $head ); 219 219 } 220 220 -
trunk/JSCalendarContrib/lib/Foswiki/Contrib/JSCalendarContrib/MANIFEST
r14 r811 1 data/ TWiki/JSCalendarContrib.txt 06442 data/ TWiki/JSCalendarContribInline.txt 06443 lib/ TWiki/Contrib/JSCalendarContrib.pm 04444 lib/ TWiki/Form/Date.pm 0444 Perl module that implements the =date= type5 pub/ TWiki/JSCalendarContrib/twiki.js 06446 pub/ TWiki/JSCalendarContrib/wikiringlogo20x20.png 06447 pub/ TWiki/JSCalendarContrib/bugtest-hidden-selects.html 06448 pub/ TWiki/JSCalendarContrib/calendar-blue2.css 06449 pub/ TWiki/JSCalendarContrib/calendar-blue.css 064410 pub/ TWiki/JSCalendarContrib/calendar-brown.css 064411 pub/ TWiki/JSCalendarContrib/calendar-green.css 064412 pub/ TWiki/JSCalendarContrib/calendar.js 064413 pub/ TWiki/JSCalendarContrib/calendar.php 064414 pub/ TWiki/JSCalendarContrib/calendar-setup.js 064415 pub/ TWiki/JSCalendarContrib/calendar-setup_stripped.js 064416 pub/ TWiki/JSCalendarContrib/calendar_stripped.js 064417 pub/ TWiki/JSCalendarContrib/calendar-system.css 064418 pub/ TWiki/JSCalendarContrib/calendar-tas.css 064419 pub/ TWiki/JSCalendarContrib/calendar-win2k-1.css 064420 pub/ TWiki/JSCalendarContrib/calendar-win2k-2.css 064421 pub/ TWiki/JSCalendarContrib/calendar-win2k-cold-1.css 064422 pub/ TWiki/JSCalendarContrib/calendar-win2k-cold-2.css 064423 pub/ TWiki/JSCalendarContrib/ChangeLog 064424 pub/ TWiki/JSCalendarContrib/dayinfo.html 064425 pub/ TWiki/JSCalendarContrib/doc/html/field-button.jpg 064426 pub/ TWiki/JSCalendarContrib/doc/html/reference.css 064427 pub/ TWiki/JSCalendarContrib/doc/html/reference.html 064428 pub/ TWiki/JSCalendarContrib/doc/html/reference-Z-S.css 064429 pub/ TWiki/JSCalendarContrib/doc/reference.pdf 064430 pub/ TWiki/JSCalendarContrib/img.gif 064431 pub/ TWiki/JSCalendarContrib/index.html 064432 pub/ TWiki/JSCalendarContrib/lang/calendar-af.js 064433 pub/ TWiki/JSCalendarContrib/lang/calendar-al.js 064434 pub/ TWiki/JSCalendarContrib/lang/calendar-bg.js 064435 pub/ TWiki/JSCalendarContrib/lang/calendar-big5.js 064436 pub/ TWiki/JSCalendarContrib/lang/calendar-big5-utf8.js 064437 pub/ TWiki/JSCalendarContrib/lang/calendar-br.js 064438 pub/ TWiki/JSCalendarContrib/lang/calendar-ca.js 064439 pub/ TWiki/JSCalendarContrib/lang/calendar-cs-utf8.js 064440 pub/ TWiki/JSCalendarContrib/lang/calendar-cs-win.js 064441 pub/ TWiki/JSCalendarContrib/lang/calendar-da.js 064442 pub/ TWiki/JSCalendarContrib/lang/calendar-de.js 064443 pub/ TWiki/JSCalendarContrib/lang/calendar-du.js 064444 pub/ TWiki/JSCalendarContrib/lang/calendar-el.js 064445 pub/ TWiki/JSCalendarContrib/lang/calendar-en.js 064446 pub/ TWiki/JSCalendarContrib/lang/calendar-es.js 064447 pub/ TWiki/JSCalendarContrib/lang/calendar-fi.js 064448 pub/ TWiki/JSCalendarContrib/lang/calendar-fr.js 064449 pub/ TWiki/JSCalendarContrib/lang/calendar-he-utf8.js 064450 pub/ TWiki/JSCalendarContrib/lang/calendar-hr.js 064451 pub/ TWiki/JSCalendarContrib/lang/calendar-hr-utf8.js 064452 pub/ TWiki/JSCalendarContrib/lang/calendar-hu.js 064453 pub/ TWiki/JSCalendarContrib/lang/calendar-it.js 064454 pub/ TWiki/JSCalendarContrib/lang/calendar-jp.js 064455 pub/ TWiki/JSCalendarContrib/lang/calendar-ko.js 064456 pub/ TWiki/JSCalendarContrib/lang/calendar-ko-utf8.js 064457 pub/ TWiki/JSCalendarContrib/lang/calendar-lt.js 064458 pub/ TWiki/JSCalendarContrib/lang/calendar-lt-utf8.js 064459 pub/ TWiki/JSCalendarContrib/lang/calendar-lv.js 064460 pub/ TWiki/JSCalendarContrib/lang/calendar-nl.js 064461 pub/ TWiki/JSCalendarContrib/lang/calendar-no.js 064462 pub/ TWiki/JSCalendarContrib/lang/calendar-pl.js 064463 pub/ TWiki/JSCalendarContrib/lang/calendar-pl-utf8.js 064464 pub/ TWiki/JSCalendarContrib/lang/calendar-pt.js 064465 pub/ TWiki/JSCalendarContrib/lang/calendar-ro.js 064466 pub/ TWiki/JSCalendarContrib/lang/calendar-ru_win_.js 064467 pub/ TWiki/JSCalendarContrib/lang/calendar-ru.js 064468 pub/ TWiki/JSCalendarContrib/lang/calendar-si.js 064469 pub/ TWiki/JSCalendarContrib/lang/calendar-sk.js 064470 pub/ TWiki/JSCalendarContrib/lang/calendar-sp.js 064471 pub/ TWiki/JSCalendarContrib/lang/calendar-sv.js 064472 pub/ TWiki/JSCalendarContrib/lang/calendar-tr.js 064473 pub/ TWiki/JSCalendarContrib/lang/calendar-zh.js 064474 pub/ TWiki/JSCalendarContrib/lang/cn_utf8.js 064475 pub/ TWiki/JSCalendarContrib/skins/aqua/active-bg.gif 064476 pub/ TWiki/JSCalendarContrib/skins/aqua/dark-bg.gif 064477 pub/ TWiki/JSCalendarContrib/skins/aqua/hover-bg.gif 064478 pub/ TWiki/JSCalendarContrib/skins/aqua/menuarrow.gif 064479 pub/ TWiki/JSCalendarContrib/skins/aqua/normal-bg.gif 064480 pub/ TWiki/JSCalendarContrib/skins/aqua/rowhover-bg.gif 064481 pub/ TWiki/JSCalendarContrib/skins/aqua/status-bg.gif 064482 pub/ TWiki/JSCalendarContrib/skins/aqua/theme.css 064483 pub/ TWiki/JSCalendarContrib/skins/aqua/title-bg.gif 064484 pub/ TWiki/JSCalendarContrib/skins/aqua/today-bg.gif 064485 pub/ TWiki/JSCalendarContrib/skins/aqua/transparent-bg.png 064486 pub/ TWiki/JSCalendarContrib/menuarrow.gif 064487 pub/ TWiki/JSCalendarContrib/menuarrow2.gif 064488 pub/ TWiki/JSCalendarContrib/multiple-dates.html 064489 pub/ TWiki/JSCalendarContrib/README 064490 pub/ TWiki/JSCalendarContrib/release-notes.html 064491 pub/ TWiki/JSCalendarContrib/simple-1.html 064492 pub/ TWiki/JSCalendarContrib/simple-2.html 064493 pub/ TWiki/JSCalendarContrib/simple-3.html 064494 pub/ TWiki/JSCalendarContrib/test.php 064495 pub/ TWiki/JSCalendarContrib/test-position.html 06441 data/System/JSCalendarContrib.txt 0644 2 data/System/JSCalendarContribInline.txt 0644 3 lib/Foswiki/Contrib/JSCalendarContrib.pm 0444 4 lib/Foswiki/Form/Date.pm 0444 Perl module that implements the =date= type 5 pub/System/JSCalendarContrib/twiki.js 0644 6 pub/System/JSCalendarContrib/wikiringlogo20x20.png 0644 7 pub/System/JSCalendarContrib/bugtest-hidden-selects.html 0644 8 pub/System/JSCalendarContrib/calendar-blue2.css 0644 9 pub/System/JSCalendarContrib/calendar-blue.css 0644 10 pub/System/JSCalendarContrib/calendar-brown.css 0644 11 pub/System/JSCalendarContrib/calendar-green.css 0644 12 pub/System/JSCalendarContrib/calendar.js 0644 13 pub/System/JSCalendarContrib/calendar.php 0644 14 pub/System/JSCalendarContrib/calendar-setup.js 0644 15 pub/System/JSCalendarContrib/calendar-setup_stripped.js 0644 16 pub/System/JSCalendarContrib/calendar_stripped.js 0644 17 pub/System/JSCalendarContrib/calendar-system.css 0644 18 pub/System/JSCalendarContrib/calendar-tas.css 0644 19 pub/System/JSCalendarContrib/calendar-win2k-1.css 0644 20 pub/System/JSCalendarContrib/calendar-win2k-2.css 0644 21 pub/System/JSCalendarContrib/calendar-win2k-cold-1.css 0644 22 pub/System/JSCalendarContrib/calendar-win2k-cold-2.css 0644 23 pub/System/JSCalendarContrib/ChangeLog 0644 24 pub/System/JSCalendarContrib/dayinfo.html 0644 25 pub/System/JSCalendarContrib/doc/html/field-button.jpg 0644 26 pub/System/JSCalendarContrib/doc/html/reference.css 0644 27 pub/System/JSCalendarContrib/doc/html/reference.html 0644 28 pub/System/JSCalendarContrib/doc/html/reference-Z-S.css 0644 29 pub/System/JSCalendarContrib/doc/reference.pdf 0644 30 pub/System/JSCalendarContrib/img.gif 0644 31 pub/System/JSCalendarContrib/index.html 0644 32 pub/System/JSCalendarContrib/lang/calendar-af.js 0644 33 pub/System/JSCalendarContrib/lang/calendar-al.js 0644 34 pub/System/JSCalendarContrib/lang/calendar-bg.js 0644 35 pub/System/JSCalendarContrib/lang/calendar-big5.js 0644 36 pub/System/JSCalendarContrib/lang/calendar-big5-utf8.js 0644 37 pub/System/JSCalendarContrib/lang/calendar-br.js 0644 38 pub/System/JSCalendarContrib/lang/calendar-ca.js 0644 39 pub/System/JSCalendarContrib/lang/calendar-cs-utf8.js 0644 40 pub/System/JSCalendarContrib/lang/calendar-cs-win.js 0644 41 pub/System/JSCalendarContrib/lang/calendar-da.js 0644 42 pub/System/JSCalendarContrib/lang/calendar-de.js 0644 43 pub/System/JSCalendarContrib/lang/calendar-du.js 0644 44 pub/System/JSCalendarContrib/lang/calendar-el.js 0644 45 pub/System/JSCalendarContrib/lang/calendar-en.js 0644 46 pub/System/JSCalendarContrib/lang/calendar-es.js 0644 47 pub/System/JSCalendarContrib/lang/calendar-fi.js 0644 48 pub/System/JSCalendarContrib/lang/calendar-fr.js 0644 49 pub/System/JSCalendarContrib/lang/calendar-he-utf8.js 0644 50 pub/System/JSCalendarContrib/lang/calendar-hr.js 0644 51 pub/System/JSCalendarContrib/lang/calendar-hr-utf8.js 0644 52 pub/System/JSCalendarContrib/lang/calendar-hu.js 0644 53 pub/System/JSCalendarContrib/lang/calendar-it.js 0644 54 pub/System/JSCalendarContrib/lang/calendar-jp.js 0644 55 pub/System/JSCalendarContrib/lang/calendar-ko.js 0644 56 pub/System/JSCalendarContrib/lang/calendar-ko-utf8.js 0644 57 pub/System/JSCalendarContrib/lang/calendar-lt.js 0644 58 pub/System/JSCalendarContrib/lang/calendar-lt-utf8.js 0644 59 pub/System/JSCalendarContrib/lang/calendar-lv.js 0644 60 pub/System/JSCalendarContrib/lang/calendar-nl.js 0644 61 pub/System/JSCalendarContrib/lang/calendar-no.js 0644 62 pub/System/JSCalendarContrib/lang/calendar-pl.js 0644 63 pub/System/JSCalendarContrib/lang/calendar-pl-utf8.js 0644 64 pub/System/JSCalendarContrib/lang/calendar-pt.js 0644 65 pub/System/JSCalendarContrib/lang/calendar-ro.js 0644 66 pub/System/JSCalendarContrib/lang/calendar-ru_win_.js 0644 67 pub/System/JSCalendarContrib/lang/calendar-ru.js 0644 68 pub/System/JSCalendarContrib/lang/calendar-si.js 0644 69 pub/System/JSCalendarContrib/lang/calendar-sk.js 0644 70 pub/System/JSCalendarContrib/lang/calendar-sp.js 0644 71 pub/System/JSCalendarContrib/lang/calendar-sv.js 0644 72 pub/System/JSCalendarContrib/lang/calendar-tr.js 0644 73 pub/System/JSCalendarContrib/lang/calendar-zh.js 0644 74 pub/System/JSCalendarContrib/lang/cn_utf8.js 0644 75 pub/System/JSCalendarContrib/skins/aqua/active-bg.gif 0644 76 pub/System/JSCalendarContrib/skins/aqua/dark-bg.gif 0644 77 pub/System/JSCalendarContrib/skins/aqua/hover-bg.gif 0644 78 pub/System/JSCalendarContrib/skins/aqua/menuarrow.gif 0644 79 pub/System/JSCalendarContrib/skins/aqua/normal-bg.gif 0644 80 pub/System/JSCalendarContrib/skins/aqua/rowhover-bg.gif 0644 81 pub/System/JSCalendarContrib/skins/aqua/status-bg.gif 0644 82 pub/System/JSCalendarContrib/skins/aqua/theme.css 0644 83 pub/System/JSCalendarContrib/skins/aqua/title-bg.gif 0644 84 pub/System/JSCalendarContrib/skins/aqua/today-bg.gif 0644 85 pub/System/JSCalendarContrib/skins/aqua/transparent-bg.png 0644 86 pub/System/JSCalendarContrib/menuarrow.gif 0644 87 pub/System/JSCalendarContrib/menuarrow2.gif 0644 88 pub/System/JSCalendarContrib/multiple-dates.html 0644 89 pub/System/JSCalendarContrib/README 0644 90 pub/System/JSCalendarContrib/release-notes.html 0644 91 pub/System/JSCalendarContrib/simple-1.html 0644 92 pub/System/JSCalendarContrib/simple-2.html 0644 93 pub/System/JSCalendarContrib/simple-3.html 0644 94 pub/System/JSCalendarContrib/test.php 0644 95 pub/System/JSCalendarContrib/test-position.html 0644 96 96 -
trunk/JSCalendarContrib/lib/Foswiki/Contrib/JSCalendarContrib/build.pl
r736 r811 4 4 # plugin or contrib and edit. 5 5 # 6 # Read the comments at the top of lib/ TWiki/Contrib/Build.pm for6 # Read the comments at the top of lib/Foswiki/Contrib/Build.pm for 7 7 # details of how the build process works, and what files you 8 8 # have to provide and where. … … 25 25 } 26 26 27 use TWiki::Contrib::Build;27 use Foswiki::Contrib::Build; 28 28 29 29 package JSCalendarBuild; 30 30 31 @JSCalendarBuild::ISA = ( " TWiki::Contrib::Build" );31 @JSCalendarBuild::ISA = ( "Foswiki::Contrib::Build" ); 32 32 33 33 sub new { -
trunk/JSCalendarContrib/lib/Foswiki/Form/Date.pm
r782 r811 1 1 # See bottom of file for license and copyright details 2 # This packages subclasses TWiki::Form::FieldDefinition to implement2 # This packages subclasses Foswiki::Form::FieldDefinition to implement 3 3 # the =date= type 4 4 5 package TWiki::Form::Date;6 use base ' TWiki::Form::FieldDefinition';5 package Foswiki::Form::Date; 6 use base 'Foswiki::Form::FieldDefinition'; 7 7 8 8 use strict; 9 9 10 use TWiki::Contrib::JSCalendarContrib;10 use Foswiki::Contrib::JSCalendarContrib; 11 11 12 12 sub new { … … 31 31 $this->cssClasses('twikiInputField', 'twikiEditFormDateField') : 32 32 'twikiInputField twikiEditFormDateField'}); 33 my $ifFormat = $ TWiki::cfg{JSCalendarContrib}{format} || '%e %b %Y';34 TWiki::Contrib::JSCalendarContrib::addHEAD( 'twiki' );33 my $ifFormat = $Foswiki::cfg{JSCalendarContrib}{format} || '%e %b %Y'; 34 Foswiki::Contrib::JSCalendarContrib::addHEAD( 'twiki' ); 35 35 my $button .= CGI::image_button( 36 36 -name => 'calendar', 37 37 -onclick => 38 38 "return showCalendar('id$this->{name}','$ifFormat')", 39 -src=> $ TWiki::cfg{PubUrlPath} . '/' .40 $ TWiki::cfg{SystemWebName} .39 -src=> $Foswiki::cfg{PubUrlPath} . '/' . 40 $Foswiki::cfg{SystemWebName} . 41 41 '/JSCalendarContrib/img.gif', 42 42 -alt => 'Calendar', … … 56 56 __DATA__ 57 57 58 Module of Foswiki - The Free Open Source Wiki, http://foswiki.org/, http:// TWiki.org/58 Module of Foswiki - The Free Open Source Wiki, http://foswiki.org/, http://Foswiki.org/ 59 59 60 Copyright (C) 2001-2007 TWiki Contributors. All Rights Reserved.61 TWiki Contributors are listed in the AUTHORS file in the root of60 Copyright (C) 2001-2007 Foswiki Contributors. All Rights Reserved. 61 Foswiki Contributors are listed in the AUTHORS file in the root of 62 62 this distribution. NOTE: Please extend that file, not this notice. 63 63 -
trunk/MailerContrib/lib/Foswiki/Contrib/MailerContrib.pm
r781 r811 2 2 # 3 3 # Copyright (C) 2004 Wind River Systems Inc. 4 # Copyright (C) 1999-2006 TWiki Contributors.5 # All Rights Reserved. TWiki Contributors4 # Copyright (C) 1999-2006 Foswiki Contributors. 5 # All Rights Reserved. Foswiki Contributors 6 6 # are listed in the AUTHORS file in the root of this distribution. 7 7 # NOTE: Please extend that file, not this notice. … … 21 21 =pod 22 22 23 ---+ package TWiki::Contrib::MailerContrib23 ---+ package Foswiki::Contrib::MailerContrib 24 24 25 25 Package of support for extended Web<nop>Notify notification, supporting per-topic notification and notification of changes to children. … … 29 29 =cut 30 30 31 package TWiki::Contrib::MailerContrib;31 package Foswiki::Contrib::MailerContrib; 32 32 33 33 use strict; … … 36 36 use CGI qw(-any); 37 37 38 require TWiki;39 require TWiki::Plugins;40 require TWiki::Time;41 require TWiki::Func;42 require TWiki::Contrib::MailerContrib::WebNotify;43 require TWiki::Contrib::MailerContrib::Change;44 require TWiki::Contrib::MailerContrib::UpData;38 require Foswiki; 39 require Foswiki::Plugins; 40 require Foswiki::Time; 41 require Foswiki::Func; 42 require Foswiki::Contrib::MailerContrib::WebNotify; 43 require Foswiki::Contrib::MailerContrib::Change; 44 require Foswiki::Contrib::MailerContrib::UpData; 45 45 46 46 use vars qw ( $VERSION $RELEASE $verbose ); … … 51 51 # PROTECTED STATIC ensure the contrib is initernally initialised 52 52 sub initContrib { 53 $ TWiki::cfg{MailerContrib}{EmailFilterIn} ||=54 $ TWiki::regex{emailAddrRegex};53 $Foswiki::cfg{MailerContrib}{EmailFilterIn} ||= 54 $Foswiki::regex{emailAddrRegex}; 55 55 } 56 56 … … 90 90 91 91 if (!defined $twiki) { 92 $twiki = new TWiki();93 } 94 95 $ TWiki::Plugins::SESSION = $twiki;96 97 my $context = TWiki::Func::getContext();92 $twiki = new Foswiki(); 93 } 94 95 $Foswiki::Plugins::SESSION = $twiki; 96 97 my $context = Foswiki::Func::getContext(); 98 98 99 99 $context->{command_line} = 1; … … 105 105 106 106 my $report = ''; 107 foreach my $web ( TWiki::Func::getListOfWebs( 'user ') ) {107 foreach my $web ( Foswiki::Func::getListOfWebs( 'user ') ) { 108 108 if ( $web =~ /^($webstr)$/ && $web !~ /^($exwebstr)$/ ) { 109 109 $report .= _processWeb( $twiki, $web ); … … 124 124 125 125 #we can get away with a normalise on a list of topics, so long as the list starts with a topic 126 my ($web, $t) = TWiki::Func::normalizeWebTopicName($defaultWeb, $topicList);126 my ($web, $t) = Foswiki::Func::normalizeWebTopicName($defaultWeb, $topicList); 127 127 #TODO: this limits us to subscribing to one web. 128 my $wn = new TWiki::Contrib::MailerContrib::WebNotify(129 $ TWiki::Plugins::SESSION, $web, $TWiki::cfg{NotifyTopicName}, 1 );128 my $wn = new Foswiki::Contrib::MailerContrib::WebNotify( 129 $Foswiki::Plugins::SESSION, $web, $Foswiki::cfg{NotifyTopicName}, 1 ); 130 130 $wn->parsePageSubscriptions( $who, $topicList, $unsubscribe ); 131 131 $wn->writeWebNotify(); … … 151 151 }; 152 152 153 my $ret = TWiki::Contrib::MailerContrib::parsePageList($subscribed, $who, $topicList);153 my $ret = Foswiki::Contrib::MailerContrib::parsePageList($subscribed, $who, $topicList); 154 154 155 155 return (!defined($subscribed->{not_subscribed}) || … … 159 159 my ( $subscribed, $who, $unsubscribe, $topic, $options, $childDepth ) = @_; 160 160 161 require TWiki::Contrib::MailerContrib::WebNotify;162 my ($sweb, $stopic) = TWiki::Func::normalizeWebTopicName($subscribed->{currentWeb}, $topic);161 require Foswiki::Contrib::MailerContrib::WebNotify; 162 my ($sweb, $stopic) = Foswiki::Func::normalizeWebTopicName($subscribed->{currentWeb}, $topic); 163 163 164 164 #TODO: extract this code so we only create $wn objects for each web once.. 165 my $wn = new TWiki::Contrib::MailerContrib::WebNotify( $TWiki::Plugins::SESSION, $sweb, $TWiki::cfg{NotifyTopicName} );165 my $wn = new Foswiki::Contrib::MailerContrib::WebNotify( $Foswiki::Plugins::SESSION, $sweb, $Foswiki::cfg{NotifyTopicName} ); 166 166 my $subscriber = $wn->getSubscriber($who); 167 167 168 my $db = new TWiki::Contrib::MailerContrib::UpData( $TWiki::Plugins::SESSION, $sweb );168 my $db = new Foswiki::Contrib::MailerContrib::UpData( $Foswiki::Plugins::SESSION, $sweb ); 169 169 #TODO: need to check $childDepth topics too (somehow) 170 170 if ( $subscriber->isSubscribedTo($stopic, $db) && … … 207 207 my( $twiki, $web) = @_; 208 208 209 if( ! TWiki::Func::webExists( $web ) ) {209 if( ! Foswiki::Func::webExists( $web ) ) { 210 210 # print STDERR "**** ERROR mailnotifier cannot find web $web\n"; 211 211 return ''; … … 217 217 218 218 # Read the webnotify and load subscriptions 219 my $wn = new TWiki::Contrib::MailerContrib::WebNotify(220 $twiki, $web, $ TWiki::cfg{NotifyTopicName} );219 my $wn = new Foswiki::Contrib::MailerContrib::WebNotify( 220 $twiki, $web, $Foswiki::cfg{NotifyTopicName} ); 221 221 if ( $wn->isEmpty() ) { 222 222 print "\t$web has no subscribers\n" if $verbose; … … 224 224 # create a DB object for parent pointers 225 225 print $wn->stringify(1) if $verbose; 226 my $db = new TWiki::Contrib::MailerContrib::UpData( $twiki, $web );226 my $db = new Foswiki::Contrib::MailerContrib::UpData( $twiki, $web ); 227 227 $report .= _processSubscriptions( $twiki, $web, $wn, $db ); 228 228 } … … 235 235 my ( $twiki, $web, $notify, $db ) = @_; 236 236 237 my $metadir = TWiki::Func::getWorkArea('MailerContrib');237 my $metadir = Foswiki::Func::getWorkArea('MailerContrib'); 238 238 my $notmeta = $web; 239 239 $notmeta =~ s#/#.#g; … … 249 249 if ( $verbose ) { 250 250 print "\tLast notification was at " . 251 TWiki::Time::formatTime( $timeOfLastNotify, 'iso' ). "\n";251 Foswiki::Time::formatTime( $timeOfLastNotify, 'iso' ). "\n"; 252 252 } 253 253 … … 270 270 my %allSet; 271 271 272 if( !defined( & TWiki::Func::eachChangeSince )) {273 require TWiki::Contrib::MailerContrib::CompatibilityHacks;272 if( !defined( &Foswiki::Func::eachChangeSince )) { 273 require Foswiki::Contrib::MailerContrib::CompatibilityHacks; 274 274 } 275 275 276 276 # + 1 because the 'since' check is >= 277 my $it = TWiki::Func::eachChangeSince( $web, $timeOfLastNotify + 1 );277 my $it = Foswiki::Func::eachChangeSince( $web, $timeOfLastNotify + 1 ); 278 278 while( $it->hasNext() ) { 279 279 my $change = $it->next(); 280 280 next if $change->{more} && $change->{more} =~ /minor$/; 281 281 282 next unless TWiki::Func::topicExists( $web, $change->{topic} );282 next unless Foswiki::Func::topicExists( $web, $change->{topic} ); 283 283 284 284 $timeOfLastChange = $change->{time} unless( $timeOfLastChange ); 285 285 286 286 print "\tChange to $change->{topic} at ". 287 TWiki::Time::formatTime( $change->{time}, 'iso' ).287 Foswiki::Time::formatTime( $change->{time}, 'iso' ). 288 288 ". New revision is $change->{revision}\n" if ( $verbose ); 289 289 290 290 # Formulate a change record, irrespective of 291 291 # whether any subscriber is interested 292 $change = new TWiki::Contrib::MailerContrib::Change(292 $change = new Foswiki::Contrib::MailerContrib::Change( 293 293 $twiki, $web, $change->{topic}, $change->{user}, 294 294 $change->{time}, $change->{revision} ); … … 300 300 # For each topic, see if there's a compulsory subscription independent 301 301 # of the time since last notify 302 foreach my $topic ( TWiki::Func::getTopicList($web)) {302 foreach my $topic (Foswiki::Func::getTopicList($web)) { 303 303 $notify->processCompulsory( $topic, $db, \%allSet ); 304 304 } … … 307 307 my $report = _sendChangesMails( 308 308 $twiki, $web, \%changeset, 309 TWiki::Time::formatTime($timeOfLastNotify) );309 Foswiki::Time::formatTime($timeOfLastNotify) ); 310 310 311 311 $report .= _sendNewsletterMails( $twiki, $web, \%allSet); … … 326 326 my $report = ''; 327 327 328 my $skin = TWiki::Func::getSkin();329 my $template = TWiki::Func::readTemplate( 'mailnotify', $skin );330 331 my $homeTopic = $ TWiki::cfg{HomeTopicName};332 333 my $before_html = TWiki::Func::expandTemplate( 'HTML:before' );334 my $middle_html = TWiki::Func::expandTemplate( 'HTML:middle' );335 my $after_html = TWiki::Func::expandTemplate( 'HTML:after' );336 337 my $before_plain = TWiki::Func::expandTemplate( 'PLAIN:before' );338 my $middle_plain = TWiki::Func::expandTemplate( 'PLAIN:middle' );339 my $after_plain = TWiki::Func::expandTemplate( 'PLAIN:after' );340 341 my $mailtmpl = TWiki::Func::expandTemplate( 'MailNotifyBody' );342 $mailtmpl = TWiki::Func::expandCommonVariables(328 my $skin = Foswiki::Func::getSkin(); 329 my $template = Foswiki::Func::readTemplate( 'mailnotify', $skin ); 330 331 my $homeTopic = $Foswiki::cfg{HomeTopicName}; 332 333 my $before_html = Foswiki::Func::expandTemplate( 'HTML:before' ); 334 my $middle_html = Foswiki::Func::expandTemplate( 'HTML:middle' ); 335 my $after_html = Foswiki::Func::expandTemplate( 'HTML:after' ); 336 337 my $before_plain = Foswiki::Func::expandTemplate( 'PLAIN:before' ); 338 my $middle_plain = Foswiki::Func::expandTemplate( 'PLAIN:middle' ); 339 my $after_plain = Foswiki::Func::expandTemplate( 'PLAIN:after' ); 340 341 my $mailtmpl = Foswiki::Func::expandTemplate( 'MailNotifyBody' ); 342 $mailtmpl = Foswiki::Func::expandCommonVariables( 343 343 $mailtmpl, $homeTopic, $web ); 344 if( $ TWiki::cfg{RemoveImgInMailnotify} ) {344 if( $Foswiki::cfg{RemoveImgInMailnotify} ) { 345 345 # change images to [alt] text if there, else remove image 346 346 $mailtmpl =~ s/<img\s[^>]*\balt=\"([^\"]+)[^>]*>/[$1]/goi; … … 360 360 } 361 361 362 $plain =~ s/\($ TWiki::cfg{UsersWebName}\./\(/go;362 $plain =~ s/\($Foswiki::cfg{UsersWebName}\./\(/go; 363 363 364 364 my $mail = $mailtmpl; … … 368 368 $mail =~ s/%PLAIN_TEXT%/$before_plain$plain$after_plain/go; 369 369 $mail =~ s/%LASTDATE%/$lastTime/geo; 370 $mail = TWiki::Func::expandCommonVariables( $mail, $homeTopic, $web );371 372 my $base = $ TWiki::cfg{DefaultUrlHost} . $TWiki::cfg{ScriptUrlPath};370 $mail = Foswiki::Func::expandCommonVariables( $mail, $homeTopic, $web ); 371 372 my $base = $Foswiki::cfg{DefaultUrlHost} . $Foswiki::cfg{ScriptUrlPath}; 373 373 $mail =~ s/(href=\")([^"]+)/$1.relativeURL($base,$2)/goei; 374 374 $mail =~ s/(action=\")([^"]+)/$1.relativeURL($base,$2)/goei; … … 377 377 $mail =~ s/( ?) *<\/?(nop|noautolink)\/?>\n?/$1/gois; 378 378 379 my $error = TWiki::Func::sendEmail( $mail, 5 );379 my $error = Foswiki::Func::sendEmail( $mail, 5 ); 380 380 381 381 if ($error) { … … 410 410 sub _sendNewsletterMail { 411 411 my ($twiki, $web, $topic, $emails) = @_; 412 my $wikiName = TWiki::Func::getWikiName();412 my $wikiName = Foswiki::Func::getWikiName(); 413 413 414 414 # SMELL: this code is almost identical to PublishContrib 415 415 416 416 # Read topic data. 417 my ($meta, $text) = TWiki::Func::readTopic( $web, $topic );418 419 if (!defined( & TWiki::Func::pushTopicContext )) {420 require TWiki::Contrib::MailerContrib::TopicContext;421 } 422 TWiki::Func::pushTopicContext( $web, $topic );417 my ($meta, $text) = Foswiki::Func::readTopic( $web, $topic ); 418 419 if (!defined( &Foswiki::Func::pushTopicContext )) { 420 require Foswiki::Contrib::MailerContrib::TopicContext; 421 } 422 Foswiki::Func::pushTopicContext( $web, $topic ); 423 423 424 424 $twiki->enterContext( 'can_render_meta', $meta ); 425 425 426 426 # Get the skin for this topic 427 my $skin = TWiki::Func::getSkin();428 TWiki::Func::readTemplate( 'newsletter', $skin );429 my $header = TWiki::Func::expandTemplate( 'NEWS:header' );430 my $body = TWiki::Func::expandTemplate( 'NEWS:body' );431 my $footer = TWiki::Func::expandTemplate( 'NEWS:footer' );427 my $skin = Foswiki::Func::getSkin(); 428 Foswiki::Func::readTemplate( 'newsletter', $skin ); 429 my $header = Foswiki::Func::expandTemplate( 'NEWS:header' ); 430 my $body = Foswiki::Func::expandTemplate( 'NEWS:body' ); 431 my $footer = Foswiki::Func::expandTemplate( 'NEWS:footer' ); 432 432 433 433 my ($revdate, $revuser, $maxrev); … … 437 437 $body =~ s/%TEXT%/$text/g; 438 438 # Don't render the header, it is preformatted 439 $header = TWiki::Func::expandCommonVariables($header, $topic, $web);439 $header = Foswiki::Func::expandCommonVariables($header, $topic, $web); 440 440 my $tmpl = "$body\n$footer"; 441 $tmpl = TWiki::Func::expandCommonVariables($tmpl, $topic, $web);442 $tmpl = TWiki::Func::renderText($tmpl, "", $meta);441 $tmpl = Foswiki::Func::expandCommonVariables($tmpl, $topic, $web); 442 $tmpl = Foswiki::Func::renderText($tmpl, "", $meta); 443 443 $tmpl = "$header$tmpl"; 444 444 … … 475 475 476 476 # Rewrite absolute URLs 477 my $base = $ TWiki::cfg{DefaultUrlHost} . $TWiki::cfg{ScriptUrlPath};477 my $base = $Foswiki::cfg{DefaultUrlHost} . $Foswiki::cfg{ScriptUrlPath}; 478 478 $tmpl =~ s/(href=\")([^"]+)/$1.relativeURL($base,$2)/goei; 479 479 $tmpl =~ s/(action=\")([^"]+)/$1.relativeURL($base,$2)/goei; … … 489 489 $mail =~ s/%EMAILTO%/$email/go; 490 490 491 my $base = $ TWiki::cfg{DefaultUrlHost} . $TWiki::cfg{ScriptUrlPath};491 my $base = $Foswiki::cfg{DefaultUrlHost} . $Foswiki::cfg{ScriptUrlPath}; 492 492 $mail =~ s/(href=\")([^"]+)/$1.relativeURL($base,$2)/goei; 493 493 $mail =~ s/(action=\")([^"]+)/$1.relativeURL($base,$2)/goei; … … 496 496 $mail =~ s/( ?) *<\/?(nop|noautolink)\/?>\n?/$1/gois; 497 497 498 my $error = TWiki::Func::sendEmail( $mail, 5 );498 my $error = Foswiki::Func::sendEmail( $mail, 5 ); 499 499 500 500 if ($error) { … … 508 508 $report .= "\t$sentMails newsletters from $web\n"; 509 509 510 TWiki::Func::popTopicContext();510 Foswiki::Func::popTopicContext(); 511 511 512 512 return $report; -
trunk/MailerContrib/lib/Foswiki/Contrib/MailerContrib/Change.pm
r781 r811 2 2 # 3 3 # Copyright (C) 2004 Wind River Systems Inc. 4 # Copyright (C) 1999-2006 TWiki Contributors.5 # All Rights Reserved. TWiki Contributors4 # Copyright (C) 1999-2006 Foswiki Contributors. 5 # All Rights Reserved. Foswiki Contributors 6 6 # are listed in the AUTHORS file in the root of this distribution. 7 7 # NOTE: Please extend that file, not this notice. … … 23 23 =pod 24 24 25 ---+ package TWiki::Contrib::MailerContrib::Change25 ---+ package Foswiki::Contrib::MailerContrib::Change 26 26 Object that represents a change to a topic. 27 27 28 28 =cut 29 29 30 package TWiki::Contrib::MailerContrib::Change;31 32 use TWiki;30 package Foswiki::Contrib::MailerContrib::Change; 31 32 use Foswiki; 33 33 34 34 use URI::Escape; … … 57 57 my $user; 58 58 # SMELL: call to unpublished core function 59 if (defined(& TWiki::Users::findUser)) {59 if (defined(&Foswiki::Users::findUser)) { 60 60 $user = $session->{users}->findUser( $author, undef, 1 ); 61 61 $this->{AUTHOR} = $user ? $user->wikiName() : $author; 62 62 } else { 63 $this->{AUTHOR} = TWiki::Func::getWikiName($author);63 $this->{AUTHOR} = Foswiki::Func::getWikiName($author); 64 64 } 65 65 $this->{TIME} = $time; … … 90 90 sub merge { 91 91 my( $this, $other ) = @_; 92 ASSERT($this->isa( ' TWiki::Contrib::MailerContrib::Change' )) if DEBUG;93 ASSERT($other->isa( ' TWiki::Contrib::MailerContrib::Change' )) if DEBUG;92 ASSERT($this->isa( 'Foswiki::Contrib::MailerContrib::Change' )) if DEBUG; 93 ASSERT($other->isa( 'Foswiki::Contrib::MailerContrib::Change' )) if DEBUG; 94 94 95 95 if( $other->{CURR_REV} > $this->{CURR_REV} ) { … … 119 119 120 120 unless( defined $this->{HTML_SUMMARY} ) { 121 if( defined & TWiki::Func::summariseChanges ) {121 if( defined &Foswiki::Func::summariseChanges ) { 122 122 $this->{HTML_SUMMARY} = 123 TWiki::Func::summariseChanges(123 Foswiki::Func::summariseChanges( 124 124 $this->{WEB}, $this->{TOPIC}, $this->{BASE_REV}, 125 125 $this->{CURR_REV}, 1 ); … … 134 134 $html =~ s/%TOPICNAME%/$this->{TOPIC}/g; 135 135 $html =~ s/%AUTHOR%/$this->{AUTHOR}/g; 136 my $tim = TWiki::Time::formatTime( $this->{TIME} );136 my $tim = Foswiki::Time::formatTime( $this->{TIME} ); 137 137 $html =~ s/%TIME%/$tim/go; 138 138 $html =~ s/%CUR_REV%/$this->{CURR_REV}/g; … … 149 149 } 150 150 $html =~ s/%REVISION%/$frev/g; 151 $html = TWiki::Func::expandCommonVariables(151 $html = Foswiki::Func::expandCommonVariables( 152 152 $html, $this->{TOPIC}, $this->{WEB} ); 153 $html = TWiki::Func::renderText( $html );153 $html = Foswiki::Func::renderText( $html ); 154 154 $html =~ s/%TEXTHEAD%/$this->{HTML_SUMMARY}/g; 155 155 … … 169 169 unless( defined $this->{TEXT_SUMMARY} ) { 170 170 my $s; 171 if( defined & TWiki::Func::summariseChanges ) {172 $s = TWiki::Func::summariseChanges(171 if( defined &Foswiki::Func::summariseChanges ) { 172 $s = Foswiki::Func::summariseChanges( 173 173 $this->{WEB}, $this->{TOPIC}, $this->{BASE_REV}, 174 174 $this->{CURR_REV}, 0 ); … … 183 183 } 184 184 185 my $tim = TWiki::Time::formatTime( $this->{TIME} );185 my $tim = Foswiki::Time::formatTime( $this->{TIME} ); 186 186 187 187 # URL-encode topic names for use of I18N topic names in plain text -
trunk/MailerContrib/lib/Foswiki/Contrib/MailerContrib/CompatibilityHacks.pm
r14 r811 28 28 } 29 29 30 package TWiki::Func;30 package Foswiki::Func; 31 31 32 32 sub eachChangeSince { … … 34 34 35 35 my $changes; 36 if( open(F, "<$ TWiki::cfg{DataDir}/$web/.changes")) {36 if( open(F, "<$Foswiki::cfg{DataDir}/$web/.changes")) { 37 37 local $/ = undef; 38 38 $changes = <F>; -
trunk/MailerContrib/lib/Foswiki/Contrib/MailerContrib/Config.spec
r14 r811 9 9 # If this is not defined, then the default setting of 10 10 # =[A-Za-z0-9.+-_]+\@[A-Za-z0-9.-]+= is used. 11 $ TWiki::cfg{MailerContrib}{EmailFilterIn} = '';11 $Foswiki::cfg{MailerContrib}{EmailFilterIn} = ''; 12 12 -
trunk/MailerContrib/lib/Foswiki/Contrib/MailerContrib/MANIFEST
r14 r811 1 lib/ TWiki/Contrib/MailerContrib/Config.spec 0444 Spec file for =configure=2 lib/ TWiki/Contrib/MailerContrib/WebNotify.pm 04443 lib/ TWiki/Contrib/MailerContrib/Subscriber.pm 04444 lib/ TWiki/Contrib/MailerContrib/Subscription.pm 04445 lib/ TWiki/Contrib/MailerContrib/TopicContext.pm 04446 lib/ TWiki/Contrib/MailerContrib/Change.pm 04447 lib/ TWiki/Contrib/MailerContrib/Constants.pm 04448 lib/ TWiki/Contrib/MailerContrib/UpData.pm 04449 lib/ TWiki/Contrib/MailerContrib/CompatibilityHacks.pm 044410 lib/ TWiki/Contrib/MailerContrib.pm 044411 data/ TWiki/MailerContrib.txt 06441 lib/Foswiki/Contrib/MailerContrib/Config.spec 0444 Spec file for =configure= 2 lib/Foswiki/Contrib/MailerContrib/WebNotify.pm 0444 3 lib/Foswiki/Contrib/MailerContrib/Subscriber.pm 0444 4 lib/Foswiki/Contrib/MailerContrib/Subscription.pm 0444 5 lib/Foswiki/Contrib/MailerContrib/TopicContext.pm 0444 6 lib/Foswiki/Contrib/MailerContrib/Change.pm 0444 7 lib/Foswiki/Contrib/MailerContrib/Constants.pm 0444 8 lib/Foswiki/Contrib/MailerContrib/UpData.pm 0444 9 lib/Foswiki/Contrib/MailerContrib/CompatibilityHacks.pm 0444 10 lib/Foswiki/Contrib/MailerContrib.pm 0444 11 data/System/MailerContrib.txt 0644 12 12 tools/mailnotify 0555 13 13 templates/mailnotify.tmpl 0444 14 14 templates/newsletter.tmpl 0444 15 pub/ TWiki/MailerContrib/wikiringlogo20x20.png 066016 pub/ TWiki/MailerContrib/logo.gif 066015 pub/System/MailerContrib/wikiringlogo20x20.png 0660 16 pub/System/MailerContrib/logo.gif 0660 -
trunk/MailerContrib/lib/Foswiki/Contrib/MailerContrib/Subscriber.pm
r781 r811 2 2 # 3 3 # Copyright (C) 2004 Wind River Systems Inc. 4 # Copyright (C) 1999-2006 TWiki Contributors.5 # All Rights Reserved. TWiki Contributors4 # Copyright (C) 1999-2006 Foswiki Contributors. 5 # All Rights Reserved. Foswiki Contributors 6 6 # are listed in the AUTHORS file in the root of this distribution. 7 7 # NOTE: Please extend that file, not this notice. … … 23 23 =pod 24 24 25 ---+ package TWiki::Contrib::MailerContrib::Subscriber25 ---+ package Foswiki::Contrib::MailerContrib::Subscriber 26 26 Object that represents a subscriber to notification. A subscriber is 27 27 a name (which may be a wikiName or an email address) and a list of … … 33 33 =cut 34 34 35 package TWiki::Contrib::MailerContrib::Subscriber;36 37 use TWiki;38 use TWiki::Plugins;35 package Foswiki::Contrib::MailerContrib::Subscriber; 36 37 use Foswiki; 38 use Foswiki::Plugins; 39 39 use Assert; 40 40 41 require TWiki::Contrib::MailerContrib::WebNotify;41 require Foswiki::Contrib::MailerContrib::WebNotify; 42 42 43 43 =pod … … 87 87 return $emails unless $name; 88 88 89 if ( $name =~ /^$ TWiki::cfg{MailerContrib}{EmailFilterIn}$/ ) {89 if ( $name =~ /^$Foswiki::cfg{MailerContrib}{EmailFilterIn}$/ ) { 90 90 push( @{$emails}, $name ); 91 91 } else { 92 my $users = $ TWiki::Plugins::SESSION->{users};92 my $users = $Foswiki::Plugins::SESSION->{users}; 93 93 if ($users->can('findUserByWikiName')) { 94 94 # User is represented by a wikiname. Map to a canonical … … 210 210 ---++ isSubscribedTo($topic, $db) -> $subscription 211 211 * =$topic= - Topic object we are checking 212 * =$db= - TWiki::Contrib::MailerContrib::UpData database of parents212 * =$db= - Foswiki::Contrib::MailerContrib::UpData database of parents 213 213 Check if we have a subscription to the given topic. Return the subscription 214 214 that matches if we do, undef otherwise. … … 232 232 ---++ isUnsubscribedFrom($topic) -> $subscription 233 233 * =$topic= - Topic object we are checking 234 * =$db= - TWiki::Contrib::MailerContrib::UpData database of parents234 * =$db= - Foswiki::Contrib::MailerContrib::UpData database of parents 235 235 Check if we have an unsubscription from the given topic. Return the subscription that matches if we do, undef otherwise. 236 236 … … 267 267 268 268 my $name = $this->{name}; 269 if ($name =~ /^$ TWiki::regex{wikiWordRegex}$/) {269 if ($name =~ /^$Foswiki::regex{wikiWordRegex}$/) { 270 270 $name = '%USERSWEB%.'.$name; 271 } elsif ($name !~ /^$ TWiki::cfg{MailerContrib}{EmailFilterIn})$/) {271 } elsif ($name !~ /^$Foswiki::cfg{MailerContrib}{EmailFilterIn})$/) { 272 272 $name = $name =~ /'/ ? '"'.$name.'"' : "'$name'"; 273 273 } -
trunk/MailerContrib/lib/Foswiki/Contrib/MailerContrib/Subscription.pm
r781 r811 2 2 # 3 3 # Copyright (C) 2004 Wind River Systems Inc. 4 # Copyright (C) 1999-2006 TWiki Contributors.5 # All Rights Reserved. TWiki Contributors4 # Copyright (C) 1999-2006 Foswiki Contributors. 5 # All Rights Reserved. Foswiki Contributors 6 6 # are listed in the AUTHORS file in the root of this distribution. 7 7 # NOTE: Please extend that file, not this notice. … … 14 14 =pod 15 15 16 ---+ package TWiki::Contrib::MailerContrib::Subscription16 ---+ package Foswiki::Contrib::MailerContrib::Subscription 17 17 Object that represents a single subscription of a user to 18 18 notification on a page. A subscription is expressed as a page … … 22 22 =cut 23 23 24 package TWiki::Contrib::MailerContrib::Subscription;24 package Foswiki::Contrib::MailerContrib::Subscription; 25 25 26 26 use Assert; 27 27 28 use TWiki::Contrib::MailerContrib::Constants;28 use Foswiki::Contrib::MailerContrib::Constants; 29 29 30 30 =pod … … 78 78 ---++ matches($topic, $db, $depth) -> boolean 79 79 * =$topic= - Topic object we are checking 80 * =$db= - TWiki::Contrib::MailerContrib::UpData database of parent names80 * =$db= - Foswiki::Contrib::MailerContrib::UpData database of parent names 81 81 * =$depth= - If non-zero, check if the parent of the given topic matches as well. undef = 0. 82 82 Check if we match this topic. Recurses up the parenthood tree seeing if … … 109 109 ---++ covers($other, $db) -> $boolean 110 110 * =$other= - Other subscription object we are checking 111 * =$db= - TWiki::Contrib::MailerContrib::UpData database of parent names111 * =$db= - Foswiki::Contrib::MailerContrib::UpData database of parent names 112 112 Return true if this subscription already covers all the topics 113 113 specified by another subscription. Thus: -
trunk/MailerContrib/lib/Foswiki/Contrib/MailerContrib/TopicContext.pm
r14 r811 2 2 # by MailerContrib. 3 3 4 sub TWiki::Func::pushTopicContext {4 sub Foswiki::Func::pushTopicContext { 5 5 my( $web, $topic ) = @_; 6 my $twiki = $ TWiki::Plugins::SESSION;6 my $twiki = $Foswiki::Plugins::SESSION; 7 7 my( $web, $topic ) = $twiki->normalizeWebTopicName( @_ ); 8 8 my $old = { … … 20 20 } 21 21 22 sub TWiki::Func::popTopicContext {23 my $twiki = $ TWiki::Plugins::SESSION;22 sub Foswiki::Func::popTopicContext { 23 my $twiki = $Foswiki::Plugins::SESSION; 24 24 my $old = pop( @{$twiki->{_FUNC_PREFS_STACK}} ); 25 25 $twiki->{prefs}->restore( $old->{mark}); -
trunk/MailerContrib/lib/Foswiki/Contrib/MailerContrib/UpData.pm
r781 r811 2 2 # 3 3 # Copyright (C) 2004 Wind River Systems Inc. 4 # Copyright (C) 1999-2006 TWiki Contributors.5 # All Rights Reserved. TWiki Contributors4 # Copyright (C) 1999-2006 Foswiki Contributors. 5 # All Rights Reserved. Foswiki Contributors 6 6 # are listed in the AUTHORS file in the root of this distribution. 7 7 # NOTE: Please extend that file, not this notice. … … 23 23 =pod 24 24 25 ---+ package TWiki::Contrib::MailerContrib::UpData25 ---+ package Foswiki::Contrib::MailerContrib::UpData 26 26 Object that lazy-scans topics to extract 27 27 parent relationships. … … 29 29 =cut 30 30 31 package TWiki::Contrib::MailerContrib::UpData;31 package Foswiki::Contrib::MailerContrib::UpData; 32 32 33 33 =pod … … 60 60 if ( ! defined( $this->{parent}{$topic} )) { 61 61 my( $meta, $text ) = 62 TWiki::Func::readTopic( $this->{web}, $topic );62 Foswiki::Func::readTopic( $this->{web}, $topic ); 63 63 my $parent = $meta->get('TOPICPARENT'); 64 64 $this->{parent}{$topic} = $parent->{name} if $parent; -
trunk/MailerContrib/lib/Foswiki/Contrib/MailerContrib/WebNotify.pm
r781 r811 2 2 # 3 3 # Copyright (C) 2004 Wind River Systems Inc. 4 # Copyright (C) 1999-2007 TWiki Contributors.5 # All Rights Reserved. TWiki Contributors4 # Copyright (C) 1999-2007 Foswiki Contributors. 5 # All Rights Reserved. Foswiki Contributors 6 6 # are listed in the AUTHORS file in the root of this distribution. 7 7 # NOTE: Please extend that file, not this notice. … … 21 21 =pod 22 22 23 ---+ package TWiki::Contrib::MailerContrib::WebNotify23 ---+ package Foswiki::Contrib::MailerContrib::WebNotify 24 24 Object that represents the contents of a %NOTIFYTOPIC% topic in a TWiki web. 25 25 26 Note that =$ TWiki::Plugins::SESSION= is used to find the TWiki session, and26 Note that =$Foswiki::Plugins::SESSION= is used to find the TWiki session, and 27 27 must be set up before this class is used. 28 28 29 29 =cut 30 30 31 package TWiki::Contrib::MailerContrib::WebNotify;31 package Foswiki::Contrib::MailerContrib::WebNotify; 32 32 33 33 use strict; … … 36 36 use Assert; 37 37 38 require TWiki::Func;39 require TWiki::Contrib::MailerContrib;40 require TWiki::Contrib::MailerContrib::Subscriber;41 require TWiki::Contrib::MailerContrib::Subscription;38 require Foswiki::Func; 39 require Foswiki::Contrib::MailerContrib; 40 require Foswiki::Contrib::MailerContrib::Subscriber; 41 require Foswiki::Contrib::MailerContrib::Subscription; 42 42 43 43 =pod … … 62 62 63 63 # Ensure the contrib is initialised 64 TWiki::Contrib::MailerContrib::initContrib();64 Foswiki::Contrib::MailerContrib::initContrib(); 65 65 66 66 $this->{web} = $web; 67 $this->{topic} = $topic || $ TWiki::cfg{NotifyTopicName} || 'WebNotify';67 $this->{topic} = $topic || $Foswiki::cfg{NotifyTopicName} || 'WebNotify'; 68 68 $this->{pretext} = ''; 69 69 $this->{posttext} = ''; … … 71 71 $this->{noexpandgroups} = $noexpandgroups; 72 72 73 if( TWiki::Func::topicExists( $web, $topic )) {73 if( Foswiki::Func::topicExists( $web, $topic )) { 74 74 $this->_load(); 75 75 } … … 89 89 sub writeWebNotify { 90 90 my $this = shift; 91 TWiki::Func::saveTopicText(91 Foswiki::Func::saveTopicText( 92 92 $this->{web}, 93 93 $this->{topic}, … … 114 114 unless ( $noAdd || defined( $subscriber )) { 115 115 $subscriber = 116 new TWiki::Contrib::MailerContrib::Subscriber( $name );116 new Foswiki::Contrib::MailerContrib::Subscriber( $name ); 117 117 $this->{subscribers}{$name} = $subscriber; 118 118 } … … 151 151 my @names = ($name); 152 152 unless ($this->{noexpandgroups}) { 153 if (defined & TWiki::Func::eachGroupMember) {154 my $it = TWiki::Func::eachGroupMember( $name );153 if (defined &Foswiki::Func::eachGroupMember) { 154 my $it = Foswiki::Func::eachGroupMember( $name ); 155 155 if( $it ) { 156 156 @names = (); … … 161 161 } 162 162 } else { 163 my $user = TWiki::User->new($this->{session}, '', $name);163 my $user = Foswiki::User->new($this->{session}, '', $name); 164 164 if ($user->isGroup) { 165 165 @names = map {$_->wikiName} @{$user->groupMembers}; … … 170 170 foreach my $n (@names) { 171 171 my $subscriber = $this->getSubscriber( $n ); 172 my $sub = new TWiki::Contrib::MailerContrib::Subscription(172 my $sub = new Foswiki::Contrib::MailerContrib::Subscription( 173 173 $topics, $depth, $opts ); 174 174 $subscriber->subscribe( $sub ); … … 193 193 my @names = ( $name ); 194 194 unless ($this->{noexpandgroups}) { 195 if (defined & TWiki::Func::eachGroupMember) {196 my $it = TWiki::Func::eachGroupMember( $name );195 if (defined &Foswiki::Func::eachGroupMember) { 196 my $it = Foswiki::Func::eachGroupMember( $name ); 197 197 if( $it ) { 198 198 @names = (); … … 203 203 } 204 204 } else { 205 my $user = TWiki::User->new($this->{session}, '', $name);205 my $user = Foswiki::User->new($this->{session}, '', $name); 206 206 if ($user->isGroup) { 207 207 @names = map {$_->wikiName} @{$user->groupMembers}; … … 212 212 foreach my $n (@names) { 213 213 my $subscriber = $this->getSubscriber( $n ); 214 my $sub = new TWiki::Contrib::MailerContrib::Subscription(214 my $sub = new Foswiki::Contrib::MailerContrib::Subscription( 215 215 $topics, $depth, 0 ); 216 216 $subscriber->unsubscribe( $sub ); … … 247 247 248 248 ---++ processChange($change, $db, $changeSet, $seenSet, $allSet) 249 * =$change= - ref of a TWiki::Contrib::Mailer::Change250 * =$db= - TWiki::Contrib::MailerContrib::UpData database of parent references249 * =$change= - ref of a Foswiki::Contrib::Mailer::Change 250 * =$db= - Foswiki::Contrib::MailerContrib::UpData database of parent references 251 251 * =$changeSet= - ref of a hash mapping emails to sets of changes 252 252 * =$seenSet= - ref of a hash recording indices of topics already seen … … 264 264 my $web = $change->{WEB}; 265 265 my %authors = map { $_ => 1 } 266 @{ TWiki::Contrib::MailerContrib::Subscriber::getEmailAddressesForUser(266 @{Foswiki::Contrib::MailerContrib::Subscriber::getEmailAddressesForUser( 267 267 $change->{author})}; 268 268 … … 272 272 if ($subs && !$subscriber->isUnsubscribedFrom( $topic, $db )) { 273 273 274 next unless TWiki::Func::checkAccessPermission(274 next unless Foswiki::Func::checkAccessPermission( 275 275 'VIEW', $name, undef, $topic, $this->{web}, undef ); 276 276 … … 306 306 ---++ processCompulsory($topic, $db, \%allSet) 307 307 * =$topic= - topic name 308 * =$db= - TWiki::Contrib::MailerContrib::UpData database of parent references308 * =$db= - Foswiki::Contrib::MailerContrib::UpData database of parent references 309 309 * =\%allSet= - ref of a hash that maps topics to email addresses for news subscriptions 310 310 … … 346 346 my $this = shift; 347 347 348 my ( $meta, $text ) = TWiki::Func::readTopic(348 my ( $meta, $text ) = Foswiki::Func::readTopic( 349 349 $this->{web}, $this->{topic} ); 350 350 my $in_pre = 1; … … 354 354 # join \ terminated lines 355 355 $text =~ s/\\\r?\n//gs; 356 my $webRE = qr/(?:$ TWiki::cfg{UsersWebName}\.)?/o;356 my $webRE = qr/(?:$Foswiki::cfg{UsersWebName}\.)?/o; 357 357 foreach my $baseline ( split ( /\r?\n/, $text )) { 358 my $line = TWiki::Func::expandCommonVariables(358 my $line = Foswiki::Func::expandCommonVariables( 359 359 $baseline, $this->{topic}, $this->{web}, $meta); 360 if( $line =~ /^\s+\*\s$webRE($ TWiki::regex{wikiWordRegex})\s+\-\s+($TWiki::cfg{MailerContrib}{EmailFilterIn}+)\s*$/o361 && $1 ne $ TWiki::cfg{DefaultUserWikiName}) {360 if( $line =~ /^\s+\*\s$webRE($Foswiki::regex{wikiWordRegex})\s+\-\s+($Foswiki::cfg{MailerContrib}{EmailFilterIn}+)\s*$/o 361 && $1 ne $Foswiki::cfg{DefaultUserWikiName}) { 362 362 # Main.WikiName - email@domain (legacy format) 363 363 $this->subscribe( $2, '*', 0, 0 ); 364 364 $in_pre = 0; 365 365 } 366 elsif ( $line =~ /^\s+\*\s$webRE($ TWiki::regex{wikiWordRegex}|'.*?'|".*?"|$TWiki::cfg{MailerContrib}{EmailFilterIn})\s*(:.*)?$/o367 && $1 ne $ TWiki::cfg{DefaultUserWikiName}) {366 elsif ( $line =~ /^\s+\*\s$webRE($Foswiki::regex{wikiWordRegex}|'.*?'|".*?"|$Foswiki::cfg{MailerContrib}{EmailFilterIn})\s*(:.*)?$/o 367 && $1 ne $Foswiki::cfg{DefaultUserWikiName}) { 368 368 my $subscriber = $1; 369 369 # Get the topic list from the last bracket matched. Have to do it … … 397 397 $this->{topicSub} = \&_subscribeTopic; 398 398 399 my $ret = TWiki::Contrib::MailerContrib::parsePageList($this, $who, $spec, $unsubscribe);399 my $ret = Foswiki::Contrib::MailerContrib::parsePageList($this, $who, $spec, $unsubscribe); 400 400 if ( $ret =~ m/\S/ ) { 401 TWiki::Func::writeWarning(401 Foswiki::Func::writeWarning( 402 402 "Badly formatted page list at $who: $spec"); 403 403 return -1; … … 409 409 my ( $this, $who, $unsubscribe, $webTopic, $options, $childDepth ) = @_; 410 410 411 my ($web, $topic) = TWiki::Func::normalizeWebTopicName($this->{web}, $webTopic);411 my ($web, $topic) = Foswiki::Func::normalizeWebTopicName($this->{web}, $webTopic); 412 412 413 413 #print STDERR "_subscribeTopic($topic)\n"; … … 438 438 unless (defined $this->{nomail}{$name}) { 439 439 $this->{nomail}{$name} = 1; 440 TWiki::Func::writeWarning(440 Foswiki::Func::writeWarning( 441 441 "Failed to find permitted email for '". 442 442 $subscriber->stringify()."' when processing web '$web'"); -
trunk/MailerContrib/lib/Foswiki/Contrib/MailerContrib/build.pl
r736 r811
