Changeset 1041
- Timestamp:
- 11/28/08 13:33:03 (3 years ago)
- Location:
- trunk
- Files:
-
- 86 edited
-
EditTablePlugin/lib/Foswiki/Plugins/EditTablePlugin.pm (modified) (2 diffs)
-
EmptyPlugin/lib/Foswiki/Plugins/EmptyPlugin.pm (modified) (24 diffs)
-
InterwikiPlugin/lib/Foswiki/Plugins/InterwikiPlugin.pm (modified) (1 diff)
-
PerlDocPlugin/lib/TWiki/Plugins/PerlDocPlugin.pm (modified) (6 diffs)
-
TWikiCompatibilityPlugin/lib/Foswiki/Plugins/TWikiCompatibilityPlugin.pm (modified) (3 diffs)
-
TwistyPlugin/lib/Foswiki/Plugins/TwistyPlugin.pm (modified) (2 diffs)
-
core/data/System/DevelopingPlugins.txt (modified) (1 diff)
-
core/data/System/PerlDoc.txt (modified) (1 diff)
-
core/lib/Foswiki.pm (modified) (47 diffs)
-
core/lib/Foswiki/Access.pm (modified) (4 diffs)
-
core/lib/Foswiki/AccessControlException.pm (modified) (4 diffs)
-
core/lib/Foswiki/AggregateIterator.pm (modified) (4 diffs)
-
core/lib/Foswiki/Attach.pm (modified) (4 diffs)
-
core/lib/Foswiki/Attrs.pm (modified) (7 diffs)
-
core/lib/Foswiki/Compatibility.pm (modified) (4 diffs)
-
core/lib/Foswiki/Configure/Load.pm (modified) (4 diffs)
-
core/lib/Foswiki/Configure/UIs/EXTEND.pm (modified) (1 diff)
-
core/lib/Foswiki/Engine.pm (modified) (1 diff)
-
core/lib/Foswiki/EngineException.pm (modified) (3 diffs)
-
core/lib/Foswiki/Form.pm (modified) (9 diffs)
-
core/lib/Foswiki/Form/FieldDefinition.pm (modified) (12 diffs)
-
core/lib/Foswiki/Form/ListFieldDefinition.pm (modified) (1 diff)
-
core/lib/Foswiki/Form/Select.pm (modified) (1 diff)
-
core/lib/Foswiki/Func.pm (modified) (192 diffs)
-
core/lib/Foswiki/I18N.pm (modified) (8 diffs)
-
core/lib/Foswiki/I18N/Extract.pm (modified) (3 diffs)
-
core/lib/Foswiki/If/Node.pm (modified) (1 diff)
-
core/lib/Foswiki/If/OP_isweb.pm (modified) (3 diffs)
-
core/lib/Foswiki/If/Parser.pm (modified) (1 diff)
-
core/lib/Foswiki/Infix/Error.pm (modified) (1 diff)
-
core/lib/Foswiki/Infix/Node.pm (modified) (4 diffs)
-
core/lib/Foswiki/Infix/Parser.pm (modified) (4 diffs)
-
core/lib/Foswiki/LineIterator.pm (modified) (4 diffs)
-
core/lib/Foswiki/ListIterator.pm (modified) (4 diffs)
-
core/lib/Foswiki/LoginManager.pm (modified) (34 diffs)
-
core/lib/Foswiki/LoginManager/ApacheLogin.pm (modified) (6 diffs)
-
core/lib/Foswiki/LoginManager/Session.pm (modified) (1 diff)
-
core/lib/Foswiki/LoginManager/TemplateLogin.pm (modified) (5 diffs)
-
core/lib/Foswiki/Merge.pm (modified) (4 diffs)
-
core/lib/Foswiki/Meta.pm (modified) (24 diffs)
-
core/lib/Foswiki/Net.pm (modified) (3 diffs)
-
core/lib/Foswiki/Net/HTTPResponse.pm (modified) (1 diff)
-
core/lib/Foswiki/OopsException.pm (modified) (5 diffs)
-
core/lib/Foswiki/Plugin.pm (modified) (1 diff)
-
core/lib/Foswiki/Plugins.pm (modified) (10 diffs)
-
core/lib/Foswiki/Plurals.pm (modified) (2 diffs)
-
core/lib/Foswiki/Prefs.pm (modified) (15 diffs)
-
core/lib/Foswiki/Prefs/Parser.pm (modified) (4 diffs)
-
core/lib/Foswiki/Prefs/PrefsCache.pm (modified) (7 diffs)
-
core/lib/Foswiki/Query/HoistREs.pm (modified) (2 diffs)
-
core/lib/Foswiki/Query/Node.pm (modified) (2 diffs)
-
core/lib/Foswiki/Query/Parser.pm (modified) (1 diff)
-
core/lib/Foswiki/Render.pm (modified) (24 diffs)
-
core/lib/Foswiki/Request.pm (modified) (1 diff)
-
core/lib/Foswiki/Response.pm (modified) (1 diff)
-
core/lib/Foswiki/Sandbox.pm (modified) (6 diffs)
-
core/lib/Foswiki/Search.pm (modified) (5 diffs)
-
core/lib/Foswiki/Store.pm (modified) (44 diffs)
-
core/lib/Foswiki/Store/QueryAlgorithms/BruteForce.pm (modified) (1 diff)
-
core/lib/Foswiki/Store/RcsFile.pm (modified) (42 diffs)
-
core/lib/Foswiki/Store/RcsLite.pm (modified) (1 diff)
-
core/lib/Foswiki/Store/RcsWrap.pm (modified) (2 diffs)
-
core/lib/Foswiki/Store/SearchAlgorithms/Forking.pm (modified) (1 diff)
-
core/lib/Foswiki/Store/SearchAlgorithms/PurePerl.pm (modified) (1 diff)
-
core/lib/Foswiki/Templates.pm (modified) (8 diffs)
-
core/lib/Foswiki/Time.pm (modified) (9 diffs)
-
core/lib/Foswiki/UI.pm (modified) (6 diffs)
-
core/lib/Foswiki/UI/ChangeForm.pm (modified) (2 diffs)
-
core/lib/Foswiki/UI/Edit.pm (modified) (1 diff)
-
core/lib/Foswiki/UI/Manage.pm (modified) (7 diffs)
-
core/lib/Foswiki/UI/Oops.pm (modified) (2 diffs)
-
core/lib/Foswiki/UI/RDiff.pm (modified) (1 diff)
-
core/lib/Foswiki/UI/Register.pm (modified) (8 diffs)
-
core/lib/Foswiki/UI/Rest.pm (modified) (1 diff)
-
core/lib/Foswiki/UI/Save.pm (modified) (2 diffs)
-
core/lib/Foswiki/UI/Search.pm (modified) (1 diff)
-
core/lib/Foswiki/UI/Statistics.pm (modified) (1 diff)
-
core/lib/Foswiki/UI/Upload.pm (modified) (3 diffs)
-
core/lib/Foswiki/UI/View.pm (modified) (3 diffs)
-
core/lib/Foswiki/UserMapping.pm (modified) (23 diffs)
-
core/lib/Foswiki/Users.pm (modified) (29 diffs)
-
core/lib/Foswiki/Users/ApacheHtpasswdUser.pm (modified) (2 diffs)
-
core/lib/Foswiki/Users/BaseUserMapping.pm (modified) (20 diffs)
-
core/lib/Foswiki/Users/HtPasswdUser.pm (modified) (1 diff)
-
core/lib/Foswiki/Users/Password.pm (modified) (14 diffs)
-
core/lib/Monitor.pm (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/EditTablePlugin/lib/Foswiki/Plugins/EditTablePlugin.pm
r893 r1041 131 131 } 132 132 133 = pod133 =begin TML 134 134 135 135 Style sheet for table in view mode … … 150 150 } 151 151 152 = pod152 =begin TML 153 153 154 154 Style sheet and javascript for table in edit mode -
trunk/EmptyPlugin/lib/Foswiki/Plugins/EmptyPlugin.pm
r1022 r1041 1 1 # See bottom of file for default license and copyright information 2 2 3 = pod3 =begin TML 4 4 5 5 ---+ package EmptyPlugin … … 88 88 $pluginName = 'EmptyPlugin'; 89 89 90 = pod90 =begin TML 91 91 92 92 ---++ initPlugin($topic, $web, $user, $installWeb) -> $boolean … … 172 172 } 173 173 174 = pod174 =begin TML 175 175 176 176 ---++ earlyInitPlugin() … … 187 187 } 188 188 189 = pod189 =begin TML 190 190 191 191 ---++ initializeUserHandler( $loginName, $url, $pathInfo ) … … 212 212 } 213 213 214 = pod214 =begin TML 215 215 216 216 ---++ registrationHandler($web, $wikiName, $loginName ) … … 232 232 } 233 233 234 = pod234 =begin TML 235 235 236 236 ---++ commonTagsHandler($text, $topic, $web, $included, $meta ) … … 281 281 } 282 282 283 = pod283 =begin TML 284 284 285 285 ---++ beforeCommonTagsHandler($text, $topic, $web, $meta ) … … 311 311 } 312 312 313 = pod313 =begin TML 314 314 315 315 ---++ afterCommonTagsHandler($text, $topic, $web, $meta ) … … 338 338 } 339 339 340 = pod340 =begin TML 341 341 342 342 ---++ preRenderingHandler( $text, \%map ) … … 391 391 } 392 392 393 = pod393 =begin TML 394 394 395 395 ---++ postRenderingHandler( $text ) … … 411 411 } 412 412 413 = pod413 =begin TML 414 414 415 415 ---++ beforeEditHandler($text, $topic, $web ) … … 434 434 } 435 435 436 = pod436 =begin TML 437 437 438 438 ---++ afterEditHandler($text, $topic, $web, $meta ) … … 460 460 } 461 461 462 = pod462 =begin TML 463 463 464 464 ---++ beforeSaveHandler($text, $topic, $web, $meta ) … … 488 488 } 489 489 490 = pod490 =begin TML 491 491 492 492 ---++ afterSaveHandler($text, $topic, $web, $error, $meta ) … … 513 513 } 514 514 515 = pod515 =begin TML 516 516 517 517 ---++ afterRenameHandler( $oldWeb, $oldTopic, $oldAttachment, $newWeb, $newTopic, $newAttachment ) … … 538 538 } 539 539 540 = pod540 =begin TML 541 541 542 542 ---++ beforeAttachmentSaveHandler(\%attrHash, $topic, $web ) … … 563 563 } 564 564 565 = pod565 =begin TML 566 566 567 567 ---++ afterAttachmentSaveHandler(\%attrHash, $topic, $web, $error ) … … 586 586 } 587 587 588 = pod588 =begin TML 589 589 590 590 ---++ mergeHandler( $diff, $old, $new, \%info ) -> $text … … 635 635 } 636 636 637 = pod637 =begin TML 638 638 639 639 ---++ modifyHeaderHandler( \%headers, $query ) … … 662 662 } 663 663 664 = pod664 =begin TML 665 665 666 666 ---++ redirectCgiQueryHandler($query, $url ) … … 685 685 } 686 686 687 = pod687 =begin TML 688 688 689 689 ---++ renderFormFieldForEditHandler($name, $type, $size, $value, $attributes, $possibleValues) -> $html … … 717 717 } 718 718 719 = pod719 =begin TML 720 720 721 721 ---++ renderWikiWordHandler($linkText, $hasExplicitLinkLabel, $web, $topic) -> $linkText … … 739 739 } 740 740 741 = pod741 =begin TML 742 742 743 743 ---++ completePageHandler($html, $httpHeaders) … … 760 760 } 761 761 762 = pod762 =begin TML 763 763 764 764 ---++ restExample($session) -> $text -
trunk/InterwikiPlugin/lib/Foswiki/Plugins/InterwikiPlugin.pm
r811 r1041 16 16 # As per the GPL, removal of this notice is prohibited. 17 17 18 = pod18 =begin TML 19 19 20 20 ---+ package Foswiki::Plugins::InterwikiPlugin -
trunk/PerlDocPlugin/lib/TWiki/Plugins/PerlDocPlugin.pm
r1039 r1041 39 39 # variables elsewhere in TWiki!! 40 40 41 =begin TML 41 =begin twiki 42 42 43 ---+ Testing TWiki formatting 43 44 | *simple* | *table* | … … 54 55 Last paragraph of this document block 55 56 56 =end TML57 =end twiki 57 58 58 59 =cut … … 127 128 } 128 129 129 if( $format =~ /(pod|twiki|raw )/ ) {130 if( $format =~ /(pod|twiki|raw|TML)/ ) { 130 131 $text =~ s/&/&\;/go; 131 132 $text =~ s/</<\;/go; … … 171 172 $mode = "twiki"; 172 173 } elsif( $tag =~ /^begin$/i ) { 173 if( $data =~ /^(html|twiki )/i ) {174 if( $data =~ /^(html|twiki|TML)/i ) { 174 175 $data =~ s@([\r\n])( +)@"$1" . "\t" x (length($2)/3)@ges; 175 176 $data =~ s/^(html|twiki)//i; … … 184 185 $text .= "---" . "+" x $1 . renderInteriorSequences( " $data" ) . "\n"; 185 186 } elsif( $tag =~ /^for$/i ) { 186 if( $data =~ /^(html|twiki )/i ) {187 if( $data =~ /^(html|twiki|TML)/i ) { 187 188 $data =~ s@([\r\n])( +)@"$1" . "\t" x (length($2)/3)@ges; 188 189 $data =~ s/^(html|twiki)\s*//i; … … 200 201 $text .= renderInteriorSequences( "$_" ) . "\n\n"; 201 202 } 202 } elsif( $mode eq "twiki" ) {203 } elsif( $mode eq "twiki" || $mode eq 'TML' ) { 203 204 if( $tag =~ /^end$/i ) { 204 205 $mode = ""; -
trunk/TWikiCompatibilityPlugin/lib/Foswiki/Plugins/TWikiCompatibilityPlugin.pm
r1038 r1041 12 12 # http://www.gnu.org/copyleft/gpl.html 13 13 14 = pod14 =begin TML 15 15 16 16 ---+ package Foswiki::Plugins::TWikiCompatibilityPlugin … … 34 34 $pluginName = 'TWikiCompatibilityPlugin'; 35 35 36 = pod36 =begin TML 37 37 38 38 ---++ initPlugin($topic, $web, $user, $installWeb) -> $boolean … … 49 49 } 50 50 51 = pod51 =begin TML 52 52 53 53 ---++ earlyInitPlugin() -
trunk/TwistyPlugin/lib/Foswiki/Plugins/TwistyPlugin.pm
r1033 r1041 17 17 # 18 18 19 = pod19 =begin TML 20 20 21 21 ---+ package TwistyPlugin … … 373 373 } 374 374 375 = pod375 =begin TML 376 376 377 377 Reads a setting from the FOSWIKIPREF cookie. -
trunk/core/data/System/DevelopingPlugins.txt
r920 r1041 14 14 * =[[%SCRIPTURL{view}%/%SYSTEMWEB%/PerlDoc?module=Foswiki::AccessControlException][Foswiki::AccessControlException]]= - access control exception 15 15 * =[[%SCRIPTURL{view}%/%SYSTEMWEB%/PerlDoc?module=Foswiki::Attrs][Foswiki::Attrs]]= - parser and storage object for macro parameters 16 * =[[%SCRIPTURL{view}%/%SYSTEMWEB%/PerlDoc?module=Foswiki::Time][Foswiki::Time]]= - time parsing and formatting 16 17 In addition the following global variables may be referred to: 17 * =$Foswiki::Plugins::VERSION= - API version number18 * =$Foswiki::Plugins::VERSION= - plugin handler API version number 18 19 * =$Foswiki::Plugins::SESSION= - reference to =Foswiki= singleton object 19 20 * =$Foswiki::cfg= - reference to configuration hash -
trunk/core/data/System/PerlDoc.txt
r920 r1041 1 ---+ %URLPARAM{module}%2 %INCLUDE{"doc:%URLPARAM{module}%" level=" 2"}%1 ---+!! %URLPARAM{module}% 2 %INCLUDE{"doc:%URLPARAM{module}%" level="1"}% -
trunk/core/lib/Foswiki.pm
r1039 r1041 2 2 package Foswiki; 3 3 4 = pod4 =begin TML 5 5 6 6 ---+ package Foswiki … … 93 93 $TranslationToken = "\0"; 94 94 95 = pod95 =begin TML 96 96 97 97 ---++ StaticMethod getLibDir() -> $path … … 526 526 } 527 527 528 = pod528 =begin TML 529 529 530 530 ---++ ObjectMethod UTF82SiteCharSet( $utf8 ) -> $ascii … … 626 626 } 627 627 628 = pod628 =begin TML 629 629 630 630 ---++ ObjectMethod writeCompletePage( $text, $pageType, $contentType ) … … 673 673 } 674 674 675 = pod675 =begin TML 676 676 677 677 ---++ ObjectMethod generateHTTPHeaders( $query, $pageType, $contentType ) -> $header … … 749 749 } 750 750 751 = pod751 =begin TML 752 752 753 753 ---++ StaticMethod isRedirectSafe($redirect) => $ok … … 813 813 } 814 814 815 = pod815 =begin TML 816 816 817 817 ---++ ObjectMethod redirect( $url, $passthrough, $action_redirectto ) … … 923 923 } 924 924 925 = pod925 =begin TML 926 926 927 927 ---++ ObjectMethod cacheQuery() -> $queryString … … 963 963 } 964 964 965 = pod965 =begin TML 966 966 967 967 ---++ StaticMethod isValidWikiWord( $name ) -> $boolean … … 976 976 } 977 977 978 = pod978 =begin TML 979 979 980 980 ---++ StaticMethod isValidTopicName( $name ) -> $boolean … … 990 990 } 991 991 992 = pod992 =begin TML 993 993 994 994 ---++ StaticMethod isValidAbbrev( $name ) -> $boolean … … 1003 1003 } 1004 1004 1005 = pod1005 =begin TML 1006 1006 1007 1007 ---++ StaticMethod isValidWebName( $name, $system ) -> $boolean … … 1023 1023 } 1024 1024 1025 = pod1025 =begin TML 1026 1026 1027 1027 ---++ ObjectMethod readOnlyMirrorWeb( $theWeb ) -> ( $mirrorSiteName, $mirrorViewURL, $mirrorLink, $mirrorNote ) … … 1065 1065 } 1066 1066 1067 = pod1067 =begin TML 1068 1068 1069 1069 ---++ ObjectMethod getSkin () -> $string … … 1094 1094 } 1095 1095 1096 = pod1096 =begin TML 1097 1097 1098 1098 ---++ ObjectMethod getScriptUrl( $absolute, $script, $web, $topic, ... ) -> $scriptURL … … 1187 1187 } 1188 1188 1189 = pod1189 =begin TML 1190 1190 1191 1191 ---++ ObjectMethod getPubUrl($absolute, $web, $topic, $attachment) -> $url … … 1237 1237 } 1238 1238 1239 = pod1239 =begin TML 1240 1240 1241 1241 ---++ ObjectMethod getIconUrl( $absolute, $iconName ) -> $iconURL … … 1259 1259 } 1260 1260 1261 = pod1261 =begin TML 1262 1262 1263 1263 ---++ ObjectMethod mapToIconFileName( $fileName, $default ) -> $fileName … … 1298 1298 } 1299 1299 1300 = pod1300 =begin TML 1301 1301 1302 1302 ---++ ObjectMethod normalizeWebTopicName( $theWeb, $theTopic ) -> ( $theWeb, $theTopic ) … … 1334 1334 } 1335 1335 1336 = pod1336 =begin TML 1337 1337 1338 1338 ---++ ClassMethod new( $loginName, $query, \%initialContext ) … … 1754 1754 } 1755 1755 1756 = pod1756 =begin TML 1757 1757 1758 1758 ---++ ObjectMethod writeLog( $action, $webTopic, $extra, $user ) … … 1795 1795 } 1796 1796 1797 = pod1797 =begin TML 1798 1798 1799 1799 ---++ ObjectMethod writeWarning( $text ) … … 1810 1810 } 1811 1811 1812 = pod1812 =begin TML 1813 1813 1814 1814 ---++ ObjectMethod writeDebug( $text ) … … 1962 1962 } 1963 1963 1964 = pod1964 =begin TML 1965 1965 1966 1966 ---++ StaticMethod applyPatternToIncludedText( $text, $pattern ) -> $text … … 2269 2269 } 2270 2270 2271 = pod2271 =begin TML 2272 2272 2273 2273 ---++ ObjectMethod inlineAlert($template, $def, ... ) -> $string … … 2314 2314 } 2315 2315 2316 = pod2316 =begin TML 2317 2317 2318 2318 ---++ StaticMethod parseSections($text) -> ($string,$sectionlistref) … … 2421 2421 } 2422 2422 2423 = pod2423 =begin TML 2424 2424 2425 2425 ---++ ObjectMethod expandVariablesOnTopicCreation ( $text, $user, $web, $topic ) -> $text … … 2520 2520 } 2521 2521 2522 = pod2522 =begin TML 2523 2523 2524 2524 ---++ StaticMethod entityEncode( $text, $extras ) -> $encodedText … … 2565 2565 } 2566 2566 2567 = pod2567 =begin TML 2568 2568 2569 2569 ---++ StaticMethod entityDecode ( $encodedText ) -> $text … … 2581 2581 } 2582 2582 2583 = pod2583 =begin TML 2584 2584 2585 2585 ---++ StaticMethod urlEncodeAttachment ( $text ) … … 2629 2629 } 2630 2630 2631 = pod2631 =begin TML 2632 2632 2633 2633 ---++ StaticMethod urlEncode( $string ) -> encoded string … … 2666 2666 } 2667 2667 2668 = pod2668 =begin TML 2669 2669 2670 2670 ---++ StaticMethod urlDecode( $string ) -> decoded string … … 2682 2682 } 2683 2683 2684 = pod2684 =begin TML 2685 2685 2686 2686 ---++ StaticMethod isTrue( $value, $default ) -> $boolean … … 2710 2710 } 2711 2711 2712 = pod2712 =begin TML 2713 2713 2714 2714 ---++ StaticMethod spaceOutWikiWord( $word, $sep ) -> $string … … 2728 2728 } 2729 2729 2730 = pod2730 =begin TML 2731 2731 2732 2732 ---++ ObjectMethod expandAllTags(\$text, $topic, $web, $meta) … … 2987 2987 } 2988 2988 2989 = pod2989 =begin TML 2990 2990 2991 2991 ---++ ObjectMethod enterContext( $id, $val ) … … 3016 3016 } 3017 3017 3018 = pod3018 =begin TML 3019 3019 3020 3020 ---++ ObjectMethod leaveContext( $id ) … … 3032 3032 } 3033 3033 3034 = pod3034 =begin TML 3035 3035 3036 3036 ---++ ObjectMethod inContext( $id ) … … 3046 3046 } 3047 3047 3048 = pod3048 =begin TML 3049 3049 3050 3050 ---++ StaticMethod registerTagHandler( $tag, $fnref ) … … 3064 3064 } 3065 3065 3066 = pod=3066 =begin TML= 3067 3067 3068 3068 ---++ StaticMethod registerRESTHandler( $subject, $verb, \&fn ) … … 3093 3093 } 3094 3094 3095 = pod3095 =begin TML 3096 3096 3097 3097 ---++ ObjectMethod handleCommonTags( $text, $web, $topic, $meta ) -> $text … … 3171 3171 } 3172 3172 3173 = pod3173 =begin TML 3174 3174 3175 3175 ---++ ObjectMethod ADDTOHEAD( $args ) … … 3282 3282 } 3283 3283 3284 = pod3284 =begin TML 3285 3285 3286 3286 ---+++ %<nop}RENDERHEAD% … … 3299 3299 } 3300 3300 3301 = pod3301 =begin TML 3302 3302 3303 3303 ---++ StaticMethod initialize( $pathInfo, $remoteUser, $topic, $url, $query ) -> ($topicName, $webName, $scriptUrlPath, $userName, $dataDir) … … 3346 3346 } 3347 3347 3348 = pod3348 =begin TML 3349 3349 3350 3350 ---++ StaticMethod readFile( $filename ) -> $text … … 3369 3369 } 3370 3370 3371 = pod3371 =begin TML 3372 3372 3373 3373 ---++ StaticMethod expandStandardEscapes($str) -> $unescapedStr … … 4513 4513 local $/ = "\n"; 4514 4514 while ( my $line = <PMFILE> ) { 4515 if ( $line =~ /^=(begin |pod)/ ) {4515 if ( $line =~ /^=(begin (twiki|TML|html)|pod)/ ) { 4516 4516 $inPod = 1; 4517 4517 } -
trunk/core/lib/Foswiki/Access.pm
r1039 r1041 24 24 # As per the GPL, removal of this notice is prohibited. 25 25 26 = pod26 =begin TML 27 27 28 28 ---+ package Foswiki::Access … … 40 40 sub MONITOR { 0 } 41 41 42 = pod42 =begin TML 43 43 44 44 ---++ ClassMethod new($session) … … 71 71 } 72 72 73 = pod73 =begin TML 74 74 75 75 ---++ ObjectMethod getReason() -> $string … … 86 86 } 87 87 88 = pod88 =begin TML 89 89 90 90 ---++ ObjectMethod checkAccessPermission( $action, $user, $text, $meta, $topic, $web ) -> $boolean -
trunk/core/lib/Foswiki/AccessControlException.pm
r1039 r1041 1 1 # See bottom of file for license and copyright information 2 =pod TML 2 3 =begin TML 3 4 4 5 ---+ package Foswiki::AccessControlException … … 18 19 user is not logged in) or reported (if they are and just don't have access). 19 20 21 API version $Date$ (revision $Rev$) 22 23 *Since* _date_ indicates where functions or parameters have been added since 24 the baseline of the API (TWiki release 4.2.3). The _date_ indicates the 25 earliest date of a Foswiki release that will support that function or 26 parameter. 27 28 *Deprecated* _date_ indicates where a function or parameters has been 29 [[http://en.wikipedia.org/wiki/Deprecation][deprecated]]. Deprecated 30 functions will still work, though they should 31 _not_ be called in new plugins and should be replaced in older plugins 32 as soon as possible. Deprecated parameters are simply ignored in Foswiki 33 releases after _date_. 34 35 *Until* _date_ indicates where a function or parameter has been removed. 36 The _date_ indicates the latest date at which Foswiki releases still supported 37 the function or parameter. 38 20 39 =cut 40 41 # THIS PACKAGE IS PART OF THE PUBLISHED API USED BY EXTENSION AUTHORS. 42 # DO NOT CHANGE THE EXISTING APIS (well thought out extensions are OK) 43 # AND ENSURE ALL POD DOCUMENTATION IS COMPLETE AND ACCURATE. 21 44 22 45 package Foswiki::AccessControlException; … … 25 48 use strict; 26 49 27 =pod 50 our $VERSION = '$Rev$'; 51 52 =begin TML 28 53 29 54 ---+ ClassMethod new($mode, $user, $web, $topic, $reason) … … 52 77 } 53 78 54 = pod79 =begin TML 55 80 56 81 ---++ ObjectMethod stringify() -> $string -
trunk/core/lib/Foswiki/AggregateIterator.pm
r830 r1041 1 1 # See bottom of file for license and copyright information 2 = pod2 =begin TML 3 3 4 4 ---+ package Foswiki::AggregateIterator … … 12 12 use strict; 13 13 14 = pod14 =begin TML 15 15 16 16 ---++ new(\@list, $unique) … … 42 42 } 43 43 44 = pod44 =begin TML 45 45 46 46 ---++ hasNext() -> $boolean … … 93 93 } 94 94 95 = pod95 =begin TML 96 96 97 97 ---++ next() -> $data -
trunk/core/lib/Foswiki/Attach.pm
r1039 r1041 19 19 use Assert; 20 20 21 = pod21 =begin TML 22 22 23 23 ---++ ClassMethod new($session) … … 49 49 } 50 50 51 = pod51 =begin TML 52 52 53 53 ---++ ObjectMethod renderMetaData( $web, $topic, $meta, $args ) -> $text … … 101 101 } 102 102 103 = pod103 =begin TML 104 104 105 105 ---++ ObjectMethod formatVersions ( $web, $topic, $attrs ) -> $text … … 259 259 } 260 260 261 = pod261 =begin TML 262 262 263 263 ---++ ObjectMethod getAttachmentLink( $user, $web, $topic, $name, $meta ) -> $html -
trunk/core/lib/Foswiki/Attrs.pm
r830 r1041 1 1 # See bottom of file for license and copyright information 2 2 3 = pod3 =begin TML 4 4 5 5 ---+ package Foswiki::Attrs … … 21 21 to =new=. 22 22 23 =cut 23 API version $Date$ (revision $Rev$) 24 25 *Since* _date_ indicates where functions or parameters have been added since 26 the baseline of the API (TWiki release 4.2.3). The _date_ indicates the 27 earliest date of a Foswiki release that will support that function or 28 parameter. 29 30 *Deprecated* _date_ indicates where a function or parameters has been 31 [[http://en.wikipedia.org/wiki/Deprecation][deprecated]]. Deprecated 32 functions will still work, though they should 33 _not_ be called in new plugins and should be replaced in older plugins 34 as soon as possible. Deprecated parameters are simply ignored in Foswiki 35 releases after _date_. 36 37 *Until* _date_ indicates where a function or parameter has been removed. 38 The _date_ indicates the latest date at which Foswiki releases still supported 39 the function or parameter. 40 41 =cut 42 43 # THIS PACKAGE IS PART OF THE PUBLISHED API USED BY EXTENSION AUTHORS. 44 # DO NOT CHANGE THE EXISTING APIS (well thought out extensions are OK) 45 # AND ENSURE ALL POD DOCUMENTATION IS COMPLETE AND ACCURATE. 24 46 25 47 package Foswiki::Attrs; … … 28 50 use Assert; 29 51 30 use vars qw( $ERRORKEY $DEFAULTKEY $RAWKEY );31 32 $ERRORKEY = '_ERROR';33 $DEFAULTKEY = '_DEFAULT';34 $RAWKEY = '_RAW';35 36 = pod37 38 ---++ ClassMethod new ($string , $friendly) => \%attrsObjectRef52 our $VERSION = '$Rev$'; 53 54 our $ERRORKEY = '_ERROR'; 55 our $DEFAULTKEY = '_DEFAULT'; 56 our $RAWKEY = '_RAW'; 57 58 =begin TML 59 60 ---++ ClassMethod new ($string) => \%attrsObjectRef 39 61 40 62 * =$string= - String containing attribute specification 41 * =$friendly= - if true, the parse will be according to the extended syntax pioneered by the original Contrib::Attrs. Otherwise it will be strict as per traditional syntax.42 63 43 64 Parse a standard attribute string containing name=value pairs and create a new … … 46 67 set in the new object. $attrs->{_RAW} will always contain the full unprocessed 47 68 $string. 48 49 Extended syntax example:50 <verbatim>51 my $attrs = new Foswiki::Attrs('the="time \\"has come", "the walrus" said to=speak of=\'many \\'things\', 1);52 </verbatim>53 In this example:54 * =the= will be =time "has come=55 * <code>_<nop>_<nop>default__</code> will be =the walrus=56 * =said= will be =on=57 * =to= will be =speak=58 * =of= will be =many 'things=59 60 Only " and ' are escaped.61 62 Traditional syntax is as old TWiki, except that the whole string is parsed63 (the old parser would only recognise default values in position 1, nowhere64 else)65 69 66 70 =cut … … 142 146 } 143 147 144 = pod148 =begin TML 145 149 146 150 ---++ ObjectMethod isEmpty() -> boolean … … 159 163 } 160 164 161 = pod165 =begin TML 162 166 163 167 ---++ ObjectMethod remove($key) -> $value … … 176 180 } 177 181 178 = pod182 =begin TML 179 183 180 184 ---++ ObjectMethod stringify() -> $string -
trunk/core/lib/Foswiki/Compatibility.pm
r830 r1041 4 4 use Assert; 5 5 6 = pod6 =begin TML 7 7 8 8 ---+ package Foswiki::Compatibility … … 104 104 } 105 105 106 = pod106 =begin TML 107 107 108 108 ---++ StaticMethod upgradeCategoryTable( $session, $web, $topic, $meta, $text ) -> $text … … 258 258 } 259 259 260 = pod260 =begin TML 261 261 262 262 ---++ migrateToFileAttachmentMacro ( $session, $meta, $text ) -> $text … … 318 318 } 319 319 320 = pod320 =begin TML 321 321 322 322 ---++ upgradeFrom1v0beta ( $session, $meta ) -> $text -
trunk/core/lib/Foswiki/Configure/Load.pm
r836 r1041 1 1 # See bottom of file for license and copyright information 2 2 3 = pod3 =begin TML 4 4 5 5 ---+ package Foswiki::Configure::Load … … 17 17 our $TRUE = 1; 18 18 19 = pod19 =begin TML 20 20 21 21 ---++ StaticMethod readConfig() … … 101 101 } 102 102 103 = pod103 =begin TML 104 104 105 105 ---++ StaticMethod expandValue($string) -> $boolean … … 118 118 } 119 119 120 = pod120 =begin TML 121 121 122 122 ---++ StaticMethod readDefaults() -> \@errors -
trunk/core/lib/Foswiki/Configure/UIs/EXTEND.pm
r830 r1041 260 260 } 261 261 262 = pod262 =begin TML 263 263 264 264 ---++ StaticMethod _unpackArchive($archive [,$dir] ) -
trunk/core/lib/Foswiki/Engine.pm
r1039 r1041 1 1 # See bottom of file for license and copyright information 2 = pod2 =begin TML 3 3 4 4 ---+!! package Foswiki::Engine -
trunk/core/lib/Foswiki/EngineException.pm
r1039 r1041 1 1 # See bottom of file for license and copyright information 2 = podTML2 =begin TML 3 3 4 4 ---+ package Foswiki::EngineException … … 16 16 use strict; 17 17 18 = pod18 =begin TML 19 19 20 20 ---+ ClassMethod new( $status, $reason [, $response] ) … … 39 39 } 40 40 41 = pod41 =begin TML 42 42 43 43 ---++ ObjectMethod stringify() -> $string -
trunk/core/lib/Foswiki/Form.pm
r1039 r1041 1 1 # See bottom of file for license and copyright details 2 2 3 = pod3 =begin TML 4 4 5 5 ---+ package Foswiki::Form … … 42 42 originalrev skin templatetopic text topic topicparent user ); 43 43 44 = pod44 =begin TML 45 45 46 46 ---++ ClassMethod new ( $session, $web, $form, \@def ) … … 129 129 } 130 130 131 = pod131 =begin TML 132 132 133 133 ---++ StaticMethod fieldTitle2FieldName($title) -> $name … … 309 309 } 310 310 311 = pod311 =begin TML 312 312 313 313 ---++ ObjectMethod renderForEdit( $web, $topic, $meta ) -> $html … … 412 412 } 413 413 414 = pod414 =begin TML 415 415 416 416 ---++ ObjectMethod renderHidden( $meta ) -> $html … … 434 434 } 435 435 436 = pod436 =begin TML 437 437 438 438 ---++ ObjectMethod getFieldValuesFromQuery($query, $metaObject) -> ( $seen, \@missing ) … … 478 478 } 479 479 480 = pod480 =begin TML 481 481 482 482 ---++ ObjectMethod isTextMergeable( $name ) -> $boolean … … 502 502 } 503 503 504 = pod504 =begin TML 505 505 506 506 ---++ ObjectMethod getField( $name ) -> $fieldDefinition … … 521 521 } 522 522 523 = pod523 =begin TML 524 524 525 525 ---++ ObjectMethod getFields() -> \@fields -
trunk/core/lib/Foswiki/Form/FieldDefinition.pm
r1039 r1041 2 2 # base class for all form field types 3 3 4 = pod4 =begin TML 5 5 6 6 ---+ package Foswiki::Form::FieldDefinition … … 19 19 use Assert; 20 20 21 = pod21 =begin TML 22 22 23 23 ---++ ClassMethod new(%...) … … 63 63 } 64 64 65 = pod65 =begin TML 66 66 67 67 ---++ isEditable() -> $boolean … … 74 74 sub isEditable { 1 } 75 75 76 = pod76 =begin TML 77 77 78 78 ---++ isMultiValued() -> $boolean … … 85 85 sub isMultiValued { 0 } 86 86 87 = pod87 =begin TML 88 88 89 89 ---++ isTextMergeable() -> $boolean … … 96 96 sub isTextMergeable { return !shift->isMultiValued() } 97 97 98 = pod98 =begin TML 99 99 100 100 ---++ isMandatory() -> $boolean … … 106 106 sub isMandatory { return shift->{attributes} =~ /M/ } 107 107 108 = pod108 =begin TML 109 109 110 110 ---++ renderForEdit( $web, $topic, $value ) -> ($col0html, $col1html) … … 134 134 } 135 135 136 = pod136 =begin TML 137 137 138 138 ---++ cssClasses(@classes) -> $classes … … 151 151 } 152 152 153 = pod153 =begin TML 154 154 155 155 ---++ getDefaultValue() -> $value … … 172 172 } 173 173 174 = pod174 =begin TML 175 175 176 176 ---++ renderHidden($meta) -> $html … … 208 208 } 209 209 210 = pod210 =begin TML 211 211 212 212 ---++ populateMetaDataFromQuery( $query, $meta, $old ) -> ($bValid, $bPresent) … … 310 310 } 311 311 312 = pod312 =begin TML 313 313 314 314 ---++ ObjectMethod renderForDisplay($format, $attrs) -> $html -
trunk/core/lib/Foswiki/Form/ListFieldDefinition.pm
r1039 r1041 1 1 # See bottom of file for license and copyright details 2 2 3 = pod3 =begin TML 4 4 5 5 ---++ package Foswiki::Form::ListFieldDefinition -
trunk/core/lib/Foswiki/Form/Select.pm
r1039 r1041 25 25 } 26 26 27 = pod27 =begin TML 28 28 29 29 ---++ getDefaultValue() -> $value -
trunk/core/lib/Foswiki/Func.pm
r966 r1041 1 1 # See bottom of file for license and copyright information 2 2 3 = pod3 =begin TML 4 4 5 5 ---+ package Foswiki::Func 6 6 7 <!-- STARTINCLUDE required for huge CompleteDocumentation topic --> 8 %STARTINCLUDE% 9 10 _Official Foswiki interface for Plugin developers_ 11 12 This module defines the interfaces that [[%SYSTEMWEB%.Plugins][Plugins]] 7 _Interface for Foswiki extensions developers_ 8 9 This module defines the main interfaces that extensions 13 10 can use to interact with the Foswiki engine and content. 14 11 … … 16 13 and starter documentation on how to write a Plugin. 17 14 18 Plugins should *only* use functions described here. If you use 19 functions in other Foswiki libraries you might create a security hole and 15 Plugins should *only* call methods in packages documented in 16 System.DevelopingPlugins. If you use 17 functions in other Foswiki libraries you risk creating a security hole, and 20 18 you will probably need to change your plugin when you upgrade Foswiki. 21 19 22 Deprecated functions will still work in older code, though they should 20 %TOC% 21 22 API version $Date$ (revision $Rev$) 23 24 *Since* _date_ indicates where functions or parameters have been added since 25 the baseline of the API (TWiki release 4.2.3). The _date_ indicates the 26 earliest date of a Foswiki release that will support that function or 27 parameter. 28 29 *Deprecated* _date_ indicates where a function or parameters has been 30 [[http://en.wikipedia.org/wiki/Deprecation][deprecated]]. Deprecated 31 functions will still work, though they should 23 32 _not_ be called in new plugins and should be replaced in older plugins 24 as soon as possible. 25 26 The compatibility history of this module is given by the VERSION number 27 of the Foswiki::Plugins module. 28 29 Notes on use of =$Foswiki::Plugins::VERSION=: 30 * If the *major* version (e.g. =1.=) is the same then any plugin coded 31 to use any *earlier* revision of the =1.= API will still work. No 32 function has been removed from the interface, nor has any API published 33 in that version changed in such a way as to *require* plugins to be 34 recoded. 35 * If the *minor* version (e.g. =1.1.=) is incremented there may be changes 36 in the API that may help improve the coding of some plugins - for 37 example, new interfaces giving access to previously hidden core functions. 38 In addition, *deprecation* of functions in the interface trigger a minor 39 version increment. Note that deprecated functions are not _removed_, they 40 are merely frozen, and plugin authors are recommended to stop using them. 41 * Any additional digits in the version number relate to minor changes, such 42 as the addition of parameters to the existing functions, or addition of 43 utility functions that are unlikely to require significant changes to 44 existing plugins. 45 * =$Foswiki::Plugins::VERSION= also applies to the plugin handlers. The 46 handlers are documented in the !EmptyPlugin, and that module indicates 47 what version of =Foswiki::Plugins::VERSION= it relates to. 48 49 =cut 33 as soon as possible. Deprecated parameters are simply ignored in Foswiki 34 releases after _date_. 35 36 *Until* _date_ indicates where a function or parameter has been removed. 37 The _date_ indicates the latest date at which Foswiki releases still supported 38 the function or parameter. 39 40 =cut 41 42 # THIS PACKAGE IS PART OF THE PUBLISHED API USED BY EXTENSION AUTHORS. 43 # DO NOT CHANGE THE EXISTING APIS (well thought out extensions are OK) 44 # AND ENSURE ALL POD DOCUMENTATION IS COMPLETE AND ACCURATE. 45 # 46 # Deprecated functions should not be removed, but should be moved to to the 47 # deprecated functions section. 50 48 51 49 package Foswiki::Func; … … 58 56 require Foswiki::Plugins; 59 57 60 = pod58 =begin TML 61 59 62 60 ---++ Environment … … 64 62 =cut 65 63 66 = pod64 =begin TML 67 65 68 66 ---+++ getSkin( ) -> $skin … … 72 70 Return: =$skin= Comma-separated list of skins, e.g. ='gnu,tartan'=. Empty string if none. 73 71 74 *Since:* Foswiki::Plugins::VERSION 1.000 (29 Jul 2001)75 76 72 =cut 77 73 … … 82 78 } 83 79 84 = pod80 =begin TML 85 81 86 82 ---+++ getUrlHost( ) -> $host … … 90 86 Return: =$host= URL host, e.g. ="http://example.com:80"= 91 87 92 *Since:* Foswiki::Plugins::VERSION 1.000 (7 Dec 2002)93 94 88 =cut 95 89 … … 100 94 } 101 95 102 = pod96 =begin TML 103 97 104 98 ---+++ getScriptUrl( $web, $topic, $script, ... ) -> $url … … 112 106 Return: =$url= URL, e.g. ="http://example.com:80/cgi-bin/view.pl/Main/WebNotify"= 113 107 114 *Since:* Foswiki::Plugins::VERSION 1.000 (7 Dec 2002)115 116 108 =cut 117 109 … … 126 118 } 127 119 128 = pod120 =begin TML 129 121 130 122 ---+++ getViewUrl( $web, $topic ) -> $url … … 135 127 Return: =$url= URL, e.g. ="http://example.com:80/cgi-bin/view.pl/Main/WebNotify"= 136 128 137 *Since:* Foswiki::Plugins::VERSION 1.000 (7 Dec 2002)138 139 129 =cut 140 130 … … 147 137 } 148 138 149 = pod139 =begin TML 150 140 151 141 ---+++ getPubUrlPath( ) -> $path … … 154 144 155 145 Return: =$path= URL path of pub directory, e.g. ="/pub"= 156 157 *Since:* Foswiki::Plugins::VERSION 1.000 (14 Jul 2001)158 146 159 147 =cut … … 163 151 } 164 152 165 = pod153 =begin TML 166 154 167 155 ---+++ getExternalResource( $url ) -> $response … … 210 198 </verbatim> 211 199 212 *Since:* Foswiki::Plugins::VERSION 1.2213 214 200 =cut 215 201 … … 222 208 } 223 209 224 = pod210 =begin TML 225 211 226 212 ---+++ getCgiQuery( ) -> $query … … 230 216 Return: =$query= CGI query object; or 0 if script is called as a shell script 231 217 232 *Since:* Foswiki::Plugins::VERSION 1.000 (7 Dec 2002)233 234 218 =cut 235 219 … … 239 223 } 240 224 241 = pod225 =begin TML 242 226 243 227 ---+++ getSessionKeys() -> @keys … … 246 230 Session keys are stored and retrieved using =setSessionValue= and 247 231 =getSessionValue=. 248 249 *Since:* Foswiki::Plugins::VERSION 1.2250 232 251 233 =cut … … 258 240 } 259 241 260 = pod242 =begin TML 261 243 262 244 ---+++ getSessionValue( $key ) -> $value … … 266 248 Return: =$value= Value associated with key; empty string if not set 267 249 268 *Since:* Foswiki::Plugins::VERSION 1.000 (27 Feb 200)269 270 250 =cut 271 251 … … 279 259 } 280 260 281 = pod261 =begin TML 282 262 283 263 ---+++ setSessionValue( $key, $value ) -> $boolean … … 288 268 Return: true if function succeeded 289 269 290 *Since:* Foswiki::Plugins::VERSION 1.000 (17 Aug 2001)291 292 270 =cut 293 271 … … 300 278 } 301 279 302 = pod280 =begin TML 303 281 304 282 ---+++ clearSessionValue( $key ) -> $boolean … … 309 287 Return: true if the session value was cleared 310 288 311 *Since:* Foswiki::Plugins::VERSION 1.1312 313 289 =cut 314 290 … … 320 296 } 321 297 322 = pod298 =begin TML 323 299 324 300 ---+++ getContext() -> \%hash … … 365 341 working, the context ID 'FirstPlugin' will be set. 366 342 367 *Since:* Foswiki::Plugins::VERSION 1.1368 369 343 =cut 370 344 … … 374 348 } 375 349 376 = pod350 =begin TML 377 351 378 352 ---+++ pushTopicContext($web, $topic) … … 391 365 global variables to remember the web and topic in =initPlugin=, then those 392 366 values will be unchanged. 393 394 *Since:* Foswiki::Plugins::VERSION 1.2395 367 396 368 =cut … … 415 387 } 416 388 417 = pod389 =begin TML 418 390 419 391 ---+++ popTopicContext() … … 421 393 Returns the Foswiki context to the state it was in before the 422 394 =pushTopicContext= was called. 423 424 *Since:* Foswiki::Plugins::VERSION 1.2425 395 426 396 =cut … … 436 406 } 437 407 438 = pod408 =begin TML 439 409 440 410 ---++ Preferences … … 442 412 =cut 443 413 444 = pod414 =begin TML 445 415 446 416 ---+++ getPreferencesValue( $key, $web ) -> $value … … 450 420 * =$web= - Name of web, optional. Current web if not specified; does not apply to settings of Plugin topics 451 421 Return: =$value= Preferences value; empty string if not set 452 453 *Since:* Foswiki::Plugins::VERSION 1.000 (7 Dec 2002)454 422 455 423 * Example for Plugin setting: … … 479 447 } 480 448 481 = pod449 =begin TML 482 450 483 451 ---+++ getPluginPreferencesValue( $key ) -> $value … … 488 456 489 457 __Note__: This function will will *only* work when called from the Plugin.pm file itself. it *will not work* if called from a sub-package (e.g. Foswiki::Plugins::MyPlugin::MyModule) 490 491 *Since:* Foswiki::Plugins::VERSION 1.021 (27 Mar 2004)492 458 493 459 *NOTE:* If =$NO_PREFS_IN_TOPIC= is enabled in the plugin, then … … 505 471 } 506 472 507 = pod473 =begin TML 508 474 509 475 ---+++ getPreferencesFlag( $key, $web ) -> $value … … 514 480 Return: =$value= Preferences flag ='1'= (if set), or ="0"= (for preferences values ="off"=, ="no"= and ="0"=) 515 481 516 *Since:* Foswiki::Plugins::VERSION 1.000 (7 Dec 2002)517 518 482 * Example for Plugin setting: 519 483 * MyPlugin topic has: =* Set SHOWHELP = off= … … 533 497 } 534 498 535 = pod499 =begin TML 536 500 537 501 ---+++ getPluginPreferencesFlag( $key ) -> $boolean … … 542 506 543 507 __Note__: This function will will *only* work when called from the Plugin.pm file itself. it *will not work* if called from a sub-package (e.g. Foswiki::Plugins::MyPlugin::MyModule) 544 545 *Since:* Foswiki::Plugins::VERSION 1.021 (27 Mar 2004)546 508 547 509 *NOTE:* If =$NO_PREFS_IN_TOPIC= is enabled in the plugin, then … … 557 519 } 558 520 559 = pod521 =begin TML 560 522 561 523 ---+++ setPreferencesValue($name, $val) … … 576 538 } 577 539 578 = pod540 =begin TML 579 541 580 542 ---++ User Handling and Access Control … … 584 546 Return: =$loginName= Default user name, e.g. ='guest'= 585 547 586 *Since:* Foswiki::Plugins::VERSION 1.000 (7 Dec 2002)587 588 548 =cut 589 549 … … 592 552 } 593 553 594 = pod554 =begin TML 595 555 596 556 ---+++ getCanonicalUserID( $user ) -> $cUID … … 608 568 registered users. This may be autogenerated for an authenticated but 609 569 unregistered user. 610 611 *Since:* Foswiki::Plugins::VERSION 1.2612 570 613 571 =cut … … 633 591 } 634 592 635 = pod593 =begin TML 636 594 637 595 ---+++ getWikiName( $user ) -> $wikiName … … 643 601 644 602 Return: =$wikiName= Wiki Name, e.g. ='JohnDoe'= 645 646 *Since:* Foswiki::Plugins::VERSION 1.000 (7 Dec 2002)647 603 648 604 =cut … … 660 616 } 661 617 662 = pod618 =begin TML 663 619 664 620 ---+++ getWikiUserName( $user ) -> $wikiName … … 670 626 671 627 Return: =$wikiName= Wiki Name, e.g. ="Main.JohnDoe"= 672 673 *Since:* Foswiki::Plugins::VERSION 1.000 (7 Dec 2002)674 628 675 629 =cut … … 687 641 } 688 642 689 = pod643 =begin TML 690 644 691 645 ---+++ wikiToUserName( $id ) -> $loginName 692 646 Translate a Wiki name to a login name. 693 647 * =$id= - Wiki name, e.g. ='Main.JohnDoe'= or ='JohnDoe'=. 694 Since TWiki 4.2.1,$id may also be a login name. This will normally648 $id may also be a login name. This will normally 695 649 be transparent, but should be borne in mind if you have login names 696 650 that are also legal wiki names. … … 704 658 705 659 returns undef if the WikiName is not found. 706 707 *Since:* Foswiki::Plugins::VERSION 1.000 (7 Dec 2002)708 660 709 661 =cut … … 723 675 } 724 676 725 = pod677 =begin TML 726 678 727 679 ---+++ userToWikiName( $loginName, $dontAddWeb ) -> $wikiName … … 735 687 userToWikiName will always return a name. If the user does not 736 688 exist in the mapping, the $loginName parameter is returned. (backward compatibility) 737 738 *Since:* Foswiki::Plugins::VERSION 1.000 (7 Dec 2002)739 689 740 690 =cut … … 755 705 } 756 706 757 = pod707 =begin TML 758 708 759 709 ---+++ emailToWikiNames( $email, $dontAddWeb ) -> @wikiNames … … 763 713 registered address. Since several users could register with the same email 764 714 address, this returns a list of wikinames rather than a single wikiname. 765 766 *Since:* Foswiki::Plugins::VERSION 1.2767 715 768 716 =cut … … 789 737 } 790 738 791 = pod739 =begin TML 792 740 793 741 ---+++ wikinameToEmails( $user ) -> @emails … … 797 745 798 746 $user may also be a login name, or the name of a group. 799 800 *Since:* Foswiki::Plugins::VERSION 1.2801 747 802 748 =cut … … 825 771 } 826 772 827 = pod773 =begin TML 828 774 829 775 ---+++ isGuest( ) -> $boolean 830 776 831 777 Test if logged in user is a guest (WikiGuest) 832 833 *Since:* Foswiki::Plugins::VERSION 1.000 (7 Dec 2002)834 778 835 779 =cut … … 841 785 } 842 786 843 = pod787 =begin TML 844 788 845 789 ---+++ isAnAdmin( $id ) -> $boolean … … 848 792 the currently logged-in user is assumed. 849 793 * $id can be either a login name or a WikiName 850 851 *Since:* Foswiki::Plugins::VERSION 1.2852 794 853 795 =cut … … 859 801 } 860 802 861 = pod803 =begin TML 862 804 863 805 ---+++ isGroupMember( $group, $id ) -> $boolean … … 872 814 873 815 * $id can be a login name or a WikiName 874 875 *Since:* Foswiki::Plugins::VERSION 1.2876 816 877 817 =cut … … 894 834 } 895 835 896 = pod836 =begin TML 897 837 898 838 ---+++ eachUser() -> $iterator … … 910 850 911 851 *WARNING* on large sites, this could be a long list! 912 913 *Since:* Foswiki::Plugins::VERSION 1.2914 852 915 853 =cut … … 923 861 } 924 862 925 = pod863 =begin TML 926 864 927 865 ---+++ eachMembership($id) -> $iterator … … 929 867 If =$id= is =undef=, defaults to the currently logged-in user. 930 868 Get an iterator over the names of all groups that the user is a member of. 931 932 *Since:* Foswiki::Plugins::VERSION 1.2933 869 934 870 =cut … … 950 886 } 951 887 952 = pod888 =begin TML 953 889 954 890 ---+++ eachGroup() -> $iterator … … 966 902 *WARNING* on large sites, this could be a long list! 967 903 968 *Since:* Foswiki::Plugins::VERSION 1.2969 970 904 =cut 971 905 … … 976 910 } 977 911 978 = pod912 =begin TML 979 913 980 914 ---+++ isGroup( $group ) -> $boolean … … 990 924 } 991 925 992 = pod926 =begin TML 993 927 994 928 ---+++ eachGroupMember($group) -> $iterator … … 1006 940 1007 941 *WARNING* on large sites, this could be a long list! 1008 1009 *Since:* Foswiki::Plugins::VERSION 1.21010 942 1011 943 =cut … … 1023 955 } 1024 956 1025 = pod957 =begin TML 1026 958 1027 959 ---+++ checkAccessPermission( $type, $id, $text, $topic, $web, $meta ) -> $boolean … … 1057 989 in =ThatWeb.ThisTopic=, then a call to =checkAccessPermissions('SPIN', 'IncyWincy', undef, 'ThisTopic', 'ThatWeb', undef)= will return =true=. 1058 990 1059 *Since:* Foswiki::Plugins::VERSION 1.000 (27 Feb 2001)1060 1061 991 =cut 1062 992 … … 1072 1002 } 1073 1003 1074 = pod1004 =begin TML 1075 1005 1076 1006 ---++ Webs, Topics and Attachments … … 1078 1008 =cut 1079 1009 1080 = pod1010 =begin TML 1081 1011 1082 1012 ---+++ getListOfWebs( $filter [, $web] ) -> @webs … … 1098 1028 </verbatim> 1099 1029 1100 *Since:* Foswiki::Plugins::VERSION 1.11101 1102 1030 =cut 1103 1031 … … 1107 1035 } 1108 1036 1109 = pod1037 =begin TML 1110 1038 1111 1039 ---+++ webExists( $web ) -> $boolean … … 1114 1042 * =$web= - Web name, required, e.g. ='Sandbox'= 1115 1043 1116 *Since:* Foswiki::Plugins::VERSION 1.000 (14 Jul 2001)1117 1118 1044 =cut 1119 1045 … … 1125 1051 } 1126 1052 1127 = pod1053 =begin TML 1128 1054 1129 1055 ---+++ createWeb( $newWeb, $baseWeb, $opts ) … … 1151 1077 </verbatim> 1152 1078 1153 *Since:* Foswiki::Plugins::VERSION 1.11154 1155 1079 =cut 1156 1080 … … 1161 1085 } 1162 1086 1163 = pod1087 =begin TML 1164 1088 1165 1089 ---+++ moveWeb( $oldName, $newName ) … … 1189 1113 </verbatim> 1190 1114 1191 *Since:* Foswiki::Plugins::VERSION 1.11192 1193 1115 =cut 1194 1116 … … 1200 1122 } 1201 1123 1202 = pod1124 =begin TML 1203 1125 1204 1126 ---+++ eachChangeSince($web, $time) -> $iterator … … 1237 1159 } 1238 1160 1239 = pod1161 =begin TML 1240 1162 1241 1163 ---+++ getTopicList( $web ) -> @topics … … 1245 1167 Return: =@topics= Topic list, e.g. =( 'WebChanges', 'WebHome', 'WebIndex', 'WebNotify' )= 1246 1168 1247 *Since:* Foswiki::Plugins::VERSION 1.000 (7 Dec 2002)1248 1249 1169 =cut 1250 1170 … … 1256 1176 } 1257 1177 1258 = pod1178 =begin TML 1259 1179 1260 1180 ---+++ topicExists( $web, $topic ) -> $boolean … … 1268 1188 To get an expected behaviour it is recommened to specify the current web for $web; don't leave it empty. 1269 1189 1270 *Since:* Foswiki::Plugins::VERSION 1.000 (14 Jul 2001)1271 1272 1190 =cut 1273 1191 … … 1278 1196 } 1279 1197 1280 = pod1198 =begin TML 1281 1199 1282 1200 ---+++ checkTopicEditLock( $web, $topic, $script ) -> ( $oopsUrl, $loginName, $unlockTime ) … … 1287 1205 Return: =( $oopsUrl, $loginName, $unlockTime )= - The =$oopsUrl= for calling redirectCgiQuery(), user's =$loginName=, and estimated =$unlockTime= in minutes, or ( '', '', 0 ) if no lease exists. 1288 1206 * =$script= The script to invoke when continuing with the edit 1289 1290 *Since:* Foswiki::Plugins::VERSION 1.010 (31 Dec 2002)1291 1207 1292 1208 =cut … … 1327 1243 } 1328 1244 1329 = pod1245 =begin TML 1330 1246 1331 1247 ---+++ setTopicEditLock( $web, $topic, $lock ) … … 1342 1258 It is *impossible* to fully lock a topic. Concurrent changes will be 1343 1259 merged. 1344 1345 *Since:* Foswiki::Plugins::VERSION 1.010 (31 Dec 2002)1346 1260 1347 1261 =cut … … 1362 1276 } 1363 1277 1364 = pod1278 =begin TML 1365 1279 1366 1280 ---+++ saveTopic( $web, $topic, $meta, $text, $options ) -> $error … … 1377 1291 Return: error message or undef. 1378 1292 1379 *Since:* Foswiki::Plugins::VERSION 1.000 (29 Jul 2001)1380 1381 1293 For example, 1382 1294 <verbatim> … … 1401 1313 } 1402 1314 1403 = pod1315 =begin TML 1404 1316 1405 1317 ---+++ saveTopicText( $web, $topic, $text, $ignorePermissions, $dontNotify ) -> $oopsUrl … … 1414 1326 1415 1327 This method is a lot less efficient and much more dangerous than =saveTopic=. 1416 1417 *Since:* Foswiki::Plugins::VERSION 1.010 (31 Dec 2002)1418 1328 1419 1329 <verbatim> … … 1491 1401 } 1492 1402 1493 = pod1403 =begin TML 1494 1404 1495 1405 ---+++ moveTopic( $web, $topic, $newWeb, $newTopic ) … … 1506 1416 1507 1417 Rename a topic to the $Foswiki::cfg{TrashWebName} to delete it. 1508 1509 *Since:* Foswiki::Plugins::VERSION 1.11510 1418 1511 1419 <verbatim> … … 1539 1447 } 1540 1448 1541 = pod1449 =begin TML 1542 1450 1543 1451 ---+++ getRevisionInfo($web, $topic, $rev, $attachment ) -> ( $date, $user, $rev, $comment ) … … 1558 1466 more efficient. 1559 1467 1560 *Since:* Foswiki::Plugins::VERSION 1.000 (29 Jul 2001)1561 1562 1468 =cut 1563 1469 … … 1570 1476 } 1571 1477 1572 = pod1478 =begin TML 1573 1479 1574 1480 ---+++ getRevisionAtTime( $web, $topic, $time ) -> $rev … … 1581 1487 (either because the topic isn't that old, or there was a problem) 1582 1488 1583 *Since:* Foswiki::Plugins::VERSION 1.11584 1585 1489 =cut 1586 1490 … … 1590 1494 } 1591 1495 1592 = pod1496 =begin TML 1593 1497 1594 1498 ---+++ readTopic( $web, $topic, $rev ) -> ( $meta, $text ) … … 1608 1512 topic. 1609 1513 1610 *Since:* Foswiki::Plugins::VERSION 1.000 (7 Dec 2002)1611 1612 1514 =cut 1613 1515 … … 1620 1522 } 1621 1523 1622 = pod1524 =begin TML 1623 1525 1624 1526 ---+++ readTopicText( $web, $topic, $rev, $ignorePermissions ) -> $text … … 1632 1534 1633 1535 This method is more efficient than =readTopic=, but returns meta-data embedded in the text. Plugins authors must be very careful to avoid damaging meta-data. You are recommended to use readTopic instead, which is a lot safer. 1634 1635 *Since:* Foswiki::Plugins::VERSION 1.010 (31 Dec 2002)1636 1536 1637 1537 =cut … … 1665 1565 } 1666 1566 1667 = pod1567 =begin TML 1668 1568 1669 1569 ---+++ attachmentExists( $web, $topic, $attachment ) -> $boolean … … 1675 1575 $web and $topic are parsed as described in the documentation for =normalizeWebTopicName=. 1676 1576 1677 *Since:* Foswiki::Plugins::VERSION 1.11678 1679 1577 =cut 1680 1578 … … 1689 1587 } 1690 1588 1691 = pod1589 =begin TML 1692 1590 1693 1591 ---+++ readAttachment( $web, $topic, $name, $rev ) -> $data … … 1719 1617 </verbatim> 1720 1618 1721 *Since:* Foswiki::Plugins::VERSION 1.11722 1723 1619 =cut 1724 1620 … … 1737 1633 } 1738 1634 1739 = pod1635 =begin TML 1740 1636 1741 1637 ---+++ saveAttachment( $web, $topic, $attachment, \%opts ) … … 1770 1666 </verbatim> 1771 1667 1772 *Since:* Foswiki::Plugins::VERSION 1.11773 1774 1668 =cut 1775 1669 … … 1790 1684 } 1791 1685 1792 = pod1686 =begin TML 1793 1687 1794 1688 ---+++ moveAttachment( $web, $topic, $attachment, $newWeb, $newTopic, $newAttachment ) … … 1826 1720 </verbatim> 1827 1721 1828 *Since:* Foswiki::Plugins::VERSION 1.11829 1830 1722 =cut 1831 1723 … … 1847 1739 } 1848 1740 1849 = pod1741 =begin TML 1850 1742 1851 1743 ---++ Assembling Pages … … 1853 1745 =cut 1854 1746 1855 = pod1747 =begin TML 1856 1748 1857 1749 ---+++ readTemplate( $name, $skin ) -> $text … … 1862 1754 Return: =$text= Template text 1863 1755 1864 *Since:* Foswiki::Plugins::VERSION 1.000 (7 Dec 2002)1865 1866 1756 =cut 1867 1757 … … 1873 1763 } 1874 1764 1875 = pod1765 =begin TML 1876 1766 1877 1767 ---+++ loadTemplate ( $name, $skin, $web ) -> $text … … 1882 1772 Return: expanded template text (what's left after removal of all %TMPL:DEF% statements) 1883 1773 1884 *Since:* Foswiki::Plugins::VERSION 1.11885 1886 1774 Reads a template and extracts template definitions, adding them to the 1887 1775 list of loaded templates, overwriting any previous definition. … … 1898 1786 } 1899 1787 1900 = pod1788 =begin TML 1901 1789 1902 1790 ---+++ expandTemplate( $def ) -> $string … … 1906 1794 Return: the text of the expanded template 1907 1795 1908 *Since:* Foswiki::Plugins::VERSION 1.11909 1910 1796 A template is defined using a %TMPL:DEF% statement in a template 1911 1797 file. See the documentation on Foswiki templates for more information. … … 1918 1804 } 1919 1805 1920 = pod1806 =begin TML 1921 1807 1922 1808 ---+++ writeHeader() … … 1924 1810 Prints a basic content-type HTML header for text/html to standard out. 1925 1811 1926 *Since:* Foswiki::Plugins::VERSION 1.000 (7 Dec 2002)1927 1928 1812 =cut 1929 1813 … … 1933 1817 } 1934 1818 1935 = pod1819 =begin TML 1936 1820 1937 1821 ---+++ redirectCgiQuery( $query, $url, $passthru ) … … 1967 1851 Foswiki installation. 1968 1852 1969 *Since:* Foswiki::Plugins::VERSION 1.000 (7 Dec 2002)1970 1971 1853 =cut 1972 1854 … … 1977 1859 } 1978 1860 1979 = pod1861 =begin TML 1980 1862 1981 1863 ---+++ addToHEAD( $id, $header, $requires ) … … 1991 1873 Note that this is _not_ the same as the HTTP header, which is modified through the Plugins =modifyHeaderHandler=. 1992 1874 1993 *Since:* Foswiki::Plugins::VERSION 1.1 1994 1995 example: 1875 Example: 1996 1876 <verbatim> 1997 1877 Foswiki::Func::addToHEAD('PATTERN_STYLE','<link id="twikiLayoutCss" rel="stylesheet" type="text/css" href="%PUBURL%/Foswiki/PatternSkin/layout.css" media="all" />'); … … 2006 1886 } 2007 1887 2008 = pod1888 =begin TML 2009 1889 2010 1890 ---+++ expandCommonVariables( $text, $topic, $web, $meta ) -> $text … … 2014 1894 * =$topic= - Current topic name, e.g. ='WebNotify'= 2015 1895 * =$web= - Web name, optional, e.g. ='Main'=. The current web is taken if missing 2016 * =$meta= - topic meta-data to use while expanding (Since Foswiki::Plugins::VERSION 1.2)1896 * =$meta= - topic meta-data to use while expanding 2017 1897 Return: =$text= Expanded text, e.g. ='Current user is <nop>WikiGuest'= 2018 2019 *Since:* Foswiki::Plugins::VERSION 1.000 (7 Dec 2002)2020 1898 2021 1899 See also: expandVariablesOnTopicCreation … … 2032 1910 } 2033 1911 2034 = pod1912 =begin TML 2035 1913 2036 1914 ---+++ renderText( $text, $web ) -> $text … … 2041 1919 Return: =$text= XHTML text, e.g. ='<b>bold</b> and <code>fixed font</code>'= 2042 1920 2043 *Since:* Foswiki::Plugins::VERSION 1.000 (7 Dec 2002)2044 2045 1921 =cut 2046 1922 … … 2052 1928 } 2053 1929 2054 = pod1930 =begin TML 2055 1931 2056 1932 ---+++ internalLink( $pre, $web, $topic, $label, $anchor, $createLink ) -> $text … … 2065 1941 Return: =$text= XHTML anchor, e.g. ='<a href='/cgi-bin/view/Main/WebNotify#Jump'>notify</a>'= 2066 1942 2067 *Since:* Foswiki::Plugins::VERSION 1.000 (7 Dec 2002)2068 2069 1943 =cut 2070 1944 … … 2077 1951 } 2078 1952 2079 = pod1953 =begin TML 2080 1954 2081 1955 ---++ E-mail … … 2104 1978 Leave a blank line between the last header field and the message body. 2105 1979 2106 *Since:* Foswiki::Plugins::VERSION 1.12107 2108 1980 =cut 2109 1981 … … 2115 1987 } 2116 1988 2117 =pod 2118 2119 ---+++ wikiToEmail( $wikiName ) -> $email 2120 2121 * =$wikiname= - wiki name of the user 2122 Get the e-mail address(es) of the named user. If the user has multiple 2123 e-mail addresses (for example, the user is a group), then the list will 2124 be comma-separated. 2125 2126 *Since:* Foswiki::Plugins::VERSION 1.1 2127 2128 *Deprecated* in favour of wikinameToEmails, because this function only 2129 returns a single email address, where a user may in fact have several. 2130 2131 $wikiName may also be a login name. 2132 2133 =cut 2134 2135 sub wikiToEmail { 2136 my ($user) = @_; 2137 my @emails = wikinameToEmails($user); 2138 if ( scalar(@emails) ) { 2139 return $emails[0]; 2140 } 2141 return ''; 2142 } 2143 2144 =pod 1989 =begin TML 2145 1990 2146 1991 ---++ Creating New Topics … … 2148 1993 =cut 2149 1994 2150 = pod1995 =begin TML 2151 1996 2152 1997 ---+++ expandVariablesOnTopicCreation ( $text ) -> $text … … 2155 2000 * =$text= - the text to process 2156 2001 Return: text with variables expanded 2157 2158 *Since:* Foswiki::Plugins::VERSION 1.12159 2002 2160 2003 Expands only the variables expected in templates that must be statically … … 2181 2024 } 2182 2025 2183 = pod2026 =begin TML 2184 2027 2185 2028 ---++ Special handlers … … 2189 2032 =cut 2190 2033 2191 = pod=2034 =begin TML= 2192 2035 2193 2036 ---+++ registerTagHandler( $var, \&fn, $syntax ) … … 2199 2042 * =\&fn= - Reference to the handler function. 2200 2043 * =$syntax= can be 'classic' (the default) or 'context-free'. 'classic' syntax is appropriate where you want the variable to support classic syntax i.e. to accept the standard =%<nop>MYVAR{ "unnamed" param1="value1" param2="value2" }%= syntax, as well as an unquoted default parameter, such as =%<nop>MYVAR{unquoted parameter}%=. If your variable will only use named parameters, you can use 'context-free' syntax, which supports a more relaxed syntax. For example, %MYVAR{param1=value1, value 2, param3="value 3", param4='value 5"}% 2201 2202 *Since:* Foswiki::Plugins::VERSION 1.12203 2044 2204 2045 The variable handler function must be of the form: … … 2258 2099 } 2259 2100 2260 = pod=2101 =begin TML= 2261 2102 2262 2103 ---+++ registerRESTHandler( $alias, \&fn, ) … … 2267 2108 * =$alias= - The name . 2268 2109 * =\&fn= - Reference to the function. 2269 2270 *Since:* Foswiki::Plugins::VERSION 1.12271 2110 2272 2111 The handler function must be of the form: … … 2322 2161 } 2323 2162 2324 = pod2163 =begin TML 2325 2164 2326 2165 ---+++ decodeFormatTokens($str) -> $unencodedString … … 2352 2191 alphanumeric characters*. You have been warned! 2353 2192 2354 *Since:* Foswiki::Plugins::VERSION 1.22355 2356 2193 =cut 2357 2194 … … 2360 2197 } 2361 2198 2362 = pod2199 =begin TML 2363 2200 2364 2201 ---++ Searching … … 2366 2203 =cut 2367 2204 2368 = pod2205 =begin TML 2369 2206 2370 2207 ---+++ searchInWebContent($searchString, $web, \@topics, \%options ) -> \%map … … 2393 2230 </verbatim> 2394 2231 2395 *Since:* Foswiki::Plugins::VERSION 1.12396 2397 2232 =cut 2398 2233 … … 2404 2239 } 2405 2240 2406 = pod2241 =begin TML 2407 2242 2408 2243 ---++ Plugin-specific file handling … … 2410 2245 =cut 2411 2246 2412 = pod2247 =begin TML 2413 2248 2414 2249 ---+++ getWorkArea( $pluginName ) -> $directorypath … … 2423 2258 to keep their areas tidy. 2424 2259 2425 *Since:* Foswiki::Plugins::VERSION 1.1 (Dec 2005)2426 2427 2260 =cut 2428 2261 … … 2433 2266 } 2434 2267 2435 = pod2268 =begin TML 2436 2269 2437 2270 ---+++ readFile( $filename ) -> $text … … 2442 2275 2443 2276 __NOTE:__ Use this function only for the Plugin workarea, *not* for topics and attachments. Use the appropriate functions to manipulate topics and attachments. 2444 2445 *Since:* Foswiki::Plugins::VERSION 1.000 (07 Dec 2002)2446 2277 2447 2278 =cut … … 2458 2289 } 2459 2290 2460 = pod2291 =begin TML 2461 2292 2462 2293 ---+++ saveFile( $filename, $text ) … … 2468 2299 2469 2300 __NOTE:__ Use this function only for the Plugin workarea, *not* for topics and attachments. Use the appropriate functions to manipulate topics and attachments. 2470 2471 *Since:* Foswiki::Plugins::VERSION 1.000 (07 Dec 2002)2472 2301 2473 2302 =cut … … 2483 2312 } 2484 2313 2485 = pod2314 =begin TML 2486 2315 2487 2316 ---++ General Utilities … … 2489 2318 =cut 2490 2319 2491 = pod2320 =begin TML 2492 2321 2493 2322 ---+++ getRegularExpression( $name ) -> $expr … … 2496 2325 * =$name= - Name of the expression to retrieve. See notes below 2497 2326 Return: String or precompiled regular expression matching as described below. 2498 2499 *Since:* Foswiki::Plugins::VERSION 1.020 (9 Feb 2004)2500 2327 2501 2328 __Note:__ Foswiki internally precompiles several regular expressions to … … 2541 2368 } 2542 2369 2543 = pod2370 =begin TML 2544 2371 2545 2372 ---+++ normalizeWebTopicName($web, $topic) -> ($web, $topic) … … 2549 2376 * =$topic= - Topic name, may be a web.topic string, required. 2550 2377 Return: the parsed Web/Topic pair 2551 2552 *Since:* Foswiki::Plugins::VERSION 1.12553 2378 2554 2379 | *Input* | *Return* | … … 2579 2404 } 2580 2405 2581 = pod2406 =begin TML 2582 2407 2583 2408 ---+++ StaticMethod sanitizeAttachmentName($fname) -> ($fileName, $origName) … … 2590 2415 file names to legal server names. 2591 2416 2592 *Since:* Foswiki::Plugins::VERSION 1.22593 2594 2417 =cut 2595 2418 … … 2599 2422 } 2600 2423 2601 = pod2424 =begin TML 2602 2425 2603 2426 ---+++ spaceOutWikiWord( $word, $sep ) -> $text … … 2606 2429 With parameter $sep any string may be used as separator between the word components; if $sep is undefined it defaults to a space. 2607 2430 2608 *Since:* Foswiki::Plugins::VERSION 1.22609 2610 2431 =cut 2611 2432 … … 2616 2437 } 2617 2438 2618 = pod2439 =begin TML 2619 2440 2620 2441 ---+++ writeWarning( $text ) … … 2624 2445 Return: none 2625 2446 2626 *Since:* Foswiki::Plugins::VERSION 1.020 (16 Feb 2004)2627 2628 2447 =cut 2629 2448 … … 2637 2456 } 2638 2457 2639 = pod2458 =begin TML 2640 2459 2641 2460 ---+++ writeDebug( $text ) … … 2645 2464 Return: none 2646 2465 2647 *Since:* Foswiki::Plugins::VERSION 1.020 (16 Feb 2004)2648 2649 2466 =cut 2650 2467 … … 2656 2473 } 2657 2474 2658 =pod 2659 2660 ---+++ formatTime( $time, $format, $timezone ) -> $text 2661 2662 Format the time in seconds into the desired time string 2663 * =$time= - Time in epoc seconds 2664 * =$format= - Format type, optional. Default e.g. ='31 Dec 2002 - 19:30'=. Can be ='$iso'= (e.g. ='2002-12-31T19:30Z'=), ='$rcs'= (e.g. ='2001/12/31 23:59:59'=, ='$http'= for HTTP header format (e.g. ='Thu, 23 Jul 1998 07:21:56 GMT'=), or any string with tokens ='$seconds, $minutes, $hours, $day, $wday, $month, $mo, $year, $ye, $tz'= for seconds, minutes, hours, day of month, day of week, 3 letter month, 2 digit month, 4 digit year, 2 digit year, timezone string, respectively 2665 * =$timezone= - either not defined (uses the displaytime setting), 'gmtime', or 'servertime' 2666 Return: =$text= Formatted time string 2667 | Note: | if you used the removed formatGmTime, add a third parameter 'gmtime' | 2668 2669 *Since:* Foswiki::Plugins::VERSION 1.020 (26 Feb 2004) 2670 2671 =cut 2672 2673 sub formatTime { 2674 2675 # my ( $epSecs, $format, $timezone ) = @_; 2676 require Foswiki::Time; 2677 return Foswiki::Time::formatTime(@_); 2678 } 2679 2680 =pod 2475 =begin TML 2681 2476 2682 2477 ---+++ isTrue( $value, $default ) -> $boolean … … 2690 2485 not specified it is taken as 0. 2691 2486
