BUG 9609 Change log y View en Dynaforms no muestra valores ingresados en formularios ... SOLVED
- Al momento de recuperar los permisos de los dynaforms, se estaba filtrando 2 veces por el UID de la tarea, esto e sinnecesario porque la funcion que recupera los permisos ya valida por la tarea - Habian otros issues menores (como el titulo del formulario en los tabs de preview) - Se quito la dobre validacion por tarea y se corrigieron los issues menores
This commit is contained in:
@@ -4631,16 +4631,26 @@ class Cases
|
||||
//permissions per user
|
||||
$oCriteria = new Criteria('workflow');
|
||||
$oCriteria->add(
|
||||
$oCriteria->getNewCriterion(ObjectPermissionPeer::USR_UID, $USR_UID)->
|
||||
addOr($oCriteria->getNewCriterion(ObjectPermissionPeer::USR_UID, ''))
|
||||
$oCriteria->getNewCriterion(ObjectPermissionPeer::USR_UID, $USR_UID)->addOr(
|
||||
$oCriteria->getNewCriterion(ObjectPermissionPeer::USR_UID, '')->addOr(
|
||||
$oCriteria->getNewCriterion(ObjectPermissionPeer::USR_UID, '0')
|
||||
)
|
||||
)
|
||||
);
|
||||
$oCriteria->add(ObjectPermissionPeer::PRO_UID, $PRO_UID);
|
||||
$oCriteria->add(ObjectPermissionPeer::OP_ACTION, $ACTION);
|
||||
$oCriteria->add(
|
||||
$oCriteria->getNewCriterion(ObjectPermissionPeer::TAS_UID, $TAS_UID)->
|
||||
addOr($oCriteria->getNewCriterion(ObjectPermissionPeer::TAS_UID, '')->
|
||||
addOr($oCriteria->getNewCriterion(ObjectPermissionPeer::OP_CASE_STATUS, ''))->
|
||||
addOr($oCriteria->getNewCriterion(ObjectPermissionPeer::OP_CASE_STATUS, 'ALL')))
|
||||
$oCriteria->getNewCriterion(ObjectPermissionPeer::TAS_UID, $TAS_UID)->addOr(
|
||||
$oCriteria->getNewCriterion(ObjectPermissionPeer::TAS_UID, '')->addOr(
|
||||
$oCriteria->getNewCriterion(ObjectPermissionPeer::TAS_UID, '0')
|
||||
)
|
||||
)->addOr(
|
||||
$oCriteria->getNewCriterion(ObjectPermissionPeer::OP_CASE_STATUS, 'ALL')->addOr(
|
||||
$oCriteria->getNewCriterion(ObjectPermissionPeer::OP_CASE_STATUS, '')->addOr(
|
||||
$oCriteria->getNewCriterion(ObjectPermissionPeer::OP_CASE_STATUS, '0')
|
||||
)
|
||||
)
|
||||
)
|
||||
);
|
||||
$rs = ObjectPermissionPeer::doSelectRS($oCriteria);
|
||||
$rs->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||
@@ -4665,10 +4675,17 @@ class Cases
|
||||
$oCriteria->add(ObjectPermissionPeer::PRO_UID, $PRO_UID);
|
||||
$oCriteria->add(ObjectPermissionPeer::OP_ACTION, $ACTION);
|
||||
$oCriteria->add(
|
||||
$oCriteria->getNewCriterion(ObjectPermissionPeer::TAS_UID, $TAS_UID)->
|
||||
addOr($oCriteria->getNewCriterion(ObjectPermissionPeer::TAS_UID, '')->
|
||||
addOr($oCriteria->getNewCriterion(ObjectPermissionPeer::OP_CASE_STATUS, ''))->
|
||||
addOr($oCriteria->getNewCriterion(ObjectPermissionPeer::OP_CASE_STATUS, 'ALL')))
|
||||
$oCriteria->getNewCriterion(ObjectPermissionPeer::TAS_UID, $TAS_UID)->addOr(
|
||||
$oCriteria->getNewCriterion(ObjectPermissionPeer::TAS_UID, '')->addOr(
|
||||
$oCriteria->getNewCriterion(ObjectPermissionPeer::TAS_UID, '0')
|
||||
)
|
||||
)->addOr(
|
||||
$oCriteria->getNewCriterion(ObjectPermissionPeer::OP_CASE_STATUS, 'ALL')->addOr(
|
||||
$oCriteria->getNewCriterion(ObjectPermissionPeer::OP_CASE_STATUS, '')->addOr(
|
||||
$oCriteria->getNewCriterion(ObjectPermissionPeer::OP_CASE_STATUS, '0')
|
||||
)
|
||||
)
|
||||
)
|
||||
);
|
||||
$rs = ObjectPermissionPeer::doSelectRS($oCriteria);
|
||||
$rs->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||
@@ -4690,7 +4707,7 @@ class Cases
|
||||
|
||||
// here!,. we should verify $PARTICIPATE
|
||||
$sw_participate = false; // must be false for default
|
||||
if (($row['OP_CASE_STATUS'] != 'COMPLETED') && ($row['OP_CASE_STATUS'] != '')) {
|
||||
if (($row['OP_CASE_STATUS'] != 'COMPLETED') && ($row['OP_CASE_STATUS'] != '') && ($row['OP_CASE_STATUS'] != '0')) {
|
||||
if ($PARTICIPATE == 1) {
|
||||
$oCriteriax = new Criteria('workflow');
|
||||
$oCriteriax->add(AppDelegationPeer::USR_UID, $USR_UID);
|
||||
@@ -4772,7 +4789,7 @@ class Cases
|
||||
$oCriteria->add(StepPeer::TAS_UID, $TASK_SOURCE);
|
||||
}
|
||||
}
|
||||
if ($O_UID != '') {
|
||||
if ($O_UID != '' && $O_UID != '0') {
|
||||
$oCriteria->add(DynaformPeer::DYN_UID, $O_UID);
|
||||
}
|
||||
$oCriteria->addJoin(ApplicationPeer::PRO_UID, StepPeer::PRO_UID);
|
||||
@@ -4809,7 +4826,7 @@ class Cases
|
||||
$oCriteria->add(AppDelegationPeer::TAS_UID, $TASK_SOURCE);
|
||||
}
|
||||
}
|
||||
if ($O_UID != '') {
|
||||
if ($O_UID != '' && $O_UID != '0') {
|
||||
$oCriteria->add(AppDocumentPeer::DOC_UID, $O_UID);
|
||||
}
|
||||
if ($obj_type == 'INPUT') {
|
||||
|
||||
@@ -224,6 +224,7 @@ class Groups
|
||||
$oCriteria = new Criteria('workflow');
|
||||
$oCriteria->addSelectColumn(GroupwfPeer::GRP_UID);
|
||||
$oCriteria->addSelectColumn(GroupwfPeer::GRP_STATUS);
|
||||
$oCriteria->addSelectColumn(GroupwfPeer::GRP_LDAP_DN);
|
||||
$oCriteria->addSelectColumn(ContentPeer::CON_VALUE);
|
||||
$oCriteria->addJoin(GroupUserPeer::GRP_UID, GroupwfPeer::GRP_UID, Criteria::LEFT_JOIN);
|
||||
$oCriteria->addJoin(GroupwfPeer::GRP_UID, ContentPeer::CON_ID, Criteria::LEFT_JOIN);
|
||||
|
||||
@@ -6,11 +6,11 @@
|
||||
|
||||
require_once 'classes/model/om/BaseAppHistory.php';
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Skeleton subclass for representing a row from the 'APP_HISTORY' table.
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
* You should add additional methods to this class to meet the
|
||||
* application requirements. This class will only be generated as
|
||||
@@ -19,7 +19,7 @@ require_once 'classes/model/om/BaseAppHistory.php';
|
||||
* @package workflow.engine.classes.model
|
||||
*/
|
||||
class AppHistory extends BaseAppHistory {
|
||||
|
||||
|
||||
function insertHistory($aData){
|
||||
|
||||
$this->setAppUid($aData['APP_UID']);
|
||||
@@ -27,14 +27,14 @@ class AppHistory extends BaseAppHistory {
|
||||
$this->setProUid($aData['PRO_UID']);
|
||||
$this->setTasUid($aData['TAS_UID']);
|
||||
$this->setDynUid($aData['CURRENT_DYNAFORM']);
|
||||
$this->setUsrUid($aData['USER_UID']);
|
||||
$this->setUsrUid($aData['USER_UID']);
|
||||
$this->setAppStatus($aData['APP_STATUS']);
|
||||
$this->setHistoryDate($aData['APP_UPDATE_DATE']);
|
||||
$this->setHistoryData($aData['APP_DATA']);
|
||||
|
||||
|
||||
|
||||
|
||||
if ($this->validate() ) {
|
||||
$res = $this->save();
|
||||
$res = $this->save();
|
||||
}
|
||||
else {
|
||||
// Something went wrong. We can now get the validationFailures and handle them.
|
||||
@@ -46,21 +46,21 @@ class AppHistory extends BaseAppHistory {
|
||||
krumo($msg);
|
||||
//return array ( 'codError' => -100, 'rowsAffected' => 0, 'message' => $msg );
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
function getDynaformHistory($PRO_UID,$TAS_UID,$APP_UID,$DYN_UID=""){
|
||||
G::LoadClass('case');
|
||||
$oCase = new Cases();
|
||||
|
||||
|
||||
$oCase->verifyTable();
|
||||
|
||||
|
||||
$aObjectPermissions = $oCase->getAllObjects($PRO_UID, $APP_UID, $TAS_UID, $_SESSION['USER_LOGGED']);
|
||||
|
||||
|
||||
if (!is_array($aObjectPermissions)) {
|
||||
$aObjectPermissions = array('DYNAFORMS' => array(-1), 'INPUT_DOCUMENTS' => array(-1), 'OUTPUT_DOCUMENTS' => array(-1));
|
||||
}
|
||||
@@ -88,13 +88,13 @@ class AppHistory extends BaseAppHistory {
|
||||
$aObjectPermissions['OUTPUT_DOCUMENTS'] = array(-1);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
$c = new Criteria('workflow');
|
||||
$c->addSelectColumn(AppHistoryPeer::APP_UID);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
$c = new Criteria('workflow');
|
||||
$c->addSelectColumn(AppHistoryPeer::APP_UID);
|
||||
$c->addSelectColumn(AppHistoryPeer::DEL_INDEX);
|
||||
$c->addSelectColumn(AppHistoryPeer::PRO_UID);
|
||||
$c->addSelectColumn(AppHistoryPeer::TAS_UID);
|
||||
@@ -104,37 +104,36 @@ class AppHistory extends BaseAppHistory {
|
||||
$c->addSelectColumn(AppHistoryPeer::HISTORY_DATE);
|
||||
$c->addSelectColumn(AppHistoryPeer::HISTORY_DATA);
|
||||
$c->addSelectColumn(UsersPeer::USR_FIRSTNAME);
|
||||
$c->addSelectColumn(UsersPeer::USR_LASTNAME);
|
||||
$c->addSelectColumn(UsersPeer::USR_LASTNAME);
|
||||
$c->addAsColumn('USR_NAME', "CONCAT(USR_LASTNAME, ' ', USR_FIRSTNAME)");
|
||||
$c->addJoin(AppHistoryPeer::USR_UID, UsersPeer::USR_UID, Criteria::LEFT_JOIN);
|
||||
|
||||
|
||||
|
||||
|
||||
//WHERE
|
||||
$c->add(AppHistoryPeer::DYN_UID, $aObjectPermissions['DYNAFORMS'], Criteria::IN);
|
||||
$c->add(AppHistoryPeer::PRO_UID, $PRO_UID);
|
||||
$c->add(AppHistoryPeer::TAS_UID, $TAS_UID);
|
||||
$c->add(AppHistoryPeer::APP_UID, $APP_UID);
|
||||
if((isset($DYN_UID))&&($DYN_UID!="")){
|
||||
$c->add(AppHistoryPeer::DYN_UID, $DYN_UID);
|
||||
}
|
||||
|
||||
|
||||
//ORDER BY
|
||||
$c->clearOrderByColumns();
|
||||
$c->addDescendingOrderByColumn(AppHistoryPeer::HISTORY_DATE);
|
||||
|
||||
|
||||
|
||||
|
||||
//Execute
|
||||
$oDataset = AppHistoryPeer::doSelectRS($c);
|
||||
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||
$oDataset->next();
|
||||
|
||||
|
||||
$aDynHistory = array();
|
||||
$aDynHistory[] = array(
|
||||
'DYN_TITLE' => 'char'
|
||||
);
|
||||
|
||||
|
||||
while ($aRow = $oDataset->getRow()) {
|
||||
|
||||
|
||||
$o = new Dynaform();
|
||||
$o->setDynUid($aRow['DYN_UID']);
|
||||
$aRow['DYN_TITLE'] = $o->getDynTitle();
|
||||
@@ -149,12 +148,12 @@ class AppHistory extends BaseAppHistory {
|
||||
$html.="<td>$value</td>";
|
||||
$html.="</tr>";
|
||||
}
|
||||
if(is_array($value)){
|
||||
if(is_array($value)){
|
||||
$html.="<tr>";
|
||||
$html.="<td><b>$key (grid):</b> </td>";
|
||||
$html.="<td><b>$key (grid):</b> </td>";
|
||||
$html.="<td>";
|
||||
$html.="<table>";
|
||||
foreach($value as $key1 =>$value1){
|
||||
foreach($value as $key1 =>$value1){
|
||||
$html.="<tr>";
|
||||
$html.="<td><b>$key1</b></td>";
|
||||
$html.="<td>";
|
||||
@@ -171,24 +170,24 @@ class AppHistory extends BaseAppHistory {
|
||||
}
|
||||
$html.="</td>";
|
||||
$html.="</tr>";
|
||||
|
||||
|
||||
}
|
||||
$html.="</table>";
|
||||
$html.="</td>";
|
||||
$html.="</tr>";
|
||||
$html.="</tr>";
|
||||
$html.="</td>";
|
||||
}
|
||||
}
|
||||
}
|
||||
$html.="</table>";
|
||||
|
||||
|
||||
$aRow['FIELDS'] = $html;
|
||||
|
||||
|
||||
if($sw_add){
|
||||
$aDynHistory[] = $aRow;
|
||||
}
|
||||
}
|
||||
$oDataset->next();
|
||||
}
|
||||
|
||||
|
||||
global $_DBArray;
|
||||
$_DBArray['DynaformsHistory'] = $aDynHistory;
|
||||
$_SESSION['_DBArray'] = $_DBArray;
|
||||
@@ -197,7 +196,7 @@ class AppHistory extends BaseAppHistory {
|
||||
$oCriteria->setDBArrayTable('DynaformsHistory');
|
||||
$oCriteria->addDescendingOrderByColumn(AppHistoryPeer::HISTORY_DATE);
|
||||
return $oCriteria;
|
||||
|
||||
|
||||
}
|
||||
|
||||
} // AppHistory
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
<?php
|
||||
/**
|
||||
* cases_ShowDocument.php
|
||||
*
|
||||
*
|
||||
* ProcessMaker Open Source Edition
|
||||
* Copyright (C) 2004 - 2008 Colosa Inc.23
|
||||
*
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
@@ -14,34 +14,41 @@
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
||||
*
|
||||
* 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 <davidsantos@colosa.com>
|
||||
*/
|
||||
if (!isset($_SESSION['PROCESS']))
|
||||
{
|
||||
G::header('location: login');
|
||||
}
|
||||
|
||||
require_once ( "classes/model/AppDocumentPeer.php" );
|
||||
|
||||
$oAppDocument = new AppDocument();
|
||||
$oAppDocument->Fields = $oAppDocument->load($_GET['a']);
|
||||
if (!isset($_SESSION['PROCESS'])) {
|
||||
G::header('location: login');
|
||||
}
|
||||
|
||||
$sAppDocUid = $oAppDocument->getAppDocUid();
|
||||
$info = pathinfo( $oAppDocument->getAppDocFilename() );
|
||||
$ext = $info['extension'];
|
||||
require_once 'classes/model/AppDocumentPeer.php';
|
||||
|
||||
$realPath = PATH_DOCUMENT . $_SESSION['APPLICATION'] . '/' . $sAppDocUid . '.' . $ext ;
|
||||
G::streamFile ( $realPath, true, $oAppDocument->Fields['APP_DOC_FILENAME'] );
|
||||
$oAppDocument = new AppDocument();
|
||||
$oAppDocument->Fields = $oAppDocument->load($_GET['a']);
|
||||
|
||||
?>
|
||||
$sAppDocUid = $oAppDocument->getAppDocUid();
|
||||
$info = pathinfo($oAppDocument->getAppDocFilename());
|
||||
$iDocVersion = $oAppDocument->getDocVersion();
|
||||
$ext = $info['extension'];
|
||||
|
||||
$realPath = PATH_DOCUMENT . $oAppDocument->Fields['APP_UID'] . '/' . $sAppDocUid .'_'.$iDocVersion . '.' . $ext;
|
||||
if (!file_exists($realPath)) {
|
||||
$realPath = PATH_DOCUMENT . $oAppDocument->Fields['APP_UID'] . '/' . $sAppDocUid . '.' . $ext;
|
||||
}
|
||||
if (!file_exists($realPath)) {
|
||||
G::streamFile($realPath, true, $oAppDocument->Fields['APP_DOC_FILENAME']);
|
||||
}
|
||||
else {
|
||||
die("'" . $oAppDocument->Fields['APP_DOC_FILENAME'] . "' " . G::LoadTranslation('ID_ERROR_STREAMING_FILE'));
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
<!--
|
||||
<!--
|
||||
<table width="30%" style="margin:0px;" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td >
|
||||
@@ -55,17 +55,17 @@
|
||||
<tr>
|
||||
<td class="userGroupTitle">
|
||||
<table width="100%" style="margin:0px;" cellspacing="0" cellpadding="0">
|
||||
<!--
|
||||
<!--
|
||||
<tr class="userGroupTitle" style="font-weight:normal;">
|
||||
<td>{dynaform}</td><td>{date}</td><td>{user}</td><td>{changes}</td><td></td>
|
||||
</tr>
|
||||
</tr>
|
||||
-->
|
||||
<tr class="userGroupTitle">
|
||||
<td width="30%">{dynTitle}</td>
|
||||
<td width="20%">{dynDate}</td>
|
||||
<td width="20%">{dynUser}</td>
|
||||
<td width="20%"><div class="userGroupLink"><a href="javascript:toggleTable('{tablename}');">{dynChanges}</a></div></td>
|
||||
<td width="10%"><div class="userGroupLink"><a href="javascript:showDynaformHistory('{dynUID}', '{tablename}', '{dynDate}');">{viewForm}</a></div></td>
|
||||
<td width="10%"><div class="userGroupLink"><a href="javascript:showDynaformHistory('{dynUID}', '{tablename}', '{dynDate}', '{dynTitle}');">{viewForm}</a></div></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
@@ -77,8 +77,8 @@
|
||||
<div class="b"></div>
|
||||
<div class="c"></div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<table width="100%" border="0" cellspacing="0" class='content' style='display:none' id="{tablename}" name="{tablename}">
|
||||
<tr><td>
|
||||
@@ -101,11 +101,11 @@
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="boxBottom">
|
||||
|
||||
<div class="boxBottom">
|
||||
<div class="a"></div>
|
||||
<div class="b"></div>
|
||||
<div class="c"></div>
|
||||
<div class="c"></div>
|
||||
</div>
|
||||
|
||||
</td>
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
<?php
|
||||
/**
|
||||
* cases_DynaformHistory.php
|
||||
*
|
||||
*
|
||||
* ProcessMaker Open Source Edition
|
||||
* Copyright (C) 2004 - 2008 Colosa Inc.23
|
||||
*
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
@@ -14,13 +14,13 @@
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
||||
*
|
||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
$tpl = new TemplatePower( PATH_TPL . 'cases/cases_DynaformHistory.html' );
|
||||
@@ -34,7 +34,7 @@ $Fields = $oCase->loadCase($_SESSION['APPLICATION']);
|
||||
$historyData=array();
|
||||
$historyDataAux=array();
|
||||
require_once 'classes/model/AppHistory.php';
|
||||
$appHistory = new AppHistory();
|
||||
$appHistory = new AppHistory();
|
||||
$c=$appHistory->getDynaformHistory($_REQUEST['PRO_UID'],$_REQUEST['TAS_UID'],$_REQUEST['APP_UID'],$_REQUEST['DYN_UID']);
|
||||
|
||||
$oDataset = ArrayBasePeer::doSelectRs ( $c);
|
||||
@@ -47,7 +47,7 @@ while ($aRow = $oDataset->getRow()) {
|
||||
|
||||
$changedValues=unserialize($aRow['HISTORY_DATA']);
|
||||
$tableName="_TCHANGE_".$changeCount;
|
||||
$historyDataAux[$tableName]=$changedValues;
|
||||
$historyDataAux[$tableName]=$changedValues;
|
||||
$oDataset->next();
|
||||
}
|
||||
|
||||
@@ -57,7 +57,7 @@ foreach($historyData as $key => $value){
|
||||
$tableName="_TCHANGE_".$changeCount;
|
||||
$changeCountA=$changeCount+1;
|
||||
$tableNameA="_TCHANGE_".$changeCountA;
|
||||
|
||||
|
||||
if(isset($historyData[$tableNameA])){
|
||||
//$historyData[$key]=array_merge($historyData[$tableNameA],$value);
|
||||
//Array merge recursive doesn't work. So here is an own procedure
|
||||
@@ -74,11 +74,11 @@ foreach($historyData as $key => $value){
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
$changeCount--;
|
||||
}
|
||||
|
||||
@@ -92,44 +92,44 @@ $changeCount=0;
|
||||
|
||||
while ($aRow = $oDataset->getRow()) {
|
||||
$changeCount++;
|
||||
|
||||
|
||||
|
||||
|
||||
$changedValues=unserialize($aRow['HISTORY_DATA']);
|
||||
|
||||
|
||||
$tpl->newBlock( "DYNLOG" );
|
||||
$tableName="_TCHANGE_".$changeCount;
|
||||
$changeCountA=$changeCount+1;
|
||||
$tableNameA="_TCHANGE_".$changeCountA;
|
||||
|
||||
$tpl->assign( "dynTitle" , $aRow['DYN_TITLE'] );
|
||||
|
||||
$tpl->assign( "dynTitle" , addslashes($aRow['DYN_TITLE']) );
|
||||
$tpl->assign( "dynDate" , $aRow['HISTORY_DATE'] );
|
||||
$tpl->assign( "dynUser" , $aRow['USR_NAME'] );
|
||||
$tpl->assign( "dynUser" , addslashes($aRow['USR_NAME']) );
|
||||
$tpl->assign( "changes" , G::LoadTranslation("ID_CHANGES") );
|
||||
$tpl->assign( "dynUID" , $aRow['DYN_UID'] );
|
||||
$tpl->assign( "tablename" , $tableName );
|
||||
|
||||
|
||||
|
||||
$tpl->assign( "viewForm" , G::LoadTranslation("ID_VIEW") );
|
||||
$tpl->assign( "dynaform" , G::LoadTranslation("ID_DYNAFORM") );
|
||||
$tpl->assign( "date" , G::LoadTranslation("ID_DATE") );
|
||||
$tpl->assign( "user" , G::LoadTranslation("ID_USER") );
|
||||
|
||||
|
||||
$tpl->assign( "fieldNameLabel" , G::LoadTranslation("ID_FIELD_NAME") );
|
||||
$tpl->assign( "previousValuesLabel" , G::LoadTranslation("ID_PREV_VALUES") );
|
||||
$tpl->assign( "currentValuesLabel" , G::LoadTranslation("ID_CURRENT_VALUES") );
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
$count=0;
|
||||
foreach($changedValues as $key =>$value){
|
||||
if(($value!=NULL)&&(!is_array($value))){
|
||||
|
||||
|
||||
$tpl->newBlock( "FIELDLOG" );
|
||||
$tpl->assign( "fieldName" , $key );
|
||||
$tpl->assign( "previous" , isset($historyData[$tableNameA][$key])?$historyData[$tableNameA][$key]:"" );
|
||||
$tpl->assign( "fieldName" , $key );
|
||||
$tpl->assign( "previous" , isset($historyData[$tableNameA][$key])?$historyData[$tableNameA][$key]:"" );
|
||||
$tpl->assign( "actual" , $value );
|
||||
$count++;
|
||||
$count++;
|
||||
}
|
||||
if(is_array($value)){
|
||||
foreach($value as $key1 =>$value1){
|
||||
@@ -144,13 +144,13 @@ while ($aRow = $oDataset->getRow()) {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
$tpl->gotoBlock( "DYNLOG" );
|
||||
|
||||
|
||||
$tpl->assign( "dynChanges" , G::LoadTranslation("ID_FIELDS_CHANGED_NUMBER")." (".$count.")" );
|
||||
$tpl->assign( "count" , $count+1 );
|
||||
|
||||
|
||||
$oDataset->next();
|
||||
|
||||
}
|
||||
@@ -161,7 +161,7 @@ if(!isset($changedValues)){
|
||||
|
||||
$_SESSION['HISTORY_DATA']=serialize($historyData);
|
||||
$tpl->gotoBlock( "_ROOT" );
|
||||
|
||||
|
||||
$tpl->printToScreen();
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user