mirror of
				https://git.code.sf.net/p/seeddms/code
				synced 2025-10-31 21:27:36 +00:00 
			
		
		
		
	correct processing of return value of getWorkflowLog()
This commit is contained in:
		
							parent
							
								
									f19ed34d25
								
							
						
					
					
						commit
						7b807f8d67
					
				|  | @ -46,7 +46,8 @@ class SeedDMS_View_RemoveWorkflowFromDocument extends SeedDMS_Theme_Style { | |||
| 		$this->contentHeading(getMLText("rm_workflow")); | ||||
| 
 | ||||
| 		$currentstate = $latestContent->getWorkflowState(); | ||||
| 		$wkflog = $latestContent->getWorkflowLog(); | ||||
| 		$wkflogs = $latestContent->getWorkflowLog(); | ||||
| 		$wkflog = array_shift($wkflogs); | ||||
| 		$workflow = $latestContent->getWorkflow(); | ||||
| 
 | ||||
| 		if($currentstate) { | ||||
|  | @ -58,8 +59,10 @@ class SeedDMS_View_RemoveWorkflowFromDocument extends SeedDMS_Theme_Style { | |||
| 						$enterts = makeTsFromLongDate($enterdate); | ||||
| 					} | ||||
| 				} | ||||
| 				$msg .= "The state was entered at ".$enterdate." which was "; | ||||
| 				$msg .= getReadableDuration((time()-$enterts))." ago.<br />"; | ||||
| 				if(!empty($enterdate)) { | ||||
| 					$msg .= "The state was entered at ".$enterdate." which was "; | ||||
| 					$msg .= getReadableDuration((time()-$enterts))." ago.<br />"; | ||||
| 				} | ||||
| 			} | ||||
| 			$msg .= "The document may stay in this state for ".$currentstate->getMaxTime()." sec."; | ||||
| 		} else { | ||||
|  | @ -96,12 +99,12 @@ class SeedDMS_View_RemoveWorkflowFromDocument extends SeedDMS_Theme_Style { | |||
| 			echo "<tr><th>".getMLText('action')."</th><th>Start state</th><th>End state</th><th>".getMLText('date')."</th><th>".getMLText('user')."</th><th>".getMLText('comment')."</th></tr>"; | ||||
| 			foreach($wkflog as $entry) { | ||||
| 				echo "<tr>"; | ||||
| 				echo "<td>".getMLText('action_'.$entry->getTransition()->getAction()->getName())."</td>"; | ||||
| 				echo "<td>".$entry->getTransition()->getState()->getName()."</td>"; | ||||
| 				echo "<td>".$entry->getTransition()->getNextState()->getName()."</td>"; | ||||
| 				echo "<td>".htmlspecialchars(getMLText('action_'.$entry->getTransition()->getAction()->getName()))."</td>"; | ||||
| 				echo "<td>".htmlspecialchars($entry->getTransition()->getState()->getName())."</td>"; | ||||
| 				echo "<td>".htmlspecialchars($entry->getTransition()->getNextState()->getName())."</td>"; | ||||
| 				echo "<td>".$entry->getDate()."</td>"; | ||||
| 				echo "<td>".$entry->getUser()->getFullname()."</td>"; | ||||
| 				echo "<td>".$entry->getComment()."</td>"; | ||||
| 				echo "<td>".htmlspecialchars($entry->getUser()->getFullname())."</td>"; | ||||
| 				echo "<td>".htmlspecialchars($entry->getComment())."</td>"; | ||||
| 				echo "</tr>"; | ||||
| 			} | ||||
| 			echo "</table>\n"; | ||||
|  |  | |||
|  | @ -77,7 +77,8 @@ $(document).ready(function() { | |||
| 		$this->contentHeading(getMLText("return_from_subworkflow")); | ||||
| 
 | ||||
| 		$currentstate = $latestContent->getWorkflowState(); | ||||
| 		$wkflog = $latestContent->getWorkflowLog(); | ||||
| 		$wkflogs = $latestContent->getWorkflowLog(); | ||||
| 		$wkflog = array_shift($wkflogs); | ||||
| 		$workflow = $latestContent->getWorkflow(); | ||||
| 		$parentworkflow = $latestContent->getParentWorkflow(); | ||||
| 
 | ||||
|  |  | |||
|  | @ -46,7 +46,8 @@ class SeedDMS_View_RewindWorkflow extends SeedDMS_Theme_Style { | |||
| 		$this->contentHeading(getMLText("rewind_workflow")); | ||||
| 
 | ||||
| 		$currentstate = $latestContent->getWorkflowState(); | ||||
| 		$wkflog = array_pop($latestContent->getWorkflowLog()); | ||||
| 		$wkflogs = $latestContent->getWorkflowLog(); | ||||
| 		$wkflog = array_shift($wkflogs); | ||||
| 		$workflow = $latestContent->getWorkflow(); | ||||
| 
 | ||||
| 		if($currentstate) { | ||||
|  |  | |||
|  | @ -47,7 +47,8 @@ class SeedDMS_View_RunSubWorkflow extends SeedDMS_Theme_Style { | |||
| 		$this->contentHeading(getMLText("run_subworkflow")); | ||||
| 
 | ||||
| 		$currentstate = $latestContent->getWorkflowState(); | ||||
| 		$wkflog = $latestContent->getWorkflowLog(); | ||||
| 		$wkflogs = $latestContent->getWorkflowLog(); | ||||
| 		$wkflog = array_shift($wkflogs); | ||||
| 		$workflow = $latestContent->getWorkflow(); | ||||
| 
 | ||||
| 		$msg = "The document is currently in state: ".$currentstate->getName()."<br />"; | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 Uwe Steinmann
						Uwe Steinmann