35 $this->
init(
'oxnews');
51 if ($this->oxnews__oxdate) {
52 $this->oxnews__oxdate->setValue(
oxRegistry::get(
"oxUtilsDate")->formatDBDate($this->oxnews__oxdate->value));
63 if ($this->_oGroups == null && $sOxid = $this->
getId()) {
65 $this->_oGroups =
oxNew(
'oxlist',
'oxgroups');
67 $sSelect =
"select {$sViewName}.* from {$sViewName}, oxobject2group ";
68 $sSelect .=
"where oxobject2group.oxobjectid='$sOxid' ";
69 $sSelect .=
"and oxobject2group.oxgroupsid={$sViewName}.oxid ";
70 $this->_oGroups->selectString($sSelect);
87 foreach ($aGroups as $oObject) {
88 if ($oObject->_sOXID == $sGroupID) {
104 public function delete($sOxid = null)
107 $sOxid = $this->
getId();
113 if ($blDelete = parent::delete($sOxid)) {
115 $oDb->execute(
"delete from oxobject2group where oxobject2group.oxobjectid = " . $oDb->quote($sOxid));
127 $this->oxnews__oxdate->setValue(
oxRegistry::get(
"oxUtilsDate")->formatDBDate($this->oxnews__oxdate->value,
true));
140 if (!$this->oxnews__oxdate ||
oxRegistry::get(
"oxUtilsDate")->isEmptyDate($this->oxnews__oxdate->value)) {
142 $this->oxnews__oxdate =
new oxField(date(
'Y-m-d'));
144 $this->oxnews__oxdate =
new oxField(
oxRegistry::get(
"oxUtilsDate")->formatDBDate($this->oxnews__oxdate->value,
true));
162 switch (strtolower($sFieldName)) {
164 case 'oxnews__oxlongdesc':
180 return $oUtilsView->parseThroughSmarty($this->oxnews__oxlongdesc->getRawValue(), $this->
getId() . $this->
getLanguage(), null,
true);