Changeset 8928
- Timestamp:
- 09/06/10 10:33:50 (21 months ago)
- Location:
- trunk/core
- Files:
-
- 2 edited
-
data/System/CommandAndCGIScripts.txt (modified) (28 diffs)
-
lib/Foswiki/UI/Register.pm (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/core/data/System/CommandAndCGIScripts.txt
r8907 r8928 12 12 ---++ CGI Scripts 13 13 Details on CGI scripts located in the =bin= directory. 14 15 Note that a blank in the 'Default' column means that the parameter 16 is not required, and has no default. _required_ means the 17 parameter is required, and has no default. text _in italics_ describes 18 default behaviour if no value is given. 14 19 15 20 ---+++ General Information … … 24 29 $ save -topic MyWeb.MyTopic -user admin -action save -text "New text of the topic" 25 30 </verbatim> 26 All parameters require a value, even if that is the empty string. 31 All parameters require a value, even if that is the empty string. Note that parameters passed on the command-line should *not* be URL-encoded. 32 33 When calling a =tools= script from the command line, you normally need to be cd'd to the =bin directory e.g. 34 <verbatim class="bash"> 35 $ cd bin 36 $ ../tools/mailnotify -q -nonews -nochanges -Main -System 37 </verbatim> 27 38 28 39 ---++++ Common parameters … … 30 41 31 42 | *Parameter* | *Description* | *Default* | 32 | =cover= | Specifies temporary skin path to prepend to the skin path for this script only (see [[Skins]]) | none|43 | =cover= | Specifies temporary skin path to prepend to the skin path for this script only (see [[Skins]]) | | 33 44 | =debugenableplugins= | During debugging it can be useful to selectively disable all but a subset of plugins. This parameter allows the caller to specify a comma-separated list of plugins that should be enabled. | | 34 45 | =foswikioriginalquery= | The original query that was being made before a redirect for user confirmation was required. | | … … 37 48 | =refresh= | If the Foswiki page cache is in use, setting this parameter will invalidate the cache. Valid values are =on= and =all=. See PageCaching for more information on the page cache. | | 38 49 | =response= | Used as part of the request validation process. | | 39 | =skin= | Overrides the default skin path (see [[Skins]]) | value of the SKIN preference|40 | =t= | While the =t= parameter is not actively used by any scripts, it is used when building links to scripts such as =edit=, to ensure that each edit link is unique. This stops the browser from trying to use a cached reply from a previous call to the script. | generally set to current time, in seconds|50 | =skin= | Overrides the default skin path (see [[Skins]]) | _value of the =SKIN= preference_ | 51 | =t= | While the =t= parameter is not actively used by any scripts, it is used when building links to scripts such as =edit=, to ensure that each edit link is unique. This stops the browser from trying to use a cached reply from a previous call to the script. | _generally set to current time, in seconds_ | 41 52 | =topic= | Overrides the web.topic path given in the URL (specify Web.<nop>TopicName) | | 42 53 | =user= | Command-line only; set the name of the user performing the action. Note: this usage is inherently insecure, as it bypasses webserver login constraints. For this reason only authorised users should be allowed to execute scripts from the command line. | | … … 47 58 48 59 | *Parameter* | *Description* | *Default* | 49 | =filename= | Name of existing attachment (if provided, this is a "manage attachment" action) | none (in which case this is a "new attachment" action)|60 | =filename= | Name of existing attachment (if provided, this is a "manage attachment" action) | _this is a "new attachment" action_ | 50 61 51 62 ---+++ =changes= … … 55 66 56 67 | *Parameter* | *Description* | *Default* | 57 | =minor= | If 0, show only major changes. If 1, show all the changes (both minor and major) | 0|68 | =minor= | If 0, show only major changes. If 1, show all the changes (both minor and major) | _show major changes_ | 58 69 59 70 The main difference between invoking this script and using WebChanges is that WebChanges is based on a =%<nop>SEARCH%=, while this script reads the =changes= file in each web, making it much faster. … … 65 76 66 77 ---+++ =edit= 67 The =edit= script understands the following parameters, typically supplied by HTML input fields: 68 69 | *Parameter* | *Description* | *Default* | 70 | =action= | If =action=text=, then hide the form. If =action=form=, then hide the normal text area and only edit the form. | | 78 The =edit= script understands the following parameters, typically supplied by HTML input fields. 79 80 A major role of the =edit= script is new topic creation. Parameters that are mainly relevant to new topic creation are marked with %ICON{"wip"}% 81 82 | *Parameter name* | *Description* | *Default* | 83 | =action= | If =action=text=, then hide the form. If =action=form=, then hide the normal text area and only edit the form. | _edit both_ | 71 84 | =breaklock= | If set, any lease conflicts will be ignored, and the edit will proceed even if someone is already editing the topic. | | 72 | =contenttype= | Optional parameter that defines the application type to write into the CGI header. Defaults to =text/html=. May be used to invoke alternative client applications ||73 | =formtemplate= | Name of the form to instantiate in the topic. Overrides any form set in the =templatetopic=. Set to 'none'to remove any existing form. | |74 | =notemplateexpansion= | Do not expand any Macros in the template defined by templatetopic. Use this when you want a verbatim copy of a topic | ="off"=|75 | =onlynewtopic= | If set, error if the topic already exists | ="off"=|76 | =onlywikiname= | If set, error if the topic name is not a WikiWord | ="off"=|77 | =redirectto= | If the user continues from edit to save, and if the save (or cancel s the edit) process is successful, save will redirect to this topic or URL. The parameter value can be a =TopicName=, a =Web.TopicName=, or a URL.%BR% *Note:* Redirect to a URL only works if it is enabled in =configure= (Miscellaneous ={AllowRedirectUrl}=). | |78 | =rev= | Lets you specify a specific revision to use as the basis of the edit. Any save will of course create a new revision. ||85 | =contenttype= | Optional parameter that defines the application type to write into the CGI header. May be used to invoke alternative client applications | =text/html= | 86 | =formtemplate= | Name of the form to instantiate in the topic. Set to =none= to remove any existing form. | | 87 | =notemplateexpansion= | %ICON{"wip"}% Do not expand any macros in the template topic. (see [[#NewTopicCreation][New topic creation]] below) | _expand_ | 88 | =onlynewtopic= | %ICON{"wip"}% If =on=, error if the topic already exists | _edit existing topic_ | 89 | =onlywikiname= | %ICON{"wip"}% If =on=, error if the name of a topic being created is not a WikiWord | _allow non-wikiword names_ | 90 | =redirectto= | If the user continues from edit to save, and if the save (or cancel) process is successful, save will redirect to this topic or URL. The parameter value can be a =TopicName=, a =Web.TopicName=, or a URL.%BR% *Note:* Redirect to a URL only works if it is enabled in =configure= (Miscellaneous ={AllowRedirectUrl}=). | | 91 | =rev= | Lets you specify a specific revision to use as the basis of the edit. | _latest_ | 79 92 | =template= | Allows you to specify a different skin template. Overrides any setting of =[[SkinTemplates#TemplatePreferences][EDIT_TEMPLATE]]=. | | 80 | =templatetopic= | The name of the template topic, copied to get the initial content (new topic _only_) | | 81 | =text= | Text to be edited. If this parameter is not given, the text is taken from the database. This parameter is mainly used for initialising new topics with user-supplied content. | | 82 | =topicparent= | Sets the parent topic | | 83 | <any name> | Any parameter can passed to the new topic; if the template topic contains =%<nop>URLPARAM{"= <any name> ="}%=, it will be replaced by its value | | 84 85 Form field values are passed in parameters named 'field' - for example, if I have a field =Status= the parameter name is =Status=. 86 1 The first sequence of ten or more =X= characters in the topic name will be converted on save to a number such that the resulting topic name is unique in the target web. 93 | =templatetopic= | %ICON{"wip"}% The name of the template topic, copied to get the initial content for a new topic. (see [[#NewTopicCreation][New topic creation]] below) | | 94 | =text= | %ICON{"wip"}% Set the text to be edited. If this parameter is not given, the text is taken from the existing topic (if it exists) | | 95 | =topicparent= | Sets the parent topic. | | 96 | _<any name>_ | This can be used in two ways; first, if the topic has a form with a field called _<any name>_, it will set the value of that field. %ICON{"wip"}% Second, it can be expanded in the topic text during topic creation - see [[#NewTopicCreation][New topic creation]] below | | 87 97 88 98 __Skin notes:__ … … 93 103 94 104 In most skins that are based on the default templates (such as Pattern skin) you can easily change the =Edit= and =Edit Wiki<nop>Text= buttons to append the =action= parameter, by setting the [[PreferenceSettings][preference]] [[VarEDITACTION][EDITACTION]] to the value =text= or =form=. (You can always get back to editing the whole topic by removing the =action= parameter from the URL browser Location window, and reloading the edit window). 105 106 #NewTopicCreation 107 __New topic creation %ICON{"wip"}%:__ 108 109 The string AUTOINC followed by one or more digits anywhere in the topic name will be converted to a number such that the resulting topic name is unique in the target web. However this doesn't happen until the topic is saved. 110 111 When a new topic is created using edit, the topic isn't actually created until the edit is saved. The content of the new topic is initialised according to the parameters you pass. 112 * =templatetopic= - defines the full name (web.topic) of a topic to use as a template for the new topic. The template topic is copied and, unless =notemplateexpansion= is set, the following macros are expanded in the topic text: =URLPARAM=, =DATE=, =SERVERTIME=, =GMTIME=, =USERNAME=, =WIKINAME=, =WIKIUSERNAME=, =USERINFO=. 113 * =text= - use this as the text of the topic. Macros are *not* expanded in this text. Overrides any text set in the =templatetopic=. 114 * =formtemplate= - Overrides any form set in the =templatetopic=. 115 * =notemplateexpansion= - given by =templatetopic=. Use this when you want a verbatim copy of a topic. 116 * =onlynewtopic= and =onlywikiname= are used to control validation of the new topic name. 117 * _<any name>_ - besides the form field value setting described above, when creating a new topic, =%<nop>URLPARAM{"= _<any name>_ ="}%= in the =templatetopic= will be expanded to the parameter value. 95 118 96 119 ---+++ =login= 97 120 Used for logging in with !TemplateLoginManager, and for interactive validation of operations that require user confirmation. 98 121 | *Parameter* | *Description* | *Default* | 99 | =foswikiloginaction= | If 'validate', the login script is being used for interactive validation of an operation. Otherwise it is being used for login. | 100 | =foswiki_origin= | URL that was being accessed when an access violation occurred. the login process will redirect to this URL if it is successful | none|122 | =foswikiloginaction= | If 'validate', the login script is being used for interactive validation of an operation. Otherwise it is being used for login. | | 123 | =foswiki_origin= | URL that was being accessed when an access violation occurred. the login process will redirect to this URL if it is successful | | 101 124 | =remember= | If set, this will cause the user's login to be retained even after their browser is shut down. | 102 125 | =sudo= | promote login to internal wiki admin (admins only) | | 103 | =password= | password of user logging in | none|104 | =username= | username of user logging in (if set, login will attempt to authenticate) | none|105 | =usernamestep= | used to initialise the =username= input field in the login form (will not attempt to authenticate) | none|126 | =password= | password of user logging in | | 127 | =username= | username of user logging in (if set, login will attempt to authenticate) | | 128 | =usernamestep= | used to initialise the =username= input field in the login form (will not attempt to authenticate) | | 106 129 107 130 ---+++ =logon= … … 114 137 115 138 | *Parameter* | *Description* | *Default* | 116 | =action= | One of =create=, =createweb=, =changePassword=, =resetPassword=, =bulkRegister=, =deleteUserAccount=, =editSettings=, =saveSettings=, =restoreRevision= | none|139 | =action= | One of =create=, =createweb=, =changePassword=, =resetPassword=, =bulkRegister=, =deleteUserAccount=, =editSettings=, =saveSettings=, =restoreRevision= | _required_ | 117 140 118 141 ---++++ =action=create= 119 142 Alternative entry point for creation, via =edit=, of a new topic, used by screens that support several actions using =manage=. 120 143 | *Parameter* | *Description* | *Default* | 121 | =topic= | Name of topic to create (can be web.topic) | none|144 | =topic= | Name of topic to create (can be web.topic) | _required_ | 122 145 Other parameters are the same as for =edit=. 123 146 … … 125 148 Create a new web 126 149 | *Parameter* | *Description* | *Default* | 127 | =baseweb= | Name of the web to copy to create the new web | ''|128 | =newtopic= | Value of %<nop>TOPIC% within the web creation message. Optionally used in some skins to signify a non-default home topic. | ''|129 | =newweb= | Name of the new web | ''|150 | =baseweb= | Name of the web to copy to create the new web | _required_ | 151 | =newtopic= | Value of %<nop>TOPIC% within the web creation message. Optionally used in some skins to signify a non-default home topic. | | 152 | =newweb= | Name of the new web | _required_ | 130 153 | =nosearchall= | Value for NOSEARCHALL | '' | 131 154 | =webbgcolor= | value for WEBBGCOLOR | '' | … … 137 160 ---++++ =action=saveSettings= 138 161 | *Parameter* | *Description* | *Default* | 139 | =originalrev= | Revision that the edit started on | Most recent revision|140 | =redirectto= | If the savesettings process is successful, save will redirect to this topic or URL. The parameter value can be a =TopicName=, a =Web.TopicName=, or a URL.%BR% *Note:* Redirect to a URL only works if it is enabled in =configure= (Miscellaneous ={AllowRedirectUrl}=). | ''|141 | =text= | Text of the topic | ''|162 | =originalrev= | Revision that the edit started on | _latest_ | 163 | =redirectto= | If the savesettings process is successful, save will redirect to this topic or URL. The parameter value can be a =TopicName=, a =Web.TopicName=, or a URL.%BR% *Note:* Redirect to a URL only works if it is enabled in =configure= (Miscellaneous ={AllowRedirectUrl}=). | _redirect to the web.topic from the URL path_ | 164 | =text= | Text of the topic | _required_ | 142 165 All other parameters may be interpreted as form fields, depending on the current form definition in the topic. 143 166 … … 145 168 See BulkRegistration. 146 169 | *Parameter* | *Description* | *Default* | 147 | =emailuserswithdetails= | Whether to mail registered users or not | false | 148 | =logtopic= | Topic to save the log in | Same as topic name, with 'Result' appended. | 149 | =overwritehometopics= | Whether to overwrite existing home topics or not | false | 170 | =logtopic= | Topic to save the log in | _same as topic name, with 'Result' appended_ | 171 | =overwritehometopics= | Whether to overwrite existing home topics or not | _do not overwrite_ | 150 172 151 173 ---++++ =action=changePassword= 152 174 Change password, email address, or both, of a user. 153 175 | *Parameter* | *Description* | *Default* | 154 | =email= | new email address | _none_|155 | =oldpassword= | current password | _ none_ |156 | =password= | new password | _none_|157 | =passwordA= | new password confirmation | _ none_ |158 | =username= | login name of user to change password for | _none_ |176 | =email= | new email address | | 177 | =oldpassword= | current password | _required, unless current user is an admin_ | 178 | =password= | new password | | 179 | =passwordA= | new password confirmation | _required if =password= is given_ | 180 | =username= | login name of user to change password/email for | _required_ | 159 181 =password, =passwordA= and =email= are optional. If neither or =password= and =passwordA= is set, then the user password is left unchanged. If =email= is unset, their email is left unchanged. 160 182 … … 162 184 Reset the password for a single or multiple users 163 185 | *Parameter* | *Description* | *Default* | 164 | =introduction= | message to be sent alongside the reset, most often used to announce to the user that they have been given an account. | ''|165 | =loginname= | *list* of usernames to reset | none - error if not set|186 | =introduction= | message to be sent alongside the reset, most often used to announce to the user that they have been given an account. | | 187 | =loginname= | *list* of usernames to reset | _required_ | 166 188 167 189 This is used by BulkResetPassword and ResetPassword. Only administrators can provide a list of LoginNames, non-admins can only provide a single LoginName. … … 172 194 Unregisters (removes) the currently logged-in user. 173 195 | *Parameter* | *Description* | *Default* | 174 | =password= | Users' password | none|196 | =password= | Users' password | _required_ | 175 197 176 198 ---++++ =action=restoreRevision= … … 180 202 add a user / list of users to a group 181 203 | *Parameter* | *Description* | *Default* | 182 | =create= | create the group if it doesn't exist | false|183 | =groupname= |groupname to change | none - error if not set|184 | =username= | *list* of usernames/wikinames to add to group | none - error if not set|204 | =create= | create the group if it doesn't exist | =0= | 205 | =groupname= |groupname to change | _required_ | 206 | =username= | *list* of usernames/wikinames to add to group | _required_ | 185 207 186 208 ---++++ =action=removeUserFromGroup= 187 209 remove a user / list of users to a group 188 210 | *Parameter* | *Description* | *Default* | 189 | =groupname= |groupname to change | none - error if not set|190 | =username= | *list* of usernames/wikinames to add to group | none - error if not set|211 | =groupname= |groupname to change | _required_ | 212 | =username= | *list* of usernames/wikinames to add to group | _required_ | 191 213 192 214 ---+++ =oops= … … 198 220 199 221 | *Parameter* | *Description* | *Default* | 200 | =def= | Optional, can be set to the name of a single definition within =template=. This definition will be instantiated in the =template= wherever =%<nop>INSTANTIATE%= is seen. This lets you use a single template file for many messages. For an example, see =oopsmanagebad.tmpl=. | |222 | =def= | Can be set to the name of a single definition within =template=. This definition will be instantiated in the =template= wherever =%<nop>INSTANTIATE%= is seen. This lets you use a single template file for many messages. For an example, see =oopsmanagebad.tmpl=. | | 201 223 | =paramN= | Where N is an integer from 1 upwards. These values will be substituted into =template= for =%<nop>PARAM1%= etc. | | 202 | =template= | Name of the template file to display | |224 | =template= | Name of the template file to display | =oops= | 203 225 204 226 ---+++ =preview= … … 211 233 | =context= | number of lines of context | | 212 234 | =render= | the rendering style {sequential, sidebyside, raw, debug} | =DIFFRENDERSTYLE=, =sequential= | 213 | =rev1= | the higher revision | |214 | =rev2= | the lower revision | |215 | =type= | {history, diff, last} history diff, version to version, last versionto previous | =diff= |235 | =rev1= | the higher revision | _latest_ | 236 | =rev2= | the lower revision | _latest_ | 237 | =type= | =history= gives a history, =diff= rev1 against rev2, =last= latest to previous | =diff= | 216 238 The =context= parameter is only respected if the back-end store supports 217 239 context diffs. … … 220 242 221 243 | *Parameter* | *Description* | *Default* | 222 | =action= | =register= or =verify= or =approve= | |244 | =action= | =register= or =verify= or =approve= | _required_ | 223 245 224 246 <blockquote class="foswikiHelp"> *%X% Note:* The =register= script can only be called via the HTTP POST method except when the action is =verify=. Make sure you specify =method="post"= if you call the =register= script via a form action. It is not possible to call =register= from an =<a href ...>= link. The =verify= action is an exception as it is used to verify registration by clicking a href link from an email.</blockquote> 225 247 226 | *Parameter* | *Description* | 227 | =addtogroups= | Accepts a comma-separated list of group names to add the user to. | 248 | *Parameter* | *Description* | *Default* | 249 | =addtogroups= | Accepts a comma-separated list of group names to add the user to. | | 228 250 | =code= | (verify= only) Activation code, verifies a pending registration | 229 | =create= | If a group does not exist, will create it.|230 | =email= | New user's email address | 231 | =firstname= | New user's first name | 232 | =lastname= | New user's surname | 233 | =loginname= | New user's login name | 234 | =password= | New user's password | 235 | =wikiname= | Wikiname of user being registered | 251 | =create= | If =on=, and a group being added to does not exist, create it. | | 252 | =email= | New user's email address | _required_ | 253 | =firstname= | New user's first name | _required_ | 254 | =lastname= | New user's surname | _required_ | 255 | =loginname= | New user's login name | _required_ | 256 | =password= | New user's password | | 257 | =wikiname= | Wikiname of user being registered | _required_ | 236 258 | <any name> | Any other parameter passed during registration will normally be passed on into the new user's home topic, or ignored. | 237 259 … … 240 262 241 263 | *Parameter* | *Description* | *Default* | 242 | =action= | =renameweb= or anything else ||243 | =confirm= | if defined, requires a second level of confirmation | |264 | =action= | =renameweb= or =renameother= | =renameother= | 265 | =confirm= | if non-0, requires a second level of confirmation | | 244 266 | =referring_topics= | (internal use only) list of topics that refer to the web or topic being renamed | | 245 | =redirectto= | If the rename process is successful, rename will redirect to this topic or URL. The parameter value can be a =TopicName=, a =Web.TopicName=, or a URL.%BR% *Note:* Redirect to a URL only works if it is enabled in =configure= (Miscellaneous ={AllowRedirectUrl}=). | |267 | =redirectto= | If the rename process is successful, rename will redirect to this topic or URL. The parameter value can be a =TopicName=, a =Web.TopicName=, or a URL.%BR% *Note:* Redirect to a URL only works if it is enabled in =configure= (Miscellaneous ={AllowRedirectUrl}=). | _the renamed topic_ | 246 268 247 269 ---++++ =action="renameweb"= 248 270 Rename a web. 249 271 | *Parameter* | *Description* | *Default* | 250 | =newparentweb= | new parent web name | existing parent|272 | =newparentweb= | new parent web name | _existing parent_ | 251 273 | =newsubweb= | new web name | | 252 274 253 ---++++ =action= <i>anything else</i>=275 ---++++ =action=renameother= 254 276 Rename a topic or an attachment. 255 277 | *Parameter* | *Description* | *Default* | 256 | =attachment= | Attachment to move | =none=|257 | =currentwebonly= | if defined, searches current web only for links to this topic ||258 | =newattachment= | New name for attachment | =attachment=, if given|259 | =newtopic= | new topic name | |260 | =newweb= | new web name | |261 | =nonwikiword= | if defined, a non-wikiword is acceptable for the new topic name ||278 | =attachment= | Attachment to move | | 279 | =currentwebonly= | if non-0, searches current web only for links to this topic | _search all webs_ | 280 | =newattachment= | New name for attachment | _same as =attachment=, if given_ | 281 | =newtopic= | new topic name | _required_ | 282 | =newweb= | new web name | _required_ | 283 | =nonwikiword= | if =on=, a non-wikiword is acceptable for the new topic name | =off= | 262 284 | =template= | template for error when an attachment doesn't exist, =deleteattachment= for when deleting an attachment | | 263 285 … … 272 294 The =rest= script supports the following parameters: 273 295 | *Parameter* | *Description* | *Default* | 274 | =endPoint= | Where to redirect the response once the request is served, in the form "Web.Topic". If not given, the REST script must generate a valid response. | 296 | =endPoint= | Where to redirect the response once the request is served, in the form "Web.Topic". If not given, the REST script must generate a valid response. | | 275 297 | =password= | See =username= | | 276 298 | =username= | If =TemplateLogin=, or a similar login manager not embedded in the web server, is used, then you need to pass a username and password to the server. The =username= and =password= parameters are used for this purpose. | … … 314 336 315 337 ---+++ =save= 316 The =save= script performs a range of save-related functions , as selected by the =action= parameter.338 The =save= script performs a range of save-related functions. 317 339 318 340 | *Parameter* | *Description* | *Default* | … … 325 347 | =action_replaceform= | Redirect _from_ the "change form" page. | | 326 348 | =action_repRev= | *Administrators only* replace the text of the most recent revision of the topic with the text in the =text= parameter. =text= must included embedded meta-data tags. All other parameters are ignored. You have to be an administrator to use this, and not all store implementations will support it. | | 327 | =action_save= | *default *; save, return to view, dontnotify is =off=| |328 | =dontnotify= | if defined, suppress change notification | |329 | =edit= | The script to use to re-edit the topic when action is =checkpoint= | =edit= |349 | =action_save= | *default behaviour*; save, return to view | | 350 | =dontnotify= | if non-0, suppress change notification | | 351 | =edit= | The bin script to use to re-edit the topic when action is =checkpoint= | =edit= | 330 352 | =editaction= | When action is =checkpoint=, =add form= or =replace form...=, this is used as the =action= parameter to the =edit= script that is redirected to after the save is complete. | | 331 | =editparams= | The parameter string to use to edit the topic when action is =checkpoint= | |353 | =editparams= | The parameter string to use to edit the topic when action is =checkpoint= | | 332 354 | =forcenewrevision= | if set, forces a revision even if %WIKITOOLNAME% thinks one isn't needed | | 333 | =formtemplate= | if defined, use the named template for the form (will remove the form i sset to 'none') | |355 | =formtemplate= | if defined, use the named template for the form (will remove the form if set to 'none') | | 334 356 | =newtopic= | If =templatetopic= is given, and this parameter is set to 1 and the topic does not exist, will clear the initial topic text. | | 335 357 | =onlynewtopic= | If set, error if topic already exists | | 336 358 | =onlywikiname= | If set, error if topic name is not a WikiWord | | 337 359 | =originalrev= | Revision on which the edit started. | | 338 | =redirectto= | The save process will redirect to this topic or URL if it is successful. (Typically this would be the URL that was being viewed when edit was invoked). The parameter value can be a =TopicName=, a =Web.TopicName=, or a URL.%BR% *Note:* Redirect to a URL only works if it is enabled in =configure= (Miscellaneous ={AllowRedirectUrl}=). | view topic being edited|360 | =redirectto= | The save process will redirect to this topic or URL if it is successful. (Typically this would be the URL that was being viewed when edit was invoked). The parameter value can be a =TopicName=, a =Web.TopicName=, or a URL.%BR% *Note:* Redirect to a URL only works if it is enabled in =configure= (Miscellaneous ={AllowRedirectUrl}=). | _topic specified in URL path_ | 339 361 | =template= | The template to use to re-edit the topic when action is =checkpoint= | | 340 362 | =templatetopic= | Name of a topic to use as a template for the text and form (new topic _only_) | | … … 377 399 Refresh the WebStatistics topics in range of webs. 378 400 | *Parameter* | *Description* | *Default* | 379 | =logdate= | YYYYMM to generate statistics for | current month|380 | =webs= | comma-separated list of webs to run stats on | all accessible webs|401 | =logdate= | YYYYMM to generate statistics for | _current month_ | 402 | =webs= | comma-separated list of webs to run stats on | _all accessible webs_ | 381 403 382 404 for example: … … 393 415 Uploads an attachment to a topic. The HTTP request is expected to be in =multipart/form-data= format. 394 416 | *Parameter* | *Description* | *Default* | 395 | =changeproperties= | if defined, this is a property change operation *only* - no file will be uploaded. | null|396 | =createlink= | if defined, will create a link to file at end of topic | |417 | =changeproperties= | if non=0, this is a property change operation *only* - no file will be uploaded. | | 418 | =createlink= | if non-0, will create a link to file at end of topic | | 397 419 | =filecomment= | Comment to associate with file in attachment table | | 398 | =filename= | deprecated, do not use | |399 420 | =filepath= | local (client) path name of the file being uploaded. This is used to look up the data for the file in the HTTP query. | | 400 | =hidefile= | if defined, will not show file in attachment table | |401 | =noredirect= | Normally it will redirect to 'view' when the upload is \421 | =hidefile= | if non-0, will not show file in attachment table | | 422 | =noredirect= | Normally the script will redirect to 'view' when the upload is \ 402 423 complete, but also designed to be useable for REST-style calling using \ 403 424 the 'noredirect' parameter. If this parameter is set it will return an \ 404 425 appropriate HTTP status code and print a message to STDOUT, starting \ 405 with 'OK' on success and 'ERROR' on failure. | 406 | =redirectto= | URL to redirect to after upload. ={AllowRedirectUrl}= \ 407 must be enabled in =configure=. The parameter value can be a \ 426 with 'OK' on success and 'ERROR' on failure. | | 427 | =redirectto= | URL to redirect to after upload. The parameter value can be a \ 408 428 =TopicName=, a =Web.TopicName=, or a URL. Redirect to a URL only works \ 409 429 if it is enabled in =configure=, and is ignored if =noredirect= is \ 410 specified.%BR% *Note:* Redirect to a URL only works if it is enabled \ 411 in =configure= (Miscellaneous ={AllowRedirectUrl}=). | | 430 specified.%BR% (Miscellaneous ={AllowRedirectUrl}=). | _topic specified in URL path_ | 412 431 413 432 *Tips* … … 421 440 422 441 | *Parameter* | *Description* | *Default* | 423 | =contenttype= | Allows you to specify a different *Content-Type:* (e.g. =contenttype=text/plain=) | | 424 | =raw=on= | Shows the text of the topic in a scrollable textarea | | 425 | =raw=debug= | As =raw=on=, but also shows the metadata (forms etc) associated with the topic. | | 426 | =raw=text= | Shows only the source of the topic, as plain text (Content-type: text/plain). Only shows the body text, *not* the form or other meta-data. | | 427 | =raw=all= | Shows only the source of the topic, as plain text (Content-type: text/plain), *with embedded meta-data*. This may be useful if you want to extract the source of a topic to a local file on disc. | | 428 | =rev= | Revision to view (e.g. =rev=45=) | | 429 | =SEARCH<hex number>= | Identifies a result set that is being paged through | 442 | =contenttype= | Allows you to specify a different *Content-Type:* (e.g. =contenttype=text/plain=) | =text/html= | 443 | =raw= | <ul>\ 444 <li> =on= - show the text of the topic in a scrollable textarea. </li> \ 445 <li> =debug= - as =on=, but also shows the metadata (forms etc) associated with the topic. </li> \ 446 <li> =text= - show only the source of the topic, as plain text (Content-type: text/plain). Only shows the body text, *not* the form or other meta-data. </li> \ 447 <li> =all= - show only the source of the topic, as plain text (Content-type: text/plain), *with embedded meta-data*. This may be useful if you want to extract the source of a topic to a local file on disc. </li></ul> | | 448 | =rev= | Revision to view (e.g. =rev=45=) | _latest_ | 449 | =SEARCH<hex number>= | Identifies a result set that is being paged through | | 430 450 | =section= | Allows to view only a part of the topic delimited by a named section (see %SYSTEMWEB%.VarSTARTSECTION). If the given section is not present, no topic content is displayed. | | 431 451 | =template= | Allows you to specify a different skin template, overriding the 'view' template the view script would normally use. The default template is =view=. For example, you could specify [[%SCRIPTURLPATH{"view"}%/%WEB%/%TOPIC%?template=edit][%SCRIPTURLPATH{"view"}%/%WEB%/%TOPIC%?template=edit]]. This is mainly useful when you have specialised templates for a Wiki Application. | | … … 437 457 438 458 | *Parameter* | *Description* | *Default* | 439 | =filename= | name of attachment | |440 | =rev= | Revision to view | |459 | =filename= | name of attachment | _required_ | 460 | =rev= | Revision to view | _latest_ | 441 461 442 462 Instead of using the =filename= parameter, you can append the attachment name 443 463 to the end of the URL path (after the topic) e.g. =%SCRIPTURL{viewfile}%/Webname/TopicName/Attachment.gif= 444 464 445 ---++ Command LineScripts465 ---++ Tool Scripts 446 466 Details on command line scripts located in the =tools= directory. 447 467 … … 453 473 454 474 ---+++ =rewriteshebang.pl= 455 Simple script to rewrite the =#!/usr/bin/perl= shebanglines specific to your local Perl installation. It will rewrite the first line of all your cgi scripts so they use a different shebang line. Use it if your perl is in a non-standard location, or you want to use a different interpreter (such as 'speedy').475 Simple script to rewrite the =#!/usr/bin/perl= [[http://en.wikipedia.org/wiki/Shebang_%28Unix%29][shebang]] lines specific to your local Perl installation. It will rewrite the first line of all your cgi scripts so they use a different shebang line. Use it if your perl is in a non-standard location, or you want to use a different interpreter (such as 'speedy'). 456 476 457 477 ---+++ =tick_foswiki.pl= … … 462 482 463 483 *Note:* The script has to be run by a user who can write files created by the webserver user. 484 485 Extensions, such as the MailerContrib, also install tool scripts. Check the documentation of the extension for details. 464 486 465 487 --- -
trunk/core/lib/Foswiki/UI/Register.pm
r8607 r8928 160 160 # This gets set from the value in the BulkRegistrations topic 161 161 $settings->{doOverwriteTopics} = $query->param('OverwriteHomeTopics') || 0; 162 $settings->{doEmailUserDetails} = $query->param('EmailUsersWithDetails')163 || 0;164 162 165 163 unless ( $session->{users}->isAdmin($user) ) {
Note: See TracChangeset
for help on using the changeset viewer.
