Forum .LRN Q&A: Re: "Unarchives a community. ** not done yet **"

FYI: Just an addendum (found that some more code is need to complete it - I hope :)

dotlrn/tcl/community-procs.tcl:

ad_proc -public unarchive {
    {-community_id:required}
} {
  Unarchives a community.
} {
        db_dml update_archive_p {}

    rel_segments_grant_permission -community_id $community_id

    # Must also execute AddUserToCommunity
    foreach user [list_users $community_id] {
        set user_id [ns_set get $user user_id]
        applets_dispatch \
        -community_id $community_id \
        -op AddUserToCommunity \
        -list_args [list $community_id $user_id]
    }
}