code: public CmsSite getCurrentSite(CmsObject cms) {
  
          CmsSite site = getSiteForSiteRoot(cms.getRequestContext().getSiteRoot());
          return (site == null) ? m_defaultSite : site;
      }
docs: Returns the current site for the provided OpenCms user context object.<p>
  
  In the unlikely case that no site matches with the provided OpenCms user context,
  the default site is returned.<p>
  
  @param cms the OpenCms user context object to check for the site
  
  @return the current site for the provided OpenCms user context object