Index: openacs-4/packages/faq/www/one-question.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/faq/www/one-question.tcl,v diff -u -r1.7 -r1.8 --- openacs-4/packages/faq/www/one-question.tcl 7 Aug 2017 23:48:10 -0000 1.7 +++ openacs-4/packages/faq/www/one-question.tcl 4 Oct 2017 13:11:08 -0000 1.8 @@ -8,23 +8,20 @@ @creation-date 2000-10-24 } { - entry_id:naturalnum,notnull } set package_id [ad_conn package_id] permission::require_permission -object_id $package_id -privilege faq_view_faq -set user_id [ad_conn user_id] +if {![db_0or1row question_info {}]} { + ad_return_complaint 1 [_ faq.lt_no_questions] + ad_script_abort +} -db_1row question_info "" - set context [list [list "one-faq?faq_id=$faq_id" $faq_name] [_ faq.One_Question]] - -ad_return_template - # Local variables: # mode: tcl # tcl-indent-level: 4 Index: openacs-4/packages/faq/www/admin/one-question.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/faq/www/admin/one-question.tcl,v diff -u -r1.8 -r1.9 --- openacs-4/packages/faq/www/admin/one-question.tcl 7 Aug 2017 23:48:10 -0000 1.8 +++ openacs-4/packages/faq/www/admin/one-question.tcl 4 Oct 2017 13:11:08 -0000 1.9 @@ -9,22 +9,24 @@ @creation-date 2000-10-24 } { - entry_id:naturalnum,notnull } -properties { entry_id:onevalue } set package_id [ad_conn package_id] -set user_id [ad_conn user_id] - permission::require_permission -object_id $package_id -privilege faq_admin_faq -db_1row q_and_a_info "select question, answer, a.faq_id, f.faq_name - from faq_q_and_as a, faqs f - where entry_id = :entry_id - and a.faq_id = f.faq_id" +if {![db_0or1row q_and_a_info { + select question, answer, a.faq_id, f.faq_name + from faq_q_and_as a, faqs f + where entry_id = :entry_id + and a.faq_id = f.faq_id +}]} { + ad_return_complaint 1 [_ faq.lt_no_questions] + ad_script_abort +} set context [list [list "one-faq?faq_id=$faq_id" "$faq_name"] "[_ faq.One_Question]"]