rsc_gone

This model tracks deleted resources (see m_rsc). Its primary goal is to be able to determine if a resource never existed, has been deleted or has been replaced by another resource.

Information kept

Only very basic information of the deleted resource is kept in the rsc_gone table. It is enough for referring to a new location, giving correct errors or to determine who deleted a resource.

It is not enough to undelete a resource. The module mod_backup retains enough information about past versions to be able to undelete a resource. Currently there is no support for an undelete.

Properties

Whenever a m_rsc record is deleted some information from that resource is copied to the rsc_gone table.

The following properties are saved:

PropertyDescriptionExample value
idId of the resource, an integer.42
new_idIf the resource is replaced by another resource then this is the id of that other resource.341
new_uriIf the resource is moved to another place on the web then this is the uri of the new location.<<"<http://example.com/hello>">>
nameThe name (if any) of the deleted resource.<<"page_hello">>
uriThe uri of the authoritative source for the resource.<<"<http://foo.bar/hello>">>
page_pathThe page path (if any) of the deleted resource.<<"/hello">>
is_authoritativeWhether the resource originated on this site or was imported and maintained on another site. Return a boolean.true
creator_idThe id of the creator of the deleted resource.1
createdThe date the deleted resource was created.{{2008,12,10},{15,30,00}}
modifier_idThe id of the user that deleted the resource.2718
modifiedThe date the resource was deleted.{{2012,12,5},{23,59,59}}

Available Model API Paths

MethodPath patternDescription
get/+id/new_location/...Return category data for +id. Uses get_new_location.
get/+id/is_gone/...Return whether gone (is_gone).

/+name marks a variable path segment. A trailing /... means extra path segments are accepted for further lookups.

See also

The Zotonic data model, m_rsc

Edit on GitHub