code/libraries/joomlatools/library/controller/behavior/editable.php
public function setReferrer(KControllerContextInterface $context)
    {
        if (!$context->request->cookies->has($this->_cookie_name.'_locked'))
        {
            $request  = $context->request->getUrl();
            $referrer = $context->request->getReferrer();

            //Compare request url and referrer
            if (isset($referrer) && !$request->equals($referrer))
            {
                //Add the referrer cookie
                $cookie = $this->getObject('lib:http.cookie', array(
                    'name'   => $this->_cookie_name,
                    'value'  => $referrer,
                    'path'   => $this->_cookie_path
                ));

                $context->response->headers->addCookie($cookie);
            }
        }
	}
public function setReferrer(KControllerContextInterface $context)
    {
        if (!$context->request->cookies->has($this->_cookie_name.'_locked'))
        {
            $request  = $context->request->getUrl();
            $referrer = $context->request->getReferrer();

            //Compare request url and referrer
            if (isset($referrer) && !$request->equals($referrer))
            {
                //Add the referrer cookie
                $cookie = $this->getObject('lib:http.cookie', array(
                    'name'   => $this->_cookie_name,
                    'value'  => $referrer,
                    'path'   => $this->_cookie_path
                ));

                $context->response->headers->addCookie($cookie);
            }
        }
	}
public function setReferrer ( KControllerContextInterface $ context ) { if ( ! $ context -> request -> cookies -> has ( $ this -> _cookie_name . '_locked' ) ) { $ request = $ context -> request -> getUrl ( ) ; $ referrer = $ context -> request -> getReferrer ( ) ; //Compare request url and referrer if ( isset ( $ referrer ) && ! $ request -> equals ( $ referrer ) ) { //Add the referrer cookie $ cookie = $ this -> getObject ( 'lib:http.cookie' , array ( 'name' => $ this -> _cookie_name , 'value' => $ referrer , 'path' => $ this -> _cookie_path ) ) ; $ context -> response -> headers -> addCookie ( $ cookie ) ; } } }
Set the referrer

@param  KControllerContextInterface $context A controller context object
@return void
Set the referrer