34 $this->
init(
'oxnews');
50 if ($this->oxnews__oxdate) {
51 $this->oxnews__oxdate->setValue(
oxRegistry::get(
"oxUtilsDate")->formatDBDate($this->oxnews__oxdate->value));
62 if ($this->_oGroups == null && $sOxid = $this->
getId()) {
64 $this->_oGroups =
oxNew(
'oxlist',
'oxgroups');
66 $sSelect =
"select {$sViewName}.* from {$sViewName}, oxobject2group ";
67 $sSelect .=
"where oxobject2group.oxobjectid='$sOxid' ";
68 $sSelect .=
"and oxobject2group.oxgroupsid={$sViewName}.oxid ";
69 $this->_oGroups->selectString($sSelect);
86 foreach ($aGroups as $oObject) {
87 if ($oObject->_sOXID == $sGroupID) {
103 public function delete($sOxid = null)
106 $sOxid = $this->
getId();
112 if ($blDelete = parent::delete($sOxid)) {
114 $oDb->execute(
"delete from oxobject2group where oxobject2group.oxobjectid = " . $oDb->quote($sOxid));
126 $this->oxnews__oxdate->setValue(
oxRegistry::get(
"oxUtilsDate")->formatDBDate($this->oxnews__oxdate->value,
true));
139 if (!$this->oxnews__oxdate ||
oxRegistry::get(
"oxUtilsDate")->isEmptyDate($this->oxnews__oxdate->value)) {
141 $this->oxnews__oxdate =
new oxField(date(
'Y-m-d'));
143 $this->oxnews__oxdate =
new oxField(
oxRegistry::get(
"oxUtilsDate")->formatDBDate($this->oxnews__oxdate->value,
true));
161 switch (strtolower($sFieldName)) {
163 case 'oxnews__oxlongdesc':
179 return $oUtilsView->parseThroughSmarty($this->oxnews__oxlongdesc->getRawValue(), $this->
getId() . $this->
getLanguage(), null,
true);