aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mandriva.org>2010-02-02 08:44:23 +0000
committerThierry Vignaud <tv@mandriva.org>2010-02-02 08:44:23 +0000
commitf3bc4c6434f50618839a2eb8fd738bd9c781b9b8 (patch)
tree72ff265a42d92614e8dc981a011208473ac0e04a
parentd1f523ded973b39f4100aa58641dd2c19bbab346 (diff)
downloaduserdrake-f3bc4c6434f50618839a2eb8fd738bd9c781b9b8.tar
userdrake-f3bc4c6434f50618839a2eb8fd738bd9c781b9b8.tar.gz
userdrake-f3bc4c6434f50618839a2eb8fd738bd9c781b9b8.tar.bz2
userdrake-f3bc4c6434f50618839a2eb8fd738bd9c781b9b8.tar.xz
userdrake-f3bc4c6434f50618839a2eb8fd738bd9c781b9b8.zip
(GroupEdit_valid) reindent(
-rwxr-xr-xuserdrake55
1 files changed, 28 insertions, 27 deletions
diff --git a/userdrake b/userdrake
index a027d5c..141cc8c 100755
--- a/userdrake
+++ b/userdrake
@@ -944,33 +944,34 @@ sub GroupEdit_valid {
$groupname = $groupEnt->GroupName($GetValue);
my $members = $ctx->EnumerateUsersByGroup($groupname);
my $gid = $groupEnt->Gid($GetValue);
- !$error and $model->foreach(sub {
- my ($mod, $_path, $iter) = @_;
- my $ch = $mod->get($iter, 2);
- my $name = $mod->get($iter, 1);
- if ($ch == 1) {
- if (!InArray($name, $members)) {
- $uEnt = $ctx->LookupUserByName($name);
- my $ugid = $uEnt->Gid($GetValue);
- if ($ugid != $gid) {
- eval { $groupEnt->MemberName($name,1) };
- }
- }
- } else {
- if (InArray($name, $members)) {
- $uEnt = $ctx->LookupUserByName($name);
- if ($uEnt->Gid($GetValue) == $groupEnt->Gid($GetValue)) {
- $model->set($iter, 0 => gtkcreate_pixbuf($pix[0]));
- $model->set($iter, 2 => 1);
- RaiseError(N("You cannot remove user '%s' from their primary group", $name));
- }
- if (!$error) {
- eval { $groupEnt->MemberName($name,2) };
- }
- }
- }
- return 0;
- }, undef);
+ !$error and $model->foreach(
+ sub {
+ my ($mod, $_path, $iter) = @_;
+ my $ch = $mod->get($iter, 2);
+ my $name = $mod->get($iter, 1);
+ if ($ch == 1) {
+ if (!InArray($name, $members)) {
+ $uEnt = $ctx->LookupUserByName($name);
+ my $ugid = $uEnt->Gid($GetValue);
+ if ($ugid != $gid) {
+ eval { $groupEnt->MemberName($name,1) };
+ }
+ }
+ } else {
+ if (InArray($name, $members)) {
+ $uEnt = $ctx->LookupUserByName($name);
+ if ($uEnt->Gid($GetValue) == $groupEnt->Gid($GetValue)) {
+ $model->set($iter, 0 => gtkcreate_pixbuf($pix[0]));
+ $model->set($iter, 2 => 1);
+ RaiseError(N("You cannot remove user '%s' from their primary group", $name));
+ }
+ if (!$error) {
+ eval { $groupEnt->MemberName($name,2) };
+ }
+ }
+ }
+ return 0;
+ }, undef);
if (!$error) {
$ctx->GroupModify($groupEnt);
Refresh($sysfilter, $stringsearch);