diff --git a/02.php/app/controller/svngroup.class.php b/02.php/app/controller/svngroup.class.php index 454c2d1..76f8a75 100644 --- a/02.php/app/controller/svngroup.class.php +++ b/02.php/app/controller/svngroup.class.php @@ -430,10 +430,10 @@ class svngroup extends controller $userGroupListBack = $userGroupList; foreach ($userGroupList as $group1) { $newList = FunGetSvnGroupGroupList($authzContent, $group1); - foreach ($leftGroupList as $group2) { + foreach ($leftGroupList as $key2 => $group2) { if (in_array($group2, $newList)) { array_push($userGroupList, $group2); - unset($leftGroupList[array_search($group2, $leftGroupList)]); + unset($leftGroupList[$key2]); } } } @@ -475,10 +475,10 @@ class svngroup extends controller $userGroupListBack = $groupGroupList; foreach ($groupGroupList as $group1) { $newList = FunGetSvnGroupGroupList($authzContent, $group1); - foreach ($leftGroupList as $group2) { + foreach ($leftGroupList as $key2 => $group2) { if (in_array($group2, $newList)) { array_push($groupGroupList, $group2); - unset($leftGroupList[array_search($group2, $leftGroupList)]); + unset($leftGroupList[$key2]); } } } diff --git a/02.php/app/controller/svnrep.class.php b/02.php/app/controller/svnrep.class.php index b4c2505..4f6b472 100644 --- a/02.php/app/controller/svnrep.class.php +++ b/02.php/app/controller/svnrep.class.php @@ -365,7 +365,7 @@ class svnrep extends controller if ($svnUserPass == '0') { FunMessageExit(200, 0, '文件格式错误(不存在[users]标识)'); } else if ($svnUserPass == '1') { - FunMessageExit(200, 0, '用户不存在'); + FunMessageExit(200, 0, '用户不存在'.$this->globalUserName); } //检查权限 diff --git a/02.php/app/function/svnUser.function.php b/02.php/app/function/svnUser.function.php index daa9144..3a4d3fc 100644 --- a/02.php/app/function/svnUser.function.php +++ b/02.php/app/function/svnUser.function.php @@ -226,7 +226,7 @@ function FunGetPassByUser($passwdContent, $userName, $isDisabledUser = false) preg_match_all(sprintf(REG_PASSWD_USER_PASSWD, REG_SVN_USER_DISABLED), $passwdContentPreg[1][0], $resultPreg); array_walk($resultPreg[1], 'FunArrayValueTrim'); array_walk($resultPreg[3], 'FunArrayValueTrim'); - if (array_search($userName, $resultPreg[1])) { + if (array_search($userName, $resultPreg[1]) !== false) { return $resultPreg[3][array_search($userName, $resultPreg[1])]; } else { return '1';