28 $oGroups =
oxNew(
"oxlist");
29 $oGroups->init(
"oxgroups");
30 $oGroups->selectString(
"select * from " . getViewName(
"oxgroups", $this->_iEditLang));
33 if ($soxId !=
"-1" && isset($soxId)) {
35 $oNews =
oxNew(
"oxnews");
36 $oNews->loadInLang($this->_iEditLang, $soxId);
38 $oOtherLang = $oNews->getAvailableInLangs();
39 if (!isset($oOtherLang[$this->_iEditLang])) {
41 $oNews->loadInLang(key($oOtherLang), $soxId);
43 $this->_aViewData[
"edit"] = $oNews;
47 $this->_aViewData[
"posslang"] = array_diff(
oxRegistry::getLang()->getLanguageNames(), $oOtherLang);
49 foreach ($oOtherLang as $id => $language) {
50 $oLang =
new stdClass();
51 $oLang->sLangDesc = $language;
53 $this->_aViewData[
"otherlang"][$id] = clone $oLang;
57 $oNewsMainAjax =
oxNew(
'news_main_ajax');
58 $this->_aViewData[
'oxajax'] = $oNewsMainAjax->getColumns();
60 return "popups/news_main.tpl";
63 return "news_main.tpl";
78 if (!isset($aParams[
'oxnews__oxactive'])) {
79 $aParams[
'oxnews__oxactive'] = 0;
84 $aParams[
'oxnews__oxshopid'] = $sShopID;
86 if (!$aParams[
'oxnews__oxdate']) {
87 $aParams[
'oxnews__oxdate'] =
"";
91 $oConvObject->fldmax_length = 0;
92 $oConvObject->fldtype =
"date";
93 $oConvObject->value = $aParams[
'oxnews__oxdate'];
94 $aParams[
'oxnews__oxdate'] =
oxRegistry::get(
"oxUtilsDate")->convertDBDate($oConvObject,
true);
96 $oNews =
oxNew(
"oxnews");
99 $oNews->loadInLang($this->_iEditLang, $soxId);
101 $aParams[
'oxnews__oxid'] = null;
107 $oNews->setLanguage(0);
108 $oNews->assign($aParams);
109 $oNews->setLanguage($this->_iEditLang);
126 if (!isset($aParams[
'oxnews__oxactive'])) {
127 $aParams[
'oxnews__oxactive'] = 0;
134 $aParams[
'oxnews__oxshopid'] = $sShopID;
136 if (!$aParams[
'oxnews__oxdate']) {
137 $aParams[
'oxnews__oxdate'] =
"";
141 $oConvObject->fldmax_length = 0;
142 $oConvObject->fldtype =
"date";
143 $oConvObject->value = $aParams[
'oxnews__oxdate'];
144 $aParams[
'oxnews__oxdate'] =
oxRegistry::get(
"oxUtilsDate")->convertDBDate($oConvObject,
true);
146 $oNews =
oxNew(
"oxnews");
148 if ($soxId !=
"-1") {
149 $oNews->loadInLang($this->_iEditLang, $soxId);
151 $aParams[
'oxnews__oxid'] = null;
156 $oNews->setLanguage(0);
157 $oNews->assign($aParams);