Index: openacs-4/packages/faq/tcl/apm-callback-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/faq/tcl/apm-callback-procs.tcl,v diff -u -r1.3 -r1.4 --- openacs-4/packages/faq/tcl/apm-callback-procs.tcl 7 Aug 2017 23:48:10 -0000 1.3 +++ openacs-4/packages/faq/tcl/apm-callback-procs.tcl 12 Jul 2018 12:39:45 -0000 1.4 @@ -7,29 +7,29 @@ namespace eval faq::apm_callback {} -ad_proc -private faq::apm_callback::package_install { +ad_proc -private faq::apm_callback::package_install { } { - Does the integration with the notifications package. + Does the integration with the notifications package. } { db_transaction { - # Create the impl and aliases for one faq Q&A - set impl_id [create_one_faq_qa_impl] + # Create the impl and aliases for one faq Q&A + set impl_id [create_one_faq_qa_impl] - # Create the notification type for one specific FAQ - set type_id [create_one_faq_type $impl_id] + # Create the notification type for one specific FAQ + set type_id [create_one_faq_type $impl_id] - # Enable the delivery intervals and delivery methods for a specific FAQ - enable_intervals_and_methods $type_id + # Enable the delivery intervals and delivery methods for a specific FAQ + enable_intervals_and_methods $type_id - # Create the impl and aliases for all faqs Q&A - set impl_id [create_all_faq_qa_impl] + # Create the impl and aliases for all faqs Q&A + set impl_id [create_all_faq_qa_impl] - # Create the notification type for all FAQs - set type_id [create_all_faq_type $impl_id] + # Create the notification type for all FAQs + set type_id [create_all_faq_type $impl_id] - # Enable the delivery intervals and delivery methods for all FAQs - enable_intervals_and_methods $type_id + # Enable the delivery intervals and delivery methods for all FAQs + enable_intervals_and_methods $type_id } } @@ -50,7 +50,7 @@ notification::type::delete -short_name all_faq_qa_notif # Delete the implementation for the notification of a new Q&A all Faqs - delete_all_faq_impl + delete_all_faq_impl } } @@ -75,67 +75,67 @@ ad_proc -public faq::apm_callback::create_one_faq_qa_impl {} { Register the service contract implementation and return the impl_id - @return impl_id of the created implementation + @return impl_id of the created implementation } { - return [acs_sc::impl::new_from_spec -spec { - name one_faq_qa_notif_type - contract_name NotificationType - owner faq - aliases { - GetURL faq::notification::get_url - ProcessReply faq::notification::process_reply - } - }] + return [acs_sc::impl::new_from_spec -spec { + name one_faq_qa_notif_type + contract_name NotificationType + owner faq + aliases { + GetURL faq::notification::get_url + ProcessReply faq::notification::process_reply + } + }] } ad_proc -public faq::apm_callback::create_one_faq_type {impl_id} { Create the notification type for one specific FAQ Q&A @return the type_id of the created type } { return [notification::type::new \ - -sc_impl_id $impl_id \ - -short_name one_faq_qa_notif \ - -pretty_name "One FAQ Q&A" \ - -description "Notification of a new Q&A of one specific faq"] + -sc_impl_id $impl_id \ + -short_name one_faq_qa_notif \ + -pretty_name "One FAQ Q&A" \ + -description "Notification of a new Q&A of one specific faq"] } ad_proc -public faq::apm_callback::enable_intervals_and_methods {type_id} { Enable the intervals and delivery methods of a specific type } { # Enable the various intervals and delivery method notification::type::interval_enable \ - -type_id $type_id \ - -interval_id [notification::interval::get_id_from_name -name instant] + -type_id $type_id \ + -interval_id [notification::interval::get_id_from_name -name instant] notification::type::interval_enable \ - -type_id $type_id \ - -interval_id [notification::interval::get_id_from_name -name hourly] + -type_id $type_id \ + -interval_id [notification::interval::get_id_from_name -name hourly] notification::type::interval_enable \ - -type_id $type_id \ - -interval_id [notification::interval::get_id_from_name -name daily] + -type_id $type_id \ + -interval_id [notification::interval::get_id_from_name -name daily] - # Enable the delivery methods + # Enable the delivery methods notification::type::delivery_method_enable \ - -type_id $type_id \ - -delivery_method_id [notification::delivery::get_id -short_name email] + -type_id $type_id \ + -delivery_method_id [notification::delivery::get_id -short_name email] } ad_proc -public faq::apm_callback::create_all_faq_qa_impl {} { Register the service contract implementation and return the impl_id - @return impl_id of the created implementation + @return impl_id of the created implementation } { return \ - [acs_sc::impl::new_from_spec -spec { - name all_faq_qa_notif_type - contract_name NotificationType - owner faq - aliases { - GetURL faq::notification::get_url - ProcessReply faq::notification::process_reply - } - }] + [acs_sc::impl::new_from_spec -spec { + name all_faq_qa_notif_type + contract_name NotificationType + owner faq + aliases { + GetURL faq::notification::get_url + ProcessReply faq::notification::process_reply + } + }] } @@ -144,10 +144,10 @@ @return the type_id of the created type } { set type_id [notification::type::new \ - -sc_impl_id $impl_id \ - -short_name all_faq_qa_notif \ - -pretty_name "FAQ Q&A" \ - -description "Notification of a new Q&A of any faq"] + -sc_impl_id $impl_id \ + -short_name all_faq_qa_notif \ + -pretty_name "FAQ Q&A" \ + -description "Notification of a new Q&A of any faq"] } # Local variables: