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";
62 return "news_main.tpl";
77 if ( !isset( $aParams[
'oxnews__oxactive']))
78 $aParams[
'oxnews__oxactive'] = 0;
82 $aParams[
'oxnews__oxshopid'] = $sShopID;
84 if (!$aParams[
'oxnews__oxdate'])
85 $aParams[
'oxnews__oxdate'] =
"";
88 $oConvObject->fldmax_length = 0;
89 $oConvObject->fldtype =
"date";
90 $oConvObject->value = $aParams[
'oxnews__oxdate'];
91 $aParams[
'oxnews__oxdate'] =
oxRegistry::get(
"oxUtilsDate")->convertDBDate( $oConvObject,
true);
93 $oNews =
oxNew(
"oxnews" );
96 $oNews->loadInLang( $this->_iEditLang, $soxId );
98 $aParams[
'oxnews__oxid'] = null;
103 $oNews->setLanguage(0);
104 $oNews->assign( $aParams);
105 $oNews->setLanguage($this->_iEditLang);
122 if ( !isset( $aParams[
'oxnews__oxactive']))
123 $aParams[
'oxnews__oxactive'] = 0;
129 $aParams[
'oxnews__oxshopid'] = $sShopID;
131 if (!$aParams[
'oxnews__oxdate'])
132 $aParams[
'oxnews__oxdate'] =
"";
135 $oConvObject->fldmax_length = 0;
136 $oConvObject->fldtype =
"date";
137 $oConvObject->value = $aParams[
'oxnews__oxdate'];
138 $aParams[
'oxnews__oxdate'] =
oxRegistry::get(
"oxUtilsDate")->convertDBDate( $oConvObject,
true );
140 $oNews =
oxNew(
"oxnews" );
143 $oNews->loadInLang( $this->_iEditLang, $soxId );
145 $aParams[
'oxnews__oxid'] = null;
149 $oNews->setLanguage(0);
150 $oNews->assign( $aParams);