Returns dynamic object SEO URI

@param string $sStdUrl standard url
@param string $sSeoUrl seo uri
@param int    $iLang   active language

@return string
960507
protected function _getDynamicUri($sStdUrl, $sSeoUrl, $iLang)
    {
        $iShopId = \OxidEsales\Eshop\Core\Registry::getConfig()->getShopId();

        $sStdUrl = $this->_trimUrl($sStdUrl);
        $sObjectId = $this->getDynamicObjectId($iShopId, $sStdUrl);
        $sSeoUrl = $this->_prepareUri($this->addLanguageParam($sSeoUrl, $iLang), $iLang);

        //load details link from DB
        $sOldSeoUrl = $this->_loadFromDb('dynamic', $sObjectId, $iLang);
        if ($sOldSeoUrl === $sSeoUrl) {
            $sSeoUrl = $sOldSeoUrl;
        } else {
            if ($sOldSeoUrl) {
                // old must be transferred to history
                $this->_copyToHistory($sObjectId, $iShopId, $iLang, 'dynamic');
            }

            // creating unique
            $sSeoUrl = $this->_processSeoUrl($sSeoUrl, $sObjectId, $iLang);

            // inserting
            $this->_saveToDb('dynamic', $sObjectId, $sStdUrl, $sSeoUrl, $iLang, $iShopId);
        }

        return $sSeoUrl;
    }
770225
public function prepareStrForSearch($sSearchStr)
    {
        $oStr = getStr();
        if ($oStr->hasSpecialChars($sSearchStr)) {
            return $oStr->recodeEntities($sSearchStr, true, ['&amp;'], ['&']);
        }

        return '';
    }
1026317
public function getLink($iLang = null)
    {
        if ($oRecomm = $this->getActiveRecommList()) {
            $sLink = $oRecomm->getLink($iLang);
        } else {
            $sLink = \OxidEsales\Eshop\Application\Controller\FrontendController::getLink($iLang);
        }
        $sSearch = \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter('searchrecomm');
        if ($sSearch) {
            $sLink .= ((strpos($sLink, '?') === false) ? '?' : '&amp;') . "searchrecomm={$sSearch}";
        }

        return $sLink;
    }
777072
public function getManufacturerUrl($oManufacturer, $iLang = null)
    {
        if (!isset($iLang)) {
            $iLang = $oManufacturer->getLanguage();
        }

        return $this->_getFullUrl($this->getManufacturerUri($oManufacturer, $iLang), $iLang);
    }
541667
public function getLink($iLang = null, $blMain = false)
    {
        if (!\OxidEsales\Eshop\Core\Registry::getUtils()->seoIsActive()) {
            return $this->getStdLink($iLang);
        }

        if ($iLang === null) {
            $iLang = $this->getLanguage();
        }

        $iLinkType = $this->getLinkType();
        if (!isset($this->_aSeoUrls[$iLang][$iLinkType])) {
            $this->_aSeoUrls[$iLang][$iLinkType] = $this->getBaseSeoLink($iLang, $blMain);
        }

        $sUrl = $this->_aSeoUrls[$iLang][$iLinkType];
        if (isset($this->_aSeoAddParams[$iLang])) {
            $sUrl .= ((strpos($sUrl . $this->_aSeoAddParams[$iLang], '?') === false) ? '?' : '&amp;') . $this->_aSeoAddParams[$iLang];
        }

        return $sUrl;
    }
437999
protected function _prepareUrl($sUri, $sTitle)
    {
        $iLang = Registry::getLang()->getBaseLanguage();
        $sUrl = $this->_getShopUrl();
        $sUrl .= $sUri . '&amp;lang=' . $iLang;

        if (Registry::getUtils()->seoIsActive()) {
            $oEncoder = Registry::getSeoEncoder();
            $sUrl = $oEncoder->getDynamicUrl($sUrl, "rss/{$sTitle}/", $iLang);
        }

        return Registry::getUtilsUrl()->prepareUrlForNoSession($sUrl);
    }
1165112
public function getUrlLang($iLang = null)
    {
        if (!$this->isAdmin()) {
            $iLang = isset($iLang) ? $iLang : $this->getBaseLanguage();
            return $this->getName() . "=" . $iLang;
        }
    }
621004
protected function _getSeoUrl($sObjectId, $iLang, $iShopId)
    {
        $oDb = \OxidEsales\Eshop\Core\DatabaseProvider::getDb(\OxidEsales\Eshop\Core\DatabaseProvider::FETCH_MODE_ASSOC);
        $aInfo = $oDb->getRow("select oxseourl, oxtype from oxseo where oxobjectid =  " . $oDb->quote($sObjectId) . " and oxlang =  " . $oDb->quote($iLang) . " and oxshopid = " . $oDb->quote($iShopId) . " order by oxparams limit 1");
        if ('oxarticle' == $aInfo['oxtype']) {
            $sMainCatId = $oDb->getOne("select oxcatnid from " . getViewName("oxobject2category") . " where oxobjectid = " . $oDb->quote($sObjectId) . " order by oxtime");
            if ($sMainCatId) {
                $sUrl = $oDb->getOne("select oxseourl from oxseo where oxobjectid =  " . $oDb->quote($sObjectId) . " and oxlang =  " . $oDb->quote($iLang) . " and oxshopid = " . $oDb->quote($iShopId) . " and oxparams = " . $oDb->quote($sMainCatId) . "  order by oxexpired");
                if ($sUrl) {
                    return $sUrl;
                }
            }
        }

        return $aInfo['oxseourl'];
    }
504955
protected function getUrlAndDecodeResponse($url, PageIndexerResponse $response)
    {
        $headers = $this->getHeaders();
        $rawResponse = $this->getUrl($url, $headers, $this->timeout);
        // convert JSON response to response object properties
        $decodedResponse = $response->getResultsFromJson($rawResponse->getBody()->getContents());

        if ($rawResponse === false || $decodedResponse === false) {
            $this->logger->log(
                SolrLogManager::ERROR,
                'Failed to execute Page Indexer Request. Request ID: ' . $this->requestId,
                [
                    'request ID' => $this->requestId,
                    'request url' => $url,
                    'request headers' => $headers,
                    'response headers' => $rawResponse->getHeaders(),
                    'raw response body' => $rawResponse->getBody()->getContents()
                ]
            );

            throw new \RuntimeException('Failed to execute Page Indexer Request. See log for details. Request ID: ' . $this->requestId, 1319116885);
        }
        return $decodedResponse;
    }
379130
public function getRecommUri($oRecomm, $iLang = null)
    {
        if (!($sSeoUrl = $this->_loadFromDb('dynamic', $oRecomm->getId(), $iLang))) {
            $myConfig = \OxidEsales\Eshop\Core\Registry::getConfig();

            // fetching part of base url
            $sSeoUrl = $this->_getStaticUri(
                $oRecomm->getBaseStdLink($iLang, false),
                $myConfig->getShopId(),
                $iLang
            )
            . $this->_prepareTitle($oRecomm->oxrecommlists__oxtitle->value, false, $iLang);

            // creating unique
            $sSeoUrl = $this->_processSeoUrl($sSeoUrl, $oRecomm->getId(), $iLang);

            // inserting
            $this->_saveToDb('dynamic', $oRecomm->getId(), $oRecomm->getBaseStdLink($iLang), $sSeoUrl, $iLang, $myConfig->getShopId());
        }

        return $sSeoUrl;
    }
856911
protected function _decodeOldUrl($seoUrl)
    {
        $stringObject = getStr();
        $database = \OxidEsales\Eshop\Core\DatabaseProvider::getDb(\OxidEsales\Eshop\Core\DatabaseProvider::FETCH_MODE_ASSOC);
        $baseUrl = \OxidEsales\Eshop\Core\Registry::getConfig()->getShopURL();
        if ($stringObject->strpos($seoUrl, $baseUrl) === 0) {
            $seoUrl = $stringObject->substr($seoUrl, $stringObject->strlen($baseUrl));
        }
        $shopId = \OxidEsales\Eshop\Core\Registry::getConfig()->getShopId();
        $seoUrl = rawurldecode($seoUrl);

        //extract page number from seo url
        list($seoUrl, $pageNumber) = $this->extractPageNumberFromSeoUrl($seoUrl);

        $key = $this->_getIdent($seoUrl, true);

        $url = false;
        $resultSet = $database->select("select oxobjectid, oxlang from oxseohistory where oxident = " . $database->quote($key) . " and oxshopid = '{$shopId}' limit 1");
        if (!$resultSet->EOF) {
            // updating hit info (oxtimestamp field will be updated automatically)
            $database->execute("update oxseohistory set oxhits = oxhits + 1 where oxident = " . $database->quote($key) . " and oxshopid = '{$shopId}' limit 1");

            // fetching new url
            $url = $this->_getSeoUrl($resultSet->fields['oxobjectid'], $resultSet->fields['oxlang'], $shopId);

            // appending with $_SERVER["QUERY_STRING"]
            $url = $this->_addQueryString($url);
        }
        if ($url && !is_null($pageNumber)) {
            $url = \OxidEsales\Eshop\Core\Registry::getUtilsUrl()->appendUrl($url, ['pgNr' => $pageNumber]);
        }

        return $url;
    }
1360844
public function getBaseSeoLink($iLang, $iPage = 0)
    {
        $oEncoder = \OxidEsales\Eshop\Core\Registry::get(\OxidEsales\Eshop\Application\Model\SeoEncoderCategory::class);
        if (!$iPage) {
            return $oEncoder->getCategoryUrl($this, $iLang);
        }

        return $oEncoder->getCategoryPageUrl($this, $iPage, $iLang);
    }
950164
public function getOutUrl($ssl = null, $admin = null, $nativeImg = false)
    {
        $ssl = is_null($ssl) ? $this->isSsl() : $ssl;
        $admin = is_null($admin) ? $this->isAdmin() : $admin;

        if ($ssl) {
            if ($nativeImg && !$admin) {
                $url = $this->getSslShopUrl();
            } else {
                $url = $this->getConfigParam('sSSLShopURL');
                if (!$url && $admin) {
                    $url = $this->getConfigParam('sAdminSSLURL') . '../';
                }
            }
        } else {
            $url = ($nativeImg && !$admin) ? $this->getShopUrl() : $this->getConfigParam('sShopURL');
        }

        return $url . $this->_sOutDir . '/';
    }
807673
public function link ( SiteLink $toSiteLink, SiteLink $fromSiteLink, EditInfo $editInfo = null ) {
		$params = array(
			'tosite' => $toSiteLink->getSiteId(),
			'totitle' => $toSiteLink->getPageName(),
			'fromsite' => $fromSiteLink->getSiteId(),
			'fromtitle' => $fromSiteLink->getPageName(),
		);

		$this->api->postRequest( 'wblinktitles', $params, $editInfo );
		return true;
	}
8785
private String getUrl(final IRI identifier) {
        return getServices().getResourceService().toExternal(identifier, getBaseUrl()).getIRIString();
    }
834980
public function getSessionCheckUrl($user_id, $sso_session)  {
        $host = Maestrano::with($this->_preset)->param('sso.idp');
        $api_base = Maestrano::with($this->_preset)->param('api.base');
        $endpoint = 'auth/saml';

        return "${host}${api_base}${endpoint}/${user_id}?session=${sso_session}";
    }
974822
public static function GetDefaultQuery($iLanguageId, $sFilterString = false)
    {
        $sDefaultQuery = 'SELECT `pkg_shop_primary_navi`.*
                          FROM `pkg_shop_primary_navi`
                         WHERE [{sFilterConditions}]
                      ORDER BY `pkg_shop_primary_navi`.`position` ASC';
        $sActivePrimaryNavigationQueryRestriction = '';
        if (!TGlobal::IsCMSMode()) {
            $sActivePrimaryNavigationQueryRestriction = TdbPkgShopPrimaryNaviList::GetActivePrimaryNavigationQueryRestriction();
        }
        if (strlen($sActivePrimaryNavigationQueryRestriction) > 0) {
            if (false === $sFilterString) {
                $sFilterString = " $sActivePrimaryNavigationQueryRestriction ";
            } else {
                $sFilterString = ' ( '.$sFilterString.' ) AND ('.$sActivePrimaryNavigationQueryRestriction.')';
            }
        } else {
            if (false === $sFilterString) {
                $sFilterString = ' 1 = 1 ';
            }
        }
        $sDefaultQuery = str_replace('[{sFilterConditions}]', $sFilterString, $sDefaultQuery);

        return $sDefaultQuery;
    }