Module m_rsc_update

Update routines for resources.

Copyright 2009-2014 Marc Worrell, Arjan Scherpenisse

Authors: Marc Worrell (marc@worrell.nl).

Description

Update routines for resources. For use by the m_rsc module.

Function Index

delete/2Delete a resource.
delete_nocheck/2Delete a resource, no check on rights etc is made.
duplicate/3Duplicate a resource, creating a new resource with the given title.
flush/2
insert/2Insert a new resource.
insert/3
normalize_props/3Recombine all properties from the ones that are posted by a form.
props_filter/3Remove properties the user is not allowed to change and convert some other to the correct data type.
test/0
update/3Update a resource.
update/4Backward comp.

Function Details

delete/2

delete(Id::Props, Context) -> ok | {error, Reason}

Delete a resource

delete_nocheck/2

delete_nocheck(Id, Context) -> ok

throws {error, Reason}

Delete a resource, no check on rights etc is made. This is called by m_category:delete/3

duplicate/3

duplicate(Id::int(), DupProps::PropList, Context) -> {ok, int()}

throws {error, Reason}

Duplicate a resource, creating a new resource with the given title.

flush/2

flush(Id, Context) -> any()

insert/2

insert(Props, Context) -> {ok, Id} | {error, Reason}

Insert a new resource. Crashes when insertion is not allowed.

insert/3

insert(Props, EscapeTexts, Context) -> any()

normalize_props/3

normalize_props(Id, Props, Context) -> any()

Recombine all properties from the ones that are posted by a form.

props_filter/3

props_filter(T::Props1, Acc, Context) -> Props2

Remove properties the user is not allowed to change and convert some other to the correct data type

test/0

test() -> any()

update/3

update(Id, Props, Context) -> {ok, Id}

throws {error, Reason}

Update a resource

update/4

update(Id, Props, Options, Context) -> any()

Backward comp.


Generated by EDoc, Aug 21 2014, 00:19:55.