24 $albumsFromVk = $apiHelper->getALbumsFromVk($this->vkGroupId);
27 $albumsMappedToRemove =
array();
28 foreach ($albumsMapped as
$key => $albumMapped)
30 if (!isset($albumsFromVk[$albumMapped[
"ALBUM_VK_ID"]]))
32 $albumsMappedToRemove[] =
array(
"VALUE_EXTERNAL" => $albumMapped[
"ALBUM_VK_ID"]);
33 unset($albumsMapped[
$key]);
37 if (!empty($albumsMappedToRemove))
43 foreach ($albumsMapped as $chunk)
45 $resDelete = $this->executer->executeMarketAlbumDelete(
array(
46 "owner_id" => $this->vkGroupId,
48 "count" =>
count($chunk),
51 foreach ($resDelete as
$res)
53 if (
$res[
"flag_album_delete_result"])
54 $albumsMappedToRemove[] =
array(
"VALUE_EXTERNAL" =>
$res[
"ALBUM_VK_ID"]);
58 if (!empty($albumsMappedToRemove))
62 if ($timer !== NULL && !$timer->check())
68 $vkExportedData->removeData();