ben
committed
on 25 Mar 02
fixed pg queries
openacs-4/.../acs-subsite/tcl/package-procs.tcl (+2 -2)
809 809     # Select out the package name if it wasn't passed in
810 810     if { [empty_string_p $package_name] } {
811 811         if { ![db_0or1row package_select {
812 812             select t.package_name
813 813               from acs_object_types t
814 814              where t.object_type = :object_type
815 815         }] } {
816 816             error "Object type \"$object_type\" does not exist"
817 817         }
818 818     }
819 819
820 820     if { [ad_conn isconnected] } {
821 821         if { [empty_string_p $creation_user] } {
822 822             set creation_user [ad_conn user_id]
823 823         }
824 824         if { [empty_string_p $creation_ip] } {
825 825             set creation_ip [ad_conn peeraddr]
826 826         }
827 827     }
828 828
829       if {!$creation_user} {
  829     if {$creation_user == 0} {
830 830         set creation_user ""
831 831     }
832 832
833 833     lappend var_list [list creation_user $creation_user]
834 834     lappend var_list [list creation_ip $creation_ip]
835 835    
836 836     # The first thing we need to do is select out the list of all
837 837     # the parameters that can be passed to this object type's new function.
838 838     # This will prevent us from passing in any parameters that are
839 839     # not defined
840 840    
841 841     # Change by Ben (OpenACS)
842 842     # This really should be more PL/SQL driven than table-field driven.
843 843     # Thus the change
844 844    
845 845     #foreach row [util_memoize "package_table_columns_for_type \"$object_type\""] {
846 846         #set real_params([string toupper [lindex $row 1]]) 1
847 847     #}
848 848
849 849     foreach arg [util_memoize "package_plsql_args \"$object_type\""] {