antoniop
committed
on 06 Feb
Provide a Notification API implementation for rendering notifications obtained via the SSE backend

This include should be used e.g. on the … Show more
Provide a Notification API implementation for rendering notifications obtained via the SSE backend

This include should be used e.g. on the website master so that SSE notifications are displayed whenever occurring. We do not do it by default for now.

Show less

openacs-4/packages/ams/tcl/ams-procs.tcl (+10 -1)
112 112 }
113 113
114 114 ad_proc -public ams::object_copy {
115 115     -from:required
116 116     -to:required
117 117 } {
118 118 } {
119 119     db_transaction {
120 120         db_dml copy_object {
121 121             insert into ams_attribute_values
122 122             (object_id,attribute_id,value_id)
123 123             ( select :to,
124 124                      attribute_id,
125 125                      value_id
126 126                 from ams_attribute_values
127 127                where object_id = :object_id )
128 128         }
129 129     }
130 130 }
131 131
  132 ad_proc -public ams::object_delete {
  133     {-object_id:required}
  134 } {
  135     delete and object that uses ams attributes
  136 } {
  137     return [db_dml delete_object { delete from ams_attribute_values where object_id = :object_id }]
  138 }
  139
  140
132 141 ad_proc -public ams::attribute::get {
133 142     -attribute_id:required
134 143     -array:required
135 144 } {
136 145     Get the info on an ams_attribute
137 146 } {
138 147     upvar 1 $array row
139 148     db_1row select_attribute_info { select * from ams_attributes where attribute_id = :attribute_id } -column_array row
140 149 }
141 150
142 151 ad_proc -public ams::attribute::new {
143 152     -attribute_id:required
144 153     {-ams_attribute_id ""}
145 154     -widget:required
146 155     {-dynamic_p "0"}
147 156     {-deprecated_p "0"}
148 157     {-context_id ""}
149 158 } {
150 159     create a new ams_attribute
151 160