|
|
@ -222,7 +222,6 @@ Class Common { |
|
|
|
$dirs_after_delete = $friends_dirs; |
|
|
|
$dirs_after_delete = $friends_dirs; |
|
|
|
if (in_array($share_dir, $friends_dirs)) { |
|
|
|
if (in_array($share_dir, $friends_dirs)) { |
|
|
|
$dirs_after_delete = array_diff($friends_dirs, array($share_dir)); |
|
|
|
$dirs_after_delete = array_diff($friends_dirs, array($share_dir)); |
|
|
|
$dirs_after_delete = array_values($dirs_after_delete); |
|
|
|
|
|
|
|
}else { |
|
|
|
}else { |
|
|
|
return true; |
|
|
|
return true; |
|
|
|
} |
|
|
|
} |
|
|
@ -333,6 +332,16 @@ Class Common { |
|
|
|
return $username; |
|
|
|
return $username; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public static function dictToArray($dict) { |
|
|
|
|
|
|
|
$arr = array(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
foreach($dict as $key => $value) { |
|
|
|
|
|
|
|
array_push($arr, $value); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return $arr; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
//从自己的目录里获取收藏夹映射关系 |
|
|
|
//从自己的目录里获取收藏夹映射关系 |
|
|
|
//返回:数组 |
|
|
|
//返回:数组 |
|
|
|
public static function getMyDirs($cellphone, $username){ |
|
|
|
public static function getMyDirs($cellphone, $username){ |
|
|
@ -351,7 +360,9 @@ Class Common { |
|
|
|
if (file_exists($cache_filename)) { |
|
|
|
if (file_exists($cache_filename)) { |
|
|
|
$mapContent = file_get_contents($cache_filename); |
|
|
|
$mapContent = file_get_contents($cache_filename); |
|
|
|
$map = json_decode($mapContent); |
|
|
|
$map = json_decode($mapContent); |
|
|
|
$map = array_values($map); |
|
|
|
if (is_object($map)) { |
|
|
|
|
|
|
|
$map = self::dictToArray($map); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|