root/devel/mod/file/lib/groups_delete.php

Revision 1539, 0.7 kB (checked in by renato, 1 year ago)

Setting prop svn:eol-style in LOTS of files.

  • Property svn:eol-style set to native
Line 
1 <?php
2
3 // groups:delete
4 // When an access group is deleted, revert all files and folders restricted to that group to private
5
6 if (isset($parameter) && logged_on) {
7             
8     // Grab group ID
9     $group_id = (int) $parameter;
10     // Create 'private' access string for current user
11     $access = "user" . $_SESSION['userid'];
12     
13     // Update files and file_folders tables, setting access to $access
14     // where the owner is the current user and access = 'group$group_id'
15     set_field('files','access',$access,'access','group'.$group_id,'owner',$USER->ident);
16     set_field('file_folders','access',$access,'access','group'.$group_id,'owner',$USER->ident);
17 }
18
19 ?>
Note: See TracBrowser for help on using the browser.