26 $oCatTree =
oxNew(
"oxCategoryList");
27 $oCatTree->loadList();
29 $oContent =
oxNew(
"oxcontent");
30 if ($soxId !=
"-1" && isset($soxId)) {
32 $oContent->loadInLang($this->_iEditLang, $soxId);
34 $oOtherLang = $oContent->getAvailableInLangs();
35 if (!isset($oOtherLang[$this->_iEditLang])) {
37 $oContent->loadInLang(key($oOtherLang), $soxId);
43 $this->_aViewData[
"posslang"] =
$aLang;
45 foreach ($oOtherLang as $id => $language) {
46 $oLang =
new stdClass();
47 $oLang->sLangDesc = $language;
49 $this->_aViewData[
"otherlang"][$id] = clone $oLang;
52 if ($oContent->oxcontents__oxcatid->value && isset($oCatTree[$oContent->oxcontents__oxcatid->value])) {
53 $oCatTree[$oContent->oxcontents__oxcatid->value]->selected = 1;
59 $oContent->oxcontents__oxloadid =
new oxField($sUId);
62 $this->_aViewData[
"edit"] = $oContent;
63 $this->_aViewData[
"link"] =
"[{ oxgetseourl ident="" . $oContent->oxcontents__oxloadid->value .
"" type="oxcontent" }]";
64 $this->_aViewData[
"cattree"] = $oCatTree;
67 $sCSS =
"content.tpl.css";
68 if ($oContent->oxcontents__oxsnippet->value ==
'1') {
72 $this->_aViewData[
"editor"] = $this->
_generateTextEditor(
"100%", 300, $oContent,
"oxcontents__oxcontent", $sCSS);
73 $this->_aViewData[
"afolder"] =
$myConfig->getConfigParam(
'aCMSfolder');
75 return "content_main.tpl";
92 if (isset($aParams[
'oxcontents__oxloadid'])) {
93 $aParams[
'oxcontents__oxloadid'] = $this->
_prepareIdent($aParams[
'oxcontents__oxloadid']);
97 if ($this->
_checkIdent($aParams[
'oxcontents__oxloadid'], $soxId)) {
99 $this->_aViewData[
"blLoadError"] =
true;
101 $oContent =
oxNew(
"oxcontent");
102 if ($soxId !=
'-1') {
103 $oContent->load($soxId);
105 $oContent->assign($aParams);
106 $this->_aViewData[
"edit"] = $oContent;
112 if (!isset($aParams[
'oxcontents__oxactive'])) {
113 $aParams[
'oxcontents__oxactive'] = 0;
117 if ($aParams[
'oxcontents__oxtype'] == 0) {
118 $aParams[
'oxcontents__oxsnippet'] = 1;
120 $aParams[
'oxcontents__oxsnippet'] = 0;
124 if ($aParams[
'oxcontents__oxfolder'] ==
'CMSFOLDER_NONE') {
125 $aParams[
'oxcontents__oxfolder'] =
'';
130 $aParams[
'oxcontents__oxshopid'] = $sShopID;
131 $oContent =
oxNew(
"oxcontent");
133 if ($soxId !=
"-1") {
134 $oContent->loadInLang($this->_iEditLang, $soxId);
136 $aParams[
'oxcontents__oxid'] = null;
141 $oContent->setLanguage(0);
142 $oContent->assign($aParams);
143 $oContent->setLanguage($this->_iEditLang);
162 if (isset($aParams[
'oxcontents__oxloadid'])) {
163 $aParams[
'oxcontents__oxloadid'] = $this->
_prepareIdent($aParams[
'oxcontents__oxloadid']);
167 if (!isset($aParams[
'oxcontents__oxactive'])) {
168 $aParams[
'oxcontents__oxactive'] = 0;
173 $aParams[
'oxcontents__oxshopid'] = $sShopID;
175 $oContent =
oxNew(
"oxcontent");
177 if ($soxId !=
"-1") {
178 $oContent->loadInLang($this->_iEditLang, $soxId);
180 $aParams[
'oxcontents__oxid'] = null;
183 $oContent->setLanguage(0);
184 $oContent->assign($aParams);
204 return getStr()->preg_replace(
"/[^a-zA-Z0-9_]*/",
"", $sIdent);
221 if (!strlen($sIdent)) {
223 } elseif ($oDb->getOne(
"select oxid from oxcontents where oxloadid = " . $oDb->quote($sIdent) .
" and oxid != " . $oDb->quote($sOxId) .
" and oxshopid = '" . $this->
getConfig()->getShopId() .
"'",
false,
false)) {