I've succeeded in porting most of an ACS 3.4 package to OpenACS. It's not very interesting -- it just keeps track of contracts for our company. But I'm having difficulty in one area, and I would appreciate some assistance.
I'm using the notes package as an example, and in the add-edit.tcl page, there is a section where it looks like this:
if [template::form is_valid new_note] {
form get_values new_note title body
set user_id [ad_conn user_id]
set peeraddr [ad_conn peeraddr]
if [info exists note_id] {
db_dml note_update {
update notes
set title = :title,
body = :body
where note_id = :note_id
}
} else {
db_exec_plsql new_note {
declare
id integer;
begin
id := note.new(
owner_id => :user_id,
title => :title,
body => :body,
creation_user => :user_id,
creation_ip => :peeraddr,
context_id => :package_id
);
end;
}
}
ad_returnredirect "./"
}
My question is: in the db_exec_plsq1 section, what function is this actually calling? I find this a little confusing.. what is happening there?
Once I start getting through this part of the learning curve, I may be able to contribute back some code that I port forward to OACS 4.6. Thanks for your help!