Commit 8663bd6899e6cd005454634aeb41e6d09f2dfce0

Authored by kevin_fourie
1 parent 5cdcb1fa

Merged from trunk...

KTS-1732
"Deleting workflow state causes fatal error. "
Fixed.

Reviewed By: Conrad

KTS-1696
"when bulk deleting files in a sub folder, am redirected to root"
Fixed. Will attempt to redirect back to folder last visited.

Reviewed By: Kevin Fourie

git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/STABLE/branches/3.3.3-Release-Branch@6372 c91229c3-7414-0410-bfa2-8a42b809f60b
lib/actions/bulkaction.php
@@ -312,6 +312,10 @@ class KTBulkAction extends KTStandardDispatcher { @@ -312,6 +312,10 @@ class KTBulkAction extends KTStandardDispatcher {
312 $sAction = 'main'; 312 $sAction = 'main';
313 313
314 if($sReturnAction == 'browse') { 314 if($sReturnAction == 'browse') {
  315 + if ($sReturnData == '')
  316 + {
  317 + $sReturnData = KTUtil::arrayGet($_REQUEST, 'fFolderId');
  318 + }
315 $sTargetUrl = KTBrowseUtil::getUrlForFolder(Folder::get($sReturnData)); 319 $sTargetUrl = KTBrowseUtil::getUrlForFolder(Folder::get($sReturnData));
316 } else if($sReturnAction == 'simpleSearch') { 320 } else if($sReturnAction == 'simpleSearch') {
317 $sTargetUrl = KTBrowseUtil::getSimpleSearchBaseUrl(); 321 $sTargetUrl = KTBrowseUtil::getSimpleSearchBaseUrl();
@@ -497,4 +501,4 @@ class KTBulkActionUtil { @@ -497,4 +501,4 @@ class KTBulkActionUtil {
497 } 501 }
498 } 502 }
499 503
500 -?>  
501 \ No newline at end of file 504 \ No newline at end of file
  505 +?>
plugins/ktcore/KTDocumentActions.php
@@ -933,7 +933,7 @@ class KTDocumentMoveAction extends KTDocumentAction { @@ -933,7 +933,7 @@ class KTDocumentMoveAction extends KTDocumentAction {
933 $bFileClash = KTDocumentUtil::fileExists($data['browse'], $this->oDocument->getFilename()); 933 $bFileClash = KTDocumentUtil::fileExists($data['browse'], $this->oDocument->getFilename());
934 if ($bFileClash && isset($data['filename'])) { 934 if ($bFileClash && isset($data['filename'])) {
935 $filename = $data['filename']; 935 $filename = $data['filename'];
936 - $bFileClash = KTDocumentUtil::fileExists($this->oFolder, $filename); 936 + $bFileClash = KTDocumentUtil::fileExists($data['browse'], $filename);
937 } else { 937 } else {
938 $filename = $this->oDocument->getFilename(); 938 $filename = $this->oDocument->getFilename();
939 } 939 }
@@ -1348,6 +1348,10 @@ class KTDocumentWorkflowAction extends KTDocumentAction { @@ -1348,6 +1348,10 @@ class KTDocumentWorkflowAction extends KTDocumentAction {
1348 if ($aTransitions) { 1348 if ($aTransitions) {
1349 $aVocab = array(); 1349 $aVocab = array();
1350 foreach ($aTransitions as $oTransition) { 1350 foreach ($aTransitions as $oTransition) {
  1351 + if(is_null($oTransition) || PEAR::isError($oTransition)){
  1352 + continue;
  1353 + }
  1354 +
1351 $aVocab[$oTransition->getId()] = $oTransition->showDescription(); 1355 $aVocab[$oTransition->getId()] = $oTransition->showDescription();
1352 } 1356 }
1353 $fieldOptions = array('vocab' => $aVocab); 1357 $fieldOptions = array('vocab' => $aVocab);