|
|
|
@ -219,7 +219,13 @@ Class Common {
@@ -219,7 +219,13 @@ Class Common {
|
|
|
|
|
if (self::isMyFavDir($friends_cellphone, $current_username, $share_dir)) {return false;} |
|
|
|
|
|
|
|
|
|
$friends_dirs = self::getMyDirs($friends_cellphone, $current_username); |
|
|
|
|
$dirs_after_delete = array_diff($friends_dirs, array($share_dir)); |
|
|
|
|
$dirs_after_delete = $friends_dirs; |
|
|
|
|
if (in_array($share_dir, $friends_dirs)) { |
|
|
|
|
$dirs_after_delete = array_diff($friends_dirs, array($share_dir)); |
|
|
|
|
$dirs_after_delete = array_values($dirs_after_delete); |
|
|
|
|
}else { |
|
|
|
|
return true; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
try { |
|
|
|
|
$my_id = self::getUserId($friends_cellphone); |
|
|
|
@ -345,6 +351,7 @@ Class Common {
@@ -345,6 +351,7 @@ Class Common {
|
|
|
|
|
if (file_exists($cache_filename)) { |
|
|
|
|
$mapContent = file_get_contents($cache_filename); |
|
|
|
|
$map = json_decode($mapContent); |
|
|
|
|
$map = array_values($map); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|