Piwik\ArchiveProcessor\Rules::isBrowserTriggerEnabled PHP Method

isBrowserTriggerEnabled() public static method

public static isBrowserTriggerEnabled ( )
    public static function isBrowserTriggerEnabled()
    {
        $uiSettingIsEnabled = Controller::isGeneralSettingsAdminEnabled();
        if ($uiSettingIsEnabled) {
            $browserArchivingEnabled = Option::get(self::OPTION_BROWSER_TRIGGER_ARCHIVING);
            if ($browserArchivingEnabled !== false) {
                return (bool) $browserArchivingEnabled;
            }
        }
        return (bool) Config::getInstance()->General['enable_browser_archiving_triggering'];
    }

Usage Example

コード例 #1
0
ファイル: Controller.php プロジェクト: TensorWrenchOSS/piwik
 private function oneClick_Copy()
 {
     /*
      * Make sure the execute bit is set for this shell script
      */
     if (!Rules::isBrowserTriggerEnabled()) {
         @chmod($this->pathRootExtractedPiwik . '/misc/cron/archive.sh', 0755);
     }
     $model = new Model();
     /*
      * Copy all files to PIWIK_INCLUDE_PATH.
      * These files are accessed through the dispatcher.
      */
     Filesystem::copyRecursive($this->pathRootExtractedPiwik, PIWIK_INCLUDE_PATH);
     $model->removeGoneFiles($this->pathRootExtractedPiwik, PIWIK_INCLUDE_PATH);
     /*
      * These files are visible in the web root and are generally
      * served directly by the web server.  May be shared.
      */
     if (PIWIK_INCLUDE_PATH !== PIWIK_DOCUMENT_ROOT) {
         /*
          * Copy PHP files that expect to be in the document root
          */
         $specialCases = array('/index.php', '/piwik.php', '/js/index.php');
         foreach ($specialCases as $file) {
             Filesystem::copy($this->pathRootExtractedPiwik . $file, PIWIK_DOCUMENT_ROOT . $file);
         }
         /*
          * Copy the non-PHP files (e.g., images, css, javascript)
          */
         Filesystem::copyRecursive($this->pathRootExtractedPiwik, PIWIK_DOCUMENT_ROOT, true);
         $model->removeGoneFiles($this->pathRootExtractedPiwik, PIWIK_DOCUMENT_ROOT);
     }
     /*
      * Config files may be user (account) specific
      */
     if (PIWIK_INCLUDE_PATH !== PIWIK_USER_PATH) {
         Filesystem::copyRecursive($this->pathRootExtractedPiwik . '/config', PIWIK_USER_PATH . '/config');
     }
     Filesystem::unlinkRecursive($this->pathRootExtractedPiwik, true);
     Filesystem::clearPhpCaches();
 }
All Usage Examples Of Piwik\ArchiveProcessor\Rules::isBrowserTriggerEnabled