46 public function getContentUri( $oCont, $iLang = null, $blRegenerate =
false )
49 $iLang = $oCont->getLanguage();
52 if ( $blRegenerate || !( $sSeoUrl = $this->
_loadFromDb(
'oxcontent', $oCont->getId(), $iLang ) ) ) {
54 if ( $iLang != $oCont->getLanguage() ) {
55 $sId = $oCont->getId();
56 $oCont =
oxNew(
'oxcontent');
57 $oCont->loadInLang( $iLang, $sId );
61 if ( $oCont->oxcontents__oxcatid->value ) {
62 $oCat =
oxNew(
'oxcategory' );
63 if ( $oCat->loadInLang( $iLang, $oCont->oxcontents__oxcatid->value ) ) {
64 if ( $oCat->oxcategories__oxparentid->value && $oCat->oxcategories__oxparentid->value !=
'oxrootid' ) {
65 $oParentCat =
oxNew(
'oxcategory' );
66 if ( $oParentCat->loadInLang( $iLang, $oCat->oxcategories__oxparentid->value ) ) {
67 $sSeoUrl .=
oxRegistry::get(
"oxSeoEncoderCategory")->getCategoryUri( $oParentCat );
73 $sSeoUrl .= $this->
_prepareTitle( $oCont->oxcontents__oxtitle->value,
false, $oCont->getLanguage() ) .
'/';
74 $sSeoUrl = $this->
_processSeoUrl( $sSeoUrl, $oCont->getId(), $iLang );
76 $this->
_saveToDb(
'oxcontent', $oCont->getId(), $oCont->getBaseStdLink($iLang), $sSeoUrl, $iLang );
94 $iLang = $oCont->getLanguage();
109 $sIdQuoted = $oDb->quote($sId);
110 $oDb->execute(
"delete from oxseo where oxobjectid = $sIdQuoted and oxtype = 'oxcontent'");
111 $oDb->execute(
"delete from oxobject2seodata where oxobjectid = $sIdQuoted");
125 $oCont =
oxNew(
"oxcontent" );
126 if ( $oCont->loadInLang( $iLang, $sObjectId ) ) {