root/devel-backup/units/search/groups_delete.php

Revision 45, 0.6 kB (checked in by sven, 3 years ago)

dos2unix to clean line endings, set svn property eol-style native, some whitespace homogenisation

  • Property svn:eol-style set to native
Line 
1 <?php
2
3     // groups:delete
4     // When an access group is deleted, revert all tags 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 tags table, setting access to $access
14             // where the owner is the current user and access = 'group$group_id'
15                 db_query("update tags set access = '$access' where access = 'group".$group_id."' and owner = '".$_SESSION['userid']."'");
16
17         }
18
19 ?>
Note: See TracBrowser for help on using the browser.