Open Source Content Management System

$object->deleteattachment

  1. Description

$object->deleteattachment -- Delete a record attachment

Description

`boolean **$object->deleteattachment** (string name)`

Minimum version: Midgard 1.4 (Bifrost)

Deletes the attachment name to the record represented by the object. Only the owner of the record can delete an attachment to that record.

Returns TRUE on success, FALSE on failure.

deleteattachment("photo")) {  
        echo "Deleted attachment \"photo\".
\n"; } else { echo "Could not delete attachment.
\n"; echo "Reason: " . mgd_errstr(); } ?>

Method available for: article, element, event, event_member, group, host, member, page, pageelement, pagelink, person, preference, sitegroup, snippet, snippetdir, style and topic objects.

Designed by Nemein, hosted by Anykey