mirror of
https://git.code.sf.net/p/seeddms/code
synced 2024-11-26 15:32:13 +00:00
pass more data to view, do not use $_GET in view anymore
This commit is contained in:
parent
e7b40e21f3
commit
248d106852
|
@ -70,7 +70,7 @@ if (!$accessop->mayApprove()){
|
|||
UI::exitError(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName()))),getMLText("access_denied"));
|
||||
}
|
||||
|
||||
$approvals = $latestContent->getApprovalStatus();
|
||||
$approvals = $content->getApprovalStatus();
|
||||
if(!$approvals) {
|
||||
UI::exitError(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName()))),getMLText("no_action"));
|
||||
}
|
||||
|
@ -80,6 +80,8 @@ $view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user));
|
|||
if($view) {
|
||||
$view->setParam('folder', $folder);
|
||||
$view->setParam('document', $document);
|
||||
$view->setParam('version', $content);
|
||||
$view->setParam('approveid', (int) $_GET['approveid']);
|
||||
$view->setParam('accessobject', $accessop);
|
||||
$view($_GET);
|
||||
exit;
|
||||
|
|
|
@ -94,12 +94,12 @@ $(document).ready(function() {
|
|||
$user = $this->params['user'];
|
||||
$folder = $this->params['folder'];
|
||||
$document = $this->params['document'];
|
||||
$content = $this->params['version'];
|
||||
$approveid = $this->params['approveid'];
|
||||
|
||||
$latestContent = $document->getLatestContent();
|
||||
$approvals = $latestContent->getApprovalStatus();
|
||||
|
||||
$approvals = $content->getApprovalStatus();
|
||||
foreach($approvals as $approval) {
|
||||
if($approval['approveID'] == $_GET['approveid']) {
|
||||
if($approval['approveID'] == $approveid) {
|
||||
$approvalStatus = $approval;
|
||||
break;
|
||||
}
|
||||
|
@ -167,10 +167,9 @@ $(document).ready(function() {
|
|||
<input type='hidden' name='approvalGroup' value="<?php echo $approvalStatus['required']; ?>" />
|
||||
<?php endif; ?>
|
||||
<input type='hidden' name='documentid' value='<?php echo $document->getId() ?>'/>
|
||||
<input type='hidden' name='version' value='<?php echo $latestContent->getVersion(); ?>'/>
|
||||
<input type='hidden' name='version' value='<?php echo $content->getVersion(); ?>'/>
|
||||
</form>
|
||||
<?php
|
||||
|
||||
$this->contentContainerEnd();
|
||||
$this->contentEnd();
|
||||
$this->htmlEndPage();
|
||||
|
|
Loading…
Reference in New Issue
Block a user