function ajax_nextgen_start_import() { if (check_admin_referer('foogallery_nextgen_import', 'foogallery_nextgen_import')) { $this->nextgen->ignore_previously_imported_galleries(); if (array_key_exists('nextgen-id', $_POST)) { $nextgen_gallery_ids = $_POST['nextgen-id']; foreach ($nextgen_gallery_ids as $gid) { $foogallery_title = stripslashes($_POST['foogallery-name-' . $gid]); //init the start progress of the import for the gallery $this->nextgen->init_import_progress($gid, $foogallery_title); } $this->nextgen->start_import(); } else { } } $this->nextgen->render_import_form(); die; }