BUG 0000 improving the documents option (add, delete folders and docuemnts)
improving Code add, remove folder and documents
This commit is contained in:
@@ -585,4 +585,37 @@ class AppDocument extends BaseAppDocument {
|
||||
return $oDataset->getRow();
|
||||
}
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/**
|
||||
* get all docuemnts for a folder
|
||||
* created by carlos pacha carlos@colosa.com, pckrlos@gmail.com
|
||||
* @param array $sFolderUid
|
||||
* @return array
|
||||
**/
|
||||
public function getDocumentsinFolders($sFolderUid)
|
||||
{
|
||||
try {
|
||||
$arrayDocumentsToDelete=array();
|
||||
|
||||
$oCriteria = new Criteria('workflow');
|
||||
$oCriteria->add(AppDocumentPeer::FOLDER_UID, $sFolderUid);
|
||||
$oDataset = AppDocumentPeer::doSelectRS($oCriteria);
|
||||
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||
$oDataset->next();
|
||||
while ($aRow = $oDataset->getRow()) {
|
||||
$arrayDocumentsToDelete[]=array('sAppDocUid'=>$aRow['APP_DOC_UID'],'iVersion'=>$aRow['DOC_VERSION']);
|
||||
$oDataset->next();
|
||||
}
|
||||
|
||||
return ($arrayDocumentsToDelete);
|
||||
}
|
||||
catch (Exception $oError) {
|
||||
throw($oError);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
} // AppDocument
|
||||
|
||||
Reference in New Issue
Block a user