/** * @see FileLoader::executeActions() */ function executeActions() { $plugin =& $this->_plugin; if (!$plugin->getEnabled()) { $this->addExecutionLogEntry(__('plugins.generic.usageStats.openFileFailed'), SCHEDULED_TASK_MESSAGE_TYPE_WARNING); return true; } parent::executeActions(); }
/** * @copydoc FileLoader::executeActions() */ protected function executeActions() { $plugin = $this->_plugin; if (!$plugin->getEnabled()) { $this->addExecutionLogEntry(__('plugins.generic.usageStats.pluginNotEnabled'), SCHEDULED_TASK_MESSAGE_TYPE_WARNING); return false; } if (!$this->_counterRobotsListFile || !file_exists($this->_counterRobotsListFile)) { $this->addExecutionLogEntry(__('plugins.generic.usageStats.noCounterBotList', array('botlist' => $this->_counterRobotsListFile)), SCHEDULED_TASK_MESSAGE_TYPE_WARNING); return false; } return parent::executeActions(); }
/** * @see FileLoader::executeActions() */ function executeActions() { $plugin =& $this->_plugin; if (!$plugin->getEnabled()) { $this->addExecutionLogEntry(__('plugins.generic.usageStats.pluginDisabled'), SCHEDULED_TASK_MESSAGE_TYPE_WARNING); return true; } // It's possible that the processing directory has files that // were being processed but the php process was stopped before // finishing the processing, or there may be a concurrent process running. // Warn the user if this is the case. $processingDirFiles = glob($this->getProcessingPath() . DIRECTORY_SEPARATOR . '*'); $processingDirError = is_array($processingDirFiles) && count($processingDirFiles); if ($processingDirError) { $this->addExecutionLogEntry(__('plugins.generic.usageStats.processingPathNotEmpty', array('directory' => $this->getProcessingPath())), SCHEDULED_TASK_MESSAGE_TYPE_ERROR); } if ($this->_autoStage) { $this->autoStage(); } return parent::executeActions() && !$processingDirError; }