Exemple #1
0
            }
        }
    }
    $limit++;
    //unset($to_be_import_rec);
}
if ($limit > $totRecords) {
    $advancemedia = sanitize_text_field($_POST['postdata']['advance_media']);
    $dir = $skinnyObj->getUploadDirectory();
    $get_inline_imageDir = explode('/', $extracted_image_location);
    $explodedCount = count($get_inline_imageDir);
    $inline_image_dirname = $get_inline_imageDir[$explodedCount - 1];
    $uploadDir = $skinnyObj->getUploadDirectory('inlineimages');
    $inline_images_dir = $uploadDir . '/smack_inline_images/' . $inline_image_dirname;
    if ($advancemedia == 'true') {
        $skinnyObj->deletefileafterprocesscomplete($inline_images_dir);
    }
    $skinnyObj->deletefileafterprocesscomplete($dir);
}
if ($importObj->insPostCount != 0 || $importObj->dupPostCount != 0 || $importObj->updatedPostCount != 0) {
    if (!isset($_SESSION['SMACK_MAPPING_SETTINGS_VALUES']['insPostCount'])) {
        $_SESSION['SMACK_MAPPING_SETTINGS_VALUES']['insPostCount'] = 0;
    }
    if (!isset($_SESSION['SMACK_MAPPING_SETTINGS_VALUES']['dupPostCount'])) {
        $_SESSION['SMACK_MAPPING_SETTINGS_VALUES']['dupPostCount'] = 0;
    }
    if (!isset($_SESSION['SMACK_MAPPING_SETTINGS_VALUES']['updatedPostCount'])) {
        $_SESSION['SMACK_MAPPING_SETTINGS_VALUES']['updatedPostCount'] = 0;
    }
    if (!isset($importObj->capturedId)) {
        $_SESSION['SMACK_MAPPING_SETTINGS_VALUES']['captureId'] = 0;