| |
1242 |
1242 |
append text_version "[_ file-storage.lt_Notification_for_File]\n" |
| |
1243 |
1243 |
set folder_name [fs_get_folder_name $folder_id] |
| |
1244 |
1244 |
append text_version "[_ file-storage.lt_File-Storage_folder_f]\n" |
| |
1245 |
1245 |
|
| |
1246 |
1246 |
if {[string equal $action "new_version"]} { |
| |
1247 |
1247 |
append text_version "[_ file-storage.lt_New_Version_Uploaded_]\n" |
| |
1248 |
1248 |
} else { |
| |
1249 |
1249 |
append text_version "[_ file-storage.lt_Name_of_the_action_ty]\n" |
| |
1250 |
1250 |
} |
| |
1251 |
1251 |
if {[info exists owner]} { |
| |
1252 |
1252 |
append text_version "[_ file-storage.Uploaded_by_ownern]\n" |
| |
1253 |
1253 |
} |
| |
1254 |
1254 |
if {[info exists description]} { |
| |
1255 |
1255 |
append text_version "[_ file-storage.lt_Version_Notes_descrip]\n" |
| |
1256 |
1256 |
} |
| |
1257 |
1257 |
|
| |
1258 |
1258 |
set url_version "$url$path1?folder_id=$folder_id" |
| |
1259 |
1259 |
append text_version "[_ file-storage.lt_View_folder_contents_]\n" |
| |
1260 |
1260 |
|
| |
1261 |
1261 |
set html_version [ad_html_text_convert -from text/plain -to text/html -- $text_version] |
| |
1262 |
|
append html_version "<br /><br />" |
| |
|
1262 |
append html_version "<br><br>" |
| |
1263 |
1263 |
# Do the notification for the file-storage |
| |
1264 |
1264 |
|
| |
1265 |
1265 |
notification::new \ |
| |
1266 |
1266 |
-type_id [notification::type::get_type_id \ |
| |
1267 |
1267 |
-short_name fs_fs_notif] \ |
| |
1268 |
1268 |
-object_id $folder_id \ |
| |
1269 |
1269 |
-notif_subject "[_ file-storage.lt_File_Storage_Notifica]" \ |
| |
1270 |
1270 |
-notif_text $text_version \ |
| |
1271 |
1271 |
-notif_html $html_version |
| |
1272 |
1272 |
|
| |
1273 |
1273 |
# walk through all folders up to the root folder |
| |
1274 |
1274 |
while {$folder_id != $root_folder} { |
| |
1275 |
1275 |
set parent_id [db_string parent_id " |
| |
1276 |
1276 |
select parent_id from cr_items where item_id = :folder_id"] |
| |
1277 |
1277 |
notification::new \ |
| |
1278 |
1278 |
-type_id [notification::type::get_type_id \ |
| |
1279 |
1279 |
-short_name fs_fs_notif] \ |
| |
1280 |
1280 |
-object_id $parent_id \ |
| |
1281 |
1281 |
-notif_subject "[_ file-storage.lt_File_Storage_Notifica]" \ |
| |
1282 |
1282 |
-notif_text $new_content \ |