Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
internals:internals-report [2006/12/18 15:26]
127.0.0.1 external edit
internals:internals-report [2018/03/29 03:46] (current)
ikeda@conversion.co.jp
Line 1: Line 1:
-====== Internals: report.pm ======+<note warning>​ 
 +This document was obsoleted. 
 +</​note>​ 
 + 
 +====== ​× Internals: report.pm ======
  
 This module provides various tools for notification and error reports in every Sympa interface (mail diffusion, mail command and web command). This module provides various tools for notification and error reports in every Sympa interface (mail diffusion, mail command and web command).
Line 6: Line 10:
  
   * **success notification**\\ ​ when the action does not involve any specific mail report or else, the user is notified of the well done of the processus.   * **success notification**\\ ​ when the action does not involve any specific mail report or else, the user is notified of the well done of the processus.
-  * **non authorization**''​(auth)''​\\ ​ a user is not allowed to perform an action, Sympa provides reason of rejecting. The template used to provides this information is ''​mail_tt2/authorization_reject.tt2''​. It contains a list of reasons, indexed by keywords that are mentioned in reject action scenario (see [[authorization-scenarios#​rules|rules]],​ page [[authorization-scenarios#​rules|{{crossref.png|[*]}}]])+  * **non authorization**''​(auth)''​\\ ​ a user is not allowed to perform an action, Sympa provides reason of rejecting. The template used to provides this information is ''​mail\_tt2/authorization\_reject.tt2''​. It contains a list of reasons, indexed by keywords that are mentioned in reject action scenario (see [[authorization-scenarios#​rules|rules]],​ page [[authorization-scenarios#​rules|{{crossref.png|[*]}}]])
   * **user error**''​(user)''​\\ ​ a error caused by the user, the user is informed about the error reason   * **user error**''​(user)''​\\ ​ a error caused by the user, the user is informed about the error reason
-  * **internal server error**''​(intern)''​\\ ​ an error independent from the user, the user is succintly informed about the error reason but a mail with more information is sent to listmaster using template ''​mail_tt2/listmaster_notification.tt2''​(If it is not necessary, keyword used is '''​intern_quiet'''​.+  * **internal server error**''​(intern)''​\\ ​ an error independent from the user, the user is succintly informed about the error reason but a mail with more information is sent to listmaster using template ''​mail\_tt2/listmaster\_notification.tt2''​(If it is not necessary, keyword used is '''​intern\_quiet'''​.
  
 For other reports than non authorizations templates used depends on the interface: For other reports than non authorizations templates used depends on the interface:
  
-  * message diffusion: ''​mail_tt2/message_report.tt2''​ +  * message diffusion: ''​mail\_tt2/message\_report.tt2''​ 
-  * mail commands: ''​mail_tt2/command_report.tt2''​ +  * mail commands: ''​mail\_tt2/command\_report.tt2''​ 
-  * web commands: ''​web_tt2/​notice.tt2''​ for positive notifications and ''​web_tt2/​error.tt2''​ for rejects.+  * web commands: ''​web\_tt2/​notice.tt2''​ for positive notifications and ''​web\_tt2/​error.tt2''​ for rejects.
  
 ===== Message diffusion ===== ===== Message diffusion =====
  
-These reports use template ''​mail_tt2/message_report.tt2''​ and there are two functions: ''​reject_report_msg()''​ and ''​notice_report_msg()''​.+These reports use template ''​mail\_tt2/message\_report.tt2''​ and there are two functions: ''​reject\_report\_msg()''​ and ''​notice\_report\_msg()''​.
  
  
Line 27: Line 31:
 **IN**: **IN**:
  
-  - ''​type''​(+): ​<​nowiki>​'​intern'​|'​intern_quiet'​|'​user'​|'​auth'​</​nowiki> ​- the error type+  - ''​type''​(+):​ '​intern'​|'​intern\_quiet'​|'​user'​|'​auth'​ - the error type
   - ''​error'':​ SCALAR - depends on $type:   - ''​error'':​ SCALAR - depends on $type:
     * '​intern':​ string error sent to listmaster     * '​intern':​ string error sent to listmaster
-    * '​user':​ $entry in ''​message_report.tt2''​ +    * '​user':​ $entry in ''​message\_report.tt2''​ 
-    * '​auth':​ $reason in ''​authorization_reject.tt2''​+    * '​auth':​ $reason in ''​authorization\_reject.tt2''​
   - ''​user''​(+):​ SCALAR - the user to notify   - ''​user''​(+):​ SCALAR - the user to notify
-  - ''​param'':​ ref(HASH) - for variable instantiation ''​message_report.tt2''​ (key ''​msgid''​(+) is required //if type == '​intern'//​)+  - ''​param'':​ ref(HASH) - for variable instantiation ''​message\_report.tt2''​ (key ''​msgid''​(+) is required //if type == '​intern'//​)
   - ''​robot'':​ SCALAR - robot   - ''​robot'':​ SCALAR - robot
-  - ''​msg_string'':​ SCALAR - rejected message+  - ''​msg\_string'':​ SCALAR - rejected message
   - ''​list'':​ ref(List) - in a list context   - ''​list'':​ ref(List) - in a list context
  
Line 46: Line 50:
 **IN**: **IN**:
  
-  - ''​entry''​(+):​ $entry in ''​message_report.tt2''​+  - ''​entry''​(+):​ $entry in ''​message\_report.tt2''​
   - ''​user''​(+):​ SCALAR - the user to notify   - ''​user''​(+):​ SCALAR - the user to notify
-  - ''​param'':​ ref(HASH) - for variable instantiation ''​message_report.tt2''​+  - ''​param'':​ ref(HASH) - for variable instantiation ''​message\_report.tt2''​
   - ''​robot''​(+):​ SCALAR - robot   - ''​robot''​(+):​ SCALAR - robot
   - ''​list'':​ ref(List) - in a list context   - ''​list'':​ ref(List) - in a list context
Line 56: Line 60:
 ===== Mail commands ===== ===== Mail commands =====
  
-A mail can contains many commands. Errors and notices are stored in module global arrays before sending (intern_error_cmduser_error_cmdglobal_error_cmdauth_reject_cmdnotice_cmd). Moreover used errors here we can have global errors on mail containing commands, so there is a function for that. These reports use template ''​mail_tt2/command_report.tt2''​ and there are many functions:+A mail can contains many commands. Errors and notices are stored in module global arrays before sending (intern\_error\_cmduser\_error\_cmdglobal\_error\_cmdauth\_reject\_cmdnotice\_cmd). Moreover used errors here we can have global errors on mail containing commands, so there is a function for that. These reports use template ''​mail\_tt2/command\_report.tt2''​ and there are many functions:
  
 ==== init_report_cmd() ==== ==== init_report_cmd() ====
Line 79: Line 83:
  
   - **internal server error** for a differed sending at the end of the mail processing:   - **internal server error** for a differed sending at the end of the mail processing:
-    * ''​global_report_cmd('​intern',​$error,​$data,​$sender,​$robot)''​ +    * ''​global\_report\_cmd('​intern',​$error,​$data,​$sender,​$robot)''​ 
-    * ''​global_report_cmd('intern_quiet',​$error,​$data)'':​ the listmaster won't be noticied +    * ''​global\_report\_cmd('intern\_quiet',​$error,​$data)'':​ the listmaster won't be noticied 
-  - **internal server error** for sending every reports directly (by calling ''​send_report_cmd()''​):​ +  - **internal server error** for sending every reports directly (by calling ''​send\_report\_cmd()''​):​ 
-    * ''​global_report_cmd('​intern',​$error,​$data,​$sender,​$robot,​1)''​ +    * ''​global\_report\_cmd('​intern',​$error,​$data,​$sender,​$robot,​1)''​ 
-    * ''​global_report_cmd('intern_quiet',​$error,​$data,​$sender,​$robot,​1)'':​ the listmaster won't be noticied +    * ''​global\_report\_cmd('intern\_quiet',​$error,​$data,​$sender,​$robot,​1)'':​ the listmaster won't be noticied 
-  - **user error** for a differed sending at the end of the mail processing: \\ ''​global_report_cmd('​user',​$error,​$data''​ +  - **user error** for a differed sending at the end of the mail processing: \\ ''​global\_report\_cmd('​user',​$error,​$data''​ 
-  - **user error** for sending every reports directly (by calling ''​send_report_cmd()''​):​ \\ ''​global_report_cmd('​user',​$error,​$data,​$sender,​$robot,​1)''​+  - **user error** for sending every reports directly (by calling ''​send\_report\_cmd()''​):​ \\ ''​global\_report\_cmd('​user',​$error,​$data,​$sender,​$robot,​1)''​
  
 **IN**: **IN**:
  
-  - ''​type''​(+):​ '​intern''​intern_quiet''​user'​+  - ''​type''​(+):​ '​intern''​intern\_quiet''​user'​
   - ''​error'':​ SCALAR - depends on $type:   - ''​error'':​ SCALAR - depends on $type:
     * '​intern':​ string error sent to listmaster     * '​intern':​ string error sent to listmaster
-    * '​user':​ $glob.entry in ''​command_report.tt2''​ +    * '​user':​ $glob.entry in ''​command\_report.tt2''​ 
-  - ''​data'':​ ref(HASH) - for variable instantiation in ''​command_report.tt2''​+  - ''​data'':​ ref(HASH) - for variable instantiation in ''​command\_report.tt2''​
   - ''​sender'':​ SCALAR - the user to notify   - ''​sender'':​ SCALAR - the user to notify
   - ''​robot'':​ SCALAR - robot   - ''​robot'':​ SCALAR - robot
Line 106: Line 110:
  
   - **internal server error**:   - **internal server error**:
-    * ''​reject_report_cmd('​intern',​$error,​$data,​$cmd,​$sender,​$robot)''​ +    * ''​reject\_report\_cmd('​intern',​$error,​$data,​$cmd,​$sender,​$robot)''​ 
-    * ''​reject_report_cmd('intern_quiet',​$error,​$data,​$cmd)'':​ the listmaster won't be noticied +    * ''​reject\_report\_cmd('intern\_quiet',​$error,​$data,​$cmd)'':​ the listmaster won't be noticied 
-  - **user error**: \\ ''​reject_report_cmd('​user',​$error,​$data,​$cmd)''​ +  - **user error**: \\ ''​reject\_report\_cmd('​user',​$error,​$data,​$cmd)''​ 
-  - **non authorization**:​ \\ ''​reject_report_cmd('​auth',​$error,​$data,​$cmd)''​+  - **non authorization**:​ \\ ''​reject\_report\_cmd('​auth',​$error,​$data,​$cmd)''​
  
 **IN**: **IN**:
  
-  - ''​type''​(+): ​<​nowiki>​'​intern'​|'​intern_quiet'​|'​user'​|'​auth'​</​nowiki>​+  - ''​type''​(+):​ '​intern'​|'​intern\_quiet'​|'​user'​|'​auth'​
   - ''​error'':​ SCALAR - depends on $type:   - ''​error'':​ SCALAR - depends on $type:
     * '​intern':​ string error sent to listmaster     * '​intern':​ string error sent to listmaster
-    * '​user':​ $u_err.entry in ''​command_report.tt2''​ +    * '​user':​ $u\_err.entry in ''​command\_report.tt2''​ 
-    * '​auth':​ $reason in ''​authorization_reject.tt2''​ +    * '​auth':​ $reason in ''​authorization\_reject.tt2''​ 
-  - ''​data'':​ ref(HASH) - for variable instantiation in ''​command_report.tt2''​ +  - ''​data'':​ ref(HASH) - for variable instantiation in ''​command\_report.tt2''​ 
-  - ''​cmd'':​ SCALAR - the rejected command, $xx.cmd in ''​command_report.tt2''​+  - ''​cmd'':​ SCALAR - the rejected command, $xx.cmd in ''​command\_report.tt2''​
   - ''​sender'':​ SCALAR - the user to notify   - ''​sender'':​ SCALAR - the user to notify
   - ''​robot'':​ SCALAR - robot   - ''​robot'':​ SCALAR - robot
Line 131: Line 135:
 **IN**: **IN**:
  
-  - ''​entry'':​ $notice.entry in ''​command_report.tt2''​ +  - ''​entry'':​ $notice.entry in ''​command\_report.tt2''​ 
-  - ''​data'':​ ref(HASH) - for variable instantiation in ''​command_report.tt2''​ +  - ''​data'':​ ref(HASH) - for variable instantiation in ''​command\_report.tt2''​ 
-  - ''​cmd'':​ SCALAR - the rejected command, $xx.cmd in ''​command_report.tt2''​+  - ''​cmd'':​ SCALAR - the rejected command, $xx.cmd in ''​command\_report.tt2''​
  
 **OUT**: 1 undef **OUT**: 1 undef
Line 139: Line 143:
 ==== send_report_cmd() ==== ==== send_report_cmd() ====
  
-Sends the template ''​command_report.tt2''​ to $sender with global arrays and then calls to ''​init_report_command.tt2''​ function. (It is used by sympa.pl at the end of mail process if there are some reports in gloal arrays)+Sends the template ''​command\_report.tt2''​ to $sender with global arrays and then calls to ''​init\_report\_command.tt2''​ function. (It is used by sympa.pl at the end of mail process if there are some reports in gloal arrays)
  
 **IN**: **IN**:
Line 150: Line 154:
 ===== Web commands ===== ===== Web commands =====
  
-It can have many errors and notices so they are stored in module global arrays before html sending. (intern_error_webuser_error_webauth_reject_webnotice_web). These reports use ''​web_tt2/​notice.tt2''​ template for notices and ''​web_tt2/​error.tt2''​ template for rejects.+It can have many errors and notices so they are stored in module global arrays before html sending. (intern\_error\_webuser\_error\_webauth\_reject\_webnotice\_web). These reports use ''​web\_tt2/​notice.tt2''​ template for notices and ''​web\_tt2/​error.tt2''​ template for rejects.
  
 ==== init_report_web() ==== ==== init_report_web() ====
Line 174: Line 178:
 **IN**: - **IN**: -
  
-**OUT**: ref(ARRAY) - clone of intern_error_web+**OUT**: ref(ARRAY) - clone of intern\_error\_web
  
 ==== get_user_error_web() ==== ==== get_user_error_web() ====
Line 182: Line 186:
 **IN**: - **IN**: -
  
-**OUT**: ref(ARRAY) - clone of user_error_web+**OUT**: ref(ARRAY) - clone of user\_error\_web
  
 ==== get_auth_reject_web() ==== ==== get_auth_reject_web() ====
Line 190: Line 194:
 **IN**: - **IN**: -
  
-**OUT**: ref(ARRAY) - clone of auth_reject_web+**OUT**: ref(ARRAY) - clone of auth\_reject\_web
  
 ==== get_notice_web() ==== ==== get_notice_web() ====
Line 198: Line 202:
 **IN**: - **IN**: -
  
-**OUT**: ref(ARRAY) - clone of notice_web+**OUT**: ref(ARRAY) - clone of notice\_web
  
  
Line 206: Line 210:
  
   - **internal server error**:   - **internal server error**:
-    * ''​reject_report_web('​intern',​$error,​$data,​$action,​$list,​$user,​$robot)''​ +    * ''​reject\_report\_web('​intern',​$error,​$data,​$action,​$list,​$user,​$robot)''​ 
-    * ''​reject_report_web('intern_quiet',​$error,​$data,​$action,​$list)'':​ the listmaster won't be noticied +    * ''​reject\_report\_web('intern\_quiet',​$error,​$data,​$action,​$list)'':​ the listmaster won't be noticied 
-  - **user error**: \\ ''​reject_report_web('​user',​$error,​$data,​$action,​ $list)''​ +  - **user error**: \\ ''​reject\_report\_web('​user',​$error,​$data,​$action,​ $list)''​ 
-  - **non authorization**:​ \\ ''​reject_report_web('​auth',​$error,​$data,​$action,​ $list)''​+  - **non authorization**:​ \\ ''​reject\_report\_web('​auth',​$error,​$data,​$action,​ $list)''​
  
 **IN**: **IN**:
  
-  - ''​type''​(+): ​<​nowiki>​'​intern'​|'​intern_quiet'​|'​user'​|'​auth'​</​nowiki>​+  - ''​type''​(+):​ '​intern'​|'​intern\_quiet'​|'​user'​|'​auth'​
   - ''​error''​(+):​ SCALAR - depends on $type:   - ''​error''​(+):​ SCALAR - depends on $type:
-    * '​intern':​ $error in ''​listmaster_notification.tt2''​ and possibly $i_err.msg in ''​error.tt2''​ +    * '​intern':​ $error in ''​listmaster\_notification.tt2''​ and possibly $i\_err.msg in ''​error.tt2''​ 
-    * 'intern_quiet': possibly $i_err.msg in ''​error.tt2''​ +    * 'intern\_quiet': possibly $i\_err.msg in ''​error.tt2''​ 
-    * '​user':​ $u_err.msg in ''​error.tt2''​ +    * '​user':​ $u\_err.msg in ''​error.tt2''​ 
-    * '​auth':​ $reason in ''​authorization_reject.tt2''​+    * '​auth':​ $reason in ''​authorization\_reject.tt2''​
   - ''​data'':​ ref(HASH) - for variable instantiation in ''​notice.tt2''​   - ''​data'':​ ref(HASH) - for variable instantiation in ''​notice.tt2''​
-  - ''​action''​(+):​ SCALAR - the rejected actin, $xx.action in ''​error.tt2'',​ $action in ''​listmaster_notification.tt2''​ +  - ''​action''​(+):​ SCALAR - the rejected actin, $xx.action in ''​error.tt2'',​ $action in ''​listmaster\_notification.tt2''​ 
-  - ''​list'': ​<​nowiki>''</​nowiki> ​ref(List)+  - ''​list'':​ ref(List)
   - ''​user'':​ SCALAR - the user for listmaster notification   - ''​user'':​ SCALAR - the user for listmaster notification
   - ''​robot'':​ SCALAR - robot for listmaster notification   - ''​robot'':​ SCALAR - robot for listmaster notification
  • internals/internals-report.1166451968.txt.gz
  • Last modified: 2017/06/21 15:20
  • (external edit)