HOR-2114
This commit is contained in:
@@ -43,19 +43,12 @@ if (!class_exists('BaseReportTable')) {
|
||||
*/
|
||||
class ReportTable extends BaseReportTable
|
||||
{
|
||||
/**
|
||||
* This value goes in the content table
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $rep_tab_title = '';
|
||||
|
||||
/**
|
||||
* Get the rep_tab_title column value.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getRepTabTitle ()
|
||||
public function getRepTabTitleContent ()
|
||||
{
|
||||
if ($this->getRepTabUid() == "") {
|
||||
throw (new Exception( "Error in getRepTabTitle, the getRepTabUid() can't be blank" ));
|
||||
@@ -71,7 +64,7 @@ class ReportTable extends BaseReportTable
|
||||
* @param string $v new value
|
||||
* @return void
|
||||
*/
|
||||
public function setRepTabTitle ($v)
|
||||
public function setRepTabTitleContent ($v)
|
||||
{
|
||||
if ($this->getRepTabUid() == "") {
|
||||
throw (new Exception( "Error in setRepTabTitle, the setRepTabUid() can't be blank" ));
|
||||
@@ -94,7 +87,6 @@ class ReportTable extends BaseReportTable
|
||||
$aFields = $oRow->toArray( BasePeer::TYPE_FIELDNAME );
|
||||
$this->fromArray( $aFields, BasePeer::TYPE_FIELDNAME );
|
||||
$this->setNew( false );
|
||||
$this->setRepTabTitle( $aFields['REP_TAB_TITLE'] = $this->getRepTabTitle() );
|
||||
return $aFields;
|
||||
} else {
|
||||
//throw( new Exception( "The row '$RepTabUid' in table ReportTable doesn't exist!" ));
|
||||
@@ -134,13 +126,10 @@ class ReportTable extends BaseReportTable
|
||||
}
|
||||
$this->setRepTabCreateDate( date( 'Y-m-d H:i:s' ) );
|
||||
$this->setRepTabStatus( 'ACTIVE' );
|
||||
|
||||
$repTabTitle = !isset($aData['REP_TAB_TITLE']) ? '' : $aData['REP_TAB_TITLE'];
|
||||
$this->setRepTabTitle($repTabTitle);
|
||||
if ($this->validate()) {
|
||||
if (! isset( $aData['REP_TAB_TITLE'] )) {
|
||||
$this->setRepTabTitle( "" );
|
||||
} else {
|
||||
$this->setRepTabTitle( $aData['REP_TAB_TITLE'] );
|
||||
}
|
||||
$this->setRepTabTitleContent($repTabTitle);
|
||||
$result = $this->save();
|
||||
$con->commit();
|
||||
return $result;
|
||||
@@ -174,7 +163,7 @@ class ReportTable extends BaseReportTable
|
||||
if ($oValidate) {
|
||||
$contentResult = 0;
|
||||
if (array_key_exists( "REP_TAB_TITLE", $fields )) {
|
||||
$contentResult += $this->setRepTabTitle( $fields["REP_TAB_TITLE"] );
|
||||
$contentResult += $this->setRepTabTitleContent( $fields["REP_TAB_TITLE"] );
|
||||
}
|
||||
$result = $this->save();
|
||||
$result = ($result == 0) ? ($contentResult > 0 ? 1 : 0) : $result;
|
||||
|
||||
Reference in New Issue
Block a user