var docQry = QueryNew("null"); var appConfig = application.ptImport.getAppConfig(); //var pageIDList = application.ptImport.PageService.getOldPageIDList(importedPagesOnly=true); var pageQry = application.ptImport.PageService.getImportedPageData(); var pageIDList = ValueList(pageQry.newpageid); var oldPageIDList = ValueList(pageQry.oldPageID); // Get the mapping record for the images var docMapQry = getMappingData(); var pageIDWhereClause = ""; var docMapQrypageIDWhereClause = ""; // Get all the application type file formats var docExtensionsQry = application.ptImport.importService.getFileFormats("application"); // Store the old site's main control ID for migration var elementDAOObj = ""; var mainControlID = 0; // Create the element DAO to config the the DAO for a migration database elementDAOObj = server.ADF.objectFactory.getBean("ElementDAO"); elementDAOObj.setDSN(application.ptImport.appConfig.migration_DSN); // Get the main content control ID for the filter mainControlID = elementDAOObj.getTopControlID(application.ptImport.appConfig.old_content_container); SELECT DISTINCT UPLOADEDDOCS.pageid, UPLOADEDDOCS.filename, UPLOADEDDOCS.publicFileName, SITEPAGES.subsiteID, SITEPAGES.name, SITEPAGES.title, SITEPAGES.caption, CONVERT(VARCHAR(MAX), SITEPAGES.description) as Description FROM UPLOADEDDOCS, SITEPAGES,LINKUSAGE WHERE UPLOADEDDOCS.VersionState = 2 AND SITEPAGES.id = UPLOADEDDOCS.pageid AND LINKUSAGE.LinkTargetID = UPLOADEDDOCS.PageID AND LINKUSAGE.VersionState = 2 AND LINKUSAGE.controlID IN ( SELECT DISTINCT ControlID FROM view_IC_PageControls WHERE parentControlID = ) AND LINKUSAGE.pageid IN () AND (#pageIDWhereClause#) AND (#docMapQrypageIDWhereClause#) AND UploadedDocs.pageid = ORDER BY sitePages.subsiteID, UploadedDocs.pageid SELECT DISTINCT * FROM docQry SELECT LINKUSAGE.EntryID, LINKUSAGE.PageID, LINKUSAGE.ControlID, LINKUSAGE.LinkURL, LINKUSAGE.LinkTargetID FROM LINKUSAGE INNER JOIN view_page_mapping_ce_data ON LinkUsage.PageID = view_page_mapping_ce_data.newPageID WHERE LINKUSAGE.TableName = 'Data_TextBlock' AND LINKUSAGE.VersionState >= 2 AND view_page_mapping_ce_data.newPageID > 0 AND view_page_mapping_ce_data.newPageID IS NOT NULL AND LINKUSAGE.EntryID = AND ( LINKUSAGE.LINKURL LIKE '%.#Extension#' ) OR SELECT * FROM #appConfig.document_mapping_view# WHERE oldPageID = '#arguments.oldPageID#' WHERE pageID = #arguments.pageID# WHERE newPageID = #arguments.newPageID# WHERE publicFileName = '#arguments.publicFileName#' var createResults = server.ADF.objectFactory.getBean("CSContent_1_0").populateContent("documentMap", arguments.data); ResultsStruct.uploadCompleted = false; ResultsStruct.UPLOADRESPONSE = "CCAPI Upload document failed. #cfcatch.message#";