This commit is contained in:
Roly Rudy Gutierrez Pinto
2016-12-22 17:16:01 -04:00
parent f5dd1fe226
commit 59b80b15be
2 changed files with 21 additions and 14 deletions

View File

@@ -48,10 +48,10 @@ class Dynaform extends BaseDynaform
*
* @var string
*/
protected $dyn_title = '';
protected $dyn_title_content = '';
/**
* Get the [Dyn_title] column value.
* Get the [Dyn_title_content] column value.
*
* @return string
*/
@@ -61,8 +61,8 @@ class Dynaform extends BaseDynaform
throw (new Exception( "Error in getDynTitle, the DYN_UID can't be blank" ));
}
$lang = defined( 'SYS_LANG' ) ? SYS_LANG : 'en';
$this->dyn_title = Content::load( 'DYN_TITLE', '', $this->getDynUid(), $lang );
return $this->dyn_title;
$this->dyn_title_content = Content::load( 'DYN_TITLE', '', $this->getDynUid(), $lang );
return $this->dyn_title_content;
}
/**
@@ -82,11 +82,11 @@ class Dynaform extends BaseDynaform
$v = (string) $v;
}
if ($this->dyn_title !== $v || $v === '') {
$this->dyn_title = $v;
if ($this->dyn_title_content !== $v || $v === '') {
$this->dyn_title_content = $v;
$lang = defined( 'SYS_LANG' ) ? SYS_LANG : 'en';
$res = Content::addContent( 'DYN_TITLE', '', $this->getDynUid(), $lang, $this->dyn_title );
$res = Content::addContent( 'DYN_TITLE', '', $this->getDynUid(), $lang, $this->dyn_title_content );
}
} // set()

View File

@@ -43,7 +43,14 @@ class Triggers extends BaseTriggers
{
/**
* Get the tri_title column value.
* This value goes in the content table
*
* @var string
*/
protected $tri_title_content = '';
/**
* Get the tri_title_content column value.
* @return string
*/
public function getTriTitleContent()
@@ -52,12 +59,12 @@ class Triggers extends BaseTriggers
throw ( new Exception( "Error in getTriTitle, the getTriUid() can't be blank") );
}
$lang = defined ( 'SYS_LANG') ? SYS_LANG : 'en';
$this->tri_title = Content::load ( 'TRI_TITLE', '', $this->getTriUid(), $lang );
return $this->tri_title;
$this->tri_title_content = Content::load ( 'TRI_TITLE', '', $this->getTriUid(), $lang );
return $this->tri_title_content;
}
/**
* Set the tri_title column value.
* Set the tri_title_content column value.
*
* @param string $v new value
* @return void
@@ -69,9 +76,9 @@ class Triggers extends BaseTriggers
}
$v=isset($v)?((string)$v):'';
$lang = defined ( 'SYS_LANG') ? SYS_LANG : 'en';
if ($this->tri_title !== $v || $v==="") {
$this->tri_title = $v;
$res = Content::addContent( 'TRI_TITLE', '', $this->getTriUid(), $lang, $this->tri_title );
if ($this->tri_title_content !== $v || $v==="") {
$this->tri_title_content = $v;
$res = Content::addContent( 'TRI_TITLE', '', $this->getTriUid(), $lang, $this->tri_title_content );
return $res;
}
return 0;