Alex Trofimov 4 ani în urmă
părinte
comite
46b258cd63
47 a modificat fișierele cu 122 adăugiri și 116 ștergeri
  1. 3 1
      inc/classes/BxDolCmts.php
  2. 1 1
      inc/classes/BxDolFormQuery.php
  3. 2 2
      inc/classes/BxDolPage.php
  4. 1 1
      inc/classes/BxDolStorageLocal.php
  5. 1 1
      inc/classes/BxDolTemplate.php
  6. 2 2
      inc/profiles.inc.php
  7. 10 3
      inc/utils.inc.php
  8. 2 2
      modules/base/connect/classes/BxBaseModConnectModule.php
  9. 2 5
      modules/base/general/classes/BxBaseModGeneralFormsEntryHelper.php
  10. 1 1
      modules/base/general/classes/BxBaseModGeneralGridAdministration.php
  11. 6 6
      modules/base/general/classes/BxBaseModGeneralModule.php
  12. 2 2
      modules/base/general/classes/BxBaseModGeneralSearchResult.php
  13. 1 1
      modules/base/general/classes/BxBaseModGeneralTemplate.php
  14. 2 2
      modules/base/groups/classes/BxBaseModGroupsAlertsResponse.php
  15. 2 2
      modules/base/groups/classes/BxBaseModGroupsMenuSnippetMeta.php
  16. 1 1
      modules/base/groups/classes/BxBaseModGroupsModule.php
  17. 1 1
      modules/base/groups/classes/BxBaseModGroupsPageEntry.php
  18. 1 1
      modules/base/payment/classes/BxBaseModPaymentConfig.php
  19. 1 1
      modules/base/profile/classes/BxBaseModProfileAlertsResponse.php
  20. 6 6
      modules/base/profile/classes/BxBaseModProfileFormEntry.php
  21. 5 5
      modules/base/profile/classes/BxBaseModProfileModule.php
  22. 1 1
      modules/base/profile/classes/BxBaseModProfilePageEntry.php
  23. 4 4
      modules/base/profile/classes/BxBaseModProfileTemplate.php
  24. 2 2
      modules/base/text/classes/BxBaseModTextGridAdministration.php
  25. 1 1
      modules/base/text/classes/BxBaseModTextPageEntry.php
  26. 1 1
      modules/base/text/classes/BxBaseModTextTemplate.php
  27. 3 3
      modules/boonex/acl/classes/BxAclModule.php
  28. 1 1
      modules/boonex/ads/classes/BxAdsFormEntry.php
  29. 1 1
      modules/boonex/ads/classes/BxAdsGridOffersAll.php
  30. 1 1
      modules/boonex/ads/classes/BxAdsMenuSnippetMeta.php
  31. 22 22
      modules/boonex/ads/classes/BxAdsModule.php
  32. 5 5
      modules/boonex/ads/classes/BxAdsTemplate.php
  33. 1 1
      modules/boonex/albums/classes/BxAlbumsContentInfoMedia.php
  34. 1 1
      studio/template/scripts/BxBaseStudioBuilderPage.php
  35. 1 1
      studio/template/scripts/BxBaseStudioFunctions.php
  36. 1 1
      template/scripts/BxBaseAccountForms.php
  37. 1 1
      template/scripts/BxBaseCmtsGridAdministration.php
  38. 2 2
      template/scripts/BxBaseFormAccount.php
  39. 1 1
      template/scripts/BxBaseFormConfirmPhone.php
  40. 2 2
      template/scripts/BxBaseFormLogin.php
  41. 3 3
      template/scripts/BxBasePageHome.php
  42. 1 1
      template/scripts/BxBasePagesSearchResult.php
  43. 1 1
      template/scripts/BxBaseReportsGrid.php
  44. 2 2
      template/scripts/BxBaseSearchResult.php
  45. 5 5
      template/scripts/BxBaseServiceAccount.php
  46. 4 4
      template/scripts/BxBaseServiceLogin.php
  47. 1 1
      template/scripts/BxBaseServices.php

+ 3 - 1
inc/classes/BxDolCmts.php

@@ -463,11 +463,13 @@ class BxDolCmts extends BxDolFactory implements iBxDolReplaceable, iBxDolContent
     	if(empty($this->_aSystem['trigger_field_title']))
             return '';
 
-    	return ($bAbsolute ? BX_DOL_URL_ROOT : '') . BxDolPermalinks::getInstance()->permalink($this->_sViewUrl, [
+        $s = BxDolPermalinks::getInstance()->permalink($this->_sViewUrl, [
             'sys' => $this->_sSystem,
             'id' => $this->_iId,
             'cmt_id' => $iCmtId
         ]);
+
+    	return $bAbsolute ? bx_absolute_url($s) : $s;
     }
 
     public function getViewText($mixedItem)

+ 1 - 1
inc/classes/BxDolFormQuery.php

@@ -87,7 +87,7 @@ class BxDolFormQuery extends BxDolDb
 
         // form action
         if (!empty($aForm['form_attrs']['action']) && 0 !== strncasecmp($aForm['form_attrs']['action'], 'http://', 7) && 0 !== strncasecmp($aForm['form_attrs']['action'], 'https://', 8))
-            $aForm['form_attrs']['action'] = BX_DOL_URL_ROOT . BxDolPermalinks::getInstance()->permalink($aForm['form_attrs']['action']);
+            $aForm['form_attrs']['action'] = bx_absolute_url(BxDolPermalinks::getInstance()->permalink($aForm['form_attrs']['action']));
 
         // params
         if (!empty($aObject['params']))

+ 2 - 2
inc/classes/BxDolPage.php

@@ -166,7 +166,7 @@ class BxDolPage extends BxDolFactory implements iBxDolFactoryObject, iBxDolRepla
         if ($bRedirectCheck && !$sObject && '/' == substr($sURI, -1)) {
             header("HTTP/1.1 301 Moved Permanently");
             unset($_GET['i']);
-            header ('Location:' . bx_append_url_params(BX_DOL_URL_ROOT . BxDolPermalinks::getInstance()->permalink('page.php?i=' . trim($sURI, '/')), $_GET));
+            header ('Location:' . bx_append_url_params(bx_absolute_url(BxDolPermalinks::getInstance()->permalink('page.php?i=' . trim($sURI, '/'))), $_GET));
             exit;
         }
 
@@ -814,7 +814,7 @@ class BxDolPage extends BxDolFactory implements iBxDolFactoryObject, iBxDolRepla
 
     public static function redirectToLoginForm ()
     {
-        header("Location: " . bx_append_url_params(BX_DOL_URL_ROOT . BxDolPermalinks::getInstance()->permalink('page.php?i=login'), ['relocate' => bx_get_self_url()]));
+        header("Location: " . bx_append_url_params(bx_absolute_url(BxDolPermalinks::getInstance()->permalink('page.php?i=login')), ['relocate' => bx_get_self_url()]));
         exit;
     }
 }

+ 1 - 1
inc/classes/BxDolStorageLocal.php

@@ -139,7 +139,7 @@ class BxDolStorageLocal extends BxDolStorage
     protected function getObjectBaseUrl ($isPrivate = false)
     {
         $o = BxDolPermalinks::getInstance();
-        return BX_DOL_URL_ROOT . $o->permalink('storage.php?o=') . $this->_aObject['object'] . ($o->_isEnabled('storage.php?o=') ? '/' : '&f=');
+        return bx_absolute_url($o->permalink('storage.php?o=') . $this->_aObject['object'] . ($o->_isEnabled('storage.php?o=') ? '/' : '&f='));
     }
 
     protected function mkdir($sDirName, $sRights = false)

+ 1 - 1
inc/classes/BxDolTemplate.php

@@ -1261,7 +1261,7 @@ class BxDolTemplate extends BxDolFactory implements iBxDolSingleton
         $sRet .= "<link rel=\"alternate\" type=\"application/json+oembed\" href=\"" . BX_DOL_URL_ROOT ."em.php?url=" . urlencode($_SERVER["REQUEST_URI"]) . "&format=json\" title=\"". (isset($this->aPage['header']) ? bx_html_attribute(strip_tags($this->aPage['header'])) : '') . "\" />";
         
         if (!empty($this->aPage['url'])){
-            $sRet .= "<link rel=\"canonical\" href=\"" . BX_DOL_URL_ROOT . BxDolPermalinks::getInstance()->permalink($this->aPage['url']). "\" />";
+            $sRet .= '<link rel="canonical" href="' . bx_absolute_url(BxDolPermalinks::getInstance()->permalink($this->aPage['url'])) . '" />';
         }
         
         return $sRet;

+ 2 - 2
inc/profiles.inc.php

@@ -194,7 +194,7 @@ function bx_check_password($sLogin, $sPassword, $iRole = BX_DOL_ROLE_MEMBER)
     
     if ($oAccount->isLocked()){
         bx_import('BxDolLanguages');
-		return _t("_sys_txt_login_locked", BX_DOL_URL_ROOT . BxDolPermalinks::getInstance()->permalink('page.php?i=forgot-password'));
+		return _t("_sys_txt_login_locked", bx_absolute_url(BxDolPermalinks::getInstance()->permalink('page.php?i=forgot-password')));
 	}
 
     $aAccountInfo = $oAccount->getInfo();
@@ -223,7 +223,7 @@ function bx_check_password($sLogin, $sPassword, $iRole = BX_DOL_ROLE_MEMBER)
             if ($aAccountInfo['login_attempts'] >= $iMaxLoginAttempts){
                 $oAccountQuery->lockAccount($aAccountInfo['id'], 1);
                 bx_import('BxDolLanguages');
-                return _t("_sys_txt_login_locked", BX_DOL_URL_ROOT . BxDolPermalinks::getInstance()->permalink('page.php?i=forgot-password'));
+                return _t("_sys_txt_login_locked", bx_absolute_url(BxDolPermalinks::getInstance()->permalink('page.php?i=forgot-password')));
             }
             else{
                 $oAccountQuery->updateAttemptsCounter($aAccountInfo['id']);

+ 10 - 3
inc/utils.inc.php

@@ -1220,7 +1220,7 @@ function bx_get_reset_password_link($sValue, $sField = 'email', $iLifetime = 0)
 
 function bx_get_reset_password_link_by_key($sKey)
 {
-    return BX_DOL_URL_ROOT . BxDolPermalinks::getInstance()->permalink('page.php?i=forgot-password', array('key' => $sKey));
+    return bx_absolute_url(BxDolPermalinks::getInstance()->permalink('page.php?i=forgot-password', array('key' => $sKey)));
 }
 
 function bx_get_reset_password_redirect($iAccountId)
@@ -1257,8 +1257,8 @@ function bx_get_reset_password_redirect($iAccountId)
             break;
     }
 
-    if(!empty($sResult) && mb_stripos($sResult, BX_DOL_URL_ROOT) !== 0)
-        $sResult = BX_DOL_URL_ROOT . $sResult;
+    if(!empty($sResult))
+        $sResult = bx_absolute_url($sResult);
 
     return $sResult;
 }
@@ -2270,4 +2270,11 @@ function is_private_ip ($sIp)
     return filter_var($sIp, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4 | FILTER_FLAG_IPV6 | FILTER_FLAG_NO_PRIV_RANGE | FILTER_FLAG_NO_RES_RANGE) !== $sIp;
 }
 
+function bx_absolute_url($sUrl)
+{
+    if (!preg_match('/^https?:\/\//', $sUrl))
+        $sUrl = BX_DOL_URL_ROOT . $sUrl;
+    return $sUrl;
+}
+
 /** @} */

+ 2 - 2
modules/base/connect/classes/BxBaseModConnectModule.php

@@ -283,13 +283,13 @@ class BxBaseModConnectModule extends BxBaseModGeneralModule
 
             case 'settings':
                 if (!$isExistingProfile) { 
-                    $sRedirectUrl = BX_DOL_URL_ROOT . BxDolPermalinks::getInstance()->permalink('page.php?i=account-settings-email');
+                    $sRedirectUrl = bx_absolute_url(BxDolPermalinks::getInstance()->permalink('page.php?i=account-settings-email'));
                     break;
                 }
 
             case 'dashboard':
             default:
-                $sRedirectUrl = BX_DOL_URL_ROOT . BxDolPermalinks::getInstance()->permalink('page.php?i=dashboard');
+                $sRedirectUrl = bx_absolute_url(BxDolPermalinks::getInstance()->permalink('page.php?i=dashboard'));
                 break;
             }
 

+ 2 - 5
modules/base/general/classes/BxBaseModGeneralFormsEntryHelper.php

@@ -632,10 +632,7 @@ class BxBaseModGeneralFormsEntryHelper extends BxDolProfileForms
         );
         $s = str_replace($aMarkers, $aReplacements, $s);
 
-        $s = BxDolPermalinks::getInstance()->permalink($s);
-
-        if (false === strpos($s, 'http://') && false === strpos($s, 'https://'))
-            $s = BX_DOL_URL_ROOT . $s;
+        $s = bx_absolute_url(BxDolPermalinks::getInstance()->permalink($s));
         
         return $s;
     }
@@ -664,7 +661,7 @@ class BxBaseModGeneralFormsEntryHelper extends BxDolProfileForms
         if(empty($CNF[$sKeyUri]))
             return;
 
-        $oForm->setAbsoluteActionUrl(BX_DOL_URL_ROOT . BxDolPermalinks::getInstance()->permalink('page.php?i=' . $CNF[$sKeyUri]));
+        $oForm->setAbsoluteActionUrl(bx_absolute_url(BxDolPermalinks::getInstance()->permalink('page.php?i=' . $CNF[$sKeyUri])));
     }
 }
 

+ 1 - 1
modules/base/general/classes/BxBaseModGeneralGridAdministration.php

@@ -221,7 +221,7 @@ class BxBaseModGeneralGridAdministration extends BxTemplGrid
 
 		$sLink = $oModuleAccounts->_oConfig->CNF['URL_MANAGE_' . $sTypeUpc];
 
-		$sLink = BX_DOL_URL_ROOT . BxDolPermalinks::getInstance()->permalink($sLink);
+		$sLink = bx_absolute_url(BxDolPermalinks::getInstance()->permalink($sLink));
 		
 		if(!empty($sFilter))
 			$sLink = bx_append_url_params($sLink, array('filter' => $sFilter));

+ 6 - 6
modules/base/general/classes/BxBaseModGeneralModule.php

@@ -379,7 +379,7 @@ class BxBaseModGeneralModule extends BxDolModule
         if(empty($aContentInfo))
             return '';
 
-        return BX_DOL_URL_ROOT . BxDolPermalinks::getInstance()->permalink('page.php?i=' . $CNF['URI_VIEW_ENTRY'] . '&id=' . $aContentInfo[$CNF['FIELD_ID']]);
+        return bx_absolute_url(BxDolPermalinks::getInstance()->permalink('page.php?i=' . $CNF['URI_VIEW_ENTRY'] . '&id=' . $aContentInfo[$CNF['FIELD_ID']]));
     }
 
     public function serviceGetTitle ($iContentId)
@@ -1435,7 +1435,7 @@ class BxBaseModGeneralModule extends BxDolModule
 
         $sEntryUrl = !empty($aParams['entry_url']) ? $aParams['entry_url'] : '';
         if(empty($sEntryUrl) && !empty($CNF['URI_VIEW_ENTRY']))
-            $sEntryUrl = BX_DOL_URL_ROOT . BxDolPermalinks::getInstance()->permalink('page.php?i=' . $CNF['URI_VIEW_ENTRY'] . '&id=' . $iContentId);
+            $sEntryUrl = bx_absolute_url(BxDolPermalinks::getInstance()->permalink('page.php?i=' . $CNF['URI_VIEW_ENTRY'] . '&id=' . $iContentId));
 
         $iEntryThumb = !empty($aParams['entry_thumb']) ? (int)$aParams['entry_thumb'] : 0;
         if(empty($iEntryThumb) && !empty($CNF['FIELD_THUMB']) && !empty($aContentInfo[$CNF['FIELD_THUMB']]))
@@ -1615,7 +1615,7 @@ class BxBaseModGeneralModule extends BxDolModule
         $aMarkers = array(
             'id' => $iContentId,
             'module' => $this->_aModule['name'],
-            'url' => BX_DOL_URL_ROOT . $sUrl,
+            'url' => bx_absolute_url($sUrl),
             'title' => $sTitle,
         );
 
@@ -2229,7 +2229,7 @@ class BxBaseModGeneralModule extends BxDolModule
             'sample' => isset($CNF['T']['txt_sample_single_with_article']) ? $CNF['T']['txt_sample_single_with_article'] : $CNF['T']['txt_sample_single'],
             'sample_wo_article' => $CNF['T']['txt_sample_single'],
             'sample_action' => isset($CNF['T']['txt_sample_action']) ? $CNF['T']['txt_sample_action'] : '',
-            'url' => BX_DOL_URL_ROOT . BxDolPermalinks::getInstance()->permalink('page.php?i=' . $CNF['URI_VIEW_ENTRY'] . '&id=' . $aContentInfo[$CNF['FIELD_ID']]),
+            'url' => bx_absolute_url(BxDolPermalinks::getInstance()->permalink('page.php?i=' . $CNF['URI_VIEW_ENTRY'] . '&id=' . $aContentInfo[$CNF['FIELD_ID']])),
             'content' => $aContent, //a string to display or array to parse default template before displaying.
             'date' => $aContentInfo[$CNF['FIELD_ADDED']],
             'views' => $aViews,
@@ -3128,7 +3128,7 @@ class BxBaseModGeneralModule extends BxDolModule
     public function _getFavoriteListUrl ($iListId, $iProfileId)
     {
         $CNF = &$this->_oConfig->CNF;
-        return BX_DOL_URL_ROOT . BxDolPermalinks::getInstance()->permalink('page.php?i=' . $CNF['URI_FAVORITES_LIST'] . '&profile_id=' . $iProfileId . '&list_id=' . $iListId);
+        return bx_absolute_url(BxDolPermalinks::getInstance()->permalink('page.php?i=' . $CNF['URI_FAVORITES_LIST'] . '&profile_id=' . $iProfileId . '&list_id=' . $iListId));
     }
     
     
@@ -3305,7 +3305,7 @@ class BxBaseModGeneralModule extends BxDolModule
     {
     	$CNF = &$this->_oConfig->CNF;
 
-    	$sUrl = BX_DOL_URL_ROOT . BxDolPermalinks::getInstance()->permalink('page.php?i=' . $CNF['URI_VIEW_ENTRY'] . '&id=' . $aContentInfo[$CNF['FIELD_ID']]);
+    	$sUrl = bx_absolute_url(BxDolPermalinks::getInstance()->permalink('page.php?i=' . $CNF['URI_VIEW_ENTRY'] . '&id=' . $aContentInfo[$CNF['FIELD_ID']]));
 
     	//--- Image(s)
         $aImages = $this->_getImagesForTimelinePost($aEvent, $aContentInfo, $sUrl, $aBrowseParams);

+ 2 - 2
modules/base/general/classes/BxBaseModGeneralSearchResult.php

@@ -33,7 +33,7 @@ class BxBaseModGeneralSearchResult extends BxTemplSearchResult
     {
         $CNF = &$this->oModule->_oConfig->CNF;
 
-        return BX_DOL_URL_ROOT . BxDolPermalinks::getInstance()->permalink('page.php?i=' . $CNF['URI_VIEW_ENTRY'] . '&id=' . $a[$CNF['FIELD_ID']]);
+        return bx_absolute_url(BxDolPermalinks::getInstance()->permalink('page.php?i=' . $CNF['URI_VIEW_ENTRY'] . '&id=' . $a[$CNF['FIELD_ID']]));
     }
 
     function getRssPageUrl ()
@@ -42,7 +42,7 @@ class BxBaseModGeneralSearchResult extends BxTemplSearchResult
             return false;
 
         $oPermalinks = BxDolPermalinks::getInstance();
-        return BX_DOL_URL_ROOT . $oPermalinks->permalink($this->aCurrent['rss']['link']);
+        return bx_absolute_url($oPermalinks->permalink($this->aCurrent['rss']['link']));
     }
 
     function rss ()

+ 1 - 1
modules/base/general/classes/BxBaseModGeneralTemplate.php

@@ -213,7 +213,7 @@ class BxBaseModGeneralTemplate extends BxDolModuleTemplate
     	$CNF = &BxDolModule::getInstance($this->MODULE)->_oConfig->CNF;
 
     	return $this->parseHtmlByName('breadcrumb.html', array(
-    		'url_home' => BX_DOL_URL_ROOT . BxDolPermalinks::getInstance()->permalink($CNF['URL_HOME']),
+    		'url_home' => bx_absolute_url(BxDolPermalinks::getInstance()->permalink($CNF['URL_HOME'])),
     		'icon_home' => $CNF['ICON'],
     		'bx_repeat:items' => $aTmplVarsItems
     	));

+ 2 - 2
modules/base/groups/classes/BxBaseModGroupsAlertsResponse.php

@@ -85,10 +85,10 @@ class BxBaseModGroupsAlertsResponse extends BxBaseModProfileAlertsResponse
 
             $sKey = BxDolKey::getInstance()->getNewKey(false, $CNF["INVITES_KEYS_LIFETIME"]);
             $this->_oModule->_oDb->insertInvite($sKey, $oAlert->iSender, $iInviter, $iInvited);
-            $sEntryUrl = BX_DOL_URL_ROOT . BxDolPermalinks::getInstance()->permalink('page.php?i=' . $CNF['URI_VIEW_ENTRY'], [
+            $sEntryUrl = bx_absolute_url(BxDolPermalinks::getInstance()->permalink('page.php?i=' . $CNF['URI_VIEW_ENTRY'], [
                 'id' => $oAlert->iObject,
                 'key' => $sKey
-            ]);
+            ]));
         }
 
         sendMailTemplate($this->_oModule->_oConfig->CNF['EMAIL_INVITATION'], 0, $iInvited, array(

+ 2 - 2
modules/base/groups/classes/BxBaseModGroupsMenuSnippetMeta.php

@@ -43,9 +43,9 @@ class BxBaseModGroupsMenuSnippetMeta extends BxBaseModProfileMenuSnippetMeta
 
         return [
             $this->getUnitMetaItemButton(_t('_bx_groups_menu_item_title_pay_and_join'), [
-                'href' => BX_DOL_URL_ROOT . BxDolPermalinks::getInstance()->permalink('page.php?i=' . $CNF['URI_JOIN_ENTRY'], [
+                'href' => bx_absolute_url(BxDolPermalinks::getInstance()->permalink('page.php?i=' . $CNF['URI_JOIN_ENTRY'], [
                     'profile_id' => $this->_oContentProfile->id()
-                ])
+                ]))
             ]),
             'bx-menu-item-button'
         ];

+ 1 - 1
modules/base/groups/classes/BxBaseModGroupsModule.php

@@ -400,7 +400,7 @@ class BxBaseModGroupsModule extends BxBaseModProfileModule
             return false;
 
         $sEntryTitle = $aContentInfo[$CNF['FIELD_NAME']];
-        $sEntryUrl = BX_DOL_URL_ROOT . BxDolPermalinks::getInstance()->permalink('page.php?i=' . $CNF['URI_VIEW_ENTRY'] . '&id=' . $aContentInfo[$CNF['FIELD_ID']]);
+        $sEntryUrl = bx_absolute_url(BxDolPermalinks::getInstance()->permalink('page.php?i=' . $CNF['URI_VIEW_ENTRY'] . '&id=' . $aContentInfo[$CNF['FIELD_ID']]));
 
         // send invitation to the group 
         $sModule = $this->getName();

+ 1 - 1
modules/base/groups/classes/BxBaseModGroupsPageEntry.php

@@ -108,7 +108,7 @@ class BxBaseModGroupsPageEntry extends BxBaseModProfilePageEntry
         $sCode = $this->_oModule->_oTemplate->getJsCode('invite_popup', array(
             'sPopupId' => $sId,
             'sKey' => $sKey,
-            'sAcceptUrl' =>  BX_DOL_URL_ROOT . BxDolPermalinks::getInstance()->permalink('page.php?i=' . $CNF['URI_VIEW_ENTRY'] . '&id=' . $this->_aProfileInfo['content_id']),
+            'sAcceptUrl' => bx_absolute_url(BxDolPermalinks::getInstance()->permalink('page.php?i=' . $CNF['URI_VIEW_ENTRY'] . '&id=' . $this->_aProfileInfo['content_id'])),
             'sDeclineUrl' => BX_DOL_URL_ROOT,
             'iGroupProfileId' => $this->_oProfile->id(),
         ));

+ 1 - 1
modules/base/payment/classes/BxBaseModPaymentConfig.php

@@ -171,7 +171,7 @@ class BxBaseModPaymentConfig extends BxBaseModGeneralConfig
 		if(strncmp($this->CNF[$sType], BX_DOL_URL_ROOT, strlen(BX_DOL_URL_ROOT)) === 0)
 			$sResult = bx_append_url_params($this->CNF[$sType], $aParams);
 		else
-			$sResult = BX_DOL_URL_ROOT . BxDolPermalinks::getInstance()->permalink($this->CNF[$sType], $aParams);
+			$sResult = bx_absolute_url(BxDolPermalinks::getInstance()->permalink($this->CNF[$sType], $aParams));
 
     	return $bSsl ? $this->http2https($sResult) : $sResult;
     }

+ 1 - 1
modules/base/profile/classes/BxBaseModProfileAlertsResponse.php

@@ -133,7 +133,7 @@ class BxBaseModProfileAlertsResponse extends BxBaseModGeneralAlertsResponse
         sendMailTemplate($CNF['EMAIL_FRIEND_REQUEST'], 0, $iRecipient, array(
             'SenderUrl' => $oSender->getUrl(),
             'SenderDisplayName' => $oSender->getDisplayName(),
-            'FriendsLink' => BX_DOL_URL_ROOT . BxDolPermalinks::getInstance()->permalink('page.php?i=' . $CNF['URI_VIEW_FRIEND_REQUESTS'] . '&profile_id=' . $iRecipient),
+            'FriendsLink' => bx_absolute_url(BxDolPermalinks::getInstance()->permalink('page.php?i=' . $CNF['URI_VIEW_FRIEND_REQUESTS'] . '&profile_id=' . $iRecipient)),
         ), BX_EMAIL_NOTIFY);
     }
 

+ 6 - 6
modules/base/profile/classes/BxBaseModProfileFormEntry.php

@@ -114,7 +114,7 @@ class BxBaseModProfileFormEntry extends BxBaseModGeneralFormEntry
                 $oConnection = BxDolConnection::getObjectInstance('sys_profiles_friends');
                 $iCount = $oConnection->getConnectedContentCount($oProfile->id(), true);
                 return $this->_oModule->_oTemplate->parseHtmlByName('name_link.html', array(
-                    'href' => BX_DOL_URL_ROOT . BxDolPermalinks::getInstance()->permalink('page.php?i=' . $this->_oModule->_oConfig->CNF['URI_VIEW_FRIENDS'] . '&profile_id=' . $oProfile->id()),
+                    'href' => bx_absolute_url(BxDolPermalinks::getInstance()->permalink('page.php?i=' . $this->_oModule->_oConfig->CNF['URI_VIEW_FRIENDS'] . '&profile_id=' . $oProfile->id())),
                     'title' => '',
                     'content' => $iCount
                 ));
@@ -131,7 +131,7 @@ class BxBaseModProfileFormEntry extends BxBaseModGeneralFormEntry
                 $oConnectionFollow = BxDolConnection::getObjectInstance('sys_profiles_subscriptions');
                 $iCount = $oConnectionFollow->getConnectedInitiatorsCount($oProfile->id());
                 return $this->_oModule->_oTemplate->parseHtmlByName('name_link.html', array(
-                    'href' => BX_DOL_URL_ROOT . BxDolPermalinks::getInstance()->permalink('page.php?i=' . $this->_oModule->_oConfig->CNF['URI_VIEW_SUBSCRIPTIONS'] . '&profile_id=' . $oProfile->id()),
+                    'href' => bx_absolute_url(BxDolPermalinks::getInstance()->permalink('page.php?i=' . $this->_oModule->_oConfig->CNF['URI_VIEW_SUBSCRIPTIONS'] . '&profile_id=' . $oProfile->id())),
                     'title' => '',
                     'content' => $iCount
                 ));
@@ -157,9 +157,9 @@ class BxBaseModProfileFormEntry extends BxBaseModGeneralFormEntry
 			return $sValue;
 
         return $this->_oModule->_oTemplate->parseHtmlByName('name_link.html', array(
-            'href' => BX_DOL_URL_ROOT . BxDolPermalinks::getInstance()->permalink($oModuleAccounts->_oConfig->CNF['URL_MANAGE_ADMINISTRATION'], array(
+            'href' => bx_absolute_url(BxDolPermalinks::getInstance()->permalink($oModuleAccounts->_oConfig->CNF['URL_MANAGE_ADMINISTRATION'], array(
             	'filter' => urlencode($sValue)
-            )),
+            ))),
             'title' => '',
             'content' => $sValue
         ));
@@ -176,9 +176,9 @@ class BxBaseModProfileFormEntry extends BxBaseModGeneralFormEntry
             return $sStatus;
 
         return $this->_oModule->_oTemplate->parseHtmlByName('name_link.html', array(
-            'href' => BX_DOL_URL_ROOT . BxDolPermalinks::getInstance()->permalink($CNF['URL_MANAGE_ADMINISTRATION'], array(
+            'href' => bx_absolute_url(BxDolPermalinks::getInstance()->permalink($CNF['URL_MANAGE_ADMINISTRATION'], array(
             	'filter' => urlencode($this->aInputs[$CNF['FIELD_TITLE']]['value'])
-            )),
+            ))),
             'title' => '',
             'content' => $sStatus
         ));

+ 5 - 5
modules/base/profile/classes/BxBaseModProfileModule.php

@@ -436,7 +436,7 @@ class BxBaseModProfileModule extends BxBaseModGeneralModule implements iBxDolCon
 
     public function serviceProfileEditUrl ($iContentId)
     {
-        return BX_DOL_URL_ROOT . BxDolPermalinks::getInstance()->permalink('page.php?i=' . $this->_oConfig->CNF['URI_EDIT_ENTRY'] . '&id=' . $iContentId);
+        return bx_absolute_url(BxDolPermalinks::getInstance()->permalink('page.php?i=' . $this->_oConfig->CNF['URI_EDIT_ENTRY'] . '&id=' . $iContentId));
     }
 
     public function serviceProfileThumb ($iContentId)
@@ -469,7 +469,7 @@ class BxBaseModProfileModule extends BxBaseModGeneralModule implements iBxDolCon
     	if(empty($CNF['URL_CREATE']))
     		return false;
 
-    	return $bAbsolute ? BX_DOL_URL_ROOT . BxDolPermalinks::getInstance()->permalink($CNF['URL_CREATE']) : $CNF['URL_CREATE'];
+    	return $bAbsolute ? bx_absolute_url(BxDolPermalinks::getInstance()->permalink($CNF['URL_CREATE'])) : $CNF['URL_CREATE'];
     }
 
     /**
@@ -496,7 +496,7 @@ class BxBaseModProfileModule extends BxBaseModGeneralModule implements iBxDolCon
         if (!$aContentInfo)
             return false;
         $CNF = $this->_oConfig->CNF;
-        return BX_DOL_URL_ROOT . BxDolPermalinks::getInstance()->permalink('page.php?i=' . $CNF['URI_VIEW_ENTRY'] . '&id=' . $aContentInfo[$CNF['FIELD_ID']]);
+        return bx_absolute_url(BxDolPermalinks::getInstance()->permalink('page.php?i=' . $CNF['URI_VIEW_ENTRY'] . '&id=' . $aContentInfo[$CNF['FIELD_ID']]));
     }
 
     /**
@@ -1989,7 +1989,7 @@ class BxBaseModProfileModule extends BxBaseModGeneralModule implements iBxDolCon
             'sample' => $sSample,
             'sample_wo_article' => $CNF['T'][$aBuildParams['txt_ss']],
             'sample_action' => isset($CNF['T'][$aBuildParams['txt_sa']]) ? $CNF['T'][$aBuildParams['txt_sa']] : '',
-            'url' => BX_DOL_URL_ROOT . BxDolPermalinks::getInstance()->permalink('page.php?i=' . $CNF['URI_VIEW_ENTRY'] . '&id=' . $aContentInfo[$CNF['FIELD_ID']]),
+            'url' => bx_absolute_url(BxDolPermalinks::getInstance()->permalink('page.php?i=' . $CNF['URI_VIEW_ENTRY'] . '&id=' . $aContentInfo[$CNF['FIELD_ID']])),
             'content' => $this->_getContentForTimelineProfileImage($aEvent, $aBrowseParams, $aBuildParams, $aContentInfo, $aFileInfo), //a string to display or array to parse default template before displaying.
             'date' => $aContentInfo[$CNF['FIELD_ADDED']],
             'views' => '',
@@ -2020,7 +2020,7 @@ class BxBaseModProfileModule extends BxBaseModGeneralModule implements iBxDolCon
     {
     	$CNF = &$this->_oConfig->CNF;
 
-    	$sUrl = BX_DOL_URL_ROOT . BxDolPermalinks::getInstance()->permalink('page.php?i=' . $CNF['URI_VIEW_ENTRY'] . '&id=' . $aContentInfo[$CNF['FIELD_ID']]);
+    	$sUrl = bx_absolute_url(BxDolPermalinks::getInstance()->permalink('page.php?i=' . $CNF['URI_VIEW_ENTRY'] . '&id=' . $aContentInfo[$CNF['FIELD_ID']]));
 
     	//--- Image(s)
         $sImage = $this->_oConfig->getImageUrl($aFileInfo['id'], $aBuildParams['trans']);

+ 1 - 1
modules/base/profile/classes/BxBaseModProfilePageEntry.php

@@ -90,7 +90,7 @@ class BxBaseModProfilePageEntry extends BxBaseModGeneralPageEntry
                 $sStatus = $this->_aContentInfo['profile_status'];
                 $sManageUrl = '#';
                 if(!empty($CNF['FIELD_TITLE']) && !empty($CNF['URL_MANAGE_ADMINISTRATION']))
-                    $sManageUrl = BX_DOL_URL_ROOT . BxDolPermalinks::getInstance()->permalink($CNF['URL_MANAGE_ADMINISTRATION'], array('filter' => urlencode($this->_aContentInfo[$CNF['FIELD_TITLE']])));
+                    $sManageUrl = bx_absolute_url(BxDolPermalinks::getInstance()->permalink($CNF['URL_MANAGE_ADMINISTRATION'], array('filter' => urlencode($this->_aContentInfo[$CNF['FIELD_TITLE']]))));
 
                 $aInformer = $CNF['INFORMERS']['status_moderation'];
                 if (isset($aInformer['map'][$sStatus]))

+ 4 - 4
modules/base/profile/classes/BxBaseModProfileTemplate.php

@@ -132,7 +132,7 @@ class BxBaseModProfileTemplate extends BxBaseModGeneralTemplate
         $iProfile = $oProfile->id();
 
         // get profile's url
-        $sUrl = BX_DOL_URL_ROOT . BxDolPermalinks::getInstance()->permalink('page.php?i=' . $CNF['URI_VIEW_ENTRY'] . '&id=' . $iContentId);
+        $sUrl = bx_absolute_url(BxDolPermalinks::getInstance()->permalink('page.php?i=' . $CNF['URI_VIEW_ENTRY'] . '&id=' . $iContentId));
 
         // get profile's title
         $sTitle = $oModule->getProfileName($aData);
@@ -309,7 +309,7 @@ class BxBaseModProfileTemplate extends BxBaseModGeneralTemplate
         $oProfile = BxDolProfile::getInstanceByContentAndType($aData[$CNF['FIELD_ID']], $this->MODULE);
         $iProfile = $oProfile->id();
 
-        $sUrl = BX_DOL_URL_ROOT . BxDolPermalinks::getInstance()->permalink('page.php?i=' . $CNF['URI_VIEW_ENTRY'] . '&id=' . $aData[$CNF['FIELD_ID']]);
+        $sUrl = bx_absolute_url(BxDolPermalinks::getInstance()->permalink('page.php?i=' . $CNF['URI_VIEW_ENTRY'] . '&id=' . $aData[$CNF['FIELD_ID']]));
         $sTitle = bx_process_output($oProfile->getDisplayName());
 
         //--- Process Cover
@@ -342,7 +342,7 @@ class BxBaseModProfileTemplate extends BxBaseModGeneralTemplate
             else
                 $sUrlCover = $this->getImageUrl('cover.svg');
 
-            $sUrlCoverChange = BX_DOL_URL_ROOT . BxDolPermalinks::getInstance()->permalink('page.php?i=' . $CNF['URI_EDIT_COVER'] . '&id=' . $aData[$CNF['FIELD_ID']]);
+            $sUrlCoverChange = bx_absolute_url(BxDolPermalinks::getInstance()->permalink('page.php?i=' . $CNF['URI_EDIT_COVER'] . '&id=' . $aData[$CNF['FIELD_ID']]));
 
             $sAddClassCover = "";
             if(isset($CNF['FIELD_COVER']) && isset($CNF['OBJECT_UPLOADERS_COVER']) && isset($CNF['OBJECT_STORAGE_COVER']) && isset($CNF['OBJECT_IMAGES_TRANSCODER_COVER'])){
@@ -398,7 +398,7 @@ class BxBaseModProfileTemplate extends BxBaseModGeneralTemplate
             $bIsAllowEditPicture = $oModule->checkAllowedEdit($aData) === CHECK_ACTION_RESULT_ALLOWED;
 
             $sUrlPicture = $this->urlPicture ($aData);
-            $sUrlPictureChange = BX_DOL_URL_ROOT . BxDolPermalinks::getInstance()->permalink('page.php?i=' . $CNF['URI_EDIT_ENTRY'] . '&id=' . $aData[$CNF['FIELD_ID']]);
+            $sUrlPictureChange = bx_absolute_url(BxDolPermalinks::getInstance()->permalink('page.php?i=' . $CNF['URI_EDIT_ENTRY'] . '&id=' . $aData[$CNF['FIELD_ID']]));
 
             $sAddClassPicture = "";
             if(isset($CNF['FIELD_PICTURE']) && isset($CNF['OBJECT_UPLOADERS_PICTURE']) && isset($CNF['OBJECT_STORAGE']) && isset($CNF['OBJECT_IMAGES_TRANSCODER_THUMB'])){

+ 2 - 2
modules/base/text/classes/BxBaseModTextGridAdministration.php

@@ -180,7 +180,7 @@ class BxBaseModTextGridAdministration extends BxBaseModGeneralGridAdministration
 
     	$CNF = &$this->_oModule->_oConfig->CNF;
 
-        $sUrl = BX_DOL_URL_ROOT . BxDolPermalinks::getInstance()->permalink('page.php?i=' . $CNF['URI_EDIT_ENTRY'] . '&id=' . $aRow[$CNF['FIELD_ID']]);
+        $sUrl = bx_absolute_url(BxDolPermalinks::getInstance()->permalink('page.php?i=' . $CNF['URI_EDIT_ENTRY'] . '&id=' . $aRow[$CNF['FIELD_ID']]));
 
     	$a['attr'] = array_merge($a['attr'], array(
     		"onclick" => "window.open('" . $sUrl . "','_self');"
@@ -193,7 +193,7 @@ class BxBaseModTextGridAdministration extends BxBaseModGeneralGridAdministration
     {
         $CNF = &$this->_oModule->_oConfig->CNF;
 
-        $sUrl = BX_DOL_URL_ROOT . BxDolPermalinks::getInstance()->permalink('page.php?i=' . $CNF['URI_VIEW_ENTRY'] . '&id=' . $aRow[$CNF['FIELD_ID']]);
+        $sUrl = bx_absolute_url(BxDolPermalinks::getInstance()->permalink('page.php?i=' . $CNF['URI_VIEW_ENTRY'] . '&id=' . $aRow[$CNF['FIELD_ID']]));
 
         return $this->_oTemplate->parseHtmlByName('title_link.html', array(
             'href' => $sUrl,

+ 1 - 1
modules/base/text/classes/BxBaseModTextPageEntry.php

@@ -41,7 +41,7 @@ class BxBaseModTextPageEntry extends BxBaseModGeneralPageEntry
         $sTitle = $sUrl = $sIcon = "";
         if ($this->_aContentInfo && CHECK_ACTION_RESULT_ALLOWED === $this->_oModule->checkAllowedView($this->_aContentInfo)) {
             $sTitle = $this->_oModule->_oTemplate->getTitleAuto($this->_aContentInfo);
-            $sUrl = BX_DOL_URL_ROOT . BxDolPermalinks::getInstance()->permalink('page.php?i=' . $CNF['URI_VIEW_ENTRY'] . '&id=' . $this->_aContentInfo[$CNF['FIELD_ID']]);
+            $sUrl = bx_absolute_url(BxDolPermalinks::getInstance()->permalink('page.php?i=' . $CNF['URI_VIEW_ENTRY'] . '&id=' . $this->_aContentInfo[$CNF['FIELD_ID']]));
             $sIcon = $CNF['ICON'];
 
             $this->addMarkers($this->_aContentInfo); // every field can be used as marker

+ 1 - 1
modules/base/text/classes/BxBaseModTextTemplate.php

@@ -860,7 +860,7 @@ class BxBaseModTextTemplate extends BxBaseModGeneralTemplate
         }
 
         // get entry url
-        $sUrl = BX_DOL_URL_ROOT . BxDolPermalinks::getInstance()->permalink('page.php?i=' . $CNF['URI_VIEW_ENTRY'] . '&id=' . $aData[$CNF['FIELD_ID']]);
+        $sUrl = bx_absolute_url(BxDolPermalinks::getInstance()->permalink('page.php?i=' . $CNF['URI_VIEW_ENTRY'] . '&id=' . $aData[$CNF['FIELD_ID']]));
 
         $oProfile = BxDolProfile::getInstanceMagic($aData[$CNF['FIELD_AUTHOR']]);
         

+ 3 - 3
modules/boonex/acl/classes/BxAclModule.php

@@ -85,7 +85,7 @@ class BxAclModule extends BxDolModule
     {
         $CNF = &$this->_oConfig->CNF;
 
-    	return  BX_DOL_URL_ROOT . BxDolPermalinks::getInstance()->permalink($CNF['URL_VIEW']);
+    	return  bx_absolute_url(BxDolPermalinks::getInstance()->permalink($CNF['URL_VIEW']));
     }
 
     /**
@@ -216,7 +216,7 @@ class BxAclModule extends BxDolModule
             'name' => $aItem['name'],
             'title' => $sTitle,
             'description' => $sDescription,
-            'url' => BX_DOL_URL_ROOT . BxDolPermalinks::getInstance()->permalink($CNF['URL_VIEW']),
+            'url' => bx_absolute_url(BxDolPermalinks::getInstance()->permalink($CNF['URL_VIEW'])),
             'price_single' => $aItem['price'],
             'price_recurring' => $aItem['price'],
             'period_recurring' => $aItem['period'],
@@ -252,7 +252,7 @@ class BxAclModule extends BxDolModule
     	    return array();
 
         $aItems = $this->_oDb->getPrices(array('type' => 'all_full'));
-        $sUrl = BX_DOL_URL_ROOT . BxDolPermalinks::getInstance()->permalink($CNF['URL_VIEW']);
+        $sUrl = bx_absolute_url(BxDolPermalinks::getInstance()->permalink($CNF['URL_VIEW']));
 
         $aResult = array();
         foreach($aItems as $aItem) {

+ 1 - 1
modules/boonex/ads/classes/BxAdsFormEntry.php

@@ -181,7 +181,7 @@ class BxAdsFormEntry extends BxBaseModTextFormEntry
         if(empty($aCategory) || !is_array($aCategory))
             return '';
 
-        $sLink = BX_DOL_URL_ROOT . BxDolPermalinks::getInstance()->permalink($CNF['URL_CATEGORIES'], array($CNF['GET_PARAM_CATEGORY'] => $aCategory['id']));
+        $sLink = bx_absolute_url(BxDolPermalinks::getInstance()->permalink($CNF['URL_CATEGORIES'], array($CNF['GET_PARAM_CATEGORY'] => $aCategory['id'])));
         return $this->_oModule->_oTemplate->parseLink($sLink, bx_process_output(_t($aCategory['title'])));
     }
 

+ 1 - 1
modules/boonex/ads/classes/BxAdsGridOffersAll.php

@@ -46,7 +46,7 @@ class BxAdsGridOffersAll extends BxTemplGrid
     {
         $CNF = &$this->_oModule->_oConfig->CNF;
 
-        $sUrl = BX_DOL_URL_ROOT . BxDolPermalinks::getInstance()->permalink('page.php?i=' . $CNF['URI_VIEW_ENTRY_OFFERS'], array('id' => $aRow['content_id']));
+        $sUrl = bx_absolute_url(BxDolPermalinks::getInstance()->permalink('page.php?i=' . $CNF['URI_VIEW_ENTRY_OFFERS'], array('id' => $aRow['content_id'])));
 
     	$a['attr'] = array_merge($a['attr'], array(
             "onclick" => "window.open('" . $sUrl . "','_self');"

+ 1 - 1
modules/boonex/ads/classes/BxAdsMenuSnippetMeta.php

@@ -21,7 +21,7 @@ class BxAdsMenuSnippetMeta extends BxBaseModTextMenuSnippetMeta
 
         $CNF = &$this->_oModule->_oConfig->CNF;
 
-        $this->_sCategoryUrl = BX_DOL_URL_ROOT . BxDolPermalinks::getInstance()->permalink($CNF['URL_CATEGORIES'], array($CNF['GET_PARAM_CATEGORY'] => ''));
+        $this->_sCategoryUrl = bx_absolute_url(BxDolPermalinks::getInstance()->permalink($CNF['URL_CATEGORIES'], array($CNF['GET_PARAM_CATEGORY'] => '')));
     }
 
     protected function _getMenuItemCategory($aItem)

+ 22 - 22
modules/boonex/ads/classes/BxAdsModule.php

@@ -105,10 +105,10 @@ class BxAdsModule extends BxBaseModTextModule
                 'viewer_name' => $oViewer->getDisplayName(),
                 'viewer_url' => $oViewer->getUrl(),
                 'ad_name' => $aContentInfo[$CNF['FIELD_TITLE']],
-                'ad_url' => BX_DOL_URL_ROOT . BxDolPermalinks::getInstance()->permalink('page.php', array(
+                'ad_url' => bx_absolute_url(BxDolPermalinks::getInstance()->permalink('page.php', array(
                     'i' => $CNF['URI_VIEW_ENTRY'], 
                     $CNF['FIELD_ID'] => $iContentId
-                ))
+                )))
             ));
 
         return echoJson(array('msg' => _t('_bx_ads_txt_msg_author_notified')));
@@ -873,8 +873,8 @@ class BxAdsModule extends BxBaseModTextModule
         $oPermalink = BxDolPermalinks::getInstance();
 
         $aResult = $this->_aModule;
-        $aResult['url_browse_order_common'] = BX_DOL_URL_ROOT . $oPermalink->permalink($CNF['URL_LICENSES_COMMON'], array('filter' => '{order}'));
-        $aResult['url_browse_order_administration'] = BX_DOL_URL_ROOT . $oPermalink->permalink($CNF['URL_LICENSES_ADMINISTRATION'], array('filter' => '{order}'));
+        $aResult['url_browse_order_common'] = bx_absolute_url($oPermalink->permalink($CNF['URL_LICENSES_COMMON'], array('filter' => '{order}')));
+        $aResult['url_browse_order_administration'] = bx_absolute_url($oPermalink->permalink($CNF['URL_LICENSES_ADMINISTRATION'], array('filter' => '{order}')));
 
         return $aResult;
     }
@@ -932,7 +932,7 @@ class BxAdsModule extends BxBaseModTextModule
             'name' => $aItem[$CNF['FIELD_NAME']],
             'title' => $aItem[$CNF['FIELD_TITLE']],
             'description' => $aItem[$CNF['FIELD_TEXT']],
-            'url' => BX_DOL_URL_ROOT . BxDolPermalinks::getInstance()->permalink('page.php?i=' . $CNF['URI_VIEW_ENTRY'], array('id' => $aItem[$CNF['FIELD_ID']])),
+            'url' => bx_absolute_url(BxDolPermalinks::getInstance()->permalink('page.php?i=' . $CNF['URI_VIEW_ENTRY'], array('id' => $aItem[$CNF['FIELD_ID']]))),
             'price_single' => $fItemPrice,
             'price_recurring' => '',
             'period_recurring' => 0,
@@ -980,7 +980,7 @@ class BxAdsModule extends BxBaseModTextModule
                 'name' => $aItem[$CNF['FIELD_NAME']],
                 'title' => $aItem[$CNF['FIELD_TITLE']],
                 'description' => $aItem[$CNF['FIELD_TEXT']],
-                'url' => BX_DOL_URL_ROOT . BxDolPermalinks::getInstance()->permalink('page.php?i=' . $CNF['URI_VIEW_ENTRY'], array('id' => $aItem[$CNF['FIELD_ID']])),
+                'url' => bx_absolute_url(BxDolPermalinks::getInstance()->permalink('page.php?i=' . $CNF['URI_VIEW_ENTRY'], array('id' => $aItem[$CNF['FIELD_ID']]))),
                 'price_single' => $aItem[$CNF['FIELD_PRICE_SINGLE']],
                 'price_recurring' => '',
                 'period_recurring' => 0,
@@ -1109,7 +1109,7 @@ class BxAdsModule extends BxBaseModTextModule
         $aEmailParams = [
             'client_name' => $oClient->getDisplayName(),
             'entry_name' => $aEntry[$CNF['FIELD_TITLE']],
-            'entry_url' => BX_DOL_URL_ROOT . BxDolPermalinks::getInstance()->permalink('page.php?i=' . $CNF['URI_VIEW_ENTRY'], ['id' => $aEntry[$CNF['FIELD_ID']]]),
+            'entry_url' => bx_absolute_url(BxDolPermalinks::getInstance()->permalink('page.php?i=' . $CNF['URI_VIEW_ENTRY'], ['id' => $aEntry[$CNF['FIELD_ID']]])),
             'vendor_url' => $sSellerUrl,
             'vendor_name' => $sSellerName,
             'count' => (int)$iItemCount,
@@ -1602,10 +1602,10 @@ class BxAdsModule extends BxBaseModTextModule
                 'viewer_name' => $oViewer->getDisplayName(),
                 'viewer_url' => $oViewer->getUrl(),
                 'entry_name' => $aContentInfo[$CNF['FIELD_TITLE']],
-                'entry_url' => BX_DOL_URL_ROOT . BxDolPermalinks::getInstance()->permalink('page.php', array(
+                'entry_url' => bx_absolute_url(BxDolPermalinks::getInstance()->permalink('page.php', array(
                     'i' => $CNF['URI_VIEW_ENTRY'], 
                     $CNF['FIELD_ID'] => $iContentId
-                ))
+                )))
             ));
 
         $aParams = $this->_alertParamsOffer($aContentInfo, $aOfferInfo);
@@ -1637,10 +1637,10 @@ class BxAdsModule extends BxBaseModTextModule
                 'offerer_name' => $oOfferer->getDisplayName(),
                 'offerer_url' => $oOfferer->getUrl(),
                 'entry_name' => $aContentInfo[$CNF['FIELD_TITLE']],
-                'entry_url' => BX_DOL_URL_ROOT . BxDolPermalinks::getInstance()->permalink('page.php', array(
+                'entry_url' => bx_absolute_url(BxDolPermalinks::getInstance()->permalink('page.php', array(
                     'i' => $CNF['URI_VIEW_ENTRY'], 
                     $CNF['FIELD_ID'] => $iContentId
-                ))
+                )))
             ));
 
         $aParams = $this->_alertParamsOffer($aContentInfo, $aOfferInfo);
@@ -1668,10 +1668,10 @@ class BxAdsModule extends BxBaseModTextModule
                 'offerer_name' => $oOfferer->getDisplayName(),
                 'offerer_url' => $oOfferer->getUrl(),
                 'entry_name' => $aContentInfo[$CNF['FIELD_TITLE']],
-                'entry_url' => BX_DOL_URL_ROOT . BxDolPermalinks::getInstance()->permalink('page.php', array(
+                'entry_url' => bx_absolute_url(BxDolPermalinks::getInstance()->permalink('page.php', array(
                     'i' => $CNF['URI_VIEW_ENTRY'], 
                     $CNF['FIELD_ID'] => $iContentId
-                ))
+                )))
             ));
 
         $aParams = $this->_alertParamsOffer($aContentInfo, $aOfferInfo);
@@ -1702,10 +1702,10 @@ class BxAdsModule extends BxBaseModTextModule
                 'offerer_name' => $oOfferer->getDisplayName(),
                 'offerer_url' => $oOfferer->getUrl(),
                 'entry_name' => $aContentInfo[$CNF['FIELD_TITLE']],
-                'entry_url' => BX_DOL_URL_ROOT . BxDolPermalinks::getInstance()->permalink('page.php', array(
+                'entry_url' => bx_absolute_url(BxDolPermalinks::getInstance()->permalink('page.php', array(
                     'i' => $CNF['URI_VIEW_ENTRY'], 
                     $CNF['FIELD_ID'] => $iContentId
-                ))
+                )))
             ));
 
         $aParams = $this->_alertParamsOffer($aContentInfo, $aOfferInfo);
@@ -1739,10 +1739,10 @@ class BxAdsModule extends BxBaseModTextModule
                 'vendor_name' => $oProfileSrc->getDisplayName(),
                 'vendor_url' => $oProfileSrc->getUrl(),
                 'entry_name' => $mixedContent[$CNF['FIELD_TITLE']],
-                'entry_url' => BX_DOL_URL_ROOT . BxDolPermalinks::getInstance()->permalink('page.php', array(
+                'entry_url' => bx_absolute_url(BxDolPermalinks::getInstance()->permalink('page.php', array(
                     'i' => $CNF['URI_VIEW_ENTRY'], 
                     $CNF['FIELD_ID'] => $iContentId
-                ))
+                )))
             ));
 
         $aParams = $this->_alertParams($mixedContent);
@@ -1778,10 +1778,10 @@ class BxAdsModule extends BxBaseModTextModule
                 'client_name' => $oProfileSrc->getDisplayName(),
                 'client_url' => $oProfileSrc->getUrl(),
                 'entry_name' => $mixedContent[$CNF['FIELD_TITLE']],
-                'entry_url' => BX_DOL_URL_ROOT . BxDolPermalinks::getInstance()->permalink('page.php', array(
+                'entry_url' => bx_absolute_url(BxDolPermalinks::getInstance()->permalink('page.php', array(
                     'i' => $CNF['URI_VIEW_ENTRY'], 
                     $CNF['FIELD_ID'] => $iContentId
-                ))
+                )))
             ));
 
         $aParams = $this->_alertParams($mixedContent);
@@ -1840,10 +1840,10 @@ class BxAdsModule extends BxBaseModTextModule
         $iContentAuthor = (int)$aContent[$CNF['FIELD_AUTHOR']];
 
         $aReturn = array(
-            'redirect' => BX_DOL_URL_ROOT . BxDolPermalinks::getInstance()->permalink('page.php', array(
+            'redirect' => bx_absolute_url(BxDolPermalinks::getInstance()->permalink('page.php', array(
                 'i' => $CNF['URI_VIEW_ENTRY'], 
                 $CNF['FIELD_ID'] => $aOffer[$CNF['FIELD_OFR_CONTENT']]
-            ))
+            )))
         );
 
         $oPayments = BxDolPayments::getInstance();
@@ -2017,7 +2017,7 @@ class BxAdsModule extends BxBaseModTextModule
             $iCategory = (int)$aContentInfo[$CNF['FIELD_CATEGORY']];
             $aCategory = $this->_oDb->getCategories(array('type' => 'id', 'id' => $iCategory));
             $sCategory = _t($aCategory['title']);
-            $sCategoryLink = BX_DOL_URL_ROOT . BxDolPermalinks::getInstance()->permalink($CNF['URL_CATEGORIES'], array($CNF['GET_PARAM_CATEGORY'] => $iCategory));
+            $sCategoryLink = bx_absolute_url(BxDolPermalinks::getInstance()->permalink($CNF['URL_CATEGORIES'], array($CNF['GET_PARAM_CATEGORY'] => $iCategory)));
         }
 
         $sPrice = _t('_bx_ads_txt_free');

+ 5 - 5
modules/boonex/ads/classes/BxAdsTemplate.php

@@ -58,7 +58,7 @@ class BxAdsTemplate extends BxBaseModTextTemplate
         $aTmplVarsItems = array_reverse($aTmplVarsItems);
         
         $aTmplVarsItems[] = array(
-            'url' => BX_DOL_URL_ROOT . $oPermalink->permalink('page.php?i=' . $CNF['URI_VIEW_ENTRY'] . '&id=' . $aContentInfo[$CNF['FIELD_ID']]),
+            'url' => bx_absolute_url($oPermalink->permalink('page.php?i=' . $CNF['URI_VIEW_ENTRY'] . '&id=' . $aContentInfo[$CNF['FIELD_ID']])),
             'title' => bx_process_output($aContentInfo[$CNF['FIELD_TITLE']])
         );
 
@@ -70,7 +70,7 @@ class BxAdsTemplate extends BxBaseModTextTemplate
         $CNF = &$this->_oConfig->CNF;
 
         $sResult = $this->_categoriesList(0, array(
-            'url' => BX_DOL_URL_ROOT . BxDolPermalinks::getInstance()->permalink($CNF['URL_CATEGORIES'], array('category' => ''))
+            'url' => bx_absolute_url(BxDolPermalinks::getInstance()->permalink($CNF['URL_CATEGORIES'], array('category' => '')))
         ));
 
         if(empty($sResult) && isset($aParams['show_empty']) && $aParams['show_empty'] === true)
@@ -84,9 +84,9 @@ class BxAdsTemplate extends BxBaseModTextTemplate
         $CNF = &$this->_oConfig->CNF;
 
         return $this->getLink('entry-link', array(
-            'href' => BX_DOL_URL_ROOT . BxDolPermalinks::getInstance()->permalink('page.php?i=' . $CNF['URI_VIEW_ENTRY'], array(
+            'href' => bx_absolute_url(BxDolPermalinks::getInstance()->permalink('page.php?i=' . $CNF['URI_VIEW_ENTRY'], array(
                 'id' => $aEntry[$CNF['FIELD_ID']]
-            )),
+            ))),
             'title' => bx_html_attribute($aEntry[$CNF['FIELD_TITLE']]),
             'content' => $aEntry[$CNF['FIELD_TITLE']]
         ));
@@ -155,7 +155,7 @@ class BxAdsTemplate extends BxBaseModTextTemplate
             return;
 
         $aTmplVarsItems[] = array(
-            'url' => BX_DOL_URL_ROOT . $oPermalink->permalink($CNF['URL_CATEGORIES'], array($CNF['GET_PARAM_CATEGORY'] => $aCategory['id'])),
+            'url' => bx_absolute_url($oPermalink->permalink($CNF['URL_CATEGORIES'], array($CNF['GET_PARAM_CATEGORY'] => $aCategory['id']))),
             'title' => bx_process_output(_t($aCategory['title']))
         );
 

+ 1 - 1
modules/boonex/albums/classes/BxAlbumsContentInfoMedia.php

@@ -89,7 +89,7 @@ class BxAlbumsContentInfoMedia extends BxDolContentInfo
         if(empty($aMedia) || !is_array($aMedia))
             return '';
 
-        return BX_DOL_URL_ROOT . BxDolPermalinks::getInstance()->permalink('page.php?i=' . $this->_oModule->_oConfig->CNF['URI_VIEW_MEDIA'] . '&id=' . $iContentId);
+        return bx_absolute_url(BxDolPermalinks::getInstance()->permalink('page.php?i=' . $this->_oModule->_oConfig->CNF['URI_VIEW_MEDIA'] . '&id=' . $iContentId));
     }
 
     public function getContentText ($iContentId)

+ 1 - 1
studio/template/scripts/BxBaseStudioBuilderPage.php

@@ -1907,7 +1907,7 @@ class BxBaseStudioBuilderPage extends BxDolStudioBuilderPage
 
         return array(
             'js_object' => $sJsObject,
-            'url_view' => BX_DOL_URL_ROOT . $oPermalinks->permalink($this->aPageRebuild['url']),
+            'url_view' => bx_absolute_url($oPermalinks->permalink($this->aPageRebuild['url'])),
             'action_page_edit' => $this->sActionPageEdit,
             'bx_if:can_delete' => array(
                 'condition' => (int)$this->aPageRebuild['deletable'] == 1,

+ 1 - 1
studio/template/scripts/BxBaseStudioFunctions.php

@@ -44,7 +44,7 @@ class BxBaseStudioFunctions extends BxBaseFunctions implements iBxDolSingleton
             'csrf_token' => BxDolForm::getCsrfToken(),
             'relocate_url' => bx_html_attribute($sUrlRelocate),
             'action_url' => BX_DOL_URL_ROOT . 'member.php',
-            'forgot_password_url' => BX_DOL_URL_ROOT . BxDolPermalinks::getInstance()->permalink('page.php?i=forgot-password'),
+            'forgot_password_url' => bx_absolute_url(BxDolPermalinks::getInstance()->permalink('page.php?i=forgot-password')),
         ));
         $sHtml = $oTemplate->parseHtmlByName('login.html', array (
             'form' => $this->transBox('bx-std-login-form-box', $sHtml, true),

+ 1 - 1
template/scripts/BxBaseAccountForms.php

@@ -49,7 +49,7 @@ class BxBaseAccountForms extends BxDolProfileForms
         if (!$oForm)
             return MsgBox(_t('_sys_txt_error_occured'));
 
-        $oForm->aFormAttrs['action'] = !empty($aParams['action']) ? $aParams['action'] : BX_DOL_URL_ROOT . BxDolPermalinks::getInstance()->permalink('page.php?i=create-account');
+        $oForm->aFormAttrs['action'] = !empty($aParams['action']) ? $aParams['action'] : bx_absolute_url(BxDolPermalinks::getInstance()->permalink('page.php?i=create-account'));
         $oForm->initChecker(self::$PROFILE_FIELDS);
 
         bx_alert('account', 'add_form_check', 0, 0, array(

+ 1 - 1
template/scripts/BxBaseCmtsGridAdministration.php

@@ -189,7 +189,7 @@ class BxBaseCmtsGridAdministration extends BxDolCmtsGridAdministration
             return '';
 
         $sLink = $oModuleAccounts->_oConfig->CNF['URL_MANAGE_' . $sTypeUpc];
-        $sLink = BX_DOL_URL_ROOT . BxDolPermalinks::getInstance()->permalink($sLink);
+        $sLink = bx_absolute_url(BxDolPermalinks::getInstance()->permalink($sLink));
         if(!empty($sFilter))
             $sLink = bx_append_url_params($sLink, array('filter' => $sFilter));
 

+ 2 - 2
template/scripts/BxBaseFormAccount.php

@@ -93,7 +93,7 @@ class BxFormAccountCheckerHelper extends BxDolFormCheckerHelper
             return BxDolAccountQuery::getInstance()->getIdByEmail($s) ? _t('_sys_form_account_input_email_uniq_error_loggedin') : true;
         }
 
-        return BxDolAccountQuery::getInstance()->getIdByEmail($s) ? _t('_sys_form_account_input_email_uniq_error', BX_DOL_URL_ROOT . BxDolPermalinks::getInstance()->permalink('page.php?i=forgot-password')) : true;
+        return BxDolAccountQuery::getInstance()->getIdByEmail($s) ? _t('_sys_form_account_input_email_uniq_error', bx_absolute_url(BxDolPermalinks::getInstance()->permalink('page.php?i=forgot-password'))) : true;
     }
 }
 
@@ -204,7 +204,7 @@ class BxBaseFormAccount extends BxTemplFormView
 	protected function genCustomInputAgreement ($aInput)
     {
     	$oPermalink = BxDolPermalinks::getInstance();
-        return '<div>' . _t('_sys_form_account_input_agreement_value', BX_DOL_URL_ROOT . $oPermalink->permalink('page.php?i=terms'), BX_DOL_URL_ROOT . $oPermalink->permalink('page.php?i=privacy')) . '</div>';
+        return '<div>' . _t('_sys_form_account_input_agreement_value', bx_absolute_url($oPermalink->permalink('page.php?i=terms')), bx_absolute_url($oPermalink->permalink('page.php?i=privacy'))) . '</div>';
     }
     
     protected function _setCustomError ($s)

+ 1 - 1
template/scripts/BxBaseFormConfirmPhone.php

@@ -39,7 +39,7 @@ class BxFormConfirmPhoneCheckerHelper extends BxDolFormCheckerHelper
         }
         
         $oSession = BxDolSession::getInstance();
-        return $oSession->getValue(BX_ACCOUNT_SESSION_KEY_FOR_PHONE_ACTIVATEION_CODE) != $s ? _t('_sys_form_confirm_phone_input_code_error_invalid', BX_DOL_URL_ROOT . BxDolPermalinks::getInstance()->permalink('page.php?i=confirm-phone') . '?step=1') : true;
+        return $oSession->getValue(BX_ACCOUNT_SESSION_KEY_FOR_PHONE_ACTIVATEION_CODE) != $s ? _t('_sys_form_confirm_phone_input_code_error_invalid', bx_absolute_url(BxDolPermalinks::getInstance()->permalink('page.php?i=confirm-phone')) . '?step=1') : true;
     }
 }
 

+ 2 - 2
template/scripts/BxBaseFormLogin.php

@@ -37,7 +37,7 @@ class BxFormLoginCheckerHelper extends BxDolFormCheckerHelper
         }
        
         $oSession = BxDolSession::getInstance();
-        return $oSession->getValue(BX_ACCOUNT_SESSION_KEY_FOR_PHONE_ACTIVATEION_CODE) != $s ? _t('_sys_form_login_input_code_error_invalid', BX_DOL_URL_ROOT . BxDolPermalinks::getInstance()->permalink('page.php?i=login-step2')) : true;          
+        return $oSession->getValue(BX_ACCOUNT_SESSION_KEY_FOR_PHONE_ACTIVATEION_CODE) != $s ? _t('_sys_form_login_input_code_error_invalid', bx_absolute_url(BxDolPermalinks::getInstance()->permalink('page.php?i=login-step2'))) : true;          
     }   
 }
 
@@ -99,7 +99,7 @@ class BxBaseFormLogin extends BxTemplFormView
 
     protected function genCustomInputSubmitText ($aInput)
     {
-        return '<div><a href="' . BX_DOL_URL_ROOT . BxDolPermalinks::getInstance()->permalink('page.php?i=forgot-password') . '">' . _t("_sys_txt_forgot_pasword") . '</a></div>';
+        return '<div><a href="' . bx_absolute_url(BxDolPermalinks::getInstance()->permalink('page.php?i=forgot-password')) . '">' . _t("_sys_txt_forgot_pasword") . '</a></div>';
     }
 
     public function getRole()

+ 3 - 3
template/scripts/BxBasePageHome.php

@@ -24,7 +24,7 @@ class BxBasePageHome extends BxTemplPage
 
         BxDolCover::getInstance()->set(array(
             'class' => 'bx-cover-homepage',
-            'title' => _t('_sys_txt_homepage_cover', BX_DOL_URL_ROOT . BxDolPermalinks::getInstance()->permalink('page.php?i=create-account')),
+            'title' => _t('_sys_txt_homepage_cover', bx_absolute_url(BxDolPermalinks::getInstance()->permalink('page.php?i=create-account'))),
             'bx_if:empty_cover_class' => array (
                 'condition' => !$bTmplVarsCover,
                 'content' => array(),
@@ -65,10 +65,10 @@ class BxBasePageHome extends BxTemplPage
             $oTemplate = BxDolTemplate::getInstance();
             $oTemplate->addJs(array('lottie.min.js'));
             $aBlock['content'] = $oTemplate->parseHtmlByContent($aBlock['content'], array(
-                'join_link' => BX_DOL_URL_ROOT . $oPermalink->permalink('page.php?i=create-account'),
+                'join_link' => bx_absolute_url($oPermalink->permalink('page.php?i=create-account')),
                 'join_form' => $sJoinForm,
                 'join_form_in_box' => !empty($sJoinForm) ? DesignBoxContent(_t('_sys_txt_splash_join'), $sJoinForm, BX_DB_PADDING_DEF) : '',
-                'login_link' => BX_DOL_URL_ROOT . $oPermalink->permalink('page.php?i=login'),
+                'login_link' => bx_absolute_url($oPermalink->permalink('page.php?i=login')),
                 'login_form' => $sLoginForm,
                 'login_form_in_box' => !empty($sLoginForm) ? DesignBoxContent(_t('_sys_txt_splash_login'), $sLoginForm, BX_DB_PADDING_DEF) : '',
             ));

+ 1 - 1
template/scripts/BxBasePagesSearchResult.php

@@ -70,7 +70,7 @@ class BxBasePagesSearchResult extends BxTemplSearchResult
             if (isset($CNF['ICON']))
                 $sIcon = $CNF['ICON'];
         }
-        $sUrl = BX_DOL_URL_ROOT . BxDolPermalinks::getInstance()->permalink($aData['url']);
+        $sUrl = bx_absolute_url(BxDolPermalinks::getInstance()->permalink($aData['url']));
         
         $sTitle = _t($aData['title']);
         if (preg_match ('/{.*?}/', $sTitle))

+ 1 - 1
template/scripts/BxBaseReportsGrid.php

@@ -237,7 +237,7 @@ class BxBaseReportsGrid extends BxTemplGrid
     
     protected function _getActionAudit($sType, $sKey, $a, $isSmall = false, $isDisabled = false, $aRow = array())
     {
-        $sUrl = BX_DOL_URL_ROOT . BxDolPermalinks::getInstance()->permalink('page.php?i=dashboard-audit&module=' . $this->_aReportSystemInfo['module_name'] . '&content_id=' . $aRow['object_id']);
+        $sUrl = bx_absolute_url(BxDolPermalinks::getInstance()->permalink('page.php?i=dashboard-audit&module=' . $this->_aReportSystemInfo['module_name'] . '&content_id=' . $aRow['object_id']));
 
     	$a['attr'] = array_merge($a['attr'], array(
     		"onclick" => "window.open('" . $sUrl . "','_self');"

+ 2 - 2
template/scripts/BxBaseSearchResult.php

@@ -164,7 +164,7 @@ class BxBaseSearchResult extends BxDolSearchResult
             return false;
 
         $oPermalinks = BxDolPermalinks::getInstance();
-        return BX_DOL_URL_ROOT . bx_append_url_params($oPermalinks->permalink($this->aCurrent['rss']['link']), 'rss=1');
+        return bx_absolute_url(bx_append_url_params($oPermalinks->permalink($this->aCurrent['rss']['link']), 'rss=1'));
     }
 
     function showAdminActionsPanel($sWrapperId, $aButtons, $sCheckboxName = 'entry', $bSelectAll = true, $bSelectAllChecked = false, $sCustomHtml = '')
@@ -251,7 +251,7 @@ class BxBaseSearchResult extends BxDolSearchResult
 
         $oPermalinks = BxDolPermalinks::getInstance();
 
-        $sUrlStart = BX_DOL_URL_ROOT . $oPermalinks->permalink($this->sBrowseUrl);
+        $sUrlStart = bx_absolute_url($oPermalinks->permalink($this->sBrowseUrl));
 
         return $this->addAdditionalUrlParams($sUrlStart, $aAdditionalParams, $bReplacePagesParams);
     }

+ 5 - 5
template/scripts/BxBaseServiceAccount.php

@@ -75,7 +75,7 @@ class BxBaseServiceAccount extends BxDol
 
         $aTmplVarsLogin = [];
         if(!isset($aParams['no_login_text']) || false === (bool)$aParams['no_login_text'])
-            $aTmplVarsLogin['url'] = BX_DOL_URL_ROOT . $oPemalink->permalink('page.php?i=login');
+            $aTmplVarsLogin['url'] = bx_absolute_url($oPemalink->permalink('page.php?i=login'));
         
         return BxDolTemplate::getInstance()->parseHtmlByName('block_join.html', [
             'bx_if:show_auth' => [
@@ -90,7 +90,7 @@ class BxBaseServiceAccount extends BxDol
                 'condition' => !empty($aTmplVarsLogin),
                 'content' => $aTmplVarsLogin
             ],
-            'agreement' => _t('_sys_form_account_input_agreement_value', BX_DOL_URL_ROOT . $oPemalink->permalink('page.php?i=terms'), BX_DOL_URL_ROOT . $oPemalink->permalink('page.php?i=privacy')),
+            'agreement' => _t('_sys_form_account_input_agreement_value', bx_absolute_url($oPemalink->permalink('page.php?i=terms')), bx_absolute_url($oPemalink->permalink('page.php?i=privacy'))),
         ]);
     }
 
@@ -281,7 +281,7 @@ class BxBaseServiceAccount extends BxDol
                     }
 
                     $oSession->setValue(BX_ACCOUNT_SESSION_KEY_FOR_PHONE_ACTIVATEION_CODE, $sActivationCode);
-                    header('Location: ' . BX_DOL_URL_ROOT . BxDolPermalinks::getInstance()->permalink('page.php?i=confirm-phone'));
+                    header('Location: ' . bx_absolute_url(BxDolPermalinks::getInstance()->permalink('page.php?i=confirm-phone')));
                 } 
                 return '<div class="bx-def-padding-sec-bottom">' . _t("_sys_txt_confirm_phone_set_phone_desc_set_phone") . '</div>' .$oForm->getCode();
             }
@@ -340,7 +340,7 @@ class BxBaseServiceAccount extends BxDol
         $oTemplate->setPageNameIndex (BX_PAGE_TRANSITION);
         $oTemplate->setPageHeader (_t('_sys_txt_confirm_email_success'));
         $oTemplate->setPageContent ('page_main_code', MsgBox(_t('_sys_txt_confirm_email_success')));
-        $oTemplate->setPageContent ('url_relocate', BX_DOL_URL_ROOT . BxDolPermalinks::getInstance()->permalink($sUrl));
+        $oTemplate->setPageContent ('url_relocate', bx_absolute_url(BxDolPermalinks::getInstance()->permalink($sUrl)));
 
         BxDolTemplate::getInstance()->getPageCode();
         exit;
@@ -553,7 +553,7 @@ class BxBaseServiceAccount extends BxDol
 
         $oForm->initChecker();
         if($oForm->isSubmittedAndValid()) {
-            $sErrorUrl = BX_DOL_URL_ROOT . BxDolPermalinks::getInstance()->permalink('page.php?i=forgot-password');
+            $sErrorUrl = bx_absolute_url(BxDolPermalinks::getInstance()->permalink('page.php?i=forgot-password'));
 
             // check if key exists
             $oKey = BxDolKey::getInstance();

+ 4 - 4
template/scripts/BxBaseServiceLogin.php

@@ -173,7 +173,7 @@ class BxBaseServiceLogin extends BxDol
 
         $aTmplVarsJoin = [];
         if(strpos($sParams, 'no_join_text') === false)
-            $aTmplVarsJoin['url'] = BX_DOL_URL_ROOT . $oPemalink->permalink('page.php?i=create-account');
+            $aTmplVarsJoin['url'] = bx_absolute_url($oPemalink->permalink('page.php?i=create-account'));
 
         $oTemplate = BxDolTemplate::getInstance();
         $oTemplate->addJs(array('jquery.form.min.js'));        
@@ -192,7 +192,7 @@ class BxBaseServiceLogin extends BxDol
                 'condition' => !empty($aTmplVarsJoin),
                 'content' => $aTmplVarsJoin
             ],
-            'agreement' => _t('_sys_form_login_input_agreement_value', BX_DOL_URL_ROOT . $oPemalink->permalink('page.php?i=terms'), BX_DOL_URL_ROOT . $oPemalink->permalink('page.php?i=privacy')),
+            'agreement' => _t('_sys_form_login_input_agreement_value', bx_absolute_url($oPemalink->permalink('page.php?i=terms')), bx_absolute_url($oPemalink->permalink('page.php?i=privacy'))),
             'bx_if:show_js_code' => [
                 'condition' => strpos($sParams, 'ajax_form') !== false,
                 'content' => []
@@ -238,7 +238,7 @@ class BxBaseServiceLogin extends BxDol
             }
             $oSession = BxDolSession::getInstance();
             $oSession->setValue(BX_ACCOUNT_SESSION_KEY_FOR_PHONE_ACTIVATEION_CODE, $sActivationCode);
-            header('Location: ' . BX_DOL_URL_ROOT . BxDolPermalinks::getInstance()->permalink('page.php?i=login-step3'));
+            header('Location: ' . bx_absolute_url(BxDolPermalinks::getInstance()->permalink('page.php?i=login-step3')));
         }
         return '<div class="bx-def-padding-sec-bottom">' . _t("_sys_txt_login_2fa_description") . '</div>' .$oForm->getCode();
     }
@@ -251,7 +251,7 @@ class BxBaseServiceLogin extends BxDol
         }
         
         $oForm = BxDolForm::getObjectInstance('sys_login', 'sys_login_step3');
-        $oForm->aInputs['back']['caption'] = _t( $oForm->aInputs['back']['caption_src'], BX_DOL_URL_ROOT . BxDolPermalinks::getInstance()->permalink('page.php?i=login-step2'));
+        $oForm->aInputs['back']['caption'] = _t( $oForm->aInputs['back']['caption_src'], bx_absolute_url(BxDolPermalinks::getInstance()->permalink('page.php?i=login-step2')));
         $oForm->aFormAttrs['action'] = '';
         $oForm->initChecker();
         

+ 1 - 1
template/scripts/BxBaseServices.php

@@ -504,7 +504,7 @@ class BxBaseServices extends BxDol implements iBxDolProfileService
 
     public function serviceProfileEditUrl ($iContentId)
     {
-        return BX_DOL_URL_ROOT . BxDolPermalinks::getInstance()->permalink('page.php?i=account-settings-info');
+        return bx_absolute_url(BxDolPermalinks::getInstance()->permalink('page.php?i=account-settings-info'));
     }
 
     public function serviceProfileThumb ($iContentId)