Logo Search packages:      
Sourcecode: maxdb-7.5.00 version File versions

SAPDB_Bool StudioWeb_StoredQueryTree::moveToFolder ( sapdbwa_WebAgent wa,
sapdbwa_HttpRequest req,
sapdbwa_HttpReply rep 
) [private]

------------------------------------------------------------------------- function: moveToFolder description: move a item to a folder

arguments: [in] wa ,webAgent object [in] req ,web request object [in] reply,web reply object

return value: true, if success -------------------------------------------------------------------------

Definition at line 603 of file StudioWeb_StoredQueryTree.cpp.

References Tools_DynamicUTF8String::Empty(), sapdbwa_HttpRequest::GetQueryString(), Studio_DBFSObject::moveItem(), and Studio_DBFSObject::status().

Referenced by doService().

{

    const char        *queryString = req.GetQueryString();

    if (queryString == NULL) return SAPDB_FALSE;
    
    
    Tools_DynamicUTF8String sOldName;
    Tools_DynamicUTF8String sNewName;

    getParameterValue(WQ_ACTIONTOTAKE,req,sOldName); 
    if(sOldName.Empty()) return SAPDB_FALSE;

    getParameterValue(WQ_NEWITEM,req,sNewName); 
    if(sNewName.Empty()) return SAPDB_FALSE;
    
    //determine file type
    st_db_stat Info;
    Tools_DynamicUTF8String sError;
    if(m_poDBFS->status(sOldName,Info,sError) == SAPDB_FALSE){
            
        sendUtf8ErrorMessageBox(wa,rep,sError);
        return SAPDB_FALSE;
    }

    if(m_poDBFS->moveItem(sOldName,sNewName,sError) == SAPDB_FALSE){

        sendUtf8ErrorMessageBox(wa,rep,sError);
        return SAPDB_FALSE;
    }
    
    return SAPDB_TRUE;    
}


Generated by  Doxygen 1.6.0   Back to index