28 $oShop =
oxNew(
'oxshop' );
29 $oShop->loadInLang( $this->_iEditLang, $this->_aViewData[
'edit']->getId() );
30 $this->_aViewData[
'edit'] = $oShop;
33 $sQ =
"select oxstdurl, oxobjectid from oxseo where oxtype='static' and oxshopid=".oxDb::getDb()->quote( $oShop->getId() ).
" group by oxobjectid order by oxstdurl";
35 $oList =
oxNew(
'oxlist' );
36 $oList->init(
'oxbase',
'oxseo' );
37 $oList->selectString( $sQ );
39 $this->_aViewData[
'aStaticUrls'] = $oList;
44 return "shop_seo.tpl";
57 if ( $this->_sActSeoObject ) {
60 $sActObject = $aStatUrl[
'oxseo__oxobjectid'];
63 if ( $sActObject && $sActObject !=
'-1' ) {
64 $this->_aViewData[
'sActSeoObject'] = $sActObject;
67 $sQ =
"select oxseourl, oxlang from oxseo where oxobjectid = ".$oDb->quote( $sActObject ).
" and oxshopid = ".$oDb->quote( $iShopId );
68 $oRs = $oDb->execute( $sQ );
69 if ( $oRs !=
false && $oRs->recordCount() > 0 ) {
70 while ( !$oRs->EOF ) {
71 $aSeoUrls[$oRs->fields[
'oxlang']] = array( $sActObject, $oRs->fields[
'oxseourl'] );
74 $this->_aViewData[
'aSeoUrls'] = $aSeoUrls;
91 $oShop =
oxNew(
'oxshop' );
92 if ( $oShop->loadInLang( $this->_iEditLang, $this->getEditObjectId() ) ) {
95 $oShop->setLanguage( 0 );
97 $oShop->setLanguage( $this->_iEditLang );
116 if ( isset( $aUrls[
'oxseo__oxstdurl'] ) && $aUrls[
'oxseo__oxstdurl'] ) {
117 $aUrls[
'oxseo__oxstdurl'] = $this->
_cleanupUrl( $aUrls[
'oxseo__oxstdurl'] );
120 if ( isset( $aUrls[
'oxseo__oxseourl'] ) && is_array( $aUrls[
'oxseo__oxseourl'] ) ) {
121 foreach ( $aUrls[
'oxseo__oxseourl'] as $iPos => $sUrl) {
122 $aUrls[
'oxseo__oxseourl'][$iPos] = $this->
_cleanupUrl( $sUrl );
139 while ( ( stripos( $sUrl,
'&' ) !==
false ) || ( stripos( $sUrl,
'&&' ) !==
false ) ) {
140 $sUrl = str_replace(
'&',
'&', $sUrl );
141 $sUrl = str_replace(
'&&',
'&', $sUrl );
145 return str_replace(
'&',
'&', $sUrl );
166 if ( ( $sObjectid = $aStaticUrl[
'oxseo__oxobjectid'] ) && $sObjectid !=
'-1' ) {
170 $oDb->execute(
"delete from oxseo where oxtype='static' and oxobjectid = ".$oDb->quote( $sObjectid ) .
" and oxshopid = ".$oDb->quote( $soxId ) );