gustafn
committed
on 23 Apr 10
- set resolve context when resolving a page via url-path (similar to site-wite-pages)
- add -package_id as parameter to count_usages to allo… Show more
- set resolve context when resolving a page via url-path (similar to site-wite-pages)

- add -package_id as parameter to count_usages to allow cross package

 usages of forms

- make sure to initialize the package of a form, when a form-page

 fetches its form

Show less

openacs-4/.../user/portrait/upload.tcl (+6 -4)
165 165             if { $resized_portrait($name) ne "" } {
166 166                 # Delete the item
167 167                 content::item::delete -item_id $resized_portrait($name)
168 168
169 169                  # Resize the item
170 170                 image::resize -item_id $item_id -size_name $name
171 171             }
172 172         }
173 173
174 174         # Only create the new relationship if there does not exist one already
175 175         set user_portrait_rel_id [relation::get_id -object_id_one $user_id -object_id_two $item_id -rel_type "user_portrait_rel"]
176 176         if {$user_portrait_rel_id eq ""} {
177 177             db_exec_plsql create_rel {}
178 178         }
179 179     }
180 180
181 181     # Flush the portrait cache
182 182     util_memoize_flush [list acs_user::get_portrait_id_not_cached -user_id $user_id]
183 183
184 184     ad_returnredirect $return_url
185   }
  185     ad_script_abort
186 186
  187 } else {
187 188     ad_return_template
  189 }
188 190
189 191 # Local variables:
190 192 #    mode: tcl
191 193 #    tcl-indent-level: 4
192 194 #    indent-tabs-mode: nil
193 195 # End: