File manager - Edit - /home/opticamezl/www/newok/quickicon.zip
Back
PK wd�\��`�� � downloadkey/downloadkey.xmlnu �[��� <?xml version="1.0" encoding="UTF-8"?> <extension type="plugin" group="quickicon" method="upgrade"> <name>plg_quickicon_downloadkey</name> <author>Joomla! Project</author> <creationDate>2019-10</creationDate> <copyright>(C) 2019 Open Source Matters, Inc.</copyright> <license>GNU General Public License version 2 or later; see LICENSE.txt</license> <authorEmail>admin@joomla.org</authorEmail> <authorUrl>www.joomla.org</authorUrl> <version>4.0.0</version> <description>PLG_QUICKICON_DOWNLOADKEY_XML_DESCRIPTION</description> <namespace path="src">Joomla\Plugin\Quickicon\Downloadkey</namespace> <files> <folder plugin="downloadkey">services</folder> <folder>src</folder> </files> <languages> <language tag="en-GB">language/en-GB/plg_quickicon_downloadkey.ini</language> <language tag="en-GB">language/en-GB/plg_quickicon_downloadkey.sys.ini</language> </languages> <config> <fields name="params"> <fieldset name="basic"> <field name="context" type="text" label="PLG_QUICKICON_DOWNLOADKEY_GROUP_LABEL" description="PLG_QUICKICON_DOWNLOADKEY_GROUP_DESC" default="update_quickicon" /> </fieldset> </fields> </config> </extension> PK wd�\@Z��A A ! downloadkey/services/provider.phpnu �[��� <?php /** * @package Joomla.Plugin * @subpackage Quickicon.downloadkey * * @copyright (C) 2022 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; use Joomla\CMS\Extension\PluginInterface; use Joomla\CMS\Factory; use Joomla\CMS\Plugin\PluginHelper; use Joomla\DI\Container; use Joomla\DI\ServiceProviderInterface; use Joomla\Event\DispatcherInterface; use Joomla\Plugin\Quickicon\Downloadkey\Extension\Downloadkey; 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) { $container->set( PluginInterface::class, function (Container $container) { $dispatcher = $container->get(DispatcherInterface::class); $plugin = new Downloadkey( $dispatcher, (array) PluginHelper::getPlugin('quickicon', 'downloadkey') ); $plugin->setApplication(Factory::getApplication()); return $plugin; } ); } }; PK wd�\Z?��� � ) downloadkey/src/Extension/Downloadkey.phpnu �[��� <?php /** * @package Joomla.Plugin * @subpackage Quickicon.downloadkey * * @copyright (C) 2019 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ namespace Joomla\Plugin\Quickicon\Downloadkey\Extension; use Joomla\CMS\Language\Text; use Joomla\CMS\Plugin\CMSPlugin; use Joomla\Component\Installer\Administrator\Helper\InstallerHelper as ComInstallerHelper; use Joomla\Event\SubscriberInterface; use Joomla\Module\Quickicon\Administrator\Event\QuickIconsEvent; // phpcs:disable PSR1.Files.SideEffects \defined('_JEXEC') or die; // phpcs:enable PSR1.Files.SideEffects /** * Joomla! update notification plugin * * @since 4.0.0 */ final class Downloadkey extends CMSPlugin implements SubscriberInterface { /** * Load the language file on instantiation. * * @var boolean * @since 4.0.0 */ protected $autoloadLanguage = true; /** * Returns an array of events this subscriber will listen to. * * @return array * * @since 4.3.0 */ public static function getSubscribedEvents(): array { return [ 'onGetIcons' => 'onGetIcons', ]; } /** * Returns an icon definition for an icon which looks for extensions updates * via AJAX and displays a notification when such updates are found. * * @param QuickIconsEvent $event The event object * * @return void * * @since 4.0.0 */ public function onGetIcons(QuickIconsEvent $event): void { $context = $event->getContext(); if ( $context !== $this->params->get('context', 'update_quickicon') || !$this->getApplication()->getIdentity()->authorise('core.manage', 'com_installer') ) { return; } $info = $this->getMissingDownloadKeyInfo(); // No extensions need a download key. The icon is not rendered. if (!$info['supported']) { return; } $iconDefinition = [ 'link' => 'index.php?option=com_installer&view=updatesites&filter[supported]=1', 'image' => 'icon-key', 'icon' => '', 'text' => Text::_('PLG_QUICKICON_DOWNLOADKEY_OK'), 'class' => 'success', 'id' => 'plg_quickicon_downloadkey', 'group' => 'MOD_QUICKICON_MAINTENANCE', ]; if ($info['missing'] !== 0) { $iconDefinition = array_merge( $iconDefinition, [ 'link' => 'index.php?option=com_installer&view=updatesites&filter[supported]=-1', 'text' => Text::plural('PLG_QUICKICON_DOWNLOADKEY_N_MISSING', $info['missing']), 'class' => 'danger', ] ); } // Add the icon to the result array $result = $event->getArgument('result', []); $result[] = [ $iconDefinition, ]; $event->setArgument('result', $result); } /** * Gets the information about update sites requiring but missing a download key. * * The return array has two keys: * - supported Number of update sites supporting Download Key * - missing Number of update sites missing a Download Key * * If 'supported' is zero you do not need to provide any download keys. All your extensions are free downloads. * * If 'supported' is non-zero and 'missing' is zero you have entered a download key for all paid extensions. * * If 'supported' is non-zero and 'missing' is also non-zero you need to enter one or more download keys. * * @return array * @since 4.0.0 */ private function getMissingDownloadKeyInfo(): array { $ret = [ 'supported' => 0, 'missing' => 0, ]; if (!class_exists('Joomla\Component\Installer\Administrator\Helper\InstallerHelper')) { require_once JPATH_ADMINISTRATOR . '/components/com_installer/Helper/InstallerHelper.php'; } $supported = ComInstallerHelper::getDownloadKeySupportedSites(true); $ret['supported'] = count($supported); if ($ret['supported'] === 0) { return $ret; } $missing = ComInstallerHelper::getDownloadKeyExistsSites(false, true); $ret['missing'] = count($missing); return $ret; } } PK wd�\E�]` ` 1 extensionupdate/src/Extension/Extensionupdate.phpnu �[��� <?php /** * @package Joomla.Plugin * @subpackage Quickicon.extensionupdate * * @copyright (C) 2011 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ namespace Joomla\Plugin\Quickicon\Extensionupdate\Extension; use Joomla\CMS\Extension\ExtensionHelper; use Joomla\CMS\Language\Text; use Joomla\CMS\Plugin\CMSPlugin; use Joomla\CMS\Session\Session; use Joomla\CMS\Uri\Uri; use Joomla\Event\SubscriberInterface; use Joomla\Module\Quickicon\Administrator\Event\QuickIconsEvent; // phpcs:disable PSR1.Files.SideEffects \defined('_JEXEC') or die; // phpcs:enable PSR1.Files.SideEffects /** * Joomla! update notification plugin * * @since 2.5 */ final class Extensionupdate extends CMSPlugin implements SubscriberInterface { /** * Load the language file on instantiation. * * @var boolean * @since 3.1 */ protected $autoloadLanguage = true; /** * Returns an array of events this subscriber will listen to. * * @return array * * @since 4.3.0 */ public static function getSubscribedEvents(): array { return [ 'onGetIcons' => 'onGetIcons', ]; } /** * Returns an icon definition for an icon which looks for extensions updates * via AJAX and displays a notification when such updates are found. * * @param QuickIconsEvent $event The event object * * @return void * * @since 2.5 */ public function onGetIcons(QuickIconsEvent $event): void { $context = $event->getContext(); if ( $context !== $this->params->get('context', 'update_quickicon') || !$this->getApplication()->getIdentity()->authorise('core.manage', 'com_installer') ) { return; } $token = Session::getFormToken() . '=1'; $options = [ 'url' => Uri::base() . 'index.php?option=com_installer&view=update&task=update.find&' . $token, 'ajaxUrl' => Uri::base() . 'index.php?option=com_installer&view=update&task=update.ajax&' . $token . '&cache_timeout=3600&eid=0&skip=' . ExtensionHelper::getExtensionRecord('joomla', 'file')->extension_id, ]; $this->getApplication()->getDocument()->addScriptOptions('js-extensions-update', $options); Text::script('PLG_QUICKICON_EXTENSIONUPDATE_UPTODATE'); Text::script('PLG_QUICKICON_EXTENSIONUPDATE_UPDATEFOUND'); Text::script('PLG_QUICKICON_EXTENSIONUPDATE_ERROR'); Text::script('MESSAGE'); Text::script('ERROR'); Text::script('INFO'); Text::script('WARNING'); $this->getApplication()->getDocument()->getWebAssetManager() ->registerAndUseScript( 'plg_quickicon_extensionupdate', 'plg_quickicon_extensionupdate/extensionupdatecheck.min.js', [], ['defer' => true], ['core'] ); // Add the icon to the result array $result = $event->getArgument('result', []); $result[] = [ [ 'link' => 'index.php?option=com_installer&view=update&task=update.find&' . $token, 'image' => 'icon-star', 'icon' => '', 'text' => $this->getApplication()->getLanguage()->_('PLG_QUICKICON_EXTENSIONUPDATE_CHECKING'), 'id' => 'plg_quickicon_extensionupdate', 'group' => 'MOD_QUICKICON_MAINTENANCE', ], ]; $event->setArgument('result', $result); } } PK wd�\�V� extensionupdate/index.htmlnu &1i� <!DOCTYPE html><title></title> PK wd�\�NHU U % extensionupdate/services/provider.phpnu �[��� <?php /** * @package Joomla.Plugin * @subpackage Quickicon.extensionupdate * * @copyright (C) 2022 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; use Joomla\CMS\Extension\PluginInterface; use Joomla\CMS\Factory; use Joomla\CMS\Plugin\PluginHelper; use Joomla\DI\Container; use Joomla\DI\ServiceProviderInterface; use Joomla\Event\DispatcherInterface; use Joomla\Plugin\Quickicon\Extensionupdate\Extension\Extensionupdate; 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) { $container->set( PluginInterface::class, function (Container $container) { $dispatcher = $container->get(DispatcherInterface::class); $plugin = new Extensionupdate( $dispatcher, (array) PluginHelper::getPlugin('quickicon', 'extensionupdate') ); $plugin->setApplication(Factory::getApplication()); return $plugin; } ); } }; PK wd�\��^�� � # extensionupdate/extensionupdate.xmlnu �[��� <?xml version="1.0" encoding="UTF-8"?> <extension type="plugin" group="quickicon" method="upgrade"> <name>plg_quickicon_extensionupdate</name> <author>Joomla! Project</author> <creationDate>2011-08</creationDate> <copyright>(C) 2011 Open Source Matters, Inc.</copyright> <license>GNU General Public License version 2 or later; see LICENSE.txt</license> <authorEmail>admin@joomla.org</authorEmail> <authorUrl>www.joomla.org</authorUrl> <version>3.0.0</version> <description>PLG_QUICKICON_EXTENSIONUPDATE_XML_DESCRIPTION</description> <namespace path="src">Joomla\Plugin\Quickicon\Extensionupdate</namespace> <files> <folder plugin="extensionupdate">services</folder> <folder>src</folder> </files> <languages> <language tag="en-GB">language/en-GB/plg_quickicon_extensionupdate.ini</language> <language tag="en-GB">language/en-GB/plg_quickicon_extensionupdate.sys.ini</language> </languages> <config> <fields name="params"> <fieldset name="basic"> <field name="context" type="text" label="PLG_QUICKICON_EXTENSIONUPDATE_GROUP_LABEL" description="PLG_QUICKICON_EXTENSIONUPDATE_GROUP_DESC" default="update_quickicon" /> </fieldset> </fields> </config> </extension> PK wd�\��U U % phpversioncheck/services/provider.phpnu �[��� <?php /** * @package Joomla.Plugin * @subpackage Quickicon.phpversioncheck * * @copyright (C) 2022 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; use Joomla\CMS\Extension\PluginInterface; use Joomla\CMS\Factory; use Joomla\CMS\Plugin\PluginHelper; use Joomla\DI\Container; use Joomla\DI\ServiceProviderInterface; use Joomla\Event\DispatcherInterface; use Joomla\Plugin\Quickicon\PhpVersionCheck\Extension\PhpVersionCheck; 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) { $container->set( PluginInterface::class, function (Container $container) { $dispatcher = $container->get(DispatcherInterface::class); $plugin = new PhpVersionCheck( $dispatcher, (array) PluginHelper::getPlugin('quickicon', 'phpversioncheck') ); $plugin->setApplication(Factory::getApplication()); return $plugin; } ); } }; PK wd�\�8��� � 1 phpversioncheck/src/Extension/PhpVersionCheck.phpnu �[��� <?php /** * @package Joomla.Plugin * @subpackage Quickicon.phpversioncheck * * @copyright (C) 2016 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ namespace Joomla\Plugin\Quickicon\PhpVersionCheck\Extension; use Joomla\CMS\Date\Date; use Joomla\CMS\Language\Text; use Joomla\CMS\Plugin\CMSPlugin; use Joomla\Event\SubscriberInterface; use Joomla\Module\Quickicon\Administrator\Event\QuickIconsEvent; // phpcs:disable PSR1.Files.SideEffects \defined('_JEXEC') or die; // phpcs:enable PSR1.Files.SideEffects /** * Plugin to check the PHP version and display a warning about its support status * * @since 3.7.0 */ final class PhpVersionCheck extends CMSPlugin implements SubscriberInterface { /** * Constant representing the active PHP version being fully supported * * @var integer * @since 3.7.0 */ public const PHP_SUPPORTED = 0; /** * Constant representing the active PHP version receiving security support only * * @var integer * @since 3.7.0 */ public const PHP_SECURITY_ONLY = 1; /** * Constant representing the active PHP version being unsupported * * @var integer * @since 3.7.0 */ public const PHP_UNSUPPORTED = 2; /** * Load plugin language files automatically * * @var boolean * @since 3.7.0 */ protected $autoloadLanguage = true; /** * Returns an array of events this subscriber will listen to. * * @return array * * @since 4.3.0 */ public static function getSubscribedEvents(): array { return [ 'onGetIcons' => 'onGetIcons', ]; } /** * Check the PHP version after the admin component has been dispatched. * * @param QuickIconsEvent $event The event object * * @return void * * @since 3.7.0 */ public function onGetIcons(QuickIconsEvent $event): void { if (!$this->shouldDisplayMessage()) { return; } $supportStatus = $this->getPhpSupport(); if ($supportStatus['status'] !== self::PHP_SUPPORTED) { // Enqueue the notification message; set a warning if receiving security support or "error" if unsupported switch ($supportStatus['status']) { case self::PHP_SECURITY_ONLY: $this->getApplication()->enqueueMessage($supportStatus['message'], 'warning'); break; case self::PHP_UNSUPPORTED: $this->getApplication()->enqueueMessage($supportStatus['message'], 'danger'); break; } } } /** * Gets PHP support status. * * @return array Array of PHP support data * * @since 3.7.0 * @note The dates used in this method should correspond to the dates given on PHP.net * @link https://www.php.net/supported-versions.php * @link https://www.php.net/eol.php */ private function getPhpSupport() { $phpSupportData = [ '7.2' => [ 'security' => '2019-11-30', 'eos' => '2020-11-30', ], '7.3' => [ 'security' => '2020-12-06', 'eos' => '2021-12-06', ], '7.4' => [ 'security' => '2021-11-28', 'eos' => '2022-11-28', ], '8.0' => [ 'security' => '2022-11-26', 'eos' => '2023-11-26', ], '8.1' => [ 'security' => '2023-11-25', 'eos' => '2025-12-31', ], '8.2' => [ 'security' => '2024-12-31', 'eos' => '2026-12-31', ], '8.3' => [ 'security' => '2025-12-31', 'eos' => '2027-12-31', ], ]; // Fill our return array with default values $supportStatus = [ 'status' => self::PHP_SUPPORTED, 'message' => null, ]; // Check the PHP version's support status using the minor version $activePhpVersion = PHP_MAJOR_VERSION . '.' . PHP_MINOR_VERSION; // Handle non standard strings like PHP 7.2.34-8+ubuntu18.04.1+deb.sury.org+1 $phpVersion = preg_split('/-/', PHP_VERSION)[0]; // Do we have the PHP version's data? if (isset($phpSupportData[$activePhpVersion])) { // First check if the version has reached end of support $today = new Date(); $phpEndOfSupport = new Date($phpSupportData[$activePhpVersion]['eos']); if ($phpNotSupported = $today > $phpEndOfSupport) { /* * Find the oldest PHP version still supported that is newer than the current version, * this is our recommendation for users on unsupported platforms */ foreach ($phpSupportData as $version => $versionData) { $versionEndOfSupport = new Date($versionData['eos']); if (version_compare($version, $activePhpVersion, 'ge') && ($today < $versionEndOfSupport)) { $supportStatus['status'] = self::PHP_UNSUPPORTED; $supportStatus['message'] = Text::sprintf( 'PLG_QUICKICON_PHPVERSIONCHECK_UNSUPPORTED', $phpVersion, $version, $versionEndOfSupport->format(Text::_('DATE_FORMAT_LC4')) ); return $supportStatus; } } // PHP version is not supported and we don't know of any supported versions. $supportStatus['status'] = self::PHP_UNSUPPORTED; $supportStatus['message'] = Text::sprintf( 'PLG_QUICKICON_PHPVERSIONCHECK_UNSUPPORTED_JOOMLA_OUTDATED', $phpVersion ); return $supportStatus; } // If the version is still supported, check if it has reached eol minus 3 month $securityWarningDate = clone $phpEndOfSupport; $securityWarningDate->sub(new \DateInterval('P3M')); if (!$phpNotSupported && $today > $securityWarningDate) { $supportStatus['status'] = self::PHP_SECURITY_ONLY; $supportStatus['message'] = Text::sprintf( 'PLG_QUICKICON_PHPVERSIONCHECK_SECURITY_ONLY', $phpVersion, $phpEndOfSupport->format(Text::_('DATE_FORMAT_LC4')) ); } } return $supportStatus; } /** * Determines if the message should be displayed * * @return boolean * * @since 3.7.0 */ private function shouldDisplayMessage() { // Only on admin app if (!$this->getApplication()->isClient('administrator')) { return false; } // Only if authenticated if ($this->getApplication()->getIdentity()->guest) { return false; } // Only on HTML documents if ($this->getApplication()->getDocument()->getType() !== 'html') { return false; } // Only on full page requests if ($this->getApplication()->getInput()->getCmd('tmpl', 'index') === 'component') { return false; } // Only to com_cpanel if ($this->getApplication()->getInput()->get('option') !== 'com_cpanel') { return false; } return true; } } PK wd�\ �8D� � # phpversioncheck/phpversioncheck.xmlnu �[��� <?xml version="1.0" encoding="UTF-8"?> <extension type="plugin" group="quickicon" method="upgrade"> <name>plg_quickicon_phpversioncheck</name> <author>Joomla! Project</author> <creationDate>2016-08</creationDate> <copyright>(C) 2016 Open Source Matters, Inc.</copyright> <license>GNU General Public License version 2 or later; see LICENSE.txt</license> <authorEmail>admin@joomla.org</authorEmail> <authorUrl>www.joomla.org</authorUrl> <version>3.7.0</version> <description>PLG_QUICKICON_PHPVERSIONCHECK_XML_DESCRIPTION</description> <namespace path="src">Joomla\Plugin\Quickicon\PhpVersionCheck</namespace> <files> <folder plugin="phpversioncheck">services</folder> <folder>src</folder> </files> <languages> <language tag="en-GB">language/en-GB/plg_quickicon_phpversioncheck.ini</language> <language tag="en-GB">language/en-GB/plg_quickicon_phpversioncheck.sys.ini</language> </languages> </extension> PK wd�\�� � � privacycheck/privacycheck.xmlnu �[��� <?xml version="1.0" encoding="UTF-8"?> <extension type="plugin" group="quickicon" method="upgrade"> <name>plg_quickicon_privacycheck</name> <author>Joomla! Project</author> <creationDate>2018-06</creationDate> <copyright>(C) 2018 Open Source Matters, Inc.</copyright> <license>GNU General Public License version 2 or later; see LICENSE.txt</license> <authorEmail>admin@joomla.org</authorEmail> <authorUrl>www.joomla.org</authorUrl> <version>3.9.0</version> <description>PLG_QUICKICON_PRIVACYCHECK_XML_DESCRIPTION</description> <namespace path="src">Joomla\Plugin\Quickicon\PrivacyCheck</namespace> <files> <folder plugin="privacycheck">services</folder> <folder>src</folder> </files> <languages> <language tag="en-GB">language/en-GB/plg_quickicon_privacycheck.ini</language> <language tag="en-GB">language/en-GB/plg_quickicon_privacycheck.sys.ini</language> </languages> <config> <fields name="params"> <fieldset name="basic"> <field name="context" type="text" label="PLG_QUICKICON_PRIVACYCHECK_GROUP_LABEL" description="PLG_QUICKICON_PRIVACYCHECK_GROUP_DESC" default="update_quickicon" /> </fieldset> </fields> </config> </extension> PK wd�\���iF F "