CODE STYLE some classes in classes/model
This commit is contained in:
@@ -775,5 +775,4 @@ class Task extends BaseTask
|
|||||||
return $event_uid;
|
return $event_uid;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//Task
|
|
||||||
|
|
||||||
|
|||||||
@@ -42,6 +42,7 @@
|
|||||||
*
|
*
|
||||||
* @package workflow.engine.classes.model
|
* @package workflow.engine.classes.model
|
||||||
*/
|
*/
|
||||||
class TaskPeer extends BaseTaskPeer {
|
class TaskPeer extends BaseTaskPeer
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
} // TaskPeer
|
|
||||||
|
|||||||
@@ -194,5 +194,4 @@ class TaskUser extends BaseTaskUser
|
|||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// TaskUser
|
|
||||||
|
|
||||||
|
|||||||
@@ -42,6 +42,7 @@
|
|||||||
*
|
*
|
||||||
* @package workflow.engine.classes.model
|
* @package workflow.engine.classes.model
|
||||||
*/
|
*/
|
||||||
class TaskUserPeer extends BaseTaskUserPeer {
|
class TaskUserPeer extends BaseTaskUserPeer
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
} // TaskUserPeer
|
|
||||||
|
|||||||
@@ -86,9 +86,19 @@ class Translation extends BaseTranslation
|
|||||||
}
|
}
|
||||||
// for date filter
|
// for date filter
|
||||||
if (($dateFrom) && ($dateTo)) {
|
if (($dateFrom) && ($dateTo)) {
|
||||||
$oCriteria->add( $oCriteria->getNewCriterion( TranslationPeer::TRN_UPDATE_DATE, "$dateFrom", Criteria::GREATER_EQUAL ) //LESS_EQUAL
|
$oCriteria->add(
|
||||||
->addAnd( $oCriteria->getNewCriterion( TranslationPeer::TRN_UPDATE_DATE, "$dateTo", Criteria::LESS_EQUAL ) //GREATER_EQUAL
|
$oCriteria->getNewCriterion(
|
||||||
) );
|
TranslationPeer::TRN_UPDATE_DATE,
|
||||||
|
"$dateFrom",
|
||||||
|
Criteria::GREATER_EQUAL
|
||||||
|
)->addAnd(
|
||||||
|
$oCriteria->getNewCriterion(
|
||||||
|
TranslationPeer::TRN_UPDATE_DATE,
|
||||||
|
"$dateTo",
|
||||||
|
Criteria::LESS_EQUAL
|
||||||
|
)
|
||||||
|
)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
// end filter
|
// end filter
|
||||||
$c = clone $oCriteria;
|
$c = clone $oCriteria;
|
||||||
@@ -125,7 +135,6 @@ class Translation extends BaseTranslation
|
|||||||
* @author Fernando Ontiveros <fernando@colosa.com>
|
* @author Fernando Ontiveros <fernando@colosa.com>
|
||||||
* @parameter $languageId (es|en|...).
|
* @parameter $languageId (es|en|...).
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public function generateFileTranslation ($languageId = '')
|
public function generateFileTranslation ($languageId = '')
|
||||||
{
|
{
|
||||||
$translation = Array ();
|
$translation = Array ();
|
||||||
@@ -357,13 +366,15 @@ class Translation extends BaseTranslation
|
|||||||
} elseif ($country == '.') {
|
} elseif ($country == '.') {
|
||||||
//this a trsnlation file with a language international, no country name was set
|
//this a trsnlation file with a language international, no country name was set
|
||||||
$LOCALE = $language['LAN_ID'];
|
$LOCALE = $language['LAN_ID'];
|
||||||
} else
|
} else {
|
||||||
throw new Exception( 'PO File Error: "' . $file . '" has a invalid country definition!' );
|
throw new Exception( 'PO File Error: "' . $file . '" has a invalid country definition!' );
|
||||||
} else
|
}
|
||||||
|
} else {
|
||||||
throw new Exception( 'PO File Error: "' . $file . '" has a invalid country definition!' );
|
throw new Exception( 'PO File Error: "' . $file . '" has a invalid country definition!' );
|
||||||
} else
|
}
|
||||||
|
} else {
|
||||||
throw new Exception( 'PO File Error: "' . $file . '" has a invalid language definition!' );
|
throw new Exception( 'PO File Error: "' . $file . '" has a invalid language definition!' );
|
||||||
|
}
|
||||||
$countItems = 0;
|
$countItems = 0;
|
||||||
try {
|
try {
|
||||||
while ($rowTranslation = $POFile->getTranslation()) {
|
while ($rowTranslation = $POFile->getTranslation()) {
|
||||||
@@ -451,5 +462,4 @@ class Translation extends BaseTranslation
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Translation
|
|
||||||
|
|
||||||
|
|||||||
@@ -42,6 +42,7 @@
|
|||||||
*
|
*
|
||||||
* @package workflow.engine.classes.model
|
* @package workflow.engine.classes.model
|
||||||
*/
|
*/
|
||||||
class TranslationPeer extends BaseTranslationPeer {
|
class TranslationPeer extends BaseTranslationPeer
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
} // TranslationPeer
|
|
||||||
|
|||||||
@@ -39,12 +39,14 @@ require_once 'classes/model/om/BaseTriggers.php';
|
|||||||
*
|
*
|
||||||
* @package workflow.engine.classes.model
|
* @package workflow.engine.classes.model
|
||||||
*/
|
*/
|
||||||
class Triggers extends BaseTriggers {
|
class Triggers extends BaseTriggers
|
||||||
|
{
|
||||||
/**
|
/**
|
||||||
* This value goes in the content table
|
* This value goes in the content table
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
protected $tri_title = '';
|
protected $tri_title = '';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the tri_title column value.
|
* Get the tri_title column value.
|
||||||
* @return string
|
* @return string
|
||||||
@@ -58,6 +60,7 @@ class Triggers extends BaseTriggers {
|
|||||||
$this->tri_title = Content::load ( 'TRI_TITLE', '', $this->getTriUid(), $lang );
|
$this->tri_title = Content::load ( 'TRI_TITLE', '', $this->getTriUid(), $lang );
|
||||||
return $this->tri_title;
|
return $this->tri_title;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the tri_title column value.
|
* Set the tri_title column value.
|
||||||
*
|
*
|
||||||
@@ -73,12 +76,12 @@ class Triggers extends BaseTriggers {
|
|||||||
$lang = defined ( 'SYS_LANG') ? SYS_LANG : 'en';
|
$lang = defined ( 'SYS_LANG') ? SYS_LANG : 'en';
|
||||||
if ($this->tri_title !== $v || $v==="") {
|
if ($this->tri_title !== $v || $v==="") {
|
||||||
$this->tri_title = $v;
|
$this->tri_title = $v;
|
||||||
|
|
||||||
$res = Content::addContent( 'TRI_TITLE', '', $this->getTriUid(), $lang, $this->tri_title );
|
$res = Content::addContent( 'TRI_TITLE', '', $this->getTriUid(), $lang, $this->tri_title );
|
||||||
return $res;
|
return $res;
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This value goes in the content table
|
* This value goes in the content table
|
||||||
* @var string
|
* @var string
|
||||||
@@ -88,6 +91,7 @@ class Triggers extends BaseTriggers {
|
|||||||
* Get the tri_description column value.
|
* Get the tri_description column value.
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public function getTriDescription()
|
public function getTriDescription()
|
||||||
{
|
{
|
||||||
if ($this->getTriUid() == "") {
|
if ($this->getTriUid() == "") {
|
||||||
@@ -97,6 +101,7 @@ class Triggers extends BaseTriggers {
|
|||||||
$this->tri_description = Content::load ( 'TRI_DESCRIPTION', '', $this->getTriUid(), $lang );
|
$this->tri_description = Content::load ( 'TRI_DESCRIPTION', '', $this->getTriUid(), $lang );
|
||||||
return $this->tri_description;
|
return $this->tri_description;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the tri_description column value.
|
* Set the tri_description column value.
|
||||||
*
|
*
|
||||||
@@ -112,124 +117,118 @@ class Triggers extends BaseTriggers {
|
|||||||
$lang = defined ( 'SYS_LANG') ? SYS_LANG : 'en';
|
$lang = defined ( 'SYS_LANG') ? SYS_LANG : 'en';
|
||||||
if ($this->tri_description !== $v || $v==="") {
|
if ($this->tri_description !== $v || $v==="") {
|
||||||
$this->tri_description = $v;
|
$this->tri_description = $v;
|
||||||
|
|
||||||
$res = Content::addContent( 'TRI_DESCRIPTION', '', $this->getTriUid(), $lang, $this->tri_description );
|
$res = Content::addContent( 'TRI_DESCRIPTION', '', $this->getTriUid(), $lang, $this->tri_description );
|
||||||
return $res;
|
return $res;
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function load($TriUid)
|
public function load($TriUid)
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
$oRow = TriggersPeer::retrieveByPK( $TriUid );
|
$oRow = TriggersPeer::retrieveByPK( $TriUid );
|
||||||
if (!is_null($oRow))
|
if (!is_null($oRow)) {
|
||||||
{
|
|
||||||
$aFields = $oRow->toArray(BasePeer::TYPE_FIELDNAME);
|
$aFields = $oRow->toArray(BasePeer::TYPE_FIELDNAME);
|
||||||
$this->fromArray($aFields, BasePeer::TYPE_FIELDNAME);
|
$this->fromArray($aFields, BasePeer::TYPE_FIELDNAME);
|
||||||
$this->setNew(false);
|
$this->setNew(false);
|
||||||
$this->setTriTitle($aFields['TRI_TITLE']=$this->getTriTitle());
|
$this->setTriTitle($aFields['TRI_TITLE']=$this->getTriTitle());
|
||||||
$this->setTriDescription($aFields['TRI_DESCRIPTION']=$this->getTriDescription());
|
$this->setTriDescription($aFields['TRI_DESCRIPTION']=$this->getTriDescription());
|
||||||
return $aFields;
|
return $aFields;
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
throw( new Exception( "The row '$TriUid' in table TRIGGERS doesn't exist!" ));
|
throw( new Exception( "The row '$TriUid' in table TRIGGERS doesn't exist!" ));
|
||||||
}
|
}
|
||||||
}
|
} catch (Exception $oError) {
|
||||||
catch (Exception $oError) {
|
|
||||||
throw($oError);
|
throw($oError);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function create($aData)
|
public function create($aData)
|
||||||
{
|
{
|
||||||
$con = Propel::getConnection(TriggersPeer::DATABASE_NAME);
|
$con = Propel::getConnection(TriggersPeer::DATABASE_NAME);
|
||||||
try
|
try {
|
||||||
{
|
|
||||||
$con->begin();
|
$con->begin();
|
||||||
if ( isset ( $aData['TRI_UID'] ) && $aData['TRI_UID']== '' )
|
if (isset ( $aData['TRI_UID'] ) && $aData['TRI_UID']== '') {
|
||||||
unset ( $aData['TRI_UID'] );
|
unset ( $aData['TRI_UID'] );
|
||||||
if ( !isset ( $aData['TRI_UID'] ) )
|
}
|
||||||
|
if ( !isset ( $aData['TRI_UID'] ) ) {
|
||||||
$this->setTriUid(G::generateUniqueID());
|
$this->setTriUid(G::generateUniqueID());
|
||||||
else
|
} else {
|
||||||
$this->setTriUid($aData['TRI_UID'] );
|
$this->setTriUid($aData['TRI_UID'] );
|
||||||
|
}
|
||||||
|
|
||||||
$this->setProUid($aData['PRO_UID']);
|
$this->setProUid($aData['PRO_UID']);
|
||||||
$this->setTriType("SCRIPT");
|
$this->setTriType("SCRIPT");
|
||||||
|
|
||||||
if ( !isset ( $aData['TRI_WEBBOT'] ) )
|
if (!isset ( $aData['TRI_WEBBOT'] )) {
|
||||||
$this->setTriWebbot("");
|
$this->setTriWebbot("");
|
||||||
else
|
} else {
|
||||||
$this->setTriWebbot( $aData['TRI_WEBBOT'] );
|
$this->setTriWebbot( $aData['TRI_WEBBOT'] );
|
||||||
|
}
|
||||||
|
|
||||||
if($this->validate())
|
if ($this->validate()) {
|
||||||
{
|
if (!isset ( $aData['TRI_TITLE'] )) {
|
||||||
if ( !isset ( $aData['TRI_TITLE'] ) )
|
|
||||||
$this->setTriTitle("");
|
$this->setTriTitle("");
|
||||||
else
|
} else {
|
||||||
$this->setTriTitle( $aData['TRI_TITLE'] );
|
$this->setTriTitle( $aData['TRI_TITLE'] );
|
||||||
|
}
|
||||||
if ( !isset ( $aData['TRI_DESCRIPTION'] ) )
|
if (!isset ( $aData['TRI_DESCRIPTION'] )) {
|
||||||
$this->setTriDescription("");
|
$this->setTriDescription("");
|
||||||
else
|
} else {
|
||||||
$this->setTriDescription( $aData['TRI_DESCRIPTION'] );
|
$this->setTriDescription( $aData['TRI_DESCRIPTION'] );
|
||||||
|
}
|
||||||
if ( !isset ( $aData['TRI_PARAM'] ) )
|
if (!isset ( $aData['TRI_PARAM'] )) {
|
||||||
$this->setTriParam("");
|
$this->setTriParam("");
|
||||||
else
|
} else {
|
||||||
$this->setTriParam( $aData['TRI_PARAM'] );
|
$this->setTriParam( $aData['TRI_PARAM'] );
|
||||||
|
}
|
||||||
$result=$this->save();
|
$result=$this->save();
|
||||||
$con->commit();
|
$con->commit();
|
||||||
return $result;
|
return $result;
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
{
|
|
||||||
$con->rollback();
|
$con->rollback();
|
||||||
throw(new Exception("Failed Validation in class ".get_class($this)."."));
|
throw(new Exception("Failed Validation in class ".get_class($this)."."));
|
||||||
}
|
}
|
||||||
}
|
} catch (Exception $e) {
|
||||||
catch(Exception $e)
|
|
||||||
{
|
|
||||||
$con->rollback();
|
$con->rollback();
|
||||||
throw($e);
|
throw($e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function update($fields)
|
public function update($fields)
|
||||||
{
|
{
|
||||||
$con = Propel::getConnection(TriggersPeer::DATABASE_NAME);
|
$con = Propel::getConnection(TriggersPeer::DATABASE_NAME);
|
||||||
try
|
try {
|
||||||
{
|
|
||||||
$con->begin();
|
$con->begin();
|
||||||
$this->load($fields['TRI_UID']);
|
$this->load($fields['TRI_UID']);
|
||||||
$this->fromArray($fields,BasePeer::TYPE_FIELDNAME);
|
$this->fromArray($fields,BasePeer::TYPE_FIELDNAME);
|
||||||
if($this->validate())
|
if ($this->validate()) {
|
||||||
{
|
|
||||||
$contentResult=0;
|
$contentResult=0;
|
||||||
if (array_key_exists("TRI_TITLE", $fields)) $contentResult+=$this->setTriTitle($fields["TRI_TITLE"]);
|
if (array_key_exists("TRI_TITLE", $fields)) {
|
||||||
if (array_key_exists("TRI_DESCRIPTION", $fields)) $contentResult+=$this->setTriDescription($fields["TRI_DESCRIPTION"]);
|
$contentResult+=$this->setTriTitle($fields["TRI_TITLE"]);
|
||||||
|
}
|
||||||
|
if (array_key_exists("TRI_DESCRIPTION", $fields)) {
|
||||||
|
$contentResult+=$this->setTriDescription($fields["TRI_DESCRIPTION"]);
|
||||||
|
}
|
||||||
$result=$this->save();
|
$result=$this->save();
|
||||||
$result=($result==0)?($contentResult>0?1:0):$result;
|
$result=($result==0)?($contentResult>0?1:0):$result;
|
||||||
$con->commit();
|
$con->commit();
|
||||||
return $result;
|
return $result;
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
{
|
|
||||||
$con->rollback();
|
$con->rollback();
|
||||||
$validationE=new Exception("Failed Validation in class ".get_class($this).".");
|
$validationE=new Exception("Failed Validation in class ".get_class($this).".");
|
||||||
$validationE->aValidationFailures = $this->getValidationFailures();
|
$validationE->aValidationFailures = $this->getValidationFailures();
|
||||||
throw($validationE);
|
throw($validationE);
|
||||||
}
|
}
|
||||||
}
|
} catch (Exception $e) {
|
||||||
catch(Exception $e)
|
|
||||||
{
|
|
||||||
$con->rollback();
|
$con->rollback();
|
||||||
throw($e);
|
throw($e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function remove($TriUid)
|
public function remove($TriUid)
|
||||||
{
|
{
|
||||||
$con = Propel::getConnection(TriggersPeer::DATABASE_NAME);
|
$con = Propel::getConnection(TriggersPeer::DATABASE_NAME);
|
||||||
try
|
try {
|
||||||
{
|
|
||||||
$result = false;
|
$result = false;
|
||||||
$con->begin();
|
$con->begin();
|
||||||
$oTri = TriggersPeer::retrieveByPK( $TriUid );
|
$oTri = TriggersPeer::retrieveByPK( $TriUid );
|
||||||
@@ -240,9 +239,7 @@ class Triggers extends BaseTriggers {
|
|||||||
$con->commit();
|
$con->commit();
|
||||||
}
|
}
|
||||||
return $result;
|
return $result;
|
||||||
}
|
} catch (Exception $e) {
|
||||||
catch(Exception $e)
|
|
||||||
{
|
|
||||||
$con->rollback();
|
$con->rollback();
|
||||||
throw($e);
|
throw($e);
|
||||||
}
|
}
|
||||||
@@ -253,24 +250,23 @@ class Triggers extends BaseTriggers {
|
|||||||
*
|
*
|
||||||
* @param string $sUid the uid of the Prolication
|
* @param string $sUid the uid of the Prolication
|
||||||
*/
|
*/
|
||||||
|
public function TriggerExists ($sUid)
|
||||||
function TriggerExists ( $sUid ) {
|
{
|
||||||
$con = Propel::getConnection(TriggersPeer::DATABASE_NAME);
|
$con = Propel::getConnection(TriggersPeer::DATABASE_NAME);
|
||||||
try {
|
try {
|
||||||
$oObj = TriggersPeer::retrieveByPk( $sUid );
|
$oObj = TriggersPeer::retrieveByPk( $sUid );
|
||||||
if (is_object($oObj) && get_class ($oObj) == 'Triggers' ) {
|
if (is_object($oObj) && get_class ($oObj) == 'Triggers' ) {
|
||||||
return true;
|
return true;
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
} catch (Exception $oError) {
|
||||||
catch (Exception $oError) {
|
|
||||||
throw($oError);
|
throw($oError);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function verifyDependecies($TRI_UID){
|
public function verifyDependecies($TRI_UID)
|
||||||
|
{
|
||||||
require_once "classes/model/Event.php";
|
require_once "classes/model/Event.php";
|
||||||
require_once "classes/model/StepTrigger.php";
|
require_once "classes/model/StepTrigger.php";
|
||||||
|
|
||||||
@@ -283,7 +279,6 @@ class Triggers extends BaseTriggers {
|
|||||||
$oCriteria->add(EventPeer::EVN_ACTION, '', Criteria::NOT_EQUAL);
|
$oCriteria->add(EventPeer::EVN_ACTION, '', Criteria::NOT_EQUAL);
|
||||||
$oCriteria->add(EventPeer::TRI_UID, $TRI_UID);
|
$oCriteria->add(EventPeer::TRI_UID, $TRI_UID);
|
||||||
|
|
||||||
|
|
||||||
$oDataset = EventPeer::doSelectRS($oCriteria);
|
$oDataset = EventPeer::doSelectRS($oCriteria);
|
||||||
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||||
|
|
||||||
@@ -327,9 +322,7 @@ class Triggers extends BaseTriggers {
|
|||||||
array_push($oResult->dependencies['Tasks'], Array('UID'=>($oTask->getTasUid()), 'DESCRIPTION'=>($oTask->getTasTitle())));
|
array_push($oResult->dependencies['Tasks'], Array('UID'=>($oTask->getTasUid()), 'DESCRIPTION'=>($oTask->getTasTitle())));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return $oResult;
|
return $oResult;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
} // Trigger
|
|
||||||
?>
|
|
||||||
|
|||||||
@@ -42,6 +42,7 @@
|
|||||||
*
|
*
|
||||||
* @package workflow.engine.classes.model
|
* @package workflow.engine.classes.model
|
||||||
*/
|
*/
|
||||||
class TriggersPeer extends BaseTriggersPeer {
|
class TriggersPeer extends BaseTriggersPeer
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
} // TriggersPeer
|
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ require_once 'classes/model/IsoLocation.php';
|
|||||||
class Users extends BaseUsers
|
class Users extends BaseUsers
|
||||||
{
|
{
|
||||||
|
|
||||||
function create ($aData)
|
public function create ($aData)
|
||||||
{
|
{
|
||||||
$con = Propel::getConnection( UsersPeer::DATABASE_NAME );
|
$con = Propel::getConnection( UsersPeer::DATABASE_NAME );
|
||||||
try {
|
try {
|
||||||
@@ -175,7 +175,7 @@ class Users extends BaseUsers
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function remove ($UsrUid)
|
public function remove ($UsrUid)
|
||||||
{
|
{
|
||||||
$con = Propel::getConnection( UsersPeer::DATABASE_NAME );
|
$con = Propel::getConnection( UsersPeer::DATABASE_NAME );
|
||||||
try {
|
try {
|
||||||
@@ -190,7 +190,7 @@ class Users extends BaseUsers
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function loadByUsername ($sUsername)
|
public function loadByUsername ($sUsername)
|
||||||
{
|
{
|
||||||
$c = new Criteria( 'workflow' );
|
$c = new Criteria( 'workflow' );
|
||||||
$del = DBAdapter::getStringDelimiter();
|
$del = DBAdapter::getStringDelimiter();
|
||||||
@@ -204,7 +204,7 @@ class Users extends BaseUsers
|
|||||||
return $c;
|
return $c;
|
||||||
}
|
}
|
||||||
|
|
||||||
function loadByUsernameInArray ($sUsername)
|
public function loadByUsernameInArray ($sUsername)
|
||||||
{
|
{
|
||||||
$c = $this->loadByUsername( $sUsername );
|
$c = $this->loadByUsername( $sUsername );
|
||||||
$rs = UsersPeer::doSelectRS( $c );
|
$rs = UsersPeer::doSelectRS( $c );
|
||||||
@@ -296,7 +296,7 @@ class Users extends BaseUsers
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function getAvailableUsersCriteria ($sGroupUID = '')
|
public function getAvailableUsersCriteria ($sGroupUID = '')
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
|
|
||||||
@@ -317,7 +317,7 @@ class Users extends BaseUsers
|
|||||||
*
|
*
|
||||||
* @return array of all active users
|
* @return array of all active users
|
||||||
*/
|
*/
|
||||||
function getAll ($start = null, $limit = null, $search = null)
|
public function getAll ($start = null, $limit = null, $search = null)
|
||||||
{
|
{
|
||||||
$totalCount = 0;
|
$totalCount = 0;
|
||||||
$criteria = new Criteria( 'workflow' );
|
$criteria = new Criteria( 'workflow' );
|
||||||
@@ -380,5 +380,4 @@ class Users extends BaseUsers
|
|||||||
return $aFields;
|
return $aFields;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Users
|
|
||||||
|
|
||||||
|
|||||||
@@ -42,6 +42,7 @@
|
|||||||
*
|
*
|
||||||
* @package workflow.engine.classes.model
|
* @package workflow.engine.classes.model
|
||||||
*/
|
*/
|
||||||
class UsersPeer extends BaseUsersPeer {
|
class UsersPeer extends BaseUsersPeer
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
} // UsersPeer
|
|
||||||
|
|||||||
@@ -22,12 +22,12 @@ class UsersProperties extends BaseUsersProperties
|
|||||||
public $usrID = '';
|
public $usrID = '';
|
||||||
public $lang = 'en';
|
public $lang = 'en';
|
||||||
|
|
||||||
function __construct ()
|
public function __construct ()
|
||||||
{
|
{
|
||||||
$this->lang = defined( 'SYS_LANG' ) ? SYS_LANG : 'en';
|
$this->lang = defined( 'SYS_LANG' ) ? SYS_LANG : 'en';
|
||||||
}
|
}
|
||||||
|
|
||||||
function UserPropertyExists ($sUserUID)
|
public function UserPropertyExists ($sUserUID)
|
||||||
{
|
{
|
||||||
$oUserProperty = UsersPropertiesPeer::retrieveByPk( $sUserUID );
|
$oUserProperty = UsersPropertiesPeer::retrieveByPk( $sUserUID );
|
||||||
if (! is_null( $oUserProperty ) && is_object( $oUserProperty ) && get_class( $oUserProperty ) == 'UsersProperties') {
|
if (! is_null( $oUserProperty ) && is_object( $oUserProperty ) && get_class( $oUserProperty ) == 'UsersProperties') {
|
||||||
@@ -436,5 +436,4 @@ class UsersProperties extends BaseUsersProperties
|
|||||||
return $baseUrl . $url;
|
return $baseUrl . $url;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// UsersProperties
|
|
||||||
|
|
||||||
|
|||||||
@@ -22,6 +22,7 @@
|
|||||||
*
|
*
|
||||||
* @package workflow.engine.classes.model
|
* @package workflow.engine.classes.model
|
||||||
*/
|
*/
|
||||||
class UsersPropertiesPeer extends BaseUsersPropertiesPeer {
|
class UsersPropertiesPeer extends BaseUsersPropertiesPeer
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
} // UsersPropertiesPeer
|
|
||||||
|
|||||||
Reference in New Issue
Block a user