Ejemplo n.º 1
0
 public static function setActive()
 {
     if (!\Audit::instance()->isbot()) {
         if (class_exists('\\Activity\\Models\\Actors')) {
             $actor = \Activity\Models\Actors::fetch();
             if ($actor->isExcluded()) {
                 return;
             }
         }
         if (\Dsc\System::instance()->get('input')->get('ping', null, 'int') != 1) {
             $fw = \Base::instance();
             $path = $fw->hive()['PATH'];
             switch ($path) {
                 // ignore certain paths, even if they aren't specifically pings
                 case strpos($path, '/minify/') === 0 ? true : false:
                 case "/minify/css":
                 case "/minify/js":
                     break;
                 default:
                     (new \Dsc\Mongo\Collections\Sessions())->store();
                     break;
             }
         }
     }
     \Dsc\Mongo\Collections\Sessions::throttledCleanup();
 }