uawdijnntqw1x1x1
IP : 216.73.217.142
Hostname : localhost.localdomain
Kernel : Linux localhost.localdomain 4.15.0-213-generic #224-Ubuntu SMP Mon Jun 19 13:30:12 UTC 2023 x86_64
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
OS : Linux
PATH:
/
var
/
www
/
consult-e-syn
/
public_html
/
643de
/
..
/
components
/
com_ats
/
Model
/
Cron.php
/
/
<?php /** * @package ats * @copyright Copyright (c)2011-2022 Nicholas K. Dionysopoulos / Akeeba Ltd * @license GNU General Public License version 3, or later */ namespace Akeeba\TicketSystem\Site\Model; defined('_JEXEC') or die; use Akeeba\TicketSystem\Admin\Helper\Debug; use Akeeba\TicketSystem\Site\Model\Exception\CronCommandMissing; use Akeeba\TicketSystem\Site\Model\Exception\CronCommandNotFound; use Akeeba\TicketSystem\Site\Model\Exception\SecretMismatch; use Akeeba\TicketSystem\Site\Model\Exception\SecretNotConfigured; use FOF40\Model\Model; use Joomla\CMS\Crypt\Crypt; use Joomla\CMS\Log\Log; class Cron extends Model { /** * ATS CRON log filename * * @since 3.2.0 */ const logFilename = 'ats_cron.php'; /** * Have I already installed a Joomla logger method for the 'ats.cron' context? * * @var bool * @since 3.2.0 */ private $loggerInstalled = false; /** * Record an entry in the ATS CRON log file. * * The log file is in the site's log directory. Its name is in the logFilename constant in this class. * * @param string $entry * @param int $level * * @return void * @since 3.2.0 */ public function log($entry, $level = Log::DEBUG) { // Install a logger for ATS CRON jobs if necessary if (!$this->loggerInstalled) { Debug::registerFileLogger('ats.cron'); $this->loggerInstalled = true; } Log::add($entry, $level, 'ats.cron'); } /** * Checks if the provided secret key matches the configuration. * * The comparison is performed in a timing safe manner. An exception is thrown if the key does not match or if no * secret key has been configured yet * * @param string $key The secret key to check. * * @return void * * @throws SecretNotConfigured * @throws SecretMismatch * * @since 3.2.0 */ public function checkSecret($key) { $configuredSecret = trim($this->container->params->get('secret', '')); $key = trim($key); if (empty($configuredSecret)) { throw new SecretNotConfigured(); } if (!Crypt::timingSafeCompare($configuredSecret, $key)) { throw new SecretMismatch(); } } /** * Tries to execute the given command. Returns true if the command executed successfully. * * @param string $command The command to execute. The filtered command name is written back to this var. * @param int $timeLimit Time limit in seconds. 0 means "no limit", is implemented as a 86400s (24h) limit. * * @return bool True on successful execution * * @since 3.2.0 */ public function run(&$command, $timeLimit = 0) { // Perform more rigorous filtering of the command name $command = (string) preg_replace('/[^A-Z0-9_]/i', '', $command); $command = strtolower($command); if (empty($command)) { throw new CronCommandMissing(); } // Process the time limit if ($timeLimit <= 0) { // No limit is implemented as a ridiculously high 86400 second (24 hour) time limit $timeLimit = 86400; } else { // In any other case the time limit must be between 1 and 600 seconds $timeLimit = max($timeLimit, 1); $timeLimit = min($timeLimit, 600); } $this->log(sprintf('Preparing to execute command ā%sā', $command)); // Make sure the language files are loaded $language = $this->container->platform->getLanguage(); $thisPath = $this->container->platform->isBackend() ? JPATH_ADMINISTRATOR : JPATH_ROOT; $altPath = !$this->container->platform->isBackend() ? JPATH_ADMINISTRATOR : JPATH_ROOT; $language->load($this->container->componentName, $altPath, null, true); $language->load($this->container->componentName, $thisPath, null, true); // Run the command $this->container->platform->importPlugin('ats'); $result = $this->container->platform->runPlugins('onAtsCronTask', [ $command, [ 'time_limit' => $timeLimit, ], ]); $commandFound = array_reduce($result, function ($carry, $item) { if ($carry) { return true; } return !is_null($item); }, false); if (!$commandFound) { throw new CronCommandNotFound(); } $finalResult = array_reduce($result, function ($carry, $item) { if (is_null($item)) { return $carry; } return $item; }, false); return (bool) $finalResult; } }
/var/www/consult-e-syn/public_html/643de/../components/com_ats/Model/Cron.php