30 public function getContentUri($oCont, $iLang = null, $blRegenerate =
false)
33 $iLang = $oCont->getLanguage();
36 if ($blRegenerate || !($sSeoUrl = $this->
_loadFromDb(
'oxContent', $oCont->getId(), $iLang))) {
38 if ($iLang != $oCont->getLanguage()) {
39 $sId = $oCont->getId();
40 $oCont =
oxNew(
'oxContent');
41 $oCont->loadInLang($iLang, $sId);
45 if ($oCont->getCategoryId() && $oCont->getType() === 2) {
46 $oCat =
oxNew(
'oxCategory');
47 if ($oCat->loadInLang($iLang, $oCont->oxcontents__oxcatid->value)) {
48 $sParentId = $oCat->oxcategories__oxparentid->value;
49 if ($sParentId && $sParentId !=
'oxrootid') {
50 $oParentCat =
oxNew(
'oxCategory');
51 if ($oParentCat->loadInLang($iLang, $oCat->oxcategories__oxparentid->value)) {
52 $sSeoUrl .=
oxRegistry::get(
"oxSeoEncoderCategory")->getCategoryUri($oParentCat);
58 $sSeoUrl .= $this->
_prepareTitle($oCont->oxcontents__oxtitle->value,
false, $oCont->getLanguage()) .
'/';
59 $sSeoUrl = $this->
_processSeoUrl($sSeoUrl, $oCont->getId(), $iLang);
61 $this->
_saveToDb(
'oxcontent', $oCont->getId(), $oCont->getBaseStdLink($iLang), $sSeoUrl, $iLang);
78 $iLang = $oCont->getLanguage();
92 $sIdQuoted = $oDb->quote($sId);
93 $oDb->execute(
"delete from oxseo where oxobjectid = $sIdQuoted and oxtype = 'oxcontent'");
94 $oDb->execute(
"delete from oxobject2seodata where oxobjectid = $sIdQuoted");
105 protected function _getAltUri($sObjectId, $iLang)
109 $oCont =
oxNew(
"oxcontent");
110 if ($oCont->loadInLang($iLang, $sObjectId)) {