Changed references to deprecated file "cases_List"

This commit is contained in:
Julio Cesar Laura
2012-11-28 15:57:55 -04:00
parent f5f13d83a9
commit 4cdbd2668a
8 changed files with 10 additions and 189 deletions

View File

@@ -1530,7 +1530,7 @@ function PMFGenerateOutputDocument ($outputID, $sApplication = null, $index = nu
G::LoadClass( 'case' );
$oCase = new Cases();
$oCase->thisIsTheCurrentUser( $sApplication, $index, $sUserLogged, '', 'cases_List' );
$oCase->thisIsTheCurrentUser( $sApplication, $index, $sUserLogged, '', 'casesListExtJs' );
//require_once 'classes/model/OutputDocument.php';
$oOutputDocument = new OutputDocument();
@@ -2109,7 +2109,7 @@ function jumping ($caseId, $delIndex)
} catch (Exception $oException) {
G::SendTemporalMessage( 'ID_NOT_DERIVATED', 'error', 'labels' );
}
G::header( 'Location: cases_List' );
G::header( 'Location: casesListExtJs' );
}
/**

View File

@@ -31,7 +31,7 @@ G::LoadClass( 'case' );
//load the variables
$oCase = new Cases();
$oCase->thisIsTheCurrentUser( $_SESSION['APPLICATION'], $_SESSION['INDEX'], $_SESSION['USER_LOGGED'], 'REDIRECT', 'cases_List' );
$oCase->thisIsTheCurrentUser( $_SESSION['APPLICATION'], $_SESSION['INDEX'], $_SESSION['USER_LOGGED'], 'REDIRECT', 'casesListExtJs' );
$Fields = $oCase->loadCase( $_SESSION['APPLICATION'] );
$Fields['APP_DATA'] = array_merge( $Fields['APP_DATA'], G::getSystemConstants() );
$Fields['APP_DATA'] = array_merge( $Fields['APP_DATA'], (array) $_POST['form'] );

View File

@@ -45,7 +45,7 @@ G::LoadClass( 'case' );
$oAppDocument = new AppDocument();
$oAppDocument->remove( $_GET['DOC'] );
$oCase = new Cases();
$oCase->thisIsTheCurrentUser( $_SESSION['APPLICATION'], $_SESSION['INDEX'], $_SESSION['USER_LOGGED'], 'REDIRECT', 'cases_List' );
$oCase->thisIsTheCurrentUser( $_SESSION['APPLICATION'], $_SESSION['INDEX'], $_SESSION['USER_LOGGED'], 'REDIRECT', 'casesListExtJs' );
if ($_GET['TYPE'] == 'INPUT') {
$aNextStep = $oCase->getNextStep( $_SESSION['PROCESS'], $_SESSION['APPLICATION'], $_SESSION['INDEX'], $_SESSION['STEP_POSITION'] - 1 );
}

View File

@@ -53,7 +53,7 @@ try {
//load data
$oCase = new Cases();
//warning: we are not using the result value of function thisIsTheCurrentUser, so I'm commenting to optimize speed.
//$oCase->thisIsTheCurrentUser( $_SESSION['APPLICATION'], $_SESSION['INDEX'], $_SESSION['USER_LOGGED'], 'REDIRECT', 'cases_List');
//$oCase->thisIsTheCurrentUser( $_SESSION['APPLICATION'], $_SESSION['INDEX'], $_SESSION['USER_LOGGED'], 'REDIRECT', 'casesListExtJs');
$appFields = $oCase->loadCase( $_SESSION['APPLICATION'] );
$appFields['APP_DATA'] = array_merge( $appFields['APP_DATA'], G::getSystemConstants() );
//cleaning debug variables

View File

@@ -1,182 +1,3 @@
<?php
/**
* cases_List.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
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* 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.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*/
/**
* Cases list (Refactored)
* By Erik A.
* O. <erik@colosa.com, aortiz.erik@gmail.com>
*/
/* Permissions */
if (($RBAC_Response = $RBAC->userCanAccess( "PM_CASES" )) != 1) {
return $RBAC_Response;
}
/* Includes */
G::LoadClass( 'case' );
G::LoadClass( 'configuration' );
// $_GET['l'] has the type of cases list like todo,pause,cancel, all
$conf = new Configurations();
if (! isset( $_GET['l'] )) {
$confCasesList = $conf->loadObject( 'ProcessMaker', 'cases_List', '', $_SESSION['USER_LOGGED'], '' );
if (is_array( $confCasesList )) {
$sTypeList = $confCasesList['sTypeList'];
} else {
$sTypeList = 'to_do';
}
} else {
$sTypeList = $_GET['l'];
$confCasesList = array ('sTypeList' => $sTypeList
);
$conf->saveObject( $confCasesList, 'ProcessMaker', 'cases_List', '', $_SESSION['USER_LOGGED'], '' );
}
$sUIDUserLogged = $_SESSION['USER_LOGGED'];
$_SESSION['CASES_MENU_OPTION'] = $sTypeList;
$oCases = new Cases();
/**
* here we verify if there is a any case with a unpause on this day
*/
if ($sTypeList === 'to_do' or $sTypeList === 'draft' or $sTypeList === 'paused') {
$oCases->ThrowUnpauseDaemon( date( 'Y-m-d' ) );
}
/* *
* Prepare the addtional filters before to show
* By Erik
*/
$aAdditionalFilter = Array ();
if (isset( $_GET['PROCESS_UID'] ) and $_GET['PROCESS_UID'] != "0" && $_GET['PROCESS_UID'] != "") {
$PRO_UID = $_GET['PROCESS_UID'];
$aAdditionalFilter['PRO_UID'] = $PRO_UID;
} else {
$PRO_UID = "0";
}
if (isset( $_GET['READ'] ) and $_GET['READ'] == "1") {
$aAdditionalFilter['READ'] = $_GET['READ'];
}
if (isset( $_GET['UNREAD'] ) and $_GET['UNREAD'] == "1") {
$aAdditionalFilter['UNREAD'] = $_GET['UNREAD'];
}
if (isset( $_GET['APP_STATUS_FILTER'] ) and $_GET['APP_STATUS_FILTER'] != "ALL") {
$aAdditionalFilter['APP_STATUS_FILTER'] = $_GET['APP_STATUS_FILTER'];
}
if (isset( $_GET['MINE'] ) and $_GET['MINE'] == "1") {
$aAdditionalFilter['MINE'] = $_GET['MINE'];
}
switch ($sTypeList) {
case 'to_do':
if (defined( 'ENABLE_CASE_LIST_OPTIMIZATION' )) {
$aCriteria = $oCases->prepareCriteriaForToDo( $sUIDUserLogged );
$xmlfile = 'cases/cases_ListTodoNew';
} else {
list ($aCriteria, $xmlfile) = $oCases->getConditionCasesList( $sTypeList, $sUIDUserLogged, true, $aAdditionalFilter );
}
break;
default:
list ($aCriteria, $xmlfile) = $oCases->getConditionCasesList( $sTypeList, $sUIDUserLogged, true, $aAdditionalFilter );
}
/*
$rs = ApplicationPeer::doSelectRS($aCriteria);
$rs->setFetchmode(ResultSet::FETCHMODE_ASSOC);
$aRows1 = Array();
while($rs->next()) {
$aRows1[] = $rs->getRow();
}
g::pr($aRows1);die;*/
/* GET , POST & $_SESSION Vars */
if (! isset( $_GET['PROCESS_UID'] )) {
$oCase = new Cases();
$rs = ApplicationPeer::doSelectRS( $aCriteria );
$rs->setFetchmode( ResultSet::FETCHMODE_ASSOC );
$aProcess = Array ();
while ($rs->next()) {
$aRow = $rs->getRow();
//g::pr($aRow); die;
if (! InAssocArray( $aRow, 'PRO_UID', $aRow['PRO_UID'] )) {
array_push( $aProcess, Array ('PRO_UID' => $aRow['PRO_UID'],'PRO_TITLE' => $aRow['APP_PRO_TITLE'] ) );
}
}
$_DBArray['_PROCESSES'] = array_merge( Array (Array ('PRO_UID' => 'char','PRO_TITLE' => 'char' ) ), $aProcess );
$_SESSION['_DBArray'] = $_DBArray;
} else {
$_DBArray = $_SESSION['_DBArray'];
}
/* Render page */
$G_PUBLISH = new Publisher();
$G_PUBLISH->ROWS_PER_PAGE = 12;
if ($sTypeList == 'to_reassign') {
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'cases/cases_ReassignBy', '', array ('REASSIGN_BY' => 1 ) );
}
$aData = Array ('PROCESS_FILTER' => $PRO_UID,'APP_STATUS_FILTER' => (isset( $_GET['APP_STATUS_FILTER'] ) ? $_GET['APP_STATUS_FILTER'] : '0')
);
$G_PUBLISH->AddContent( 'propeltable', 'paged-table', $xmlfile, $aCriteria, $aData );
G::RenderPage( 'publish', 'blank' );
function InAssocArray ($a, $k, $v)
{
foreach ($a as $item) {
if (isset( $item[$k] ) && $v == $item[$k]) {
return true;
}
}
return false;
}
?>
<script>
try{
oPropelTable = document.getElementById('publisherContent[0]');
oTable = oPropelTable.getElementsByTagName('table');
oTable[0].style.width = '98%';
oTable[1].style.width = '98%';
parent.outerLayout.hide('east');
parent.PANEL_EAST_OPEN = false;
if(parent.refreshCountFolders) parent.refreshCountFolders();
}catch(e){}
</script>
<?php
G::header('Location: ../cases/casesListExtJs');
die();

View File

@@ -39,7 +39,7 @@ try {
//Load the variables
$oCase = new Cases();
$oCase->thisIsTheCurrentUser( $_SESSION["APPLICATION"], $_SESSION["INDEX"], $_SESSION["USER_LOGGED"], "REDIRECT", "cases_List" );
$oCase->thisIsTheCurrentUser( $_SESSION["APPLICATION"], $_SESSION["INDEX"], $_SESSION["USER_LOGGED"], "REDIRECT", "casesListExtJs" );
$Fields = $oCase->loadCase( $_SESSION["APPLICATION"] );
$Fields["APP_DATA"] = array_merge( $Fields["APP_DATA"], G::getSystemConstants() );

View File

@@ -69,7 +69,7 @@ $appDocComment = (isset($_POST["form"]["APP_DOC_COMMENT"]))? $_POST["form"]["APP
$actionType = $_POST["form"]["actionType"];
$case = new Cases();
$case->thisIsTheCurrentUser($_SESSION["APPLICATION"], $_SESSION["INDEX"], $_SESSION["USER_LOGGED"], "REDIRECT", "cases_List");
$case->thisIsTheCurrentUser($_SESSION["APPLICATION"], $_SESSION["INDEX"], $_SESSION["USER_LOGGED"], "REDIRECT", "casesListExtJs");
//Load the fields
$arrayField = $case->loadCase($_SESSION["APPLICATION"]);

View File

@@ -160,7 +160,7 @@ if (isset( $_GET['breakpoint'] )) {
#end trigger debug session.......
//$oCase->thisIsTheCurrentUser($_SESSION['APPLICATION'], $_SESSION['INDEX'], $_SESSION['USER_LOGGED'], 'REDIRECT', 'cases_List');
//$oCase->thisIsTheCurrentUser($_SESSION['APPLICATION'], $_SESSION['INDEX'], $_SESSION['USER_LOGGED'], 'REDIRECT', 'casesListExtJs');
//Save data - Start