PM-1429
This commit is contained in:
@@ -568,7 +568,7 @@ class Process extends BaseProcess
|
||||
return (is_object( $oPro ) && get_class( $oPro ) == 'Process');
|
||||
}
|
||||
|
||||
public static function existsByProTitle ($PRO_TITLE)
|
||||
public static function existsByProTitle ($proTitle)
|
||||
{
|
||||
$oCriteria = new Criteria("workflow");
|
||||
|
||||
@@ -576,7 +576,7 @@ class Process extends BaseProcess
|
||||
|
||||
$oCriteria->add( ContentPeer::CON_CATEGORY, 'PRO_TITLE' );
|
||||
$oCriteria->add( ContentPeer::CON_LANG, SYS_LANG );
|
||||
$oCriteria->add( ContentPeer::CON_VALUE, $PRO_TITLE );
|
||||
$oCriteria->add( ContentPeer::CON_VALUE, $proTitle );
|
||||
$oDataset = ContentPeer::doSelectRS( $oCriteria, Propel::getDbConnection('workflow_ro') );
|
||||
$oDataset->setFetchmode( ResultSet::FETCHMODE_ASSOC );
|
||||
|
||||
@@ -586,31 +586,31 @@ class Process extends BaseProcess
|
||||
return ((int)($aRow["NUM_REC"]) > 0)? true : false;
|
||||
}
|
||||
|
||||
public static function getByProTitle($PRO_TITLE) {
|
||||
public static function getByProTitle($proTitle) {
|
||||
$oCriteria = new Criteria("workflow");
|
||||
|
||||
$oCriteria->addSelectColumn(ContentPeer::CON_ID);
|
||||
|
||||
$oCriteria->add(ContentPeer::CON_CATEGORY, 'PRO_TITLE');
|
||||
$oCriteria->add(ContentPeer::CON_LANG, SYS_LANG);
|
||||
$oCriteria->add(ContentPeer::CON_VALUE, $PRO_TITLE);
|
||||
$oCriteria->add(ContentPeer::CON_VALUE, $proTitle);
|
||||
$oDataset = ContentPeer::doSelectRS($oCriteria, Propel::getDbConnection('workflow_ro'));
|
||||
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||
|
||||
$oDataset->next();
|
||||
$aRow = $oDataset->getRow();
|
||||
$oProcess = new Process();
|
||||
return $oProcess->load($aRow["CON_ID"]);
|
||||
return isset($aRow["CON_ID"]) ? $oProcess->load($aRow["CON_ID"]) : null;
|
||||
}
|
||||
|
||||
public static function getNextTitle($PRO_TITLE) {
|
||||
public static function getNextTitle($proTitle) {
|
||||
$oCriteria = new Criteria('workflow');
|
||||
|
||||
$oCriteria->addSelectColumn(ContentPeer::CON_VALUE);
|
||||
|
||||
$oCriteria->add(ContentPeer::CON_CATEGORY, 'PRO_TITLE');
|
||||
$oCriteria->add(ContentPeer::CON_LANG, SYS_LANG);
|
||||
$oCriteria->add(ContentPeer::CON_VALUE, $PRO_TITLE . '-%', Criteria::LIKE);
|
||||
$oCriteria->add(ContentPeer::CON_VALUE, $proTitle . '-%', Criteria::LIKE);
|
||||
$oCriteria->addAscendingOrderByColumn(ContentPeer::CON_VALUE);
|
||||
|
||||
$oDataset = ContentPeer::doSelectRS($oCriteria, Propel::getDbConnection('workflow_ro'));
|
||||
@@ -628,7 +628,7 @@ class Process extends BaseProcess
|
||||
$row["CON_VALUE"] = $number;
|
||||
$data[] = $row;
|
||||
}
|
||||
return $PRO_TITLE . "-" . ($may + 1);
|
||||
return $proTitle . "-" . ($may + 1);
|
||||
}
|
||||
|
||||
public function getAllProcessesCount ()
|
||||
|
||||
Reference in New Issue
Block a user