From fbb3fe480c977a9a81a51deb7340e978dee77432 Mon Sep 17 00:00:00 2001 From: witersen <1801168257@qq.com> Date: Tue, 26 Apr 2022 15:28:51 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=94=B1=E4=BA=8Earray=5Fsea?= =?UTF-8?q?rch=E4=BD=BF=E7=94=A8=E4=B8=8D=E5=BD=93=E9=80=A0=E6=88=90?= =?UTF-8?q?=E7=9A=84=E5=AF=B9=E6=95=B0=E7=BB=84=E9=A6=96=E4=BD=8D=E7=9A=84?= =?UTF-8?q?=E7=94=A8=E6=88=B7=E8=AF=86=E5=88=AB=E9=94=99=E8=AF=AF=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 02.php/app/controller/svngroup.class.php | 8 ++++---- 02.php/app/controller/svnrep.class.php | 2 +- 02.php/app/function/svnUser.function.php | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) 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';