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

// 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 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"; application.ADF.scripts.loadJQuery(); application.ADF.scripts.loadJQueryUI(themeName="pepper-grinder");

Custom Code Package Builder

<< Return to Form

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(request.formattedTimestamp," ,:", "-,-") & "\";

#destFilePathStart#


#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#


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

Build Package Run Time = #timer/1000# seconds

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

#valErrorMsg#

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.
Package Directory:
Enter the absolute path on the server to store the package.
 
SELECT * FROM arguments.dirFileQry WHERE type = 'File' AND DATELASTMODIFIED >= 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;