You must be a member of the CPAdmin group to access this tool.

application.ADF.scripts.loadJQuery(); application.ADF.scripts.loadJQueryUI(); // Check the action for the form if ( NOT StructKeyExists(request.params, "action") ) request.params.action = "form"; valError = false; // Validate the form fields if ( request.params.action EQ "run" ) { if ( NOT StructKeyExists(request.params,"CSRF_Token") OR NOT application.ADF.csSecurity.validateCSRF_Token(requestToken=Request.Params.CSRF_Token) ) { valError = true; valErrorMsg = "Error: User session could not be validated! Process could not run."; } else { if (NOT LEN(request.params.modifiedDate)) { valError = true; valErrorMsg = "Please enter the last modified date."; } if (NOT StructKeyExists(request.params, "customCodeDir")) { valError = true; valErrorMsg = "Please select the custom code directories."; } if (request.params.buildPackage EQ "yes" AND NOT LEN(request.params.packageDir)) { valError = true; valErrorMsg = "Please enter the build package directory."; } } } // Check if we ran into an error and reload the the form if ( valError ) request.params.action = "form"; formattedTimestamp = MID(request.formattedTimestamp,1,Len(request.formattedTimestamp)-3); application.ADF.scripts.addHeaderCSS(packageBuilderCSS,"TERTIARY"); application.ADF.scripts.addFooterJS(packageBuilderJS,"TERTIARY");

Custom Code Package Builder

<< Return to Form

if ( NOT StructKeyExists(request.params,"CSRF_Token") OR NOT application.ADF.csSecurity.validateCSRF_Token(requestToken=Request.Params.CSRF_Token) ) { WriteOutput("Error: User session could not be validated! Process could not run."); exit; } timeStart = GetTickCount(); // Global file query globalFileQuery = QueryNew('null'); // Loop over the custom code directories selected for ( i=1; i LTE LISTLEN(request.params.customCodeDir); i++ ){ currDir = #request.site.dir# & ListGetAt(request.params.customCodeDir, i); // Get the files for the directory currDirFileQry = directoryFiles(dirPath=currDir, recurse="true"); //application.ADF.utils.dodump(currDirFileQry, "currDirFileQry", false); // Filter by the last modified date filterCurrDirFileQry = filterDirByModifiedDate(dirFileQry=currDirFileQry, lastModifiedDate=request.params.modifiedDate); //application.ADF.utils.dodump(filterCurrDirFileQry, "filterCurrDirFileQry", false); // Merge the new files into the global file Query globalFileQuery = mergeDirFileData(globalQry=globalFileQuery, newFileQry=filterCurrDirFileQry); //application.ADF.utils.dodump(globalFileQuery, "globalFileQuery", false); } timeEnd = GetTickCount(); timer = timeEnd - timeStart; //application.ADF.utils.dodump(globalFileQuery, "globalFileQuery", false);

Global File Query Run Time = #timer/1000# seconds

Custom Code Files Modified On or After #request.params.modifiedDate#:

timeStart = GetTickCount(); srcFilePathStart = Replace(request.site.dir, "\", "/", "all"); destFilePathStart = request.params.packageDir & ReplaceList(formattedTimestamp," ,:", "-,-") & "/"; destFilePathStart = Replace(destFilePathStart, "\", "/", "all");

Destination Folder: #destFilePathStart#


currFilePath = "#directory#/#name#"; currFilePath = Replace(currFilePath, "\", "/", "all");

#currFilePath#

// Replace everything after the request.site.dir with the package destintation destDirPath = ReplaceNoCase(directory, srcFilePathStart, destFilePathStart); // Build the new file destination destFilePath = "#destDirPath#/#name#"; // Setup the destination directory dirExists = createDirectory(destDir=destDirPath); // Copy the file fileCopyStatus = copyFile(srcFilePath=currFilePath, destFilePath=destFilePath);

dirExists = #dirExists# | fileCopyStatus = #fileCopyStatus#

#destFilePath#


Zip creatation was successful!

Zip creatation failed!

timeEnd = GetTickCount(); timer = timeEnd - timeStart;

Build Package Run Time = #timer/1000# seconds

Please enter the form field values to run the package builder.

#valErrorMsg#

#Server.CommonSpot.UDF.tag.input(type="hidden",name="CSRF_Token",id="CSRF_Token",value=application.ADF.csSecurity.getCSRF_Token())#
Last Modified Date:
Custom Code Directories: _cs_apps
customcf
customfields
datasheet-modules
renderhandlers
templates
Build Package?: No
Yes
Selecting "Yes" will build the custom code package and store in the file path defined in the "Package Directory" field.
Create Zip File?: No
Yes
Selecting "Yes" for both "Build Package" and "Create Zip" will build zip file of the custom code package and store in the file path defined in the "Package Directory" field.
Package Directory:
Enter the absolute path on the server to store the package.
 
SELECT * FROM arguments.dirFileQry WHERE type = 'File' AND DATELASTMODIFIED >= AND Directory NOT Like ORDER BY Directory var retFileQry = QueryNew('null'); // Check if the global query contains NO records, then set to the new file query if ( arguments.globalQry.RecordCount LTE 0 ) return arguments.newFileQry; SELECT * FROM arguments.globalQry UNION ALL SELECT * FROM arguments.newFileQry return retFileQry;