示例#1
0
 /**
  * Cleanup
  */
 protected function end()
 {
     switch ($this->getState()) {
         case self::STATE_LOGGING_DISABLE:
             printDebug("Logging disabled, display transparent logo");
             break;
         case self::STATE_EMPTY_REQUEST:
             printDebug("Empty request => Piwik page");
             echo "<a href='/'>Piwik</a> is a free open source web <a href='http://piwik.org'>analytics</a> that lets you keep control of your data.";
             break;
         case self::STATE_NOSCRIPT_REQUEST:
         case self::STATE_NOTHING_TO_NOTICE:
         default:
             printDebug("Nothing to notice => default behaviour");
             break;
     }
     printDebug("End of the page.");
     if ($GLOBALS['PIWIK_TRACKER_DEBUG'] === true) {
         if (isset(self::$db)) {
             self::$db->recordProfiling();
             Piwik::printSqlProfilingReportTracker(self::$db);
         }
     }
     self::disconnectDatabase();
 }
示例#2
0
 /**
  * This is called at the end of the Generator script.
  * Calls the Profiler output if the profiler is enabled.
  * 
  * @return void
  */
 public function end()
 {
     Piwik_Tracker::disconnectDatabase();
     if ($this->profiling) {
         Piwik::printSqlProfilingReportTracker();
     }
 }
示例#3
0
 protected function end()
 {
     switch ($this->getState()) {
         case self::STATE_LOGGING_DISABLE:
             printDebug("Logging disabled, display transparent logo");
             $this->outputTransparentGif();
             break;
         case self::STATE_NO_GET_VARIABLE:
             printDebug("No get variables => Piwik page");
             echo "<a href='index.php'>Piwik</a> is a free open source <a href='http://piwik.org'>web analytics</a> alternative to Google analytics.";
             break;
         case self::STATE_TO_REDIRECT_URL:
             $this->sendHeader('Location: ' . $this->getUrlToRedirect());
             break;
         case self::STATE_NOTHING_TO_NOTICE:
         default:
             printDebug("Nothing to notice => default behaviour");
             $this->outputTransparentGif();
             break;
     }
     printDebug("End of the page.");
     if ($GLOBALS['PIWIK_TRACKER_DEBUG'] === true) {
         Piwik::printSqlProfilingReportTracker(self::$db);
     }
     self::disconnectDatabase();
 }
示例#4
0
 protected function end()
 {
     switch ($this->getState()) {
         case self::STATE_LOGGING_DISABLE:
             printDebug("Logging disabled, display transparent logo");
             $this->outputTransparentGif();
             break;
         case self::STATE_EMPTY_REQUEST:
             printDebug("Empty request => Piwik page");
             echo "<a href='/'>Piwik</a> is a free open source <a href='http://piwik.org'>web analytics</a> alternative to Google analytics.";
             break;
         case self::STATE_TO_REDIRECT_URL:
             $this->sendHeader('Location: ' . $this->getUrlToRedirect());
             break;
         case self::STATE_TRACK_ONLY:
             printDebug("Data push, tracking only");
             break;
         case self::STATE_NOSCRIPT_REQUEST:
         case self::STATE_NOTHING_TO_NOTICE:
         default:
             printDebug("Nothing to notice => default behaviour");
             $this->outputTransparentGif();
             break;
     }
     printDebug("End of the page.");
     if ($GLOBALS['PIWIK_TRACKER_DEBUG'] === true) {
         if (isset(self::$db)) {
             self::$db->recordProfiling();
             Piwik::printSqlProfilingReportTracker(self::$db);
         }
     }
     self::disconnectDatabase();
 }