Link to the current page, changing the session provider the given
 value.
 @param provider [String, nil]
343680
def link_to_current_page_by_provider(provider)
      provider = Krikri::Provider.find(provider) if provider.is_a? String

      return link_to_provider_page(provider) if params[:controller] ==
                                                'krikri/providers'
      params[:provider] = provider.id
      params[:session_provider] = provider.id
      link_to provider_name(provider), params
    end
482381
def page_redirect_url(options = {})
      options = {
        locale: prefix_locale? ? @page.language_code : nil,
        urlname: @page.urlname
      }.merge(options)

      alchemy.show_page_path additional_params.merge(options)
    end
927285
def load_page
      @page ||= Language.current.pages.contentpages.find_by(
        urlname: params[:urlname],
        language_code: params[:locale] || Language.current.code
      )
    end
13120
static void changePage(String url, TransitionIntf<?> t, boolean reverse, boolean changeHash,
                           boolean dialog) {
        changingPage = true;
        try {
            changePage(url, t.getJqmValue(), reverse, changeHash, dialog ? DATA_ROLE_DIALOG : null);
        } finally {
            changingPage = false;
        }
    }
1320932
def configure_pagination(page, options)
      page = super(page, options)
      raise ::Folio::InvalidPage unless page.current_page.is_a?(Integer)
      raise ::Folio::InvalidPage if page.out_of_bounds?
      page
    rescue ::WillPaginate::InvalidPage
      raise ::Folio::InvalidPage
    end
238287
function (e) {
        if (e && e.prevValue === e.newValue) {
            return;
        }

        var par   = this.current ? this.current.parentNode : null,
            after = this.link;

        if (par) {
            switch (this.paginator.getTotalPages()) {
                case Paginator.VALUE_UNLIMITED :
                        after = this.na; break;
                case this.paginator.getCurrentPage() :
                        after = this.span; break;
            }

            if (this.current !== after) {
                par.replaceChild(after,this.current);
                this.current = after;
            }
        }
    }
285979
def updateLink(page, lnk):
    
    CheckParent(page)
    annot = getLinkText(page, lnk)
    if annot == "":
        raise ValueError("link kind not supported")

    page.parent._updateObject(lnk["xref"], annot, page = page) 
    return
471936
function(provider) {
        if (!this.isCurrent()) {
          return;
        }
        if (_.isString(provider)) {
          provider = AV.User._authProviders[provider];
        }
        if (provider && provider.deauthenticate) {
          provider.deauthenticate();
        }
      }
41730
private void linkSession(long csid, long sessionID) {

        LongKeyIntValueHashMap scsMap;

        scsMap = (LongKeyIntValueHashMap) sessionUseMap.get(sessionID);

        if (scsMap == null) {
            scsMap = new LongKeyIntValueHashMap();

            sessionUseMap.put(sessionID, scsMap);
        }

        int count = scsMap.get(csid, 0);

        scsMap.put(csid, count + 1);

        if (count == 0) {
            useMap.put(csid, useMap.get(csid, 0) + 1);
        }
    }
60069
def edit_link(link = nil, options = {}, &block)
      if link && link.is_a?(Instamojo::Link)
        yield(link) if block_given?
      else
        options = set_options(options, &block)
        link = Instamojo::Link.new(options, self)
      end
      patch("links/#{link.slug}", link.to_h)
      @response.success? ? Instamojo::Link.new(@response.body[:link], self) : @response
    end
131681
def link_tag(protocol, base_url, view)
      view.tag :link, :rel => 'alternate', :href => href(protocol, base_url), :id => id, :media => media_query
    end
514519
def set_http_service(domain = nil, username = nil, password = nil)
      self.domain    = domain
      self.user_name = username
      self.password  = password
      self.service   = Credential::Service::HTTP
    end
288402
def link_to_page(page, key, link_options = {})
      css_class = "#{link_options[:class]} #{page == current_page ? 'current' : ''}"
      if key.nil?
        content_tag :span, "..", :class => "spacer"
      elsif page.nil?
        content_tag :span, t(key), :class => "#{css_class} unavailable"
      else
        link_to t(key, :page => page), url_for_page(page), :class => css_class, :alt => view.strip_tags(t(key, :page => page)), :remote => options[:remote], :method => options[:method]
      end
    end
1223389
def canonical_link_tag( url_for_options = nil )
      url = canonical_url_from( url_for_options || @_canonical_url_for_options || request.url )
      tag( :link, :rel => 'canonical', :href => url ) if url # custom url methods may sometimes return nil --R
    end
1126827
def put(self, key, value):
    ''''''
    # if value is a link, don't follow links
    if self._link_for_value(value):
      super(SymlinkDatastore, self).put(key, value)
      return

    # if `key` points to a symlink, need to follow it.
    current_value = super(SymlinkDatastore, self).get(key)
    link_key = self._link_for_value(current_value)
    if link_key:
      self.put(link_key, value) # self.put: could be another link.
    else:
      super(SymlinkDatastore, self).put(key, value)
224820
def load_current_users
      return if !@connect_current_user.nil?

      if @request.ssl? && @cookies.signed[:secure_user_id] != "secure#{@session[:user_id]}"
        sign_out! # hijacked
      else
        # If there is a session user_id, load up that user, otherwise set the anonymous user.
       
        if @session[:user_id]
          @connect_current_user = User.where(id: @session[:user_id]).first

          # It could happen (normally in development) that there is a session user_id that 
          # doesn't map to a User in the db.  In such a case, sign_out! to reset the state
          if @connect_current_user.nil?
            sign_out!
            return
          end
        else
          @connect_current_user = User.anonymous
        end

        # bring the app user inline with the connect user
        @app_current_user = user_provider.connect_user_to_app_user(@connect_current_user)
      end
    end
90832
public void linkSipSessions(SipSession session1, SipSession session2) {
        if (session1 == null) {
            throw new NullPointerException("First argument is null");
        }
        if (session2 == null) {
            throw new NullPointerException("Second argument is null");
        }

        if (!((MobicentsSipSession) session1).isValidInternal() || !((MobicentsSipSession) session2).isValidInternal()
                || State.TERMINATED.equals(((MobicentsSipSession) session1).getState())
                || State.TERMINATED.equals(((MobicentsSipSession) session2).getState())
                || !session1.getApplicationSession().equals(session2.getApplicationSession())
                || (sessionMap.get(((MobicentsSipSession) session1).getId()) != null && !sessionMap.get(((MobicentsSipSession) session1).getId()).equals(((MobicentsSipSession) session2).getId()))
                || (sessionMap.get(((MobicentsSipSession) session2).getId()) != null
                && !sessionMap.get(((MobicentsSipSession) session2).getId()).equals(((MobicentsSipSession) session1).getId()))) {
            throw new IllegalArgumentException("either of the specified sessions has been terminated "
                    + "or the sessions do not belong to the same application session or "
                    + "one or both the sessions are already linked with some other session(s)");
        }
        this.sessionMap.put(((MobicentsSipSession) session1).getId(), ((MobicentsSipSession) session2).getId());
        this.sessionMap.put(((MobicentsSipSession) session2).getId(), ((MobicentsSipSession) session1).getId());
        if (logger.isDebugEnabled()) {
            logger.debug("sipsession " + ((MobicentsSipSession) session1).getKey() + " linked to sip session " + ((MobicentsSipSession) session2).getKey());
        }
        dumpAppSession((MobicentsSipSession) session1);
        dumpLinkedSessions();
    }