content::extlink::edit (public)

 content::extlink::edit -extlink_id extlink_id -url url -label label \
    -description description

Defined in packages/acs-content-repository/tcl/content-extlink-procs.tcl

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.

Switches:
-extlink_id (required)
Optional pre-assigned object_id for the link
-url (required)
The URL of the external resource
-label (required)
Label for the extlink (defaults to the URL)
-description (required)
An extended description of the link (defaults to NULL)

Testcases:
content_extlink
Source code:

    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 {}
    }
XQL Not present:
PostgreSQL, Oracle
Generic XQL file:
<fullquery name="content::extlink::edit.extlink_update_extlink">
    <querytext>

        update cr_extlinks
        set url = :url,
          label = :label,
          description = :description
        where extlink_id = :extlink_id

      </querytext>
</fullquery>

<fullquery name="content::extlink::edit.extlink_update_object">
    <querytext>

        update acs_objects
        set last_modified = current_timestamp,
          modifying_user = :modifying_user,
          modifying_ip = :modifying_ip,
          title = :label
        where object_id = :extlink_id

      </querytext>
</fullquery>
packages/acs-content-repository/tcl/content-extlink-procs.xql

[ hide source ] | [ make this the default ]
Show another procedure: