visitorCheckReferrer
14740
protected function visitorSetDebugSettings($visitors_category_id)
	{
	    $GLOBALS['visitors']['debug']['tag']          = false; 
	    $GLOBALS['visitors']['debug']['checks']       = false;
	    $GLOBALS['visitors']['debug']['referrer']     = false;
	    $GLOBALS['visitors']['debug']['searchengine'] = false;
	    
	    $objVisitors = \Database::getInstance()
                ->prepare("SELECT
                                visitors_expert_debug_tag,
                                visitors_expert_debug_checks,
                                visitors_expert_debug_referrer,
                                visitors_expert_debug_searchengine
                            FROM
                                tl_visitors
                            LEFT JOIN
                                tl_visitors_category ON (tl_visitors_category.id=tl_visitors.pid)
                            WHERE
                                pid=? AND published=?
                            ORDER BY tl_visitors.id, visitors_name")
                ->limit(1)
                ->execute($visitors_category_id,1);
	    while ($objVisitors->next())
	    {
	        $GLOBALS['visitors']['debug']['tag']          = (boolean)$objVisitors->visitors_expert_debug_tag;
	        $GLOBALS['visitors']['debug']['checks']       = (boolean)$objVisitors->visitors_expert_debug_checks;
	        $GLOBALS['visitors']['debug']['referrer']     = (boolean)$objVisitors->visitors_expert_debug_referrer;
	        $GLOBALS['visitors']['debug']['searchengine'] = (boolean)$objVisitors->visitors_expert_debug_searchengine;
	        ModuleVisitorLog::writeLog('## START ##', '## DEBUG ##', 'T'.(int)$GLOBALS['visitors']['debug']['tag'] .'#C'. (int)$GLOBALS['visitors']['debug']['checks'] .'#R'.(int) $GLOBALS['visitors']['debug']['referrer'] .'#S'.(int)$GLOBALS['visitors']['debug']['searchengine']);
	    }
	}
645222
private boolean checkRestrictorService(RestrictorCheck pCheck, Object ... args) {
        try {
            ServiceReference[] serviceRefs = bundleContext.getServiceReferences(Restrictor.class.getName(),null);
            if (serviceRefs != null) {
                boolean ret = true;
                boolean found = false;
                for (ServiceReference serviceRef : serviceRefs) {
                    Restrictor restrictor = (Restrictor) bundleContext.getService(serviceRef);
                    if (restrictor != null) {
                        ret = ret && pCheck.check(restrictor,args);
                        found = true;
                    }
                }
                return found && ret;
            } else {
                return false;
            }
        } catch (InvalidSyntaxException e) {
            // Will not happen, since we dont use a filter here
            throw new IllegalArgumentException("Impossible exception (we don't use a filter for fetching the services)",e);
        }
    }
269883
private void validateIncomingReferences( JcrVersionNode version ) throws RepositoryException {
        for (PropertyIterator iter = version.getReferences(); iter.hasNext();) {
            AbstractJcrProperty prop = (AbstractJcrProperty)iter.next();
            AbstractJcrNode referrer = prop.getParent();

            // If the property's parent is the root node, fail.
            if (referrer.isRoot()) {
                throw new ReferentialIntegrityException(JcrI18n.cannotRemoveVersion.text(prop.getPath()));
            }
            boolean referrerIsAnotherVersion = (referrer instanceof JcrVersionNode)
                                               && ((JcrVersionNode)referrer).getContainingHistory()
                                                                            .getIdentifier()
                                                                            .equals(version.getContainingHistory()
                                                                                           .getIdentifier());
            if (!this.equals(referrer) && !referrerIsAnotherVersion) {
                throw new ReferentialIntegrityException(JcrI18n.cannotRemoveVersion.text(prop.getPath()));
            }
        }
    }
45363
public final void visit(final Visitor visitor)
	{
		final Visit visit = new Visit();
		try
		{
			visit(visitor, visit);
		}
		catch (final StopVisitationException ignored)
		{
		}
	}
294273
@Override
    public void visit(NodeVisitor v) {
        if (v.visit(this)) {
            target.visit(v);
            element.visit(v);
        }
    }
176819
private static VisitorAttributes checkAttributes(VirtualFileFilter filter, VisitorAttributes attributes) {
        if (filter == null) {
            throw MESSAGES.nullArgument("filter");
        }
        // Specified
        if (attributes != null) { return attributes; }
        // From the filter
        if (filter instanceof VirtualFileFilterWithAttributes) { return ((VirtualFileFilterWithAttributes) filter).getAttributes(); }
        // It will use the default
        return null;
    }
1106624
def checkURL(cls, trust_root, url):
        """"""
        tr = cls.parse(trust_root)
        return tr is not None and tr.validateURL(url)
1219620
private function checkVisitorUuid()
    {
        if ( ! isset($this->visitorInfo['uuid']) || ! $this->visitorInfo['uuid'])
            $this->visitorInfo['uuid'] = $this->getVisitorIdFromSystem();
    }
754011
public void accept(final WebAppVisitor visitor) {
		visitor.visit(this); // First do everything else

		for (WebAppListener listener : listeners) {
			visitor.visit(listener);
		}
		if (!filters.isEmpty()) {
			// first visit the filters with a filter mapping in mapping order
			final List<WebAppFilter> remainingFilters = new ArrayList<>(
					filters.values());
			for (String filterName : orderedFilters) {
				final WebAppFilter filter = filters.get(filterName);
				visitor.visit(filter);
				remainingFilters.remove(filter);
			}
			// then visit filters without a mapping order in the order they were
			// added
			for (WebAppFilter filter : remainingFilters) {
				visitor.visit(filter);
			}
		}
		if (!servlets.isEmpty()) {
			for (WebAppServlet servlet : getSortedWebAppServlet()) {
				// Fix for PAXWEB-205
				visitor.visit(servlet);
			}
		}
		if (!constraintsMapping.isEmpty()) {
			for (WebAppConstraintMapping constraintMapping : constraintsMapping) {
				visitor.visit(constraintMapping);
			}

		}

		for (WebAppErrorPage errorPage : errorPages) {
			visitor.visit(errorPage);
		}

		visitor.end();
	}
1293594
private void check() {
		final Constructor<?> constructor = getConstructor();
		final XParameter[] parameters = getParameters();
		final Class<?>[] parameterTypes = constructor.getParameterTypes();
		Validate.isTrue(parameters.length == parameterTypes.length,
				"Wrong number of parameters: [" + parameters.length
						+ "], expected [" + parameterTypes.length + "].");
		for (int index = 0; index < parameters.length; index++) {
			final XParameter parameter = parameters[index];
			final Class<?> parameterType = parameterTypes[index];
			Validate.isTrue(parameterType.equals(parameter.getType()),
					"Wrong parameter type: [" + parameter.getType()
							+ "], expected [" + parameterType + "]");
		}
	}
1250052
def create_referrer
      
      # will not respond to _get_reqref unless 
      # reqref injected in application-controller
      #
      if self.respond_to?(:_get_reqref)
        if struct = _get_reqref

          self.create_referee(
                      origin: struct.referrer_url, 
                      request: struct.request_url, 
                      visits: struct.visit_count
                      )
        end
      end
    end
782775
@Override
    public void visit(final Submitter submitter) {
        visitedNameable = submitter;
        for (final GedObject gob : submitter.getAttributes()) {
            gob.accept(this);
        }
    }
60167
@Override
  @SuppressWarnings("unchecked")
  public void visit(Visitable visitable) {
    if (visitable instanceof Auditable) {
      Auditable<USER, PROCESS, ?> auditable = (Auditable<USER, PROCESS, ?>) visitable;

      if (auditable.isNew() || isCreatedUnset(auditable)) {
        auditable.setCreatedBy(getUser());
        auditable.setCreatedOn(getDateTime());
        auditable.setCreatedWith(getProcess());
      }

      if (auditable.isModified()) {
        auditable.setModifiedBy(getUser());
        auditable.setModifiedOn(getDateTime());
        auditable.setModifiedWith(getProcess());
      }
    }
  }
969493
public static function check() {
		if (R::count("role") < 1) {
			$role                                = R::dispense("role");
			$role->name                          = "guest";
			$per                                 = new permission("guest");
			$role->role->sharedPermissionList [] = $per->get();
			R::store($role);
		}
	}
1079880
@Override
    public void visit(NodeVisitor v) {
        if (v.visit(this)) {
            condition.visit(v);
            thenPart.visit(v);
            if (elsePart != null) {
                elsePart.visit(v);
            }
        }
    }
1214235
@Override
	public <P, E extends Exception> void accept(ComponentVisitor<P, E> visitor, P parameter) throws E
	{
		visitor.visit(this, parameter);
		
		for (Component component : components)
		{
			component.accept(visitor, parameter);
		}
		
		visitor.endVisit(this, parameter);
	}
962441
public function record(Visitor $visitor, $idReferrerActionUrl, $idReferrerActionName)
    {
        $this->loadIdsFromLogActionTable();

        $visitAction = array(
            'idvisit'           => $visitor->getVisitorColumn('idvisit'),
            'idsite'            => $this->request->getIdSite(),
            'idvisitor'         => $visitor->getVisitorColumn('idvisitor'),
            'idaction_url'      => $this->getIdActionUrl(),
            'idaction_url_ref'  => $idReferrerActionUrl,
            'idaction_name_ref' => $idReferrerActionName
        );

        /** @var ActionDimension[] $dimensions */
        $dimensions = ActionDimension::getAllDimensions();

        foreach ($dimensions as $dimension) {
            $value = $dimension->onNewAction($this->request, $visitor, $this);

            if ($value !== false) {
                if (is_float($value)) {
                    $value = Common::forceDotAsSeparatorForDecimalPoint($value);
                }

                $visitAction[$dimension->getColumnName()] = $value;
            }
        }

        // idaction_name is NULLable. we only set it when applicable
        if ($this->isActionHasActionName()) {
            $visitAction['idaction_name'] = (int)$this->getIdActionName();
        }

        foreach ($this->actionIdsCached as $field => $idAction) {
            $visitAction[$field] = ($idAction === false) ? 0 : $idAction;
        }

        $customValue = $this->getCustomFloatValue();
        if ($customValue !== false && $customValue !== null && $customValue !== '') {
            $visitAction[self::DB_COLUMN_CUSTOM_FLOAT] = Common::forceDotAsSeparatorForDecimalPoint($customValue);
        }

        $visitAction = array_merge($visitAction, $this->customFields);

        $this->idLinkVisitAction = $this->getModel()->createAction($visitAction);

        $visitAction['idlink_va'] = $this->idLinkVisitAction;

        Common::printDebug("Inserted new action:");
        $visitActionDebug = $visitAction;
        $visitActionDebug['idvisitor'] = bin2hex($visitActionDebug['idvisitor']);
        Common::printDebug($visitActionDebug);
    }