@@ 1104-1114 (lines=11) @@ | ||
1101 | * </ul> |
|
1102 | * @return int Always {@link NO_ERROR}. |
|
1103 | */ |
|
1104 | function field_permission_add ($fid, $gid, $perm) |
|
1105 | { |
|
1106 | debug_write_log(DEBUG_TRACE, '[field_permission_add]'); |
|
1107 | debug_write_log(DEBUG_DUMP, '[field_permission_add] $fid = ' . $fid); |
|
1108 | debug_write_log(DEBUG_DUMP, '[field_permission_add] $gid = ' . $gid); |
|
1109 | debug_write_log(DEBUG_DUMP, '[field_permission_add] $perm = ' . $perm); |
|
1110 | ||
1111 | dal_query('fields/fpadd.sql', $fid, $gid, $perm); |
|
1112 | ||
1113 | return NO_ERROR; |
|
1114 | } |
|
1115 | ||
1116 | /** |
|
1117 | * Revokes from specified group all permissions for specified field. |
@@ 405-416 (lines=12) @@ | ||
402 | * @param int $perm New permissions set. |
|
403 | * @return int Always {@link NO_ERROR}. |
|
404 | */ |
|
405 | function group_set_permissions ($gid, $tid, $perm) |
|
406 | { |
|
407 | debug_write_log(DEBUG_TRACE, '[group_set_permissions]'); |
|
408 | debug_write_log(DEBUG_DUMP, '[group_set_permissions] $gid = ' . $gid); |
|
409 | debug_write_log(DEBUG_DUMP, '[group_set_permissions] $tid = ' . $tid); |
|
410 | debug_write_log(DEBUG_DUMP, '[group_set_permissions] $perm = ' . $perm); |
|
411 | ||
412 | dal_query('groups/gpremove.sql', $gid, $tid); |
|
413 | dal_query('groups/gpadd.sql', $gid, $tid, $perm); |
|
414 | ||
415 | return NO_ERROR; |
|
416 | } |
|
417 | ||
418 | /** |
|
419 | * Exports groups of specified group IDs to XML code (see also {@link project_import}). |