Disable visit tracking for search engines
authorAlexander Ebert <ebert@woltlab.com>
Fri, 31 Jul 2020 11:40:14 +0000 (13:40 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Fri, 31 Jul 2020 11:40:14 +0000 (13:40 +0200)
wcfsetup/install/files/lib/system/visitTracker/VisitTracker.class.php

index ffd71aa0bc32b5f8619f84ce97069a9489672986..3b94acb0258afbc5256a139caf42352ef5ad85c3 100644 (file)
@@ -85,7 +85,7 @@ class VisitTracker extends SingletonFactory {
                                        $this->userVisits = @unserialize($data);
                                }
                        }
-                       else {
+                       else if (WCF::getSession()->spiderID === null) {
                                $this->userVisits = WCF::getSession()->getVar('trackedUserVisits');
                        }
                        
@@ -128,7 +128,7 @@ class VisitTracker extends SingletonFactory {
                        $row = $statement->fetchArray();
                        if ($row) return $row['visitTime'];
                }
-               else {
+               else if (WCF::getSession()->spiderID === null) {
                        if ($visitTime = WCF::getSession()->getVar('trackedUserVisit_'.$this->getObjectTypeID($objectType).'_'.$objectID)) {
                                return $visitTime;
                        }