Index: openacs-4/packages/acs-content-repository/tcl/content-extlink-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-content-repository/tcl/content-extlink-procs.tcl,v diff -u -N -r1.6 -r1.7 --- openacs-4/packages/acs-content-repository/tcl/content-extlink-procs.tcl 14 Dec 2005 15:29:26 -0000 1.6 +++ openacs-4/packages/acs-content-repository/tcl/content-extlink-procs.tcl 13 Feb 2009 22:13:06 -0000 1.7 @@ -56,6 +56,34 @@ } +ad_proc -public content::extlink::edit { + -extlink_id:required + -url:required + -label:required + -description:required +} { + + Edit an existing external link. The parameters are required because it + is assumed that the caller will be pulling the existing values out of + the database before editing them. + + @extlink_id Optional pre-assigned object_id for the link + @url The URL of the external resource + @label Label for the extlink (defaults to the URL) + @description An extended description of the link (defaults to NULL) +} { + + set modifying_user [ad_conn user_id] + set modifying_ip [ad_conn peeraddr] + + db_transaction { + db_dml extlink_update_object {} + db_dml extlink_update_extlink {} + } +} + + + ad_proc -public content::extlink::delete { -extlink_id:required } { Index: openacs-4/packages/acs-content-repository/tcl/content-extlink-procs.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-content-repository/tcl/content-extlink-procs.xql,v diff -u -N -r1.1 -r1.2 --- openacs-4/packages/acs-content-repository/tcl/content-extlink-procs.xql 27 Feb 2005 20:05:58 -0000 1.1 +++ openacs-4/packages/acs-content-repository/tcl/content-extlink-procs.xql 13 Feb 2009 22:13:06 -0000 1.2 @@ -1,6 +1,31 @@ + + + + update cr_extlinks + set url = :url, + label = :label, + description = :description + where extlink_id = :extlink_id + + + + + + + + update acs_objects + set last_modified = current_timestamp, + modifying_user = :modifying_user, + modifying_ip = :modifying_ip, + title = :label + where object_id = :extlink_id + + + + select label Index: openacs-4/packages/acs-content-repository/tcl/extlink-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-content-repository/tcl/Attic/extlink-procs.tcl,v diff -u -N -r1.9 -r1.10 --- openacs-4/packages/acs-content-repository/tcl/extlink-procs.tcl 10 Jan 2007 21:22:03 -0000 1.9 +++ openacs-4/packages/acs-content-repository/tcl/extlink-procs.tcl 13 Feb 2009 22:13:06 -0000 1.10 @@ -60,7 +60,7 @@ @label Label for the extlink (defaults to the URL) @description An extended description of the link (defaults to NULL) - @see update-directly + @see content::extlink::edit } { set modifying_user [ad_conn user_id] Index: openacs-4/packages/ajax-filestorage-ui/www/xmlhttp/add-url.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajax-filestorage-ui/www/xmlhttp/add-url.tcl,v diff -u -N -r1.2 -r1.3 --- openacs-4/packages/ajax-filestorage-ui/www/xmlhttp/add-url.tcl 2 Jan 2008 07:12:12 -0000 1.2 +++ openacs-4/packages/ajax-filestorage-ui/www/xmlhttp/add-url.tcl 13 Feb 2009 22:13:06 -0000 1.3 @@ -23,7 +23,7 @@ } else { - set item_id [content_extlink::new -url $fsurl -label $fstitle -description $fsdescription -parent_id $folder_id] + set item_id [content::extlink::new -url $fsurl -label $fstitle -description $fsdescription -parent_id $folder_id] # Analogous as for files (see file-add-2) we know the user has write permission to this folder, # but they may not have admin privileges. Index: openacs-4/packages/ajax-filestorage-ui/www/xmlhttp/edit-name.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajax-filestorage-ui/www/xmlhttp/edit-name.tcl,v diff -u -N -r1.1 -r1.2 --- openacs-4/packages/ajax-filestorage-ui/www/xmlhttp/edit-name.tcl 26 Nov 2007 12:52:45 -0000 1.1 +++ openacs-4/packages/ajax-filestorage-ui/www/xmlhttp/edit-name.tcl 13 Feb 2009 22:13:06 -0000 1.2 @@ -33,7 +33,7 @@ if { $type == "folder" } { fs::rename_folder -folder_id $object_id -name $newname } elseif { $type == "url" } { - content_extlink::edit -extlink_id $object_id -url $url -label $newname -description "" + content::extlink::edit -extlink_id $object_id -url $url -label $newname -description "" } else { set title $newname set file_id $object_id Index: openacs-4/packages/ajax-filestorage-ui/www/xmlhttp/rename-fsitem.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajax-filestorage-ui/www/xmlhttp/rename-fsitem.tcl,v diff -u -N -r1.2 -r1.3 --- openacs-4/packages/ajax-filestorage-ui/www/xmlhttp/rename-fsitem.tcl 27 Dec 2008 06:27:25 -0000 1.2 +++ openacs-4/packages/ajax-filestorage-ui/www/xmlhttp/rename-fsitem.tcl 13 Feb 2009 22:13:06 -0000 1.3 @@ -33,7 +33,7 @@ if { $type == "folder" } { fs::rename_folder -folder_id $object_id -name $newname } elseif { $type == "url" } { - content_extlink::edit -extlink_id $object_id -url $url -label $newname -description "" + content::extlink::edit -extlink_id $object_id -url $url -label $newname -description "" } else { set title $newname set file_id $object_id Index: openacs-4/packages/attachments/tcl/attachments-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/attachments/tcl/attachments-procs.tcl,v diff -u -N -r1.15 -r1.16 --- openacs-4/packages/attachments/tcl/attachments-procs.tcl 9 Nov 2008 23:29:22 -0000 1.15 +++ openacs-4/packages/attachments/tcl/attachments-procs.tcl 13 Feb 2009 22:13:06 -0000 1.16 @@ -156,8 +156,8 @@ set lst_with_urls [list] foreach item_id $lst { - if { [content_extlink::extlink_p -item_id $item_id] } { - set label [content_extlink::extlink_name -item_id $item_id] + if { [content::extlink::is_extlink -item_id $item_id] } { + set label [content::extlink::name -item_id $item_id] } else { set label [fs::get_object_prettyname -object_id $item_id] } @@ -179,8 +179,8 @@ set lst_with_urls [list] foreach item_id $lst { - if { [content_extlink::extlink_p -item_id $item_id] } { - set label [content_extlink::extlink_name -item_id $item_id] + if { [content::extlink::is_extlink -item_id $item_id] } { + set label [content::extlink::name -item_id $item_id] } else { set label [fs::get_object_name -object_id $item_id] } Index: openacs-4/packages/attachments/www/simple-add-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/attachments/www/simple-add-2.tcl,v diff -u -N -r1.4 -r1.5 --- openacs-4/packages/attachments/www/simple-add-2.tcl 28 Aug 2003 09:41:46 -0000 1.4 +++ openacs-4/packages/attachments/www/simple-add-2.tcl 13 Feb 2009 22:13:06 -0000 1.5 @@ -26,7 +26,7 @@ db_transaction { # Create the URL (for now) - set url_id [content_extlink::new -url $url -label $title -description $description -parent_id $folder_id] + set url_id [content::extlink::new -url $url -label $title -description $description -parent_id $folder_id] # Attach the URL attachments::attach -object_id $object_id -attachment_id $url_id Index: openacs-4/packages/dotlrn-fs/tcl/dotlrn-fs-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-fs/tcl/dotlrn-fs-procs.tcl,v diff -u -N -r1.94 -r1.95 --- openacs-4/packages/dotlrn-fs/tcl/dotlrn-fs-procs.tcl 12 Mar 2008 20:15:53 -0000 1.94 +++ openacs-4/packages/dotlrn-fs/tcl/dotlrn-fs-procs.tcl 13 Feb 2009 22:13:06 -0000 1.95 @@ -729,7 +729,7 @@ Optionall set up a node mapping on folders too. } { - if {[content_extlink::extlink_p -item_id $object_id]} { + if {[content::extlink::is_extlink -item_id $object_id]} { item::copy -item_id $object_id -target_folder_id $target_folder_id } elseif {[fs::folder_p -object_id $object_id]} { Index: openacs-4/packages/file-storage/www/simple-add-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/file-storage/www/simple-add-2.tcl,v diff -u -N -r1.7 -r1.8 --- openacs-4/packages/file-storage/www/simple-add-2.tcl 26 May 2005 08:28:46 -0000 1.7 +++ openacs-4/packages/file-storage/www/simple-add-2.tcl 13 Feb 2009 22:13:06 -0000 1.8 @@ -23,7 +23,7 @@ # Check for write permission on this folder ad_require_permission $folder_id write -set item_id [content_extlink::new -url $url -label $title -description $description -parent_id $folder_id] +set item_id [content::extlink::new -url $url -label $title -description $description -parent_id $folder_id] # Analogous as for files (see file-add-2) we know the user has write permission to this folder, # but they may not have admin privileges. Index: openacs-4/packages/file-storage/www/simple-add.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/file-storage/www/simple-add.tcl,v diff -u -N -r1.12 -r1.13 --- openacs-4/packages/file-storage/www/simple-add.tcl 15 Jun 2007 17:40:29 -0000 1.12 +++ openacs-4/packages/file-storage/www/simple-add.tcl 13 Feb 2009 22:13:06 -0000 1.13 @@ -79,7 +79,7 @@ {submit:text(submit) {label $submit_label}} } -on_request { } -on_submit { - set item_id [content_extlink::new -url $url -label $title -description $description -parent_id $folder_id] + set item_id [content::extlink::new -url $url -label $title -description $description -parent_id $folder_id] # Analogous as for files (see file-add-2) we know the user has write permission to this folder, # but they may not have admin privileges. Index: openacs-4/packages/file-storage/www/simple-delete.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/file-storage/www/simple-delete.tcl,v diff -u -N -r1.7 -r1.8 --- openacs-4/packages/file-storage/www/simple-delete.tcl 26 May 2005 08:28:46 -0000 1.7 +++ openacs-4/packages/file-storage/www/simple-delete.tcl 13 Feb 2009 22:13:06 -0000 1.8 @@ -16,9 +16,9 @@ db_transaction { - fs::do_notifications -folder_id $folder_id -filename [content_extlink::extlink_name -item_id $object_id] -item_id $object_id -action "delete_url" + fs::do_notifications -folder_id $folder_id -filename [content::extlink::name -item_id $object_id] -item_id $object_id -action "delete_url" - content_extlink::delete -extlink_id $object_id + content::extlink::delete -extlink_id $object_id } Index: openacs-4/packages/file-storage/www/simple-edit.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/file-storage/www/simple-edit.tcl,v diff -u -N -r1.9 -r1.10 --- openacs-4/packages/file-storage/www/simple-edit.tcl 15 Jun 2007 17:40:29 -0000 1.9 +++ openacs-4/packages/file-storage/www/simple-edit.tcl 13 Feb 2009 22:13:06 -0000 1.10 @@ -32,7 +32,7 @@ ad_form -extend -edit_request { db_1row extlink_data "" } -edit_data { - content_extlink::edit -extlink_id $object_id -url $url -label $name -description $description + content::extlink::edit -extlink_id $object_id -url $url -label $name -description $description if { [parameter::get -parameter CategoriesP -package_id $package_id -default 0] } { category::map_object -remove_old -object_id $object_id [category::ad_form::get_categories \ -container_object_id $package_id \