26 $oGroups =
oxNew(
"oxlist");
27 $oGroups->init(
"oxgroups");
28 $oGroups->selectString(
"select * from " . getViewName(
"oxgroups", $this->_iEditLang));
31 if ($soxId !=
"-1" && isset($soxId)) {
33 $oNews =
oxNew(
"oxnews");
34 $oNews->loadInLang($this->_iEditLang, $soxId);
36 $oOtherLang = $oNews->getAvailableInLangs();
37 if (!isset($oOtherLang[$this->_iEditLang])) {
39 $oNews->loadInLang(key($oOtherLang), $soxId);
41 $this->_aViewData[
"edit"] = $oNews;
45 $this->_aViewData[
"posslang"] = array_diff(
oxRegistry::getLang()->getLanguageNames(), $oOtherLang);
47 foreach ($oOtherLang as $id => $language) {
48 $oLang =
new stdClass();
49 $oLang->sLangDesc = $language;
51 $this->_aViewData[
"otherlang"][$id] = clone $oLang;
55 $oNewsMainAjax =
oxNew(
'news_main_ajax');
56 $this->_aViewData[
'oxajax'] = $oNewsMainAjax->getColumns();
58 return "popups/news_main.tpl";
61 return "news_main.tpl";
76 if (!isset($aParams[
'oxnews__oxactive'])) {
77 $aParams[
'oxnews__oxactive'] = 0;
82 $aParams[
'oxnews__oxshopid'] = $sShopID;
84 if (!$aParams[
'oxnews__oxdate']) {
85 $aParams[
'oxnews__oxdate'] =
"";
89 $oConvObject->fldmax_length = 0;
90 $oConvObject->fldtype =
"date";
91 $oConvObject->value = $aParams[
'oxnews__oxdate'];
92 $aParams[
'oxnews__oxdate'] =
oxRegistry::get(
"oxUtilsDate")->convertDBDate($oConvObject,
true);
94 $oNews =
oxNew(
"oxnews");
97 $oNews->loadInLang($this->_iEditLang, $soxId);
99 $aParams[
'oxnews__oxid'] = null;
105 $oNews->setLanguage(0);
106 $oNews->assign($aParams);
107 $oNews->setLanguage($this->_iEditLang);
124 if (!isset($aParams[
'oxnews__oxactive'])) {
125 $aParams[
'oxnews__oxactive'] = 0;
132 $aParams[
'oxnews__oxshopid'] = $sShopID;
134 if (!$aParams[
'oxnews__oxdate']) {
135 $aParams[
'oxnews__oxdate'] =
"";
139 $oConvObject->fldmax_length = 0;
140 $oConvObject->fldtype =
"date";
141 $oConvObject->value = $aParams[
'oxnews__oxdate'];
142 $aParams[
'oxnews__oxdate'] =
oxRegistry::get(
"oxUtilsDate")->convertDBDate($oConvObject,
true);
144 $oNews =
oxNew(
"oxnews");
146 if ($soxId !=
"-1") {
147 $oNews->loadInLang($this->_iEditLang, $soxId);
149 $aParams[
'oxnews__oxid'] = null;
154 $oNews->setLanguage(0);
155 $oNews->assign($aParams);