@@ -109,10 +109,14 @@ public function listDataParseShareItem($listData,$parseSearch){
109
109
if ($ parseSearch ['type ' ] != KodIO::KOD_SHARE_ITEM ) return $ listData ;
110
110
$ userShare = Action ('explorer.userShare ' );
111
111
$ shareInfo = Model ("Share " )->getInfo ($ parseSearch ['id ' ]);
112
+ $ pathPre = '{shareItem: ' ;
112
113
foreach ($ listData as $ key => $ keyList ) {
113
114
if ($ key != 'folderList ' && $ key != 'fileList ' ) continue ;
114
115
$ keyListNew = array ();
115
116
foreach ($ keyList as $ source ){
117
+ $ pathStart = substr ($ source ['path ' ],0 ,strlen ($ pathPre ));// 已经处理过
118
+ if ($ pathStart == $ pathPre ){$ keyListNew [] = $ source ;continue ;}
119
+
116
120
$ source = $ userShare ->_shareItemeParse ($ source ,$ shareInfo );
117
121
if ($ source ){$ keyListNew [] = $ source ;}
118
122
};
@@ -123,10 +127,14 @@ public function listDataParseShareItem($listData,$parseSearch){
123
127
// 外链分享搜索
124
128
public function listDataParseShareLink ($ listData ,$ parseSearch ){
125
129
if ($ parseSearch ['type ' ] != KodIO::KOD_SHARE_LINK ) return $ listData ;
130
+ $ pathPre = '{shareItemLink: ' ;
126
131
foreach ($ listData as $ key => $ keyList ) {
127
132
if ($ key != 'folderList ' && $ key != 'fileList ' ) continue ;
128
133
$ keyListNew = array ();
129
134
foreach ($ keyList as $ source ){
135
+ $ pathStart = substr ($ source ['path ' ],0 ,strlen ($ pathPre ));// 已经处理过
136
+ if ($ pathStart == $ pathPre ){$ keyListNew [] = $ source ;continue ;}
137
+
130
138
$ source = Action ('explorer.share ' )->shareItemInfo ($ source );
131
139
if ($ source ){$ keyListNew [] = $ source ;}
132
140
};
@@ -279,6 +287,7 @@ public function searchIO($path,$param){
279
287
280
288
if (kodIO::pathDriverLocal ($ info ['path ' ])){
281
289
$ infoFile = IO ::info ($ item ['path ' ]); // 物理路径获取权限等情况;
290
+ $ infoFile = is_array ($ infoFile ) ? $ infoFile :array ();
282
291
$ info = array_merge ($ infoFile ,$ info );
283
292
}
284
293
$ typeKey = $ isFolder ? 'folderList ' :'fileList ' ;
0 commit comments