mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
Yet another merge from head to WCM-DEV2.
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/WCM-DEV2/root@3774 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -41,10 +41,10 @@ public class FTPDate
|
||||
* Pack a date string in Unix format The format is 'Mmm dd hh:mm' if the file is less than six
|
||||
* months old, else the format is 'Mmm dd yyyy'.
|
||||
*
|
||||
* @param buf StringBuffer
|
||||
* @param buf StringBuilder
|
||||
* @param dt Date
|
||||
*/
|
||||
public final static void packUnixDate(StringBuffer buf, Date dt)
|
||||
public final static void packUnixDate(StringBuilder buf, Date dt)
|
||||
{
|
||||
|
||||
// Check if the date is valid
|
||||
|
@@ -1320,11 +1320,10 @@ public class FTPSrvSession extends SrvSession implements Runnable
|
||||
|
||||
// Output the file information to the client
|
||||
|
||||
StringBuffer str = new StringBuffer(256);
|
||||
StringBuilder str = new StringBuilder(256);
|
||||
|
||||
for (FileInfo finfo : files)
|
||||
{
|
||||
|
||||
// Build the output record
|
||||
|
||||
str.setLength(0);
|
||||
|
@@ -180,7 +180,7 @@ public class PassthruAuthenticator extends CifsAuthenticator implements SessionL
|
||||
// using the session that has already been setup.
|
||||
|
||||
AuthenticateSession authSess = passDetails.getAuthenticateSession();
|
||||
authSess.doSessionSetup(client.getUserName(), client.getANSIPassword(), client.getPassword());
|
||||
authSess.doSessionSetup(client.getDomain(), client.getUserName(), null, client.getANSIPassword(), client.getPassword());
|
||||
|
||||
// Check if the user has been logged on as a guest
|
||||
|
||||
|
@@ -113,6 +113,11 @@ public class CheckInOutDesktopAction extends DesktopAction {
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
// Dump the error
|
||||
|
||||
if ( logger.isErrorEnabled())
|
||||
logger.error("Desktop action error", ex);
|
||||
|
||||
// Return an error status and message
|
||||
|
||||
response.setStatus(StsError, "Checkin failed for " + target.getTarget() + ", " + ex.getMessage());
|
||||
@@ -122,6 +127,19 @@ public class CheckInOutDesktopAction extends DesktopAction {
|
||||
{
|
||||
try
|
||||
{
|
||||
// Check if the file is locked
|
||||
|
||||
if ( getNodeService().hasAspect( target.getNode(), ContentModel.ASPECT_LOCKABLE)) {
|
||||
|
||||
// Get the lock type
|
||||
|
||||
String lockTypeStr = (String) getNodeService().getProperty( target.getNode(), ContentModel.PROP_LOCK_TYPE);
|
||||
if ( lockTypeStr != null) {
|
||||
response.setStatus(StsError, "Checkout failed, file is locked");
|
||||
return response;
|
||||
}
|
||||
}
|
||||
|
||||
// Check out the file
|
||||
|
||||
NodeRef workingCopyNode = getCheckInOutService().checkout( target.getNode());
|
||||
@@ -149,6 +167,11 @@ public class CheckInOutDesktopAction extends DesktopAction {
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
// Dump the error
|
||||
|
||||
if ( logger.isErrorEnabled())
|
||||
logger.error("Desktop action error", ex);
|
||||
|
||||
// Return an error status and message
|
||||
|
||||
response.setStatus(StsError, "Failed to checkout " + target.getTarget() + ", " + ex.getMessage());
|
||||
|
@@ -47,6 +47,6 @@ public class CmdLineDesktopAction extends DesktopAction {
|
||||
|
||||
// Return a URL in the status message
|
||||
|
||||
return new DesktopResponse(StsCommandLine, "C:\\Windows\\notepad.exe");
|
||||
return new DesktopResponse(StsCommandLine, "%SystemRoot%\\notepad.exe");
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user