// // Copyright 2000 Perforce Software. All rights reserved. // // This file is part of Perforce - the FAST SCM System. // // p4wFTProcessorView: // Generates the reopen command for changing file type #include <stdlib.h> #include <string.h> #include <p4wp4.h> #include "p4wView.h" #include "p4wFTProcessorView.h" #include "p4wCmdPane.h" p4wFTProcessorView::p4wFTProcessorView(p4wRequest & Request) : p4wRunView(Request) { ProcessFormAction(); fAc = AC_FILETYPEFRM; // // Set the short and the long versions of the title. // If there is no POST data the title is "Error". if( !ProcessForm() ) { fShortTitle.Set( "Error" ); fFullTitle.Set( "Error" ); return; } fShortTitle.Set( "Command Result" ); fFullTitle.Set( "Reopen Result" ); } p4wFTProcessorView::~p4wFTProcessorView() { } void p4wFTProcessorView::RenderContent() { // // Issue reopen command (passing the results through a cmdPane) // Build a spec to parse the reopen options StrBuf fileType; if( !ProcessForm() ) { RenderError("Requested URL is invalid in this context."); return; } GetFileType( fileType ); title = "Reopen "; if (!fRequest.isLocalRequest() && strstr(fileType.Text(), "symlink") && !SEC_ALLOW_CR8CHG_SYMLINKS) { RenderError("Remote user cannot change a file to a symlink filetype."); return; } // // Get the type argument ArgAndTitle( "-t" ); ArgAndTitle( fileType ); // Process the files. If this returned an error don't issue the command if( !AddFileArgs() ) return; // Run the command. p4wCmdPane cmdPane(*this, fRequest, title.Text()); fRequest.p4("reopen", 0, 0, &cmdPane); fRequest.p4Wait(); }
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#1 | 12234 | Matt Attaway |
Rejigger P4Web project in preparation for official sunsetting The bin directory contains the last official builds of P4Web from the Perforce download site. P4Web is soon to be completely sunsetted; these builds are here for folks who don't want to build their own. To better handle the archived builds the source code has been moved into a separate src directory. |
||
//guest/perforce_software/p4web/Views/p4wFTProcessorView.cpp | |||||
#1 | 8914 | Matt Attaway | Initial add of the P4Web source code |