File manager - Edit - /home/verseaumee/empowernetkenyajuly2026/webinstaller.tar
Back
webinstaller.php 0000604 00000010071 15251766757 0007770 0 ustar 00 <?php /** * @package Joomla.Plugin * @subpackage Installer.webinstaller * * @copyright (C) 2018 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\Application\CMSApplication; use Joomla\CMS\Form\Rule\UrlRule; use Joomla\CMS\Language\Text; use Joomla\CMS\Plugin\CMSPlugin; use Joomla\CMS\Plugin\PluginHelper; use Joomla\CMS\Updater\Update; use Joomla\CMS\Uri\Uri; use Joomla\CMS\Version; /** * Support for the "Install from Web" tab * * @since 3.2 */ class PlgInstallerWebinstaller extends CMSPlugin { /** * The URL for the remote server. * * @var string * @since 4.0.0 */ const REMOTE_URL = 'https://appscdn.joomla.org/webapps/'; /** * The application object. * * @var CMSApplication * @since 4.0.0 */ protected $app; /** * The URL to install from * * @var string|null * @since 4.0.0 */ private $installfrom = null; /** * Flag if the document is in a RTL direction * * @var integer|null * @since 4.0.0 */ private $rtl = null; /** * Event listener for the `onInstallerAddInstallationTab` event. * * @return array Returns an array with the tab information * * @since 4.0.0 */ public function onInstallerAddInstallationTab() { // Load language files $this->loadLanguage(); $installfrom = $this->getInstallFrom(); $doc = $this->app->getDocument(); $lang = $this->app->getLanguage(); // Push language strings to the JavaScript store Text::script('PLG_INSTALLER_WEBINSTALLER_CANNOT_INSTALL_EXTENSION_IN_PLUGIN'); Text::script('PLG_INSTALLER_WEBINSTALLER_REDIRECT_TO_EXTERNAL_SITE_TO_INSTALL'); $doc->getWebAssetManager() ->registerAndUseStyle('plg_installer_webinstaller.client', 'plg_installer_webinstaller/client.min.css') ->registerAndUseScript( 'plg_installer_webinstaller.client', 'plg_installer_webinstaller/client.min.js', [], ['type' => 'module'], ['core'] ); $devLevel = Version::PATCH_VERSION; if (!empty(Version::EXTRA_VERSION)) { $devLevel .= '-' . Version::EXTRA_VERSION; } $doc->addScriptOptions( 'plg_installer_webinstaller', [ 'base_url' => addslashes(self::REMOTE_URL), 'installat_url' => base64_encode(Uri::current() . '?option=com_installer&view=install'), 'installfrom_url' => addslashes($installfrom), 'product' => base64_encode(Version::PRODUCT), 'release' => base64_encode(Version::MAJOR_VERSION . '.' . Version::MINOR_VERSION), 'dev_level' => base64_encode($devLevel), 'installfromon' => $installfrom ? 1 : 0, 'language' => base64_encode($lang->getTag()), 'installFrom' => $installfrom != '' ? 4 : 5, ] ); $tab = [ 'name' => 'web', 'label' => Text::_('PLG_INSTALLER_WEBINSTALLER_TAB_LABEL'), ]; // Render the input ob_start(); include PluginHelper::getLayoutPath('installer', 'webinstaller'); $tab['content'] = ob_get_clean(); $tab['content'] = '<legend>' . $tab['label'] . '</legend>' . $tab['content']; return $tab; } /** * Internal check to determine if the output is in a RTL direction * * @return integer * * @since 3.2 */ private function isRTL() { if ($this->rtl === null) { $this->rtl = strtolower($this->app->getDocument()->getDirection()) === 'rtl' ? 1 : 0; } return $this->rtl; } /** * Get the install from URL * * @return string * * @since 3.2 */ private function getInstallFrom() { if ($this->installfrom === null) { $installfrom = base64_decode($this->app->input->getBase64('installfrom', '')); $field = new SimpleXMLElement('<field></field>'); if ((new UrlRule)->test($field, $installfrom) && preg_match('/\.xml\s*$/', $installfrom)) { $update = new Update; $update->loadFromXml($installfrom); $package_url = trim($update->get('downloadurl', false)->_data); if ($package_url) { $installfrom = $package_url; } } $this->installfrom = $installfrom; } return $this->installfrom; } } webinstaller.xml 0000604 00000001456 15251766757 0010010 0 ustar 00 <?xml version="1.0" encoding="utf-8"?> <extension type="plugin" group="installer" method="upgrade"> <name>plg_installer_webinstaller</name> <author>Joomla! Project</author> <creationDate>April 2017</creationDate> <copyright>(C) 2018 Open Source Matters, Inc.</copyright> <license>https://www.gnu.org/licenses/gpl-2.0.html GNU/GPL</license> <authorEmail>admin@joomla.org</authorEmail> <authorUrl>www.joomla.org</authorUrl> <version>4.0.0</version> <description>PLG_INSTALLER_WEBINSTALLER_XML_DESCRIPTION</description> <files> <filename plugin="webinstaller">webinstaller.php</filename> </files> <languages> <language tag="en-GB">language/en-GB/plg_installer_webinstaller.ini</language> <language tag="en-GB">language/en-GB/plg_installer_webinstaller.sys.ini</language> </languages> </extension> tmpl/default.php 0000604 00000003150 15251766757 0007675 0 ustar 00 <?php /** * @package Joomla.Plugin * @subpackage Installer.Webinstaller * * @copyright (C) 2018 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\Language\Text; /** @var PlgInstallerWebinstaller $this */ $dir = $this->isRTL() ? ' dir="ltr"' : ''; Text::script('JSEARCH_FILTER_CLEAR'); Text::script('PLG_INSTALLER_WEBINSTALLER_INSTALL_WEB_LOADING_ERROR'); ?> <div id="jed-container" class="tab-pane"> <div class="card" id="web-loader"> <div class="card-body"> <h2 class="card-title"><?php echo Text::_('PLG_INSTALLER_WEBINSTALLER_INSTALL_WEB_LOADING'); ?></h2> </div> </div> <div class="hidden" id="web-loader-error"> </div> </div> <fieldset class="form-group hidden" id="uploadform-web"<?php echo $dir; ?>> <p><strong><?php echo Text::_('PLG_INSTALLER_WEBINSTALLER_INSTALL_WEB_CONFIRM'); ?></strong></p> <dl> <dt id="uploadform-web-name-label"><?php echo Text::_('PLG_INSTALLER_WEBINSTALLER_INSTALL_WEB_CONFIRM_NAME'); ?></dt> <dd id="uploadform-web-name"></dd> <dt><?php echo Text::_('PLG_INSTALLER_WEBINSTALLER_INSTALL_WEB_CONFIRM_URL'); ?></dt> <dd id="uploadform-web-url"></dd> </dl> <div class="card card-light"> <div class="card-body"> <div class="card-text"> <button type="button" class="btn btn-primary" id="uploadform-web-install"><?php echo Text::_('COM_INSTALLER_INSTALL_BUTTON'); ?></button> <button type="button" class="btn btn-secondary" id="uploadform-web-cancel"><?php echo Text::_('JCANCEL'); ?></button> </div> </div> </div> </fieldset>
| ver. 1.4 |
Github
|
.
| PHP 8.5.7 | Generation time: 0 |
proxy
|
phpinfo
|
Settings