CODE STYLE class/model/ files

This commit is contained in:
Fernando Ontiveros
2012-10-20 16:52:15 -04:00
parent ad53bd8a50
commit 319f755d18
52 changed files with 2559 additions and 2617 deletions

View File

@@ -297,7 +297,7 @@ class InputDocument extends BaseInputDocument
* @param string $sUid the uid of the Prolication
*/
function InputExists ($sUid)
public function InputExists ($sUid)
{
$con = Propel::getConnection( InputDocumentPeer::DATABASE_NAME );
try {

View File

@@ -2,10 +2,10 @@
/**
* InputDocumentPeer.php
* @package workflow.engine.classes.model
*
*
* ProcessMaker Open Source Edition
* Copyright (C) 2004 - 2011 Colosa Inc.
*
*
* 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
@@ -15,13 +15,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.
*
*
*/
// include base peer class
@@ -34,7 +34,7 @@
/**
* Skeleton subclass for performing query and update operations on the 'INPUT_DOCUMENT' table.
*
*
*
*
* You should add additional methods to this class to meet the
* application requirements. This class will only be generated as
@@ -42,6 +42,7 @@
*
* @package workflow.engine.classes.model
*/
class InputDocumentPeer extends BaseInputDocumentPeer {
class InputDocumentPeer extends BaseInputDocumentPeer
{
}
} // InputDocumentPeer

View File

@@ -2,10 +2,10 @@
/**
* IsoCountry.php
* @package workflow.engine.classes.model
*
*
* ProcessMaker Open Source Edition
* Copyright (C) 2004 - 2011 Colosa Inc.
*
*
* 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
@@ -15,13 +15,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.
*
*
*/
require_once 'classes/model/om/BaseIsoCountry.php';
@@ -30,7 +30,7 @@ require_once 'classes/model/om/BaseIsoCountry.php';
/**
* Skeleton subclass for representing a row from the 'ISO_COUNTRY' table.
*
*
*
*
* You should add additional methods to this class to meet the
* application requirements. This class will only be generated as
@@ -38,26 +38,30 @@ require_once 'classes/model/om/BaseIsoCountry.php';
*
* @package workflow.engine.classes.model
*/
class IsoCountry extends BaseIsoCountry {
function findById($UID){
$oCriteria = new Criteria('workflow');
$oCriteria->addSelectColumn(IsoCountryPeer::IC_UID);
$oCriteria->addSelectColumn(IsoCountryPeer::IC_NAME);
$oCriteria->add(IsoCountryPeer::IC_UID, $UID);
$oDataset = IsoCountryPeer::doSelectRS($oCriteria);
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
$oDataset->next();
return $oDataset->getRow();
}
class IsoCountry extends BaseIsoCountry
{
public function findById($UID)
{
$oCriteria = new Criteria('workflow');
$oCriteria->addSelectColumn(IsoCountryPeer::IC_UID);
$oCriteria->addSelectColumn(IsoCountryPeer::IC_NAME);
$oCriteria->add(IsoCountryPeer::IC_UID, $UID);
$oDataset = IsoCountryPeer::doSelectRS($oCriteria);
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
$oDataset->next();
return $oDataset->getRow();
}
public function findByIcName($IC_NAME)
{
$oCriteria = new Criteria('workflow');
$oCriteria->addSelectColumn(IsoCountryPeer::IC_UID);
$oCriteria->addSelectColumn(IsoCountryPeer::IC_NAME);
$oCriteria->add(IsoCountryPeer::IC_NAME, $IC_NAME);
$oDataset = IsoCountryPeer::doSelectRS($oCriteria);
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
$oDataset->next();
return $oDataset->getRow();
}
}
function findByIcName($IC_NAME){
$oCriteria = new Criteria('workflow');
$oCriteria->addSelectColumn(IsoCountryPeer::IC_UID);
$oCriteria->addSelectColumn(IsoCountryPeer::IC_NAME);
$oCriteria->add(IsoCountryPeer::IC_NAME, $IC_NAME);
$oDataset = IsoCountryPeer::doSelectRS($oCriteria);
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
$oDataset->next();
return $oDataset->getRow();
}
} // IsoCountry

View File

@@ -2,10 +2,10 @@
/**
* IsoCountryPeer.php
* @package workflow.engine.classes.model
*
*
* ProcessMaker Open Source Edition
* Copyright (C) 2004 - 2011 Colosa Inc.
*
*
* 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
@@ -15,13 +15,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.
*
*
*/
// include base peer class
@@ -34,7 +34,7 @@
/**
* Skeleton subclass for performing query and update operations on the 'ISO_COUNTRY' table.
*
*
*
*
* You should add additional methods to this class to meet the
* application requirements. This class will only be generated as
@@ -42,6 +42,7 @@
*
* @package workflow.engine.classes.model
*/
class IsoCountryPeer extends BaseIsoCountryPeer {
class IsoCountryPeer extends BaseIsoCountryPeer
{
}
} // IsoCountryPeer

View File

@@ -2,10 +2,10 @@
/**
* IsoLocation.php
* @package workflow.engine.classes.model
*
*
* ProcessMaker Open Source Edition
* Copyright (C) 2004 - 2011 Colosa Inc.
*
*
* 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
@@ -15,13 +15,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.
*
*
*/
require_once 'classes/model/om/BaseIsoLocation.php';
@@ -30,7 +30,7 @@ require_once 'classes/model/om/BaseIsoLocation.php';
/**
* Skeleton subclass for representing a row from the 'ISO_LOCATION' table.
*
*
*
*
* You should add additional methods to this class to meet the
* application requirements. This class will only be generated as
@@ -38,59 +38,58 @@ require_once 'classes/model/om/BaseIsoLocation.php';
*
* @package workflow.engine.classes.model
*/
class IsoLocation extends BaseIsoLocation {
function findById($IC_UID, $IS_UID, $IL_UID){
$oCriteria = new Criteria('workflow');
$oCriteria->addSelectColumn(IsoLocationPeer::IC_UID);
$oCriteria->addSelectColumn(IsoLocationPeer::IS_UID);
$oCriteria->addSelectColumn(IsoLocationPeer::IL_UID);
$oCriteria->addSelectColumn(IsoLocationPeer::IL_NAME);
$oCriteria->add(IsoLocationPeer::IC_UID, $IC_UID);
$oCriteria->add(IsoLocationPeer::IS_UID, $IS_UID);
$oCriteria->add(IsoLocationPeer::IL_UID, $IL_UID);
$oDataset = IsoLocationPeer::doSelectRS($oCriteria);
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
$oDataset->next();
return $oDataset->getRow();
}
function findByIcName($IL_NAME){
$oCriteria = new Criteria('workflow');
$oCriteria->addSelectColumn(IsoLocationPeer::IC_UID);
$oCriteria->addSelectColumn(IsoLocationPeer::IS_UID);
$oCriteria->addSelectColumn(IsoLocationPeer::IL_UID);
$oCriteria->addSelectColumn(IsoLocationPeer::IL_NAME);
$oCriteria->add(IsoLocationPeer::IL_NAME, $IL_NAME);
$oDataset = IsoLocationPeer::doSelectRS($oCriteria);
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
$oDataset->next();
return $oDataset->getRow();
}
function getAllRowsLike($word)
class IsoLocation extends BaseIsoLocation
{
public function findById($IC_UID, $IS_UID, $IL_UID)
{
try {
//require_once 'classes/model/IsoLocation.php';
$c = new Criteria('workflow');
$c->addSelectColumn(IsoLocationPeer::IC_UID);
$c->addSelectColumn(IsoLocationPeer::IL_NORMAL_NAME);
$c->add(IsoLocationPeer::IL_NORMAL_NAME, $word."%", Criteria::LIKE);
$rs = IsoLocationPeer::doSelectRS($c);
//$rs->setFetchmode(ResultSet::FETCHMODE_ASSOC);
$rows = Array();
while($rs->next()){
array_push($rows, $rs->getRow());
}
return $rows;
}
catch (Exception $oException) {
throw $oException;
}
$oCriteria = new Criteria('workflow');
$oCriteria->addSelectColumn(IsoLocationPeer::IC_UID);
$oCriteria->addSelectColumn(IsoLocationPeer::IS_UID);
$oCriteria->addSelectColumn(IsoLocationPeer::IL_UID);
$oCriteria->addSelectColumn(IsoLocationPeer::IL_NAME);
$oCriteria->add(IsoLocationPeer::IC_UID, $IC_UID);
$oCriteria->add(IsoLocationPeer::IS_UID, $IS_UID);
$oCriteria->add(IsoLocationPeer::IL_UID, $IL_UID);
$oDataset = IsoLocationPeer::doSelectRS($oCriteria);
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
$oDataset->next();
return $oDataset->getRow();
}
} // IsoLocation
public function findByIcName($IL_NAME)
{
$oCriteria = new Criteria('workflow');
$oCriteria->addSelectColumn(IsoLocationPeer::IC_UID);
$oCriteria->addSelectColumn(IsoLocationPeer::IS_UID);
$oCriteria->addSelectColumn(IsoLocationPeer::IL_UID);
$oCriteria->addSelectColumn(IsoLocationPeer::IL_NAME);
$oCriteria->add(IsoLocationPeer::IL_NAME, $IL_NAME);
$oDataset = IsoLocationPeer::doSelectRS($oCriteria);
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
$oDataset->next();
return $oDataset->getRow();
}
public function getAllRowsLike($word)
{
try {
$c = new Criteria('workflow');
$c->addSelectColumn(IsoLocationPeer::IC_UID);
$c->addSelectColumn(IsoLocationPeer::IL_NORMAL_NAME);
$c->add(IsoLocationPeer::IL_NORMAL_NAME, $word."%", Criteria::LIKE);
$rs = IsoLocationPeer::doSelectRS($c);
//$rs->setFetchmode(ResultSet::FETCHMODE_ASSOC);
$rows = Array();
while ($rs->next()) {
array_push($rows, $rs->getRow());
}
return $rows;
} catch (Exception $oException) {
throw $oException;
}
}
}

View File

@@ -2,10 +2,10 @@
/**
* IsoLocationPeer.php
* @package workflow.engine.classes.model
*
*
* ProcessMaker Open Source Edition
* Copyright (C) 2004 - 2011 Colosa Inc.
*
*
* 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
@@ -15,13 +15,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.
*
*
*/
// include base peer class
@@ -34,7 +34,7 @@
/**
* Skeleton subclass for performing query and update operations on the 'ISO_LOCATION' table.
*
*
*
*
* You should add additional methods to this class to meet the
* application requirements. This class will only be generated as
@@ -42,6 +42,7 @@
*
* @package workflow.engine.classes.model
*/
class IsoLocationPeer extends BaseIsoLocationPeer {
class IsoLocationPeer extends BaseIsoLocationPeer
{
}
} // IsoLocationPeer

View File

@@ -2,10 +2,10 @@
/**
* IsoSubdivision.php
* @package workflow.engine.classes.model
*
*
* ProcessMaker Open Source Edition
* Copyright (C) 2004 - 2011 Colosa Inc.
*
*
* 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
@@ -15,13 +15,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.
*
*
*/
require_once 'classes/model/om/BaseIsoSubdivision.php';
@@ -30,7 +30,7 @@ require_once 'classes/model/om/BaseIsoSubdivision.php';
/**
* Skeleton subclass for representing a row from the 'ISO_SUBDIVISION' table.
*
*
*
*
* You should add additional methods to this class to meet the
* application requirements. This class will only be generated as
@@ -38,29 +38,33 @@ require_once 'classes/model/om/BaseIsoSubdivision.php';
*
* @package workflow.engine.classes.model
*/
class IsoSubdivision extends BaseIsoSubdivision {
function findById($IC_UID, $IS_UID){
$oCriteria = new Criteria('workflow');
$oCriteria->addSelectColumn(IsoSubdivisionPeer::IC_UID);
$oCriteria->addSelectColumn(IsoSubdivisionPeer::IS_UID);
$oCriteria->addSelectColumn(IsoSubdivisionPeer::IS_NAME);
$oCriteria->add(IsoSubdivisionPeer::IC_UID, $IC_UID);
$oCriteria->add(IsoSubdivisionPeer::IS_UID, $IS_UID);
$oDataset = IsoSubdivisionPeer::doSelectRS($oCriteria);
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
$oDataset->next();
return $oDataset->getRow();
}
class IsoSubdivision extends BaseIsoSubdivision
{
public function findById($IC_UID, $IS_UID)
{
$oCriteria = new Criteria('workflow');
$oCriteria->addSelectColumn(IsoSubdivisionPeer::IC_UID);
$oCriteria->addSelectColumn(IsoSubdivisionPeer::IS_UID);
$oCriteria->addSelectColumn(IsoSubdivisionPeer::IS_NAME);
$oCriteria->add(IsoSubdivisionPeer::IC_UID, $IC_UID);
$oCriteria->add(IsoSubdivisionPeer::IS_UID, $IS_UID);
$oDataset = IsoSubdivisionPeer::doSelectRS($oCriteria);
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
$oDataset->next();
return $oDataset->getRow();
}
public function findByIcName($IS_NAME)
{
$oCriteria = new Criteria('workflow');
$oCriteria->addSelectColumn(IsoSubdivisionPeer::IC_UID);
$oCriteria->addSelectColumn(IsoSubdivisionPeer::IS_UID);
$oCriteria->addSelectColumn(IsoSubdivisionPeer::IS_NAME);
$oCriteria->add(IsoSubdivisionPeer::IS_NAME, $IS_UID);
$oDataset = IsoSubdivisionPeer::doSelectRS($oCriteria);
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
$oDataset->next();
return $oDataset->getRow();
}
}
function findByIcName($IS_NAME){
$oCriteria = new Criteria('workflow');
$oCriteria->addSelectColumn(IsoSubdivisionPeer::IC_UID);
$oCriteria->addSelectColumn(IsoSubdivisionPeer::IS_UID);
$oCriteria->addSelectColumn(IsoSubdivisionPeer::IS_NAME);
$oCriteria->add(IsoSubdivisionPeer::IS_NAME, $IS_UID);
$oDataset = IsoSubdivisionPeer::doSelectRS($oCriteria);
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
$oDataset->next();
return $oDataset->getRow();
}
} // IsoSubdivision

View File

@@ -2,10 +2,10 @@
/**
* IsoSubdivisionPeer.php
* @package workflow.engine.classes.model
*
*
* ProcessMaker Open Source Edition
* Copyright (C) 2004 - 2011 Colosa Inc.
*
*
* 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
@@ -15,13 +15,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.
*
*
*/
// include base peer class
@@ -34,7 +34,7 @@
/**
* Skeleton subclass for performing query and update operations on the 'ISO_SUBDIVISION' table.
*
*
*
*
* You should add additional methods to this class to meet the
* application requirements. This class will only be generated as
@@ -42,6 +42,7 @@
*
* @package workflow.engine.classes.model
*/
class IsoSubdivisionPeer extends BaseIsoSubdivisionPeer {
class IsoSubdivisionPeer extends BaseIsoSubdivisionPeer
{
}
} // IsoSubdivisionPeer

View File

@@ -45,7 +45,7 @@ require_once 'classes/model/Translation.php';
class Language extends BaseLanguage
{
function load ($sLanUid)
public function load ($sLanUid)
{
try {
$oRow = LanguagePeer::retrieveByPK( $sLanUid );
@@ -62,7 +62,7 @@ class Language extends BaseLanguage
}
}
function update ($aFields)
public function update ($aFields)
{
$oConnection = Propel::getConnection( LanguagePeer::DATABASE_NAME );
try {
@@ -82,8 +82,9 @@ class Language extends BaseLanguage
throw ($e);
}
}
//SELECT LAN_ID, LAN_NAME FROM LANGUAGE WHERE LAN_ENABLED = '1' ORDER BY LAN_WEIGHT DESC
function getActiveLanguages ()
public function getActiveLanguages ()
{
$oCriteria = new Criteria( 'workflow' );
$oCriteria->addSelectColumn( LanguagePeer::LAN_ID );
@@ -103,7 +104,7 @@ class Language extends BaseLanguage
return $rows;
}
function findById ($LAN_ID)
public function findById ($LAN_ID)
{
$oCriteria = new Criteria( 'workflow' );
$oCriteria->addSelectColumn( LanguagePeer::LAN_NAME );
@@ -114,7 +115,7 @@ class Language extends BaseLanguage
return $oDataset->getRow();
}
function findByLanName ($LAN_NAME)
public function findByLanName ($LAN_NAME)
{
$oCriteria = new Criteria( 'workflow' );
$oCriteria->addSelectColumn( LanguagePeer::LAN_ID );
@@ -179,9 +180,7 @@ class Language extends BaseLanguage
$errorMsg = '';
while ($rowTranslation = $POFile->getTranslation()) {
$countItems ++;
if (! isset( $POFile->translatorComments[0] ) || ! isset( $POFile->translatorComments[1] ) || ! isset( $POFile->references[0] )) {
throw new Exception( 'The .po file doesn\'t have valid directives for Processmaker!' );
}
@@ -223,7 +222,6 @@ class Language extends BaseLanguage
}
} // is a Xml update
elseif ($updateXml) {
$xmlForm = $context;
//erik: expresion to prevent and hable correctly dropdown values like -1, -2 etc.
preg_match( '/^([\w_]+)\s-\s([\w_]+)\s*-*\s*([\w\W]*)$/', $reference, $match );
@@ -287,17 +285,11 @@ class Language extends BaseLanguage
}
//export
function export ()
public function export ()
{
//G::LoadThirdParty('pear', 'Benchmark/Timer');
G::LoadSystem( 'i18n_po' );
G::LoadClass( "system" );
//echo G::getMemoryUsage();
//$timer = new Benchmark_Timer();
//$timer->start();
//creating the .po file
$sPOFile = PATH_CORE . 'content' . PATH_SEP . 'translations' . PATH_SEP . MAIN_POFILE . '.' . $_GET['LOCALE'] . '.po';
@@ -347,10 +339,6 @@ class Language extends BaseLanguage
$poFile->addHeader( 'X-Poedit-SourceCharset', 'utf-8' );
$poFile->addHeader( 'Content-Transfer-Encoding', '8bit' );
//$timer->setMarker('end making po headers');
//export translation
$aLabels = array ();
$aMsgids = array ('' => true
);
@@ -429,9 +417,6 @@ class Language extends BaseLanguage
//now find labels in xmlforms
/**
* *********
*/
$aExceptionFields = array ('','javascript','hidden','phpvariable','private','toolbar','xmlmenu','toolbutton','cellmark','grid','CheckboxTable'
);
@@ -545,26 +530,12 @@ class Language extends BaseLanguage
}
}
} //end foreach
}
//
//$timer->setMarker('end xml files processed');
//$profiling = $timer->getProfiling();
//$timer->stop(); $timer->display();
//echo G::getMemoryUsage();
//die;
//g::pr($profiling);
G::streamFile( $sPOFile, true );
}
}
// Language
function getMatchDropdownOptionValue ($name, $options)
{
foreach ($options as $option) {

View File

@@ -2,10 +2,10 @@
/**
* LanguagePeer.php
* @package workflow.engine.classes.model
*
*
* ProcessMaker Open Source Edition
* Copyright (C) 2004 - 2011 Colosa Inc.
*
*
* 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
@@ -15,13 +15,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.
*
*
*/
// include base peer class
@@ -34,7 +34,7 @@
/**
* Skeleton subclass for performing query and update operations on the 'LANGUAGE' table.
*
*
*
*
* You should add additional methods to this class to meet the
* application requirements. This class will only be generated as
@@ -42,6 +42,7 @@
*
* @package workflow.engine.classes.model
*/
class LanguagePeer extends BaseLanguagePeer {
class LanguagePeer extends BaseLanguagePeer
{
}
} // LanguagePeer

View File

@@ -2,10 +2,10 @@
/**
* Lexico.php
* @package workflow.engine.classes.model
*
*
* ProcessMaker Open Source Edition
* Copyright (C) 2004 - 2011 Colosa Inc.
*
*
* 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
@@ -15,13 +15,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.
*
*
*/
require_once 'classes/model/om/BaseLexico.php';
@@ -30,7 +30,7 @@ require_once 'classes/model/om/BaseLexico.php';
/**
* Skeleton subclass for representing a row from the 'LEXICO' table.
*
*
*
*
* You should add additional methods to this class to meet the
* application requirements. This class will only be generated as
@@ -38,6 +38,7 @@ require_once 'classes/model/om/BaseLexico.php';
*
* @package workflow.engine.classes.model
*/
class Lexico extends BaseLexico {
class Lexico extends BaseLexico
{
}
} // Lexico

View File

@@ -2,10 +2,10 @@
/**
* LexicoPeer.php
* @package workflow.engine.classes.model
*
*
* ProcessMaker Open Source Edition
* Copyright (C) 2004 - 2011 Colosa Inc.
*
*
* 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
@@ -15,13 +15,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.
*
*
*/
// include base peer class
@@ -34,7 +34,7 @@
/**
* Skeleton subclass for performing query and update operations on the 'LEXICO' table.
*
*
*
*
* You should add additional methods to this class to meet the
* application requirements. This class will only be generated as
@@ -42,6 +42,7 @@
*
* @package workflow.engine.classes.model
*/
class LexicoPeer extends BaseLexicoPeer {
class LexicoPeer extends BaseLexicoPeer
{
}
} // LexicoPeer

View File

@@ -10,7 +10,7 @@ require_once 'classes/model/om/BaseLogCasesScheduler.php';
/**
* Skeleton subclass for representing a row from the 'LOG_CASES_SCHEDULER' table.
*
*
*
*
* You should add additional methods to this class to meet the
* application requirements. This class will only be generated as
@@ -18,8 +18,10 @@ require_once 'classes/model/om/BaseLogCasesScheduler.php';
*
* @package workflow.engine.classes.model
*/
class LogCasesScheduler extends BaseLogCasesScheduler {
function getAllCriteria() {
class LogCasesScheduler extends BaseLogCasesScheduler
{
public function getAllCriteria()
{
$c = new Criteria('workflow');
$c->clearSelectColumns();
$c->addSelectColumn(LogCasesSchedulerPeer::LOG_CASE_UID);
@@ -34,14 +36,15 @@ class LogCasesScheduler extends BaseLogCasesScheduler {
$c->addSelectColumn(LogCasesSchedulerPeer::WS_ROUTE_CASE_STATUS);
return $c;
}
function getAll(){
public function getAll()
{
$oCriteria = $this->getAllCriteria();
$oDataset = LogCasesSchedulerPeer::doSelectRS($oCriteria);
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
$oDataset->next();
$aRows = Array();
while( $aRow = $oDataset->getRow() ) {
while ($aRow = $oDataset->getRow() ) {
$aRows[] = $aRow;
$oDataset->next();
}
@@ -53,16 +56,19 @@ class LogCasesScheduler extends BaseLogCasesScheduler {
$aRows[$k] = array_merge($aRow, $aProcessRow, $aTaskRow);
}*/
return $aRows;
return $aRows;
}
function saveLogParameters($params){
if ( isset ( $params['LOG_CASE_UID'] ) && $params['LOG_CASE_UID']== '' )
public function saveLogParameters($params)
{
if ( isset ( $params['LOG_CASE_UID'] ) && $params['LOG_CASE_UID']== '' ) {
unset ( $params['LOG_CASE_UID'] );
if ( !isset ( $params['LOG_CASE_UID'] ) )
$params['LOG_CASE_UID'] = G::generateUniqueID();
$this->setLogCaseUid($params['LOG_CASE_UID']);
}
if ( !isset ( $params['LOG_CASE_UID'] ) ) {
$params['LOG_CASE_UID'] = G::generateUniqueID();
}
$this->setLogCaseUid($params['LOG_CASE_UID']);
$this->setProUid($params['PRO_UID']);
$this->setTasUid($params['TAS_UID']);
$this->setSchUid($params['SCH_UID']);
@@ -72,8 +78,6 @@ class LogCasesScheduler extends BaseLogCasesScheduler {
$this->setResult($params['RESULT']);
$this->setWsCreateCaseStatus($params['WS_CREATE_CASE_STATUS']);
$this->setWsRouteCaseStatus($params['WS_ROUTE_CASE_STATUS']);
}
}
} // LogCasesScheduler

View File

@@ -14,7 +14,7 @@
/**
* Skeleton subclass for performing query and update operations on the 'LOG_CASES_SCHEDULER' table.
*
*
*
*
* You should add additional methods to this class to meet the
* application requirements. This class will only be generated as
@@ -22,6 +22,7 @@
*
* @package workflow.engine.classes.model
*/
class LogCasesSchedulerPeer extends BaseLogCasesSchedulerPeer {
class LogCasesSchedulerPeer extends BaseLogCasesSchedulerPeer
{
}
} // LogCasesSchedulerPeer

View File

@@ -20,8 +20,7 @@ require_once 'classes/model/om/BaseLoginLog.php';
*/
class LoginLog extends BaseLoginLog
{
function create ($aData)
public function create ($aData)
{
$con = Propel::getConnection( LoginLogPeer::DATABASE_NAME );
try {
@@ -79,7 +78,7 @@ class LoginLog extends BaseLoginLog
}
}
function remove ($LogUid)
public function remove ($LogUid)
{
$con = Propel::getConnection( LoginLogPeer::DATABASE_NAME );
try {
@@ -95,7 +94,7 @@ class LoginLog extends BaseLoginLog
}
//Added by Qennix
function getLastLoginByUser ($sUID)
public function getLastLoginByUser ($sUID)
{
$c = new Criteria();
$c->addSelectColumn( LoginLogPeer::LOG_INIT_DATE );
@@ -110,7 +109,7 @@ class LoginLog extends BaseLoginLog
}
//Added by Qennix
function getLastLoginAllUsers ()
public function getLastLoginAllUsers ()
{
$c = new Criteria();
$c->addSelectColumn( LoginLogPeer::USR_UID );
@@ -126,5 +125,4 @@ class LoginLog extends BaseLoginLog
return $aRows;
}
}
// LoginLog

View File

@@ -14,7 +14,7 @@
/**
* Skeleton subclass for performing query and update operations on the 'LOGIN_LOG' table.
*
*
*
*
* You should add additional methods to this class to meet the
* application requirements. This class will only be generated as
@@ -22,6 +22,7 @@
*
* @package workflow.engine.classes.model
*/
class LoginLogPeer extends BaseLoginLogPeer {
class LoginLogPeer extends BaseLoginLogPeer
{
}
} // LoginLogPeer

View File

@@ -20,7 +20,6 @@ require_once 'classes/model/om/BaseObjectPermission.php';
*/
class ObjectPermission extends BaseObjectPermission
{
public function load ($UID)
{
try {
@@ -38,7 +37,7 @@ class ObjectPermission extends BaseObjectPermission
}
}
function create ($aData)
public function create ($aData)
{
try {
$this->fromArray( $aData, BasePeer::TYPE_FIELDNAME );
@@ -49,7 +48,7 @@ class ObjectPermission extends BaseObjectPermission
}
}
function Exists ($Uid)
public function Exists ($Uid)
{
try {
$oPro = ObjectPermissionPeer::retrieveByPk( $Uid );
@@ -63,7 +62,7 @@ class ObjectPermission extends BaseObjectPermission
}
}
function remove ($Uid)
public function remove ($Uid)
{
$con = Propel::getConnection( ObjectPermissionPeer::DATABASE_NAME );
try {
@@ -82,7 +81,7 @@ class ObjectPermission extends BaseObjectPermission
}
}
function update ($aFields)
public function update ($aFields)
{
$oConnection = Propel::getConnection( ObjectPermissionPeer::DATABASE_NAME );
try {
@@ -103,7 +102,7 @@ class ObjectPermission extends BaseObjectPermission
}
}
function removeByObject ($sType, $sObjUid)
public function removeByObject ($sType, $sObjUid)
{
try {
$oCriteria = new Criteria( 'workflow' );
@@ -115,7 +114,7 @@ class ObjectPermission extends BaseObjectPermission
}
}
function loadInfo ($sObjUID)
public function loadInfo ($sObjUID)
{
$oCriteria = new Criteria( 'workflow' );
@@ -127,5 +126,4 @@ class ObjectPermission extends BaseObjectPermission
return ($aRow);
}
}
// ObjectPermission

View File

@@ -14,7 +14,7 @@
/**
* Skeleton subclass for performing query and update operations on the 'OBJECT_PERMISSION' table.
*
*
*
*
* You should add additional methods to this class to meet the
* application requirements. This class will only be generated as
@@ -22,6 +22,7 @@
*
* @package workflow.engine.classes.model
*/
class ObjectPermissionPeer extends BaseObjectPermissionPeer {
class ObjectPermissionPeer extends BaseObjectPermissionPeer
{
}
} // ObjectPermissionPeer

View File

@@ -504,9 +504,9 @@ class OutputDocument extends BaseOutputDocument
$sPath,
$sFilename,
$sContent,
$sLandscape=false,
$sTypeDocToGener='BOTH',
$aProperties=array()
$sLandscape = false,
$sTypeDocToGener = 'BOTH',
$aProperties = array()
) {
if (($sUID != '') && is_array($aFields) && ($sPath != '')) {
$nrt = array("\n", "\r", "\t");
@@ -945,5 +945,4 @@ class OutputDocument extends BaseOutputDocument
}
}
}
// OutputDocument

View File

@@ -2,10 +2,10 @@
/**
* OutputDocumentPeer.php
* @package workflow.engine.classes.model
*
*
* ProcessMaker Open Source Edition
* Copyright (C) 2004 - 2011 Colosa Inc.
*
*
* 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
@@ -15,13 +15,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.
*
*
*/
// include base peer class
@@ -34,7 +34,7 @@
/**
* Skeleton subclass for performing query and update operations on the 'OUTPUT_DOCUMENT' table.
*
*
*
*
* You should add additional methods to this class to meet the
* application requirements. This class will only be generated as
@@ -42,6 +42,7 @@
*
* @package workflow.engine.classes.model
*/
class OutputDocumentPeer extends BaseOutputDocumentPeer {
class OutputDocumentPeer extends BaseOutputDocumentPeer
{
}
} // OutputDocumentPeer

View File

@@ -150,7 +150,7 @@ class Process extends BaseProcess
* @return void
*/
function create ($aData)
public function create ($aData)
{
if (! isset( $aData['USR_UID'] )) {
throw (new PropelException( 'The process cannot be created. The USR_UID is empty.' ));
@@ -212,7 +212,6 @@ class Process extends BaseProcess
}
throw (new PropelException( 'The row cannot be created!', new PropelException( $msg ) ));
}
} catch (Exception $e) {
$con->rollback();
throw ($e);
@@ -224,8 +223,7 @@ class Process extends BaseProcess
*
* @param string $sProUid the uid of the Prolication
*/
function processExists ($ProUid)
public function processExists ($ProUid)
{
$con = Propel::getConnection( ProcessPeer::DATABASE_NAME );
try {
@@ -246,10 +244,8 @@ class Process extends BaseProcess
* @param string $ProUid the uid of the Prolication
* @return array $Fields the fields
*/
function load ($ProUid, $getAllLang = false)
public function load ($ProUid, $getAllLang = false)
{
$con = Propel::getConnection( ProcessPeer::DATABASE_NAME );
try {
$oPro = ProcessPeer::retrieveByPk( $ProUid );
@@ -262,7 +258,6 @@ class Process extends BaseProcess
// $this->pro_title = $aFields['PRO_TITLE'];
// $this->pro_description = $aFields['PRO_DESCRIPTION'];
$lang = defined( 'SYS_LANG' ) ? SYS_LANG : 'en';
$c = new Criteria();
@@ -335,9 +330,8 @@ class Process extends BaseProcess
}
}
function getAll ()
public function getAll ()
{
$oCriteria = new Criteria( 'workflow' );
$oCriteria->addSelectColumn( ProcessPeer::PRO_UID );
@@ -403,7 +397,6 @@ class Process extends BaseProcess
* @return variant
*
*/
public function update ($aData)
{
if (isset( $aData['PRO_DYNAFORMS'] ) && is_array( $aData['PRO_DYNAFORMS'] )) {
@@ -453,7 +446,6 @@ class Process extends BaseProcess
* @return variant
*
*/
public function createRow ($aData)
{
$con = Propel::getConnection( ProcessPeer::DATABASE_NAME );
@@ -577,8 +569,7 @@ class Process extends BaseProcess
return $aRow['PROCESS'] ? true : false;
}
//new functions
function getAllProcessesCount ()
public function getAllProcessesCount ()
{
$c = $this->tmpCriteria;
$c->clearSelectColumns();
@@ -594,7 +585,7 @@ class Process extends BaseProcess
}
}
function getAllProcesses ($start, $limit, $category = null, $processName = null, $counters = true, $reviewSubProcess = false)
public function getAllProcesses ($start, $limit, $category = null, $processName = null, $counters = true, $reviewSubProcess = false)
{
require_once PATH_RBAC . "model/RbacUsers.php";
require_once "classes/model/ProcessCategory.php";
@@ -753,7 +744,7 @@ class Process extends BaseProcess
return $aProcesses;
}
function getCasesCountInAllProcesses ()
public function getCasesCountInAllProcesses ()
{
/*SELECT PRO_UID, APP_STATUS, COUNT( * )
FROM APPLICATION
@@ -783,7 +774,7 @@ class Process extends BaseProcess
return $aProcesses;
}
function getAllProcessesByCategory ()
public function getAllProcessesByCategory ()
{
$oCriteria = new Criteria( 'workflow' );
$oCriteria->addSelectColumn( ProcessPeer::PRO_CATEGORY );
@@ -799,7 +790,7 @@ class Process extends BaseProcess
return $aProc;
}
function getTriggerWebBotProcess ($proUid, $action)
public function getTriggerWebBotProcess ($proUid, $action)
{
require_once ("classes/model/Triggers.php");
@@ -856,12 +847,9 @@ class Process extends BaseProcess
}
}
}
//Process
function ordProcessByProTitle ($a, $b)
{
if ($a['PRO_TITLE'] > $b['PRO_TITLE']) {
return 1;
} elseif ($a['PRO_TITLE'] < $b['PRO_TITLE']) {

View File

@@ -6,11 +6,10 @@
require_once 'classes/model/om/BaseProcessCategory.php';
/**
* Skeleton subclass for representing a row from the 'PROCESS_CATEGORY' table.
*
*
*
*
* You should add additional methods to this class to meet the
* application requirements. This class will only be generated as
@@ -18,48 +17,42 @@ require_once 'classes/model/om/BaseProcessCategory.php';
*
* @package workflow.engine.classes.model
*/
class ProcessCategory extends BaseProcessCategory {
function getAll($type='criteria')
{
$c = new Criteria('workflow');
$c->addSelectColumn(ProcessCategoryPeer::CATEGORY_UID);
$c->addSelectColumn(ProcessCategoryPeer::CATEGORY_NAME);
$dataset = ProcessCategoryPeer::doSelectRS($c);
$dataset->setFetchmode ( ResultSet::FETCHMODE_ASSOC );
if( $type == 'array' ){
$result = Array();
while ( $dataset->next() ) {
$result[] = $dataset->getRow();
}
return $result;
}
else {
return $c;
class ProcessCategory extends BaseProcessCategory
{
public function getAll ($type = 'criteria')
{
$c = new Criteria('workflow');
$c->addSelectColumn(ProcessCategoryPeer::CATEGORY_UID);
$c->addSelectColumn(ProcessCategoryPeer::CATEGORY_NAME);
$dataset = ProcessCategoryPeer::doSelectRS($c);
$dataset->setFetchmode ( ResultSet::FETCHMODE_ASSOC );
if ($type == 'array') {
$result = Array();
while ( $dataset->next() ) {
$result[] = $dataset->getRow();
}
return $result;
} else {
return $c;
}
}
}
function loadByCategoryName($sCategoryName)
{
$c = new Criteria('workflow');
$del = DBAdapter::getStringDelimiter();
$c->clearSelectColumns();
$c->addSelectColumn( ProcessCategoryPeer::CATEGORY_UID );
$c->addSelectColumn( ProcessCategoryPeer::CATEGORY_NAME);
$c->add(ProcessCategoryPeer::CATEGORY_NAME, $sCategoryName);
$dataset = ProcessCategoryPeer::doSelectRS($c);
$dataset->setFetchmode ( ResultSet::FETCHMODE_ASSOC );
$dataset->next();
$aRow = $dataset->getRow();
return $aRow;
}
} // ProcessCategory
public function loadByCategoryName($sCategoryName)
{
$c = new Criteria('workflow');
$del = DBAdapter::getStringDelimiter();
$c->clearSelectColumns();
$c->addSelectColumn( ProcessCategoryPeer::CATEGORY_UID );
$c->addSelectColumn( ProcessCategoryPeer::CATEGORY_NAME);
$c->add(ProcessCategoryPeer::CATEGORY_NAME, $sCategoryName);
$dataset = ProcessCategoryPeer::doSelectRS($c);
$dataset->setFetchmode ( ResultSet::FETCHMODE_ASSOC );
$dataset->next();
$aRow = $dataset->getRow();
return $aRow;
}
}

View File

@@ -14,7 +14,7 @@
/**
* Skeleton subclass for performing query and update operations on the 'PROCESS_CATEGORY' table.
*
*
*
*
* You should add additional methods to this class to meet the
* application requirements. This class will only be generated as
@@ -22,6 +22,7 @@
*
* @package workflow.engine.classes.model
*/
class ProcessCategoryPeer extends BaseProcessCategoryPeer {
class ProcessCategoryPeer extends BaseProcessCategoryPeer
{
}
} // ProcessCategoryPeer

View File

@@ -2,10 +2,10 @@
/**
* ProcessOwner.php
* @package workflow.engine.classes.model
*
*
* ProcessMaker Open Source Edition
* Copyright (C) 2004 - 2011 Colosa Inc.
*
*
* 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
@@ -15,13 +15,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.
*
*
*/
require_once 'classes/model/om/BaseProcessOwner.php';
@@ -30,7 +30,7 @@ require_once 'classes/model/om/BaseProcessOwner.php';
/**
* Skeleton subclass for representing a row from the 'PROCESS_OWNER' table.
*
*
*
*
* You should add additional methods to this class to meet the
* application requirements. This class will only be generated as
@@ -38,6 +38,7 @@ require_once 'classes/model/om/BaseProcessOwner.php';
*
* @package workflow.engine.classes.model
*/
class ProcessOwner extends BaseProcessOwner {
class ProcessOwner extends BaseProcessOwner
{
}
} // ProcessOwner

View File

@@ -2,10 +2,10 @@
/**
* ProcessOwnerPeer.php
* @package workflow.engine.classes.model
*
*
* ProcessMaker Open Source Edition
* Copyright (C) 2004 - 2011 Colosa Inc.
*
*
* 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
@@ -15,13 +15,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.
*
*
*/
// include base peer class
@@ -34,7 +34,7 @@
/**
* Skeleton subclass for performing query and update operations on the 'PROCESS_OWNER' table.
*
*
*
*
* You should add additional methods to this class to meet the
* application requirements. This class will only be generated as
@@ -42,6 +42,7 @@
*
* @package workflow.engine.classes.model
*/
class ProcessOwnerPeer extends BaseProcessOwnerPeer {
class ProcessOwnerPeer extends BaseProcessOwnerPeer
{
}
} // ProcessOwnerPeer

View File

@@ -2,10 +2,10 @@
/**
* ProcessPeer.php
* @package workflow.engine.classes.model
*
*
* ProcessMaker Open Source Edition
* Copyright (C) 2004 - 2011 Colosa Inc.
*
*
* 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
@@ -15,13 +15,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.
*
*
*/
// include base peer class
@@ -34,7 +34,7 @@
/**
* Skeleton subclass for performing query and update operations on the 'PROCESS' table.
*
*
*
*
* You should add additional methods to this class to meet the
* application requirements. This class will only be generated as
@@ -42,6 +42,7 @@
*
* @package workflow.engine.classes.model
*/
class ProcessPeer extends BaseProcessPeer {
class ProcessPeer extends BaseProcessPeer
{
}
} // ProcessPeer

View File

@@ -18,83 +18,79 @@ require_once 'classes/model/om/BaseProcessUser.php';
*
* @package workflow.engine.classes.model
*/
class ProcessUser extends BaseProcessUser {
public function create($aData)
{
$oConnection = Propel::getConnection(ProcessUserPeer::DATABASE_NAME);
try {
$criteria = new Criteria('workflow');
$criteria->add(ProcessUserPeer::PU_UID, $aData['PU_UID'] );
$criteria->add(ProcessUserPeer::PRO_UID, $aData['PRO_UID'] );
$criteria->add(ProcessUserPeer::USR_UID, $aData['USR_UID'] );
$criteria->add(ProcessUserPeer::PU_TYPE, $aData['PU_TYPE'] );
$objects = ProcessUserPeer::doSelect($criteria, $oConnection);
$oConnection->begin();
foreach($objects as $row) {
$this->remove($row->getTasUid(), $row->getUsrUid(), $row->getTuType(), $row->getTuRelation() );
}
$oConnection->commit();
class ProcessUser extends BaseProcessUser
{
public function create($aData)
{
$oConnection = Propel::getConnection(ProcessUserPeer::DATABASE_NAME);
try {
$criteria = new Criteria('workflow');
$criteria->add(ProcessUserPeer::PU_UID, $aData['PU_UID'] );
$criteria->add(ProcessUserPeer::PRO_UID, $aData['PRO_UID'] );
$criteria->add(ProcessUserPeer::USR_UID, $aData['USR_UID'] );
$criteria->add(ProcessUserPeer::PU_TYPE, $aData['PU_TYPE'] );
$objects = ProcessUserPeer::doSelect($criteria, $oConnection);
$oConnection->begin();
foreach ($objects as $row) {
$this->remove($row->getTasUid(), $row->getUsrUid(), $row->getTuType(), $row->getTuRelation() );
}
$oConnection->commit();
$oProcessUser = new ProcessUser();
$oProcessUser->fromArray($aData, BasePeer::TYPE_FIELDNAME);
if ($oProcessUser->validate()) {
$oConnection->begin();
$iResult = $oProcessUser->save();
$oConnection->commit();
return $iResult;
}
else {
$sMessage = '';
$aValidationFailures = $oProcessUser->getValidationFailures();
foreach($aValidationFailures as $oValidationFailure) {
$sMessage .= $oValidationFailure->getMessage() . '<br />';
$oProcessUser = new ProcessUser();
$oProcessUser->fromArray($aData, BasePeer::TYPE_FIELDNAME);
if ($oProcessUser->validate()) {
$oConnection->begin();
$iResult = $oProcessUser->save();
$oConnection->commit();
return $iResult;
} else {
$sMessage = '';
$aValidationFailures = $oProcessUser->getValidationFailures();
foreach ($aValidationFailures as $oValidationFailure) {
$sMessage .= $oValidationFailure->getMessage() . '<br />';
}
throw(new Exception('The registry cannot be created!<br />'.$sMessage));
}
} catch (Exception $oError) {
$oConnection->rollback();
throw($oError);
}
throw(new Exception('The registry cannot be created!<br />'.$sMessage));
}
}
catch (Exception $oError) {
$oConnection->rollback();
throw($oError);
}
}
/**
* Remove the application document registry
* @param string $sPuUid
* @param string $sProUid
* @param string $sUserUid
* @return string
**/
public function remove($sPuUid)
{
$oConnection = Propel::getConnection(ProcessUserPeer::DATABASE_NAME);
try {
$oProcessUser = ProcessUserPeer::retrieveByPK($sPuUid);
if (!is_null($oProcessUser))
{
$oConnection->begin();
$iResult = $oProcessUser->delete();
$oConnection->commit();
return $iResult;
}
else {
throw(new Exception('This row doesn\'t exist!'));
}
/**
* Remove the application document registry
* @param string $sPuUid
* @param string $sProUid
* @param string $sUserUid
* @return string
**/
public function remove($sPuUid)
{
$oConnection = Propel::getConnection(ProcessUserPeer::DATABASE_NAME);
try {
$oProcessUser = ProcessUserPeer::retrieveByPK($sPuUid);
if (!is_null($oProcessUser)) {
$oConnection->begin();
$iResult = $oProcessUser->delete();
$oConnection->commit();
return $iResult;
} else {
throw(new Exception('This row doesn\'t exist!'));
}
} catch (Exception $oError) {
$oConnection->rollback();
throw($oError);
}
}
catch (Exception $oError) {
$oConnection->rollback();
throw($oError);
}
}
function Exists ( $sUid ) {
try {
$oObj = ProcessUserPeer::retrieveByPk($sUid);
return (is_object($oObj) && get_class($oObj) == 'ProcessUser');
public function Exists ($sUid)
{
try {
$oObj = ProcessUserPeer::retrieveByPk($sUid);
return (is_object($oObj) && get_class($oObj) == 'ProcessUser');
} catch (Exception $oError) {
throw($oError);
}
}
catch (Exception $oError) {
throw($oError);
}
}
} // ProcessUser
}

View File

@@ -14,7 +14,7 @@
/**
* Skeleton subclass for performing query and update operations on the 'PROCESS_USER' table.
*
*
*
*
* You should add additional methods to this class to meet the
* application requirements. This class will only be generated as
@@ -22,6 +22,7 @@
*
* @package workflow.engine.classes.model
*/
class ProcessUserPeer extends BaseProcessUserPeer {
class ProcessUserPeer extends BaseProcessUserPeer
{
}
} // ProcessUserPeer

File diff suppressed because it is too large Load Diff

View File

@@ -14,7 +14,7 @@
/**
* Skeleton subclass for performing query and update operations on the 'REPORT_TABLE' table.
*
*
*
*
* You should add additional methods to this class to meet the
* application requirements. This class will only be generated as
@@ -22,6 +22,7 @@
*
* @package workflow.engine.classes.model
*/
class ReportTablePeer extends BaseReportTablePeer {
class ReportTablePeer extends BaseReportTablePeer
{
}
} // ReportTablePeer

Some files were not shown because too many files have changed in this diff Show More