uawdijnntqw1x1x1
IP : 216.73.217.102
Hostname : webm003.cluster107.gra.hosting.ovh.net
Kernel : Linux webm003.cluster107.gra.hosting.ovh.net 5.15.167-ovh-vps-grsec-zfs-classid #1 SMP Tue Sep 17 08:14:20 UTC 2024 x86_64
Disable Function : _dyuweyrj4,_dyuweyrj4r,dl
OS : Linux
PATH:
/
home
/
opticamezl
/
www
/
newok
/
tmp
/
..
/
cache
/
..
/
modules
/
..
/
cli
/
..
/
cli
/
cli
/
..
/
..
/
deletecpnblogs.tar
/
/
deletecpnblogs.xml000060400000003035151721417110010255 0ustar00<?xml version="1.0" encoding="utf-8"?> <extension version="4.1" type="plugin" group="task" method="upgrade"> <name>PLG_TASK_DELETECPNBLOGS</name> <author>Web357 (Yiannis Christodoulou)</author> <creationDate>2025-10-27</creationDate> <copyright>Copyright: (©) 2014-2024 Web357. All rights reserved.</copyright> <license>GNU/GPLv3, https://www.gnu.org/licenses/gpl-3.0.html</license> <authorEmail>support@web357.com</authorEmail> <authorUrl>https://www.web357.com</authorUrl> <version>4.4.4</version> <variant>pro</variant> <description>A beautiful and functional EU Cookie Law Compliance Joomla! Plugin that provides a mechanism for informing your visitors about how you use cookies on your website in an elegant manner. It includes a variety of features and parameters (responsive, multilingual, block cookies, change style, etc.). This Joomla! plugin is ready for the GDPR Compliance which has been already implemented on 25 May 2018.</description> <namespace path="src">Joomla\Plugin\Task\Deletecpnblogs</namespace> <files> <filename plugin="deletecpnblogs">deletecpnblogs.php</filename> <folder>src</folder> <folder>forms</folder> <folder>language</folder> <folder>services</folder> <filename>script.install.helper.php</filename> </files> <scriptfile>script.install.php</scriptfile> <updateservers><server type="extension" priority="1" name="Cookies Policy Notification Bar (pro version)">https://updates.web357.com/cookiespolicynotificationbar/cookiespolicynotificationbar_pro.xml</server></updateservers> </extension>deletecpnblogs.php000060400000001375151721417110010251 0ustar00<?php /* ====================================================== # Cookies Policy Notification Bar for Joomla! - v4.4.4 (pro version) # ------------------------------------------------------- # For Joomla! CMS (v4.x) # Author: Web357 (Yiannis Christodoulou) # Copyright: (©) 2014-2024 Web357. All rights reserved. # License: GNU/GPLv3, https://www.gnu.org/licenses/gpl-3.0.html # Website: https://www.web357.com # Demo: https://demo-joomla.web357.com/cookies-policy-notification-bar # Support: support@web357.com # Last modified: Monday 27 October 2025, 03:29:25 PM ========================================================= */ defined('_JEXEC') or die; use Joomla\CMS\Plugin\CMSPlugin; class plgTaskDeletecpnblogs extends CMSPlugin { }script.install.php000060400000001753151721417110010230 0ustar00<?php /* ====================================================== # Cookies Policy Notification Bar for Joomla! - v4.4.4 (pro version) # ------------------------------------------------------- # For Joomla! CMS (v4.x) # Author: Web357 (Yiannis Christodoulou) # Copyright: (©) 2014-2024 Web357. All rights reserved. # License: GNU/GPLv3, https://www.gnu.org/licenses/gpl-3.0.html # Website: https://www.web357.com # Demo: https://demo-joomla.web357.com/cookies-policy-notification-bar # Support: support@web357.com # Last modified: Monday 27 October 2025, 03:29:25 PM ========================================================= */ defined('_JEXEC') or die; require_once __DIR__ . '/script.install.helper.php'; class PlgTaskDeletecpnblogsInstallerScript extends PlgTaskDeletecpnblogsInstallerScriptHelper { public $name = 'Delete Cookies Policy Notification Bar Logs'; public $alias = 'deletecpnblogs'; public $extension_type = 'plugin'; public $plugin_folder = 'task'; }services/provider.php000060400000003413151721417110010727 0ustar00<?php /* ====================================================== # Cookies Policy Notification Bar for Joomla! - v4.4.4 (pro version) # ------------------------------------------------------- # For Joomla! CMS (v4.x) # Author: Web357 (Yiannis Christodoulou) # Copyright: (©) 2014-2024 Web357. All rights reserved. # License: GNU/GPLv3, https://www.gnu.org/licenses/gpl-3.0.html # Website: https://www.web357.com # Demo: https://demo-joomla.web357.com/cookies-policy-notification-bar # Support: support@web357.com # Last modified: Monday 27 October 2025, 03:29:25 PM ========================================================= */ defined('_JEXEC') or die; use Joomla\CMS\Extension\PluginInterface; use Joomla\CMS\Factory; use Joomla\CMS\Plugin\PluginHelper; use Joomla\Database\DatabaseInterface; use Joomla\DI\Container; use Joomla\DI\ServiceProviderInterface; use Joomla\Event\DispatcherInterface; use Joomla\Plugin\Task\Deletecpnblogs\Extension\Deletecpnblogs; return new class () implements ServiceProviderInterface { /** * Registers the service provider with a DI container. * @param Container $container The DI container. * @return void * @since 4.3.0 */ public function register(Container $container): void { $container->set( PluginInterface::class, function (Container $container) { $plugin = new Deletecpnblogs( $container->get(DispatcherInterface::class), (array) PluginHelper::getPlugin('task', 'deletecpnblogs'), ); $plugin->setApplication(Factory::getApplication()); $plugin->setDatabase($container->get(DatabaseInterface::class)); return $plugin; } ); } }; language/en-GB/plg_task_deletecpnblogs.ini000060400000001220151721417110014565 0ustar00PLG_TASK_DELETECPNBLOGS="Task - Delete Cookie Policy Notification Bar Logs" PLG_TASK_DELETECPNBLOGS_DESCRIPTION="Delete logs of the Cookie Policy Notification Bar plugin. To be used as a task in the Task Scheduler." PLG_TASK_DELETECPNBLOGS_DELETECPNBLOGS_TITLE="Delete Cookie Policy Notification Bar Logs" PLG_TASK_DELETECPNBLOGS_DELETECPNBLOGS_DESC="Delete logs of the Cookie Policy Notification Bar plugin." PLG_TASK_DELETECPNBLOGS_FIELD_DELETECPNBLOGS_LABEL="Days to delete logs after" PLG_TASK_DELETECPNBLOGS_FIELD_DELETECPNBLOGS_DESC="Enter the number of days after which the Cookie Policy Notification Bar logs from the component will be deleted." language/en-GB/plg_task_deletecpnblogs.sys.ini000060400000000327151721417110015411 0ustar00PLG_TASK_DELETECPNBLOGS="Task - Delete Cookie Policy Notification Bar Logs" PLG_TASK_DELETECPNBLOGS_DESCRIPTION="Delete logs of the Cookie Policy Notification Bar plugin. To be used as a task in the Task Scheduler."forms/deletecpnblogs.xml000060400000000657151721417110011412 0ustar00<?xml version="1.0" encoding="UTF-8"?> <form> <fields name="params"> <fieldset name="task_params"> <field name="cpnbLogDeletePeriod" type="number" label="PLG_TASK_DELETECPNBLOGS_FIELD_DELETECPNBLOGS_LABEL" description="PLG_TASK_DELETECPNBLOGS_FIELD_DELETECPNBLOGS_DESC" default="90" min="1" filter="int" validate="number" /> </fieldset> </fields> </form> script.install.helper.php000060400000036604151721417110011511 0ustar00<?php /* ====================================================== # Cookies Policy Notification Bar for Joomla! - v4.4.4 (pro version) # ------------------------------------------------------- # For Joomla! CMS (v4.x) # Author: Web357 (Yiannis Christodoulou) # Copyright: (©) 2014-2024 Web357. All rights reserved. # License: GNU/GPLv3, https://www.gnu.org/licenses/gpl-3.0.html # Website: https://www.web357.com # Demo: https://demo-joomla.web357.com/cookies-policy-notification-bar # Support: support@web357.com # Last modified: Monday 27 October 2025, 03:29:25 PM ========================================================= */ defined('_JEXEC') or die; use Joomla\CMS\Version; use Joomla\CMS\Factory; use Joomla\Filesystem\File; use Joomla\Filesystem\Folder; use Joomla\CMS\Language\Text; use Joomla\CMS\Installer\Installer; class PlgTaskDeletecpnblogsInstallerScriptHelper { public $name = ''; public $alias = ''; public $extname = ''; public $extension_type = ''; public $plugin_folder = 'task'; public $module_position = 'web357'; public $client_id = 0; public $install_type = 'install'; public $show_message = true; public $db = null; public $softbreak = null; public $mini_version = null; public function __construct(&$params) { $this->extname = $this->extname ?: $this->alias; $this->db = Factory::getDbo(); // Get Joomla's version $jversion = new Version(); $short_version = explode('.', $jversion->getShortVersion()); // 3.8.10 $this->mini_version = $short_version[0].'.'.$short_version[1]; // 3.8 } public function preflight($route, $adapter) { if (!in_array($route, array('install', 'update'))) { return true; } Factory::getLanguage()->load('plg_system_web357installer', JPATH_PLUGINS . '/system/web357installer'); if ($this->show_message && $this->isInstalled()) { $this->install_type = 'update'; } if ($this->onBeforeInstall($route) === false) { return false; } return true; } public function postflight($route, $adapter) { $this->removeGlobalLanguageFiles(); if (version_compare($this->mini_version, "4.0", "<")) { $this->removeUnusedLanguageFiles(); } Factory::getLanguage()->load($this->getPrefix() . '_' . $this->extname, $this->getMainFolder()); if (!in_array($route, array('install', 'update'))) { return true; } $this->updateHttptoHttpsInUpdateSites(); if ($this->onAfterInstall($route) === false) { return false; } if ($route == 'install') { $this->publishExtension(); } if ($this->show_message) { $this->addInstalledMessage(); } Factory::getCache()->clean('com_plugins'); Factory::getCache()->clean('_system'); return true; } public function isInstalled() { if ( ! is_file($this->getInstalledXMLFile())) { return false; } $query = $this->db->getQuery(true) ->select($this->db->quoteName('extension_id')) ->from('#__extensions') ->where($this->db->quoteName('type') . ' = ' . $this->db->quote($this->extension_type)) ->where($this->db->quoteName('element') . ' = ' . $this->db->quote($this->getElementName())); $this->db->setQuery($query, 0, 1); $result = $this->db->loadResult(); return empty($result) ? false : true; } public function getMainFolder() { switch ($this->extension_type) { case 'plugin' : return JPATH_PLUGINS . '/' . $this->plugin_folder . '/' . $this->extname; case 'component' : return JPATH_ADMINISTRATOR . '/components/com_' . $this->extname; case 'module' : return JPATH_SITE . '/modules/mod_' . $this->extname; case 'library' : return JPATH_SITE . '/libraries/' . $this->extname; } } public function getInstalledXMLFile() { return $this->getXMLFile($this->getMainFolder()); } public function getCurrentXMLFile() { return $this->getXMLFile(__DIR__); } public function getXMLFile($folder) { switch ($this->extension_type) { case 'module' : return $folder . '/mod_' . $this->extname . '.xml'; default : return $folder . '/' . $this->extname . '.xml'; } } public function uninstallExtension($extname, $type = 'plugin', $folder = 'system', $show_message = true) { if (empty($extname)) { return; } $folders = array(); switch ($type) { case 'plugin'; $folders[] = JPATH_PLUGINS . '/' . $folder . '/' . $extname; break; case 'component': $folders[] = JPATH_ADMINISTRATOR . '/components/com_' . $extname; $folders[] = JPATH_SITE . '/components/com_' . $extname; break; case 'module': $folders[] = JPATH_ADMINISTRATOR . '/modules/mod_' . $extname; $folders[] = JPATH_SITE . '/modules/mod_' . $extname; break; } if ( ! $this->foldersExist($folders)) { return; } $query = $this->db->getQuery(true) ->select($this->db->quoteName('extension_id')) ->from('#__extensions') ->where($this->db->quoteName('element') . ' = ' . $this->db->quote($this->getElementName($type, $extname))) ->where($this->db->quoteName('type') . ' = ' . $this->db->quote($type)); if ($type == 'plugin') { $query->where($this->db->quoteName('folder') . ' = ' . $this->db->quote($folder)); } $this->db->setQuery($query); $ids = $this->db->loadColumn(); if (empty($ids)) { foreach ($folders as $folder) { Folder::delete($folder); } return; } $ignore_ids = Factory::getApplication()->getUserState('rl_ignore_uninstall_ids', array()); if (Factory::getApplication()->input->get('option') == 'com_installer' && Factory::getApplication()->input->get('task') == 'remove') { // Don't attempt to uninstall extensions that are already selected to get uninstalled by them selves $ignore_ids = array_merge($ignore_ids, Factory::getApplication()->input->get('cid', array(), 'array')); Factory::getApplication()->input->set('cid', array_merge($ignore_ids, $ids)); } $ids = array_diff($ids, $ignore_ids); if (empty($ids)) { return; } $ignore_ids = array_merge($ignore_ids, $ids); Factory::getApplication()->setUserState('rl_ignore_uninstall_ids', $ignore_ids); foreach ($ids as $id) { $tmpInstaller = new Installer(); $tmpInstaller->uninstall($type, $id); } if ($show_message) { Factory::getApplication()->enqueueMessage( Text::sprintf( 'COM_INSTALLER_UNINSTALL_SUCCESS', Text::_('COM_INSTALLER_TYPE_TYPE_' . strtoupper($type)) ) ); } } public function foldersExist($folders = array()) { foreach ($folders as $folder) { if (is_dir($folder)) { return true; } } return false; } public function uninstallPlugin($extname, $folder = 'system', $show_message = true) { $this->uninstallExtension($extname, 'plugin', $folder, $show_message); } public function uninstallComponent($extname, $show_message = true) { $this->uninstallExtension($extname, 'component', null, $show_message); } public function uninstallModule($extname, $show_message = true) { $this->uninstallExtension($extname, 'module', null, $show_message); } public function publishExtension() { switch ($this->extension_type) { case 'plugin' : $this->publishPlugin(); case 'module' : $this->publishModule(); } } public function publishPlugin() { $query = $this->db->getQuery(true) ->update('#__extensions') ->set($this->db->quoteName('enabled') . ' = 1') ->where($this->db->quoteName('type') . ' = ' . $this->db->quote('plugin')) ->where($this->db->quoteName('element') . ' = ' . $this->db->quote($this->extname)) ->where($this->db->quoteName('folder') . ' = ' . $this->db->quote($this->plugin_folder)); $this->db->setQuery($query); $this->db->execute(); } public function publishModule() { // Get module id $query = $this->db->getQuery(true) ->select($this->db->quoteName('id')) ->from('#__modules') ->where($this->db->quoteName('module') . ' = ' . $this->db->quote('mod_' . $this->extname)) ->where($this->db->quoteName('client_id') . ' = ' . (int) $this->client_id); $this->db->setQuery($query, 0, 1); $id = $this->db->loadResult(); if ( ! $id) { return; } // check if module is already in the modules_menu table (meaning is is already saved) $query->clear() ->select($this->db->quoteName('moduleid')) ->from('#__modules_menu') ->where($this->db->quoteName('moduleid') . ' = ' . (int) $id); $this->db->setQuery($query, 0, 1); $exists = $this->db->loadResult(); if ($exists) { return; } // Get highest ordering number in position $query->clear() ->select($this->db->quoteName('ordering')) ->from('#__modules') ->where($this->db->quoteName('position') . ' = ' . $this->db->quote($this->module_position)) ->where($this->db->quoteName('client_id') . ' = ' . (int) $this->client_id) ->order('ordering DESC'); $this->db->setQuery($query, 0, 1); $ordering = $this->db->loadResult(); $ordering++; // publish module and set ordering number $query->clear() ->update('#__modules') ->set($this->db->quoteName('published') . ' = 1') ->set($this->db->quoteName('ordering') . ' = ' . (int) $ordering) ->set($this->db->quoteName('position') . ' = ' . $this->db->quote($this->module_position)) ->where($this->db->quoteName('id') . ' = ' . (int) $id); $this->db->setQuery($query); $this->db->execute(); // add module to the modules_menu table $query->clear() ->insert('#__modules_menu') ->columns(array($this->db->quoteName('moduleid'), $this->db->quoteName('menuid'))) ->values((int) $id . ', 0'); $this->db->setQuery($query); $this->db->execute(); } public function addInstalledMessage() { Factory::getApplication()->enqueueMessage( Text::sprintf( Text::_($this->install_type == 'update' ? 'W357_THE_EXTENSION_HAS_BEEN_UPDATED_SUCCESSFULLY' : 'W357_THE_EXTENSION_HAS_BEEN_INSTALLED_SUCCESSFULLY'), '<strong>' . Text::_($this->name) . '</strong>', '<strong>' . $this->getVersion() . '</strong>', $this->getFullType() ) ); } public function getPrefix() { switch ($this->extension_type) { case 'plugin'; return Text::_('plg_' . strtolower($this->plugin_folder)); case 'component': return Text::_('com'); case 'module': return Text::_('mod'); case 'library': return Text::_('lib'); default: return $this->extension_type; } } public function getElementName($type = null, $extname = null) { $type = is_null($type) ? $this->extension_type : $type; $extname = is_null($extname) ? $this->extname : $extname; switch ($type) { case 'component' : return 'com_' . $extname; case 'module' : return 'mod_' . $extname; case 'plugin' : default: return $extname; } } public function getFullType() { return Text::_('W357_' . strtoupper($this->getPrefix())); } public function getVersion($file = '') { $file = $file ?: $this->getCurrentXMLFile(); if ( ! is_file($file)) { return ''; } $xml = Installer::parseXMLInstallFile($file); if ( ! $xml || ! isset($xml['version'])) { return ''; } return $xml['version']; } public function isNewer() { if ( ! $installed_version = $this->getVersion($this->getInstalledXMLFile())) { return true; } $package_version = $this->getVersion(); return version_compare($installed_version, $package_version, '<='); } public function canInstall() { // The extension is not installed yet if ( ! $installed_version = $this->getVersion($this->getInstalledXMLFile())) { return true; } // The free version is installed. So any version is ok to install if (strpos($installed_version, 'PRO') === false) { return true; } // Current package is a pro version, so all good if (strpos($this->getVersion(), 'PRO') !== false) { return true; } Factory::getLanguage()->load($this->getPrefix() . '_' . $this->extname, __DIR__); Factory::getApplication()->enqueueMessage(Text::_('W357_ERROR_PRO_TO_FREE'), 'error'); Factory::getApplication()->enqueueMessage( html_entity_decode( Text::sprintf( 'W357_ERROR_UNINSTALL_FIRST', '<a href="//www.web357.com/product/' . $this->url_alias . '" target="_blank">', '</a>', Text::_($this->name) ) ), 'error' ); return false; } public function onBeforeInstall($route) { if ( ! $this->canInstall()) { return false; } return true; } public function onAfterInstall($route) { } public function delete($files = array()) { foreach ($files as $file) { if (is_dir($file) && is_dir($file)) { Folder::delete($file); } if (is_file($file) && is_file($file)) { File::delete($file); } } } public function fixAssetsRules($rules = '{"core.admin":[],"core.manage":[]}') { // replace default rules value {} with the correct initial value $query = $this->db->getQuery(true) ->update($this->db->quoteName('#__assets')) ->set($this->db->quoteName('rules') . ' = ' . $this->db->quote($rules)) ->where($this->db->quoteName('title') . ' = ' . $this->db->quote('com_' . $this->extname)) ->where($this->db->quoteName('rules') . ' = ' . $this->db->quote('{}')); $this->db->setQuery($query); $this->db->execute(); } private function updateHttptoHttpsInUpdateSites() { $query = $this->db->getQuery(true) ->update('#__update_sites') ->set($this->db->quoteName('location') . ' = REPLACE(' . $this->db->quoteName('location') . ', ' . $this->db->quote('http://') . ', ' . $this->db->quote('https://') . ')') ->where($this->db->quoteName('location') . ' LIKE ' . $this->db->quote('http://updates.web357%')); $this->db->setQuery($query); $this->db->execute(); } private function removeGlobalLanguageFiles() { if ($this->extension_type == 'library' || $this->alias === 'web357framework') { return; } $language_files = Folder::files(JPATH_ADMINISTRATOR . '/language', '\.' . $this->getPrefix() . '_' . $this->extname . '\.', true, true); // Remove override files foreach ($language_files as $i => $language_file) { if (strpos($language_file, '/overrides/') === false) { continue; } unset($language_files[$i]); } if (empty($language_files)) { return; } File::delete($language_files); } private function removeUnusedLanguageFiles() { if ($this->extension_type == 'library') { return; } $main_language_dir_path = Folder::folders(__DIR__ . '/language'); $installed_languages = array_merge( Folder::folders(JPATH_SITE . '/language'), Folder::folders(JPATH_ADMINISTRATOR . '/language') ); $languages = array(); if (is_array($main_language_dir_path) && is_array($installed_languages)) { $languages = array_diff( $main_language_dir_path, $installed_languages ); } $delete_languages = array(); if (!empty($languages)) { foreach ($languages as $language) { $delete_languages[] = $this->getMainFolder() . '/language/' . $language; } } if (empty($delete_languages)) { return; } // Remove folders $this->delete($delete_languages); } }src/Extension/Deletecpnblogs.php000060400000010273151721417110012751 0ustar00<?php /* ====================================================== # Cookies Policy Notification Bar for Joomla! - v4.4.4 (pro version) # ------------------------------------------------------- # For Joomla! CMS (v4.x) # Author: Web357 (Yiannis Christodoulou) # Copyright: (©) 2014-2024 Web357. All rights reserved. # License: GNU/GPLv3, https://www.gnu.org/licenses/gpl-3.0.html # Website: https://www.web357.com # Demo: https://demo-joomla.web357.com/cookies-policy-notification-bar # Support: support@web357.com # Last modified: Monday 27 October 2025, 03:29:25 PM ========================================================= */ namespace Joomla\Plugin\Task\Deletecpnblogs\Extension; use Joomla\CMS\Factory; use Joomla\CMS\Plugin\CMSPlugin; use Joomla\Component\Scheduler\Administrator\Event\ExecuteTaskEvent; use Joomla\Component\Scheduler\Administrator\Task\Status; use Joomla\Component\Scheduler\Administrator\Traits\TaskPluginTrait; use Joomla\Database\DatabaseAwareTrait; use Joomla\Event\SubscriberInterface; use Joomla\Event\DispatcherInterface; \defined('_JEXEC') or die; /** * A task plugin. For Delete Cookies Policy Notification Bar Logs after x days * {@see ExecuteTaskEvent}. * * @since 5.1.0 */ final class Deletecpnblogs extends CMSPlugin implements SubscriberInterface { use TaskPluginTrait; use DatabaseAwareTrait; /** * @var string[] * * @since 5.1.0 */ protected const TASKS_MAP = [ 'Deletecpnblogs.deletecpnblogs' => [ 'langConstPrefix' => 'PLG_TASK_DELETECPNBLOGS_DELETECPNBLOGS', 'method' => 'deleteCpnbLogs', 'form' => 'deletecpnblogs', ], ]; /** * @var boolean * @since 5.0.0 */ protected $autoloadLanguage = true; /** * Constructor. * * @param DispatcherInterface $dispatcher The dispatcher * @param array $config An optional associative array of configuration settings * @param string $rootDirectory The root directory to look for images * * @since 5.1.0 */ public function __construct(DispatcherInterface $dispatcher, array $config) { parent::__construct($dispatcher, $config); } /** * @inheritDoc * * @return string[] * * @since 5.1.0 */ public static function getSubscribedEvents(): array { return [ 'onTaskOptionsList' => 'advertiseRoutines', 'onExecuteTask' => 'standardRoutineHandler', 'onContentPrepareForm' => 'enhanceTaskItemForm', ]; } /** * @param ExecuteTaskEvent $event The `onExecuteTask` event. * * @return integer The routine exit code. * * @since 5.1.0 * @throws \Exception */ private function deleteCpnbLogs(ExecuteTaskEvent $event): int { $daysToDeleteAfter = (int) $event->getArgument('params')->cpnbLogDeletePeriod ?? 0; $this->logTask(sprintf('Delete Logs after %d days', $daysToDeleteAfter)); $now = Factory::getDate()->toSql(); $db = $this->getDatabase(); $query = $db->getQuery(true); if ($daysToDeleteAfter > 0) { $days = -1 * $daysToDeleteAfter; $query->clear() ->delete($db->quoteName('#__plg_system_cookiespolicynotificationbar_logs')) ->where($db->quoteName('datetime') . ' < ' . $query->dateAdd($db->quote($now), $days, 'DAY')); $db->setQuery($query); try { $db->execute(); $deletedRows = $db->getAffectedRows(); // Get the count of deleted rows $this->logTask(sprintf('Deleted %d logs', $deletedRows)); // Log the count of deleted rows } catch (\RuntimeException $e) { // Log the error possibly and handle exceptions $this->logTask('Error deleting logs: ' . $e->getMessage()); return Status::KNOCKOUT; } } else { $this->logTask('No logs deleted as the deletion period is set to 0 days.'); } $this->logTask('Delete Logs end'); return Status::OK; } }
/home/opticamezl/www/newok/tmp/../cache/../modules/../cli/../cli/cli/../../deletecpnblogs.tar