diff --git a/workflow/engine/classes/model/map/OutputDocumentMapBuilder.php b/workflow/engine/classes/model/map/OutputDocumentMapBuilder.php index d4f7be1cd..92c7d36a2 100755 --- a/workflow/engine/classes/model/map/OutputDocumentMapBuilder.php +++ b/workflow/engine/classes/model/map/OutputDocumentMapBuilder.php @@ -105,6 +105,8 @@ class OutputDocumentMapBuilder $tMap->addColumn('OUT_DOC_PDF_SECURITY_PERMISSIONS', 'OutDocPdfSecurityPermissions', 'string', CreoleTypes::VARCHAR, false, 150); + $tMap->addColumn('OUT_DOC_OPEN_TYPE', 'OutDocOpenType', 'int', CreoleTypes::INTEGER, false, null); + $tMap->addValidator('OUT_DOC_UID', 'maxLength', 'propel.validator.MaxLengthValidator', '32', 'Output Document UID can be no larger than 32 in size'); $tMap->addValidator('OUT_DOC_UID', 'required', 'propel.validator.RequiredValidator', '', 'Output Document UID is required.'); diff --git a/workflow/engine/classes/model/om/BaseOutputDocument.php b/workflow/engine/classes/model/om/BaseOutputDocument.php index b71ff437f..889500012 100755 --- a/workflow/engine/classes/model/om/BaseOutputDocument.php +++ b/workflow/engine/classes/model/om/BaseOutputDocument.php @@ -147,6 +147,12 @@ abstract class BaseOutputDocument extends BaseObject implements Persistent */ protected $out_doc_pdf_security_permissions = ''; + /** + * The value for the out_doc_open_type field. + * @var int + */ + protected $out_doc_open_type = 0; + /** * Flag to prevent endless save loop, if this object is referenced * by another object which falls in this transaction. @@ -381,6 +387,17 @@ abstract class BaseOutputDocument extends BaseObject implements Persistent return $this->out_doc_pdf_security_permissions; } + /** + * Get the [out_doc_open_type] column value. + * + * @return int + */ + public function getOutDocOpenType() + { + + return $this->out_doc_open_type; + } + /** * Set the value of [out_doc_uid] column. * @@ -821,6 +838,28 @@ abstract class BaseOutputDocument extends BaseObject implements Persistent } // setOutDocPdfSecurityPermissions() + /** + * Set the value of [out_doc_open_type] column. + * + * @param int $v new value + * @return void + */ + public function setOutDocOpenType($v) + { + + // Since the native PHP type for this column is integer, + // we will cast the input value to an int (if it is not). + if ($v !== null && !is_int($v) && is_numeric($v)) { + $v = (int) $v; + } + + if ($this->out_doc_open_type !== $v || $v === 0) { + $this->out_doc_open_type = $v; + $this->modifiedColumns[] = OutputDocumentPeer::OUT_DOC_OPEN_TYPE; + } + + } // setOutDocOpenType() + /** * Hydrates (populates) the object variables with values from the database resultset. * @@ -878,12 +917,14 @@ abstract class BaseOutputDocument extends BaseObject implements Persistent $this->out_doc_pdf_security_permissions = $rs->getString($startcol + 19); + $this->out_doc_open_type = $rs->getInt($startcol + 20); + $this->resetModified(); $this->setNew(false); // FIXME - using NUM_COLUMNS may be clearer. - return $startcol + 20; // 20 = OutputDocumentPeer::NUM_COLUMNS - OutputDocumentPeer::NUM_LAZY_LOAD_COLUMNS). + return $startcol + 21; // 21 = OutputDocumentPeer::NUM_COLUMNS - OutputDocumentPeer::NUM_LAZY_LOAD_COLUMNS). } catch (Exception $e) { throw new PropelException("Error populating OutputDocument object", $e); @@ -1147,6 +1188,9 @@ abstract class BaseOutputDocument extends BaseObject implements Persistent case 19: return $this->getOutDocPdfSecurityPermissions(); break; + case 20: + return $this->getOutDocOpenType(); + break; default: return null; break; @@ -1187,6 +1231,7 @@ abstract class BaseOutputDocument extends BaseObject implements Persistent $keys[17] => $this->getOutDocPdfSecurityOpenPassword(), $keys[18] => $this->getOutDocPdfSecurityOwnerPassword(), $keys[19] => $this->getOutDocPdfSecurityPermissions(), + $keys[20] => $this->getOutDocOpenType(), ); return $result; } @@ -1278,6 +1323,9 @@ abstract class BaseOutputDocument extends BaseObject implements Persistent case 19: $this->setOutDocPdfSecurityPermissions($value); break; + case 20: + $this->setOutDocOpenType($value); + break; } // switch() } @@ -1381,6 +1429,10 @@ abstract class BaseOutputDocument extends BaseObject implements Persistent $this->setOutDocPdfSecurityPermissions($arr[$keys[19]]); } + if (array_key_exists($keys[20], $arr)) { + $this->setOutDocOpenType($arr[$keys[20]]); + } + } /** @@ -1472,6 +1524,10 @@ abstract class BaseOutputDocument extends BaseObject implements Persistent $criteria->add(OutputDocumentPeer::OUT_DOC_PDF_SECURITY_PERMISSIONS, $this->out_doc_pdf_security_permissions); } + if ($this->isColumnModified(OutputDocumentPeer::OUT_DOC_OPEN_TYPE)) { + $criteria->add(OutputDocumentPeer::OUT_DOC_OPEN_TYPE, $this->out_doc_open_type); + } + return $criteria; } @@ -1564,6 +1620,8 @@ abstract class BaseOutputDocument extends BaseObject implements Persistent $copyObj->setOutDocPdfSecurityPermissions($this->out_doc_pdf_security_permissions); + $copyObj->setOutDocOpenType($this->out_doc_open_type); + $copyObj->setNew(true); diff --git a/workflow/engine/classes/model/om/BaseOutputDocumentPeer.php b/workflow/engine/classes/model/om/BaseOutputDocumentPeer.php index 0ab08dcd0..f6b2c4744 100755 --- a/workflow/engine/classes/model/om/BaseOutputDocumentPeer.php +++ b/workflow/engine/classes/model/om/BaseOutputDocumentPeer.php @@ -25,7 +25,7 @@ abstract class BaseOutputDocumentPeer const CLASS_DEFAULT = 'classes.model.OutputDocument'; /** The total number of columns. */ - const NUM_COLUMNS = 20; + const NUM_COLUMNS = 21; /** The number of lazy-loaded columns. */ const NUM_LAZY_LOAD_COLUMNS = 0; @@ -91,6 +91,9 @@ abstract class BaseOutputDocumentPeer /** the column name for the OUT_DOC_PDF_SECURITY_PERMISSIONS field */ const OUT_DOC_PDF_SECURITY_PERMISSIONS = 'OUTPUT_DOCUMENT.OUT_DOC_PDF_SECURITY_PERMISSIONS'; + /** the column name for the OUT_DOC_OPEN_TYPE field */ + const OUT_DOC_OPEN_TYPE = 'OUTPUT_DOCUMENT.OUT_DOC_OPEN_TYPE'; + /** The PHP to DB Name Mapping */ private static $phpNameMap = null; @@ -102,10 +105,10 @@ abstract class BaseOutputDocumentPeer * e.g. self::$fieldNames[self::TYPE_PHPNAME][0] = 'Id' */ private static $fieldNames = array ( - BasePeer::TYPE_PHPNAME => array ('OutDocUid', 'ProUid', 'OutDocReportGenerator', 'OutDocLandscape', 'OutDocMedia', 'OutDocLeftMargin', 'OutDocRightMargin', 'OutDocTopMargin', 'OutDocBottomMargin', 'OutDocGenerate', 'OutDocType', 'OutDocCurrentRevision', 'OutDocFieldMapping', 'OutDocVersioning', 'OutDocDestinationPath', 'OutDocTags', 'OutDocPdfSecurityEnabled', 'OutDocPdfSecurityOpenPassword', 'OutDocPdfSecurityOwnerPassword', 'OutDocPdfSecurityPermissions', ), - BasePeer::TYPE_COLNAME => array (OutputDocumentPeer::OUT_DOC_UID, OutputDocumentPeer::PRO_UID, OutputDocumentPeer::OUT_DOC_REPORT_GENERATOR, OutputDocumentPeer::OUT_DOC_LANDSCAPE, OutputDocumentPeer::OUT_DOC_MEDIA, OutputDocumentPeer::OUT_DOC_LEFT_MARGIN, OutputDocumentPeer::OUT_DOC_RIGHT_MARGIN, OutputDocumentPeer::OUT_DOC_TOP_MARGIN, OutputDocumentPeer::OUT_DOC_BOTTOM_MARGIN, OutputDocumentPeer::OUT_DOC_GENERATE, OutputDocumentPeer::OUT_DOC_TYPE, OutputDocumentPeer::OUT_DOC_CURRENT_REVISION, OutputDocumentPeer::OUT_DOC_FIELD_MAPPING, OutputDocumentPeer::OUT_DOC_VERSIONING, OutputDocumentPeer::OUT_DOC_DESTINATION_PATH, OutputDocumentPeer::OUT_DOC_TAGS, OutputDocumentPeer::OUT_DOC_PDF_SECURITY_ENABLED, OutputDocumentPeer::OUT_DOC_PDF_SECURITY_OPEN_PASSWORD, OutputDocumentPeer::OUT_DOC_PDF_SECURITY_OWNER_PASSWORD, OutputDocumentPeer::OUT_DOC_PDF_SECURITY_PERMISSIONS, ), - BasePeer::TYPE_FIELDNAME => array ('OUT_DOC_UID', 'PRO_UID', 'OUT_DOC_REPORT_GENERATOR', 'OUT_DOC_LANDSCAPE', 'OUT_DOC_MEDIA', 'OUT_DOC_LEFT_MARGIN', 'OUT_DOC_RIGHT_MARGIN', 'OUT_DOC_TOP_MARGIN', 'OUT_DOC_BOTTOM_MARGIN', 'OUT_DOC_GENERATE', 'OUT_DOC_TYPE', 'OUT_DOC_CURRENT_REVISION', 'OUT_DOC_FIELD_MAPPING', 'OUT_DOC_VERSIONING', 'OUT_DOC_DESTINATION_PATH', 'OUT_DOC_TAGS', 'OUT_DOC_PDF_SECURITY_ENABLED', 'OUT_DOC_PDF_SECURITY_OPEN_PASSWORD', 'OUT_DOC_PDF_SECURITY_OWNER_PASSWORD', 'OUT_DOC_PDF_SECURITY_PERMISSIONS', ), - BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, ) + BasePeer::TYPE_PHPNAME => array ('OutDocUid', 'ProUid', 'OutDocReportGenerator', 'OutDocLandscape', 'OutDocMedia', 'OutDocLeftMargin', 'OutDocRightMargin', 'OutDocTopMargin', 'OutDocBottomMargin', 'OutDocGenerate', 'OutDocType', 'OutDocCurrentRevision', 'OutDocFieldMapping', 'OutDocVersioning', 'OutDocDestinationPath', 'OutDocTags', 'OutDocPdfSecurityEnabled', 'OutDocPdfSecurityOpenPassword', 'OutDocPdfSecurityOwnerPassword', 'OutDocPdfSecurityPermissions', 'OutDocOpenType', ), + BasePeer::TYPE_COLNAME => array (OutputDocumentPeer::OUT_DOC_UID, OutputDocumentPeer::PRO_UID, OutputDocumentPeer::OUT_DOC_REPORT_GENERATOR, OutputDocumentPeer::OUT_DOC_LANDSCAPE, OutputDocumentPeer::OUT_DOC_MEDIA, OutputDocumentPeer::OUT_DOC_LEFT_MARGIN, OutputDocumentPeer::OUT_DOC_RIGHT_MARGIN, OutputDocumentPeer::OUT_DOC_TOP_MARGIN, OutputDocumentPeer::OUT_DOC_BOTTOM_MARGIN, OutputDocumentPeer::OUT_DOC_GENERATE, OutputDocumentPeer::OUT_DOC_TYPE, OutputDocumentPeer::OUT_DOC_CURRENT_REVISION, OutputDocumentPeer::OUT_DOC_FIELD_MAPPING, OutputDocumentPeer::OUT_DOC_VERSIONING, OutputDocumentPeer::OUT_DOC_DESTINATION_PATH, OutputDocumentPeer::OUT_DOC_TAGS, OutputDocumentPeer::OUT_DOC_PDF_SECURITY_ENABLED, OutputDocumentPeer::OUT_DOC_PDF_SECURITY_OPEN_PASSWORD, OutputDocumentPeer::OUT_DOC_PDF_SECURITY_OWNER_PASSWORD, OutputDocumentPeer::OUT_DOC_PDF_SECURITY_PERMISSIONS, OutputDocumentPeer::OUT_DOC_OPEN_TYPE, ), + BasePeer::TYPE_FIELDNAME => array ('OUT_DOC_UID', 'PRO_UID', 'OUT_DOC_REPORT_GENERATOR', 'OUT_DOC_LANDSCAPE', 'OUT_DOC_MEDIA', 'OUT_DOC_LEFT_MARGIN', 'OUT_DOC_RIGHT_MARGIN', 'OUT_DOC_TOP_MARGIN', 'OUT_DOC_BOTTOM_MARGIN', 'OUT_DOC_GENERATE', 'OUT_DOC_TYPE', 'OUT_DOC_CURRENT_REVISION', 'OUT_DOC_FIELD_MAPPING', 'OUT_DOC_VERSIONING', 'OUT_DOC_DESTINATION_PATH', 'OUT_DOC_TAGS', 'OUT_DOC_PDF_SECURITY_ENABLED', 'OUT_DOC_PDF_SECURITY_OPEN_PASSWORD', 'OUT_DOC_PDF_SECURITY_OWNER_PASSWORD', 'OUT_DOC_PDF_SECURITY_PERMISSIONS', 'OUT_DOC_OPEN_TYPE', ), + BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, ) ); /** @@ -115,10 +118,10 @@ abstract class BaseOutputDocumentPeer * e.g. self::$fieldNames[BasePeer::TYPE_PHPNAME]['Id'] = 0 */ private static $fieldKeys = array ( - BasePeer::TYPE_PHPNAME => array ('OutDocUid' => 0, 'ProUid' => 1, 'OutDocReportGenerator' => 2, 'OutDocLandscape' => 3, 'OutDocMedia' => 4, 'OutDocLeftMargin' => 5, 'OutDocRightMargin' => 6, 'OutDocTopMargin' => 7, 'OutDocBottomMargin' => 8, 'OutDocGenerate' => 9, 'OutDocType' => 10, 'OutDocCurrentRevision' => 11, 'OutDocFieldMapping' => 12, 'OutDocVersioning' => 13, 'OutDocDestinationPath' => 14, 'OutDocTags' => 15, 'OutDocPdfSecurityEnabled' => 16, 'OutDocPdfSecurityOpenPassword' => 17, 'OutDocPdfSecurityOwnerPassword' => 18, 'OutDocPdfSecurityPermissions' => 19, ), - BasePeer::TYPE_COLNAME => array (OutputDocumentPeer::OUT_DOC_UID => 0, OutputDocumentPeer::PRO_UID => 1, OutputDocumentPeer::OUT_DOC_REPORT_GENERATOR => 2, OutputDocumentPeer::OUT_DOC_LANDSCAPE => 3, OutputDocumentPeer::OUT_DOC_MEDIA => 4, OutputDocumentPeer::OUT_DOC_LEFT_MARGIN => 5, OutputDocumentPeer::OUT_DOC_RIGHT_MARGIN => 6, OutputDocumentPeer::OUT_DOC_TOP_MARGIN => 7, OutputDocumentPeer::OUT_DOC_BOTTOM_MARGIN => 8, OutputDocumentPeer::OUT_DOC_GENERATE => 9, OutputDocumentPeer::OUT_DOC_TYPE => 10, OutputDocumentPeer::OUT_DOC_CURRENT_REVISION => 11, OutputDocumentPeer::OUT_DOC_FIELD_MAPPING => 12, OutputDocumentPeer::OUT_DOC_VERSIONING => 13, OutputDocumentPeer::OUT_DOC_DESTINATION_PATH => 14, OutputDocumentPeer::OUT_DOC_TAGS => 15, OutputDocumentPeer::OUT_DOC_PDF_SECURITY_ENABLED => 16, OutputDocumentPeer::OUT_DOC_PDF_SECURITY_OPEN_PASSWORD => 17, OutputDocumentPeer::OUT_DOC_PDF_SECURITY_OWNER_PASSWORD => 18, OutputDocumentPeer::OUT_DOC_PDF_SECURITY_PERMISSIONS => 19, ), - BasePeer::TYPE_FIELDNAME => array ('OUT_DOC_UID' => 0, 'PRO_UID' => 1, 'OUT_DOC_REPORT_GENERATOR' => 2, 'OUT_DOC_LANDSCAPE' => 3, 'OUT_DOC_MEDIA' => 4, 'OUT_DOC_LEFT_MARGIN' => 5, 'OUT_DOC_RIGHT_MARGIN' => 6, 'OUT_DOC_TOP_MARGIN' => 7, 'OUT_DOC_BOTTOM_MARGIN' => 8, 'OUT_DOC_GENERATE' => 9, 'OUT_DOC_TYPE' => 10, 'OUT_DOC_CURRENT_REVISION' => 11, 'OUT_DOC_FIELD_MAPPING' => 12, 'OUT_DOC_VERSIONING' => 13, 'OUT_DOC_DESTINATION_PATH' => 14, 'OUT_DOC_TAGS' => 15, 'OUT_DOC_PDF_SECURITY_ENABLED' => 16, 'OUT_DOC_PDF_SECURITY_OPEN_PASSWORD' => 17, 'OUT_DOC_PDF_SECURITY_OWNER_PASSWORD' => 18, 'OUT_DOC_PDF_SECURITY_PERMISSIONS' => 19, ), - BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, ) + BasePeer::TYPE_PHPNAME => array ('OutDocUid' => 0, 'ProUid' => 1, 'OutDocReportGenerator' => 2, 'OutDocLandscape' => 3, 'OutDocMedia' => 4, 'OutDocLeftMargin' => 5, 'OutDocRightMargin' => 6, 'OutDocTopMargin' => 7, 'OutDocBottomMargin' => 8, 'OutDocGenerate' => 9, 'OutDocType' => 10, 'OutDocCurrentRevision' => 11, 'OutDocFieldMapping' => 12, 'OutDocVersioning' => 13, 'OutDocDestinationPath' => 14, 'OutDocTags' => 15, 'OutDocPdfSecurityEnabled' => 16, 'OutDocPdfSecurityOpenPassword' => 17, 'OutDocPdfSecurityOwnerPassword' => 18, 'OutDocPdfSecurityPermissions' => 19, 'OutDocOpenType' => 20, ), + BasePeer::TYPE_COLNAME => array (OutputDocumentPeer::OUT_DOC_UID => 0, OutputDocumentPeer::PRO_UID => 1, OutputDocumentPeer::OUT_DOC_REPORT_GENERATOR => 2, OutputDocumentPeer::OUT_DOC_LANDSCAPE => 3, OutputDocumentPeer::OUT_DOC_MEDIA => 4, OutputDocumentPeer::OUT_DOC_LEFT_MARGIN => 5, OutputDocumentPeer::OUT_DOC_RIGHT_MARGIN => 6, OutputDocumentPeer::OUT_DOC_TOP_MARGIN => 7, OutputDocumentPeer::OUT_DOC_BOTTOM_MARGIN => 8, OutputDocumentPeer::OUT_DOC_GENERATE => 9, OutputDocumentPeer::OUT_DOC_TYPE => 10, OutputDocumentPeer::OUT_DOC_CURRENT_REVISION => 11, OutputDocumentPeer::OUT_DOC_FIELD_MAPPING => 12, OutputDocumentPeer::OUT_DOC_VERSIONING => 13, OutputDocumentPeer::OUT_DOC_DESTINATION_PATH => 14, OutputDocumentPeer::OUT_DOC_TAGS => 15, OutputDocumentPeer::OUT_DOC_PDF_SECURITY_ENABLED => 16, OutputDocumentPeer::OUT_DOC_PDF_SECURITY_OPEN_PASSWORD => 17, OutputDocumentPeer::OUT_DOC_PDF_SECURITY_OWNER_PASSWORD => 18, OutputDocumentPeer::OUT_DOC_PDF_SECURITY_PERMISSIONS => 19, OutputDocumentPeer::OUT_DOC_OPEN_TYPE => 20, ), + BasePeer::TYPE_FIELDNAME => array ('OUT_DOC_UID' => 0, 'PRO_UID' => 1, 'OUT_DOC_REPORT_GENERATOR' => 2, 'OUT_DOC_LANDSCAPE' => 3, 'OUT_DOC_MEDIA' => 4, 'OUT_DOC_LEFT_MARGIN' => 5, 'OUT_DOC_RIGHT_MARGIN' => 6, 'OUT_DOC_TOP_MARGIN' => 7, 'OUT_DOC_BOTTOM_MARGIN' => 8, 'OUT_DOC_GENERATE' => 9, 'OUT_DOC_TYPE' => 10, 'OUT_DOC_CURRENT_REVISION' => 11, 'OUT_DOC_FIELD_MAPPING' => 12, 'OUT_DOC_VERSIONING' => 13, 'OUT_DOC_DESTINATION_PATH' => 14, 'OUT_DOC_TAGS' => 15, 'OUT_DOC_PDF_SECURITY_ENABLED' => 16, 'OUT_DOC_PDF_SECURITY_OPEN_PASSWORD' => 17, 'OUT_DOC_PDF_SECURITY_OWNER_PASSWORD' => 18, 'OUT_DOC_PDF_SECURITY_PERMISSIONS' => 19, 'OUT_DOC_OPEN_TYPE' => 20, ), + BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, ) ); /** @@ -259,6 +262,8 @@ abstract class BaseOutputDocumentPeer $criteria->addSelectColumn(OutputDocumentPeer::OUT_DOC_PDF_SECURITY_PERMISSIONS); + $criteria->addSelectColumn(OutputDocumentPeer::OUT_DOC_OPEN_TYPE); + } const COUNT = 'COUNT(OUTPUT_DOCUMENT.OUT_DOC_UID)'; diff --git a/workflow/engine/config/schema.xml b/workflow/engine/config/schema.xml index 0bfe72d84..d768368e3 100755 --- a/workflow/engine/config/schema.xml +++ b/workflow/engine/config/schema.xml @@ -781,6 +781,7 @@ + diff --git a/workflow/engine/methods/cases/cases_ShowOutputDocument.php b/workflow/engine/methods/cases/cases_ShowOutputDocument.php index 49eeee328..6a87329b3 100755 --- a/workflow/engine/methods/cases/cases_ShowOutputDocument.php +++ b/workflow/engine/methods/cases/cases_ShowOutputDocument.php @@ -34,18 +34,25 @@ if (!isset($_SESSION['USER_LOGGED'])) { * For more information, contact Colosa Inc, 2566 Le Jeune Rd., * Coral Gables, FL, 33134, USA, or email info@colosa.com. */ -/* - * Created on 13-02-2008 - * - * @author David Callizaya +/* + * Created on 13-02-2008 + * + * @author David Callizaya */ require_once ("classes/model/AppDocumentPeer.php"); +require_once ("classes/model/OutputDocumentPeer.php"); $oAppDocument = new AppDocument(); $oAppDocument->Fields = $oAppDocument->load( $_GET['a'], (isset( $_GET['v'] )) ? $_GET['v'] : null ); $sAppDocUid = $oAppDocument->getAppDocUid(); +$sDocUid = $oAppDocument->Fields['DOC_UID']; + +$oOutputDocument = new OutputDocument(); +$oOutputDocument->Fields = $oOutputDocument->getByUid( $sDocUid ); +$download = $oOutputDocument->Fields['OUT_DOC_OPEN_TYPE']; + $info = pathinfo( $oAppDocument->getAppDocFilename() ); if (! isset( $_GET['ext'] )) { $ext = $info['extension']; @@ -58,7 +65,7 @@ if (! isset( $_GET['ext'] )) { } $ver = (isset( $_GET['v'] ) && $_GET['v'] != '') ? '_' . $_GET['v'] : ''; -if (! $ver) //This code is in the case the outputdocument won't be versioned +if (! $ver) //This code is in the case the outputdocument won't be versioned $ver = '_1'; $realPath = PATH_DOCUMENT . G::getPathFromUID($oAppDocument->Fields['APP_UID']) . '/outdocs/' . $sAppDocUid . $ver . '.' . $ext; @@ -102,7 +109,7 @@ if (! $sw_file_exists) { $res['message'] = $info['basename'] . $ver . '.' . $ext; print G::json_encode( $res ); } else { - G::streamFile( $realPath, true, $info['basename'] . $ver . '.' . $ext ); + G::streamFile( $realPath, $download, $info['basename'] . $ver . '.' . $ext ); } } //G::streamFile ( $realPath, true); diff --git a/workflow/engine/xmlform/outputdocs/outputdocs_Properties.html b/workflow/engine/xmlform/outputdocs/outputdocs_Properties.html index 1e77f0630..5ddcafa58 100755 --- a/workflow/engine/xmlform/outputdocs/outputdocs_Properties.html +++ b/workflow/engine/xmlform/outputdocs/outputdocs_Properties.html @@ -124,6 +124,10 @@ {$form.OUT_DOC_TAGS} + + {$OUT_DOC_OPEN_TYPE} + {$form.OUT_DOC_OPEN_TYPE} + diff --git a/workflow/engine/xmlform/outputdocs/outputdocs_Properties.xml b/workflow/engine/xmlform/outputdocs/outputdocs_Properties.xml index 055be1be2..f1d0636b7 100755 --- a/workflow/engine/xmlform/outputdocs/outputdocs_Properties.xml +++ b/workflow/engine/xmlform/outputdocs/outputdocs_Properties.xml @@ -103,6 +103,9 @@ + + By clicking on the generated file link + Cancel