Ejemplo n.º 1
0
 public function test_isSiteEmpty()
 {
     $this->assertTrue($this->model->isSiteEmpty(1));
     $fixture = new OneVisitorTwoVisits();
     $fixture->setUp();
     $this->assertFalse($this->model->isSiteEmpty(1));
 }
Ejemplo n.º 2
0
 public function redirectDashboardToWelcomePage(&$module, &$action)
 {
     if ($module !== 'CoreHome' || $action !== 'index') {
         return;
     }
     $siteId = Common::getRequestVar('idSite', false, 'int');
     if (!$siteId) {
         return;
     }
     // Skip the screen if purging logs is enabled
     $settings = PrivacyManager::getPurgeDataSettings();
     if ($settings['delete_logs_enable'] == 1) {
         return;
     }
     $trackerModel = new TrackerModel();
     if ($trackerModel->isSiteEmpty($siteId)) {
         $module = 'SitesManager';
         $action = 'siteWithoutData';
     }
 }