general_comments::get_comments (public, deprecated)

 general_comments::get_comments object_id return_url

Defined in packages/general-comments/tcl/general-comments-procs.tcl

Deprecated. Invoking this procedure generates a warning.

Generates a line item list of comments for the object_id.

Parameters:
object_id - The object_id to retrieve the comments for.
return_url - A url for the user to return to after viewing a comment.

See Also:

Partial Call Graph (max 5 caller/called nodes):
%3 ad_get_tcl_call_stack ad_get_tcl_call_stack (public) db_foreach db_foreach (public) export_vars export_vars (public) general_comments_package_url general_comments_package_url (public) general_comments::get_comments general_comments::get_comments general_comments::get_comments->ad_get_tcl_call_stack general_comments::get_comments->db_foreach general_comments::get_comments->export_vars general_comments::get_comments->general_comments_package_url

Testcases:
No testcase defined.
Source code:
ns_log Notice "Deprecated proc general_comments::get_comments used:\n[ad_get_tcl_call_stack]"


        # get the package url
        set package_url [general_comments_package_url]

        set html ""
        db_foreach get_comments_deprecated "
             select g.comment_id,
                    r.title,
                    r.content,
                    r.mime_type,
                    o.creation_user,
                    to_char(o.creation_date, 'MM-DD-YYYY') as creation_date,
                    p.first_names || ' ' || p.last_name as author
               from general_comments g,
                    cr_items i,
                    cr_revisions r,
                    acs_objects o,
                    persons p
              where g.object_id = :object_id and
                    i.item_id = g.comment_id and
                    r.revision_id = i.live_revision and
                    o.object_id = g.comment_id and
                    p.person_id = o.creation_user
              order by creation_date" {
                  append html [subst {
                      <li><a href="[ns_quotehtml [export_vars -base ${package_url}view-comment {comment_id return_url}]]">$title</a>
                      by $author$creation_date<br>
                  }]
              }
        return "$html"
Generic XQL file:
packages/general-comments/tcl/general-comments-procs.xql

PostgreSQL XQL file:
packages/general-comments/tcl/general-comments-procs-postgresql.xql

Oracle XQL file:
packages/general-comments/tcl/general-comments-procs-oracle.xql

[ hide source ] | [ make this the default ]
Show another procedure: