Index: branches/5.2.x/units/affiliates/affiliates_tag_processor.php =================================================================== diff -u -N -r14625 -r14656 --- branches/5.2.x/units/affiliates/affiliates_tag_processor.php (.../affiliates_tag_processor.php) (revision 14625) +++ branches/5.2.x/units/affiliates/affiliates_tag_processor.php (.../affiliates_tag_processor.php) (revision 14656) @@ -1,6 +1,6 @@ getObject($params); + /* @var $object kDBItem */ + $params['affiliate'] = $object->GetDBField('AffiliateCode'); $params['prefix'] = '_FRONT_END_'; $params['index_file'] = 'index.php'; + + // to build non-SSL link without SID in case, when SSL is enabled (or SSL domain doesn't match non-SSL domain) $params['__SSL__'] = 0; - $params['__NO_SID__'] = 1; // don't work + $params['__NO_SID__'] = 1; $link = $this->Application->ProcessParsedTag('m', 'Link', $params); @@ -44,15 +48,19 @@ */ function GetUserAffiliateLink($params) { - $object =& $this->Application->recallObject( $this->getPrefixSpecial(), $this->Prefix, array_merge($params, array('skip_autoload'=>true)) ); - $object->Load(array('PortalUserId' => $this->Application->RecallVar('user_id'))); + $params['skip_autoload'] = true; -// return $this->GetAffiliateLink($params); + $object =& $this->getObject($params); + /* @var $object kDBItem */ + $object->Load(array('PortalUserId' => $this->Application->RecallVar('user_id'))); + $params['index_file'] = 'index.php'; $params['affiliate'] = $object->GetDBField('AffiliateCode'); + + // to build non-SSL link without SID in case, when SSL is enabled (or SSL domain doesn't match non-SSL domain) $params['__SSL__'] = 0; - $params['__NO_SID__'] = 1; // don't work + $params['__NO_SID__'] = 1; $link = $this->Application->ProcessParsedTag('m', 'Link', $params); @@ -71,7 +79,7 @@ { $object =& $this->Application->recallObject($this->Prefix . '.user'); /* @var $object kDBItem */ - + return $object->isLoaded(); } @@ -158,7 +166,7 @@ function PresetFormFields($params) { $prefix = $this->getPrefixSpecial(); - + if ( !$this->Application->GetVar($prefix . '_event') && !$this->Application->GetVar('u.register_event') ) { $this->Application->HandleEvent(new kEvent($prefix . ':OnNew')); }