primo commit

This commit is contained in:
2024-12-17 17:34:10 +01:00
commit e650f8df99
16435 changed files with 2451012 additions and 0 deletions

View File

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="utf-8"?>
<extension type="file" version="1.6" method="upgrade">
<name>it-IT.com_allvideoshare</name>
<author>Peppe</author>
<authorEmail>giusleotta@tiscali.it</authorEmail>
<authorUrl>mypcdoktor.it</authorUrl>
<creationDate>August 2013</creationDate>
<copyright>Copyright (c) 2013 - 2014 All Video Share. All rights reserved.</copyright>
<license>http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL</license>
<version>3.1.0</version>
<description>Italian language pack for All Video Share.</description>
<fileset>
<files folder="administrator" target="administrator/language/it-IT">
<filename>it-IT.com_allvideoshare.ini</filename>
<filename>it-IT.com_allvideoshare.menu.ini</filename>
<filename>it-IT.com_allvideoshare.sys.ini</filename>
</files>
<files folder="site" target="language/it-IT">
<filename>it-IT.com_allvideoshare.ini</filename>
<filename>it-IT.mod_allvideosharegallery.ini</filename>
<filename>it-IT.mod_allvideoshareplayer.ini</filename>
<filename>it-IT.mod_allvideosharesearch.ini</filename>
</files>
</fileset>
</extension>

View File

@ -0,0 +1,98 @@
<?xml version="1.0" encoding="utf-8"?>
<extension version="2.5" type="file" method="upgrade">
<name>attachments_it_it_language_pack</name>
<version>3.1.1</version>
<creationDate>2013-06-10</creationDate>
<author>Jonathan M. Cameron, Piero Mattirolo (2.0-3.1), Lemminkainen (1.3.4)</author>
<authorEmail>jmcameron@jmcameron.net</authorEmail>
<authorUrl></authorUrl>
<copyright>Copyright (C) 2012-2013 Jonathan M. Cameron. All rights reserved.</copyright>
<license>GNU GPL 3: http://www.gnu.org/licenses/gpl-3.0.html</license>
<description>ATTACHMENTS_IT_IT_LANGUAGE_PACK</description>
<scriptfile>install.php</scriptfile>
<fileset>
<!-- Admin component language folder -->
<files folder="attachments_component/admin" target="administrator/components/com_attachments/language/it-IT">
<filename>index.html</filename>
<filename>it-IT.com_attachments.ini</filename>
<filename>it-IT.com_attachments.sys.ini</filename>
</files>
<!-- Site component language folder -->
<files folder="attachments_component/site" target="components/com_attachments/language/it-IT">
<filename>index.html</filename>
<filename>it-IT.com_attachments.ini</filename>
</files>
<!-- Attachments plugin language files -->
<files folder="attachments_plugin" target="plugins/content/attachments/language/it-IT">
<filename>index.html</filename>
<filename>it-IT.plg_content_attachments.ini</filename>
<filename>it-IT.plg_content_attachments.sys.ini</filename>
</files>
<!-- Attachments search plugin language files -->
<files folder="attachments_search" target="plugins/search/attachments/language/it-IT">
<filename>index.html</filename>
<filename>it-IT.plg_search_attachments.ini</filename>
<filename>it-IT.plg_search_attachments.sys.ini</filename>
</files>
<!-- Attachments add attachment editor button language files -->
<files folder="add_attachment_btn_plugin" target="plugins/editors-xtd/add_attachment/language/it-IT">
<filename>index.html</filename>
<filename>it-IT.plg_editors-xtd_add_attachment.ini</filename>
<filename>it-IT.plg_editors-xtd_add_attachment.sys.ini</filename>
</files>
<!-- Attachments insert attachment token editor button language files -->
<files folder="insert_attachments_token_btn_plugin" target="plugins/editors-xtd/insert_attachments_token/language/it-IT">
<filename>index.html</filename>
<filename>it-IT.plg_editors-xtd_insert_attachments_token.ini</filename>
<filename>it-IT.plg_editors-xtd_insert_attachments_token.sys.ini</filename>
</files>
<!-- Attachments show attachment in editor plugin language files -->
<files folder="show_attachments_in_editor_plugin" target="plugins/system/show_attachments/language/it-IT">
<filename>index.html</filename>
<filename>it-IT.plg_system_show_attachments.ini</filename>
<filename>it-IT.plg_system_show_attachments.sys.ini</filename>
</files>
<!-- Attachments quickicon plugin language files -->
<files folder="attachments_quickicon_plugin" target="plugins/quickicon/attachments/language/it-IT">
<filename>index.html</filename>
<filename>it-IT.plg_quickicon_attachments.ini</filename>
<filename>it-IT.plg_quickicon_attachments.sys.ini</filename>
</files>
<!-- Attachments attachments for content plugin language files -->
<files folder="attachments_for_content" target="plugins/attachments/attachments_for_content/language/it-IT">
<filename>index.html</filename>
<filename>it-IT.plg_attachments_attachments_for_content.ini</filename>
<filename>it-IT.plg_attachments_attachments_for_content.sys.ini</filename>
</files>
<!-- Attachments attachments plugin framework language files -->
<files folder="attachments_plugin_framework" target="plugins/attachments/attachments_plugin_framework/language/it-IT">
<filename>index.html</filename>
<filename>it-IT.plg_attachments_attachments_plugin_framework.ini</filename>
<filename>it-IT.plg_attachments_attachments_plugin_framework.sys.ini</filename>
</files>
<!-- Languages for this set of files -->
<files folder="language/en-GB" target="language/en-GB">
<filename>en-GB.files_attachments_it_it_language_pack.sys.ini</filename>
</files>
<files folder="language/it-IT" target="language/it-IT">
<filename>it-IT.files_attachments_it_it_language_pack.sys.ini</filename>
</files>
</fileset>
<updateservers>
<server type="extension" priority="1" name="Attachments Italian (it-IT) Language Pack Updates">http://jmcameron.net/attachments/updates/translations/Italian-it-IT/updates.xml</server>
</updateservers>
</extension>

View File

@ -0,0 +1,76 @@
<?php
/**
* Attachments language pack installation script
*
* @package Attachments
*
* @author Jonathan M. Cameron
* @copyright Copyright (C) 2013 Jonathan M. Cameron
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU/GPL
* @link http://joomlacode.org/gf/project/attachments/frs/
*/
// No direct access
defined('_JEXEC') or die('Restricted access');
// Import the component helper
jimport('joomla.application.component.helper');
/**
* The attachments language installation class
*
* @package Attachments
*/
class attachments_it_it_language_packInstallerScript
{
/**
* Attachments component preflight function
*
* @param $type : type of installation
* @param $parent : the installer parent
*/
public function preflight($type, $parent)
{
$app = JFactory::getApplication();
// Load the installation language file
$lang = JFactory::getLanguage();
$lang->load('files_attachments_language_pack.install', dirname(__FILE__));
// Verify that the Joomla version is adequate
$this->minimum_joomla_release = $parent->get( 'manifest' )->attributes()->version;
if ( version_compare(JVERSION, $this->minimum_joomla_release, 'lt') ) {
$msg = JText::sprintf('ATTACHMENTS_LANGUAGE_PACK_ERROR_INADEQUATE_JOOMLA_VERSION_S',
$this->minimum_joomla_release);
$app->enqueueMessage('<br/>', 'error');
$app->enqueueMessage($msg, 'error');
$app->enqueueMessage('<br/>', 'error');
return false;
}
// Make sure the component is already installed
$result = JComponentHelper::getComponent('com_attachments', true);
if (! $result->enabled)
{
$msg = JText::_('ATTACHMENTS_LANGUAGE_PACK_ERROR_INSTALL_COMPONENT_FIRST');
$app->enqueueMessage('<br/>', 'error');
$app->enqueueMessage($msg, 'error');
$app->enqueueMessage('<br/>', 'error');
return false;
}
// Verify that the attachments version is adequate
// (Do not update language pack for old versions of Attachments)
require_once(JPATH_SITE.'/components/com_attachments/defines.php');
$min_version = '3.0.9';
if (version_compare(AttachmentsDefines::$ATTACHMENTS_VERSION, '3.0.9', 'lt'))
{
$msg = JText::sprintf('ATTACHMENTS_LANGUAGE_PACK_ERROR_ATTACHMENTS_TOO_OLD_S', '3.1');
$app->enqueueMessage('<br/>', 'error');
$app->enqueueMessage($msg, 'error');
$app->enqueueMessage('<br/>', 'error');
return false;
}
}
}

View File

@ -0,0 +1,87 @@
<?xml version="1.0" encoding="utf-8"?>
<extension type="file" version="2.5" method="upgrade">
<!-- Please use a unique name to make uninstall to work. Should be identical to your manifest filename. -->
<name>com_jem_it-IT</name>
<tag>it-IT</tag>
<author>Italian Translation Team</author>
<creationDate>3 October 2016</creationDate>
<copyright>(C) 2005-2016 Christopher Lukes / JEM Translation Team</copyright>
<license>http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL</license>
<authorEmail>info@joomlaeventmanager.net</authorEmail>
<authorUrl>http://www.joomlaeventmanager.net</authorUrl>
<version>2.2.0</version>
<description>This is the it-IT language pack for JEM - an Event Manager for Joomla!
For assistance in translations please visit the Transifex Project page of JEM at http://www.transifex.com/projects/p/JEM/
</description>
<!-- Fileset definition -->
<fileset>
<!-- back-end -->
<files folder="admin_it-IT" target="administrator/components/com_jem/language/it-IT">
<filename>it-IT.com_jem.ini</filename>
<filename>it-IT.com_jem.sys.ini</filename>
</files>
<!-- front-end -->
<files folder="site_it-IT" target="components/com_jem/language/it-IT">
<filename>it-IT.com_jem.ini</filename>
</files>
<!-- modules -->
<files folder="site_it-IT" target="modules/mod_jem/language/it-IT">
<filename>it-IT.mod_jem.ini</filename>
<filename>it-IT.mod_jem.sys.ini</filename>
</files>
<files folder="site_it-IT" target="modules/mod_jem_wide/language/it-IT">
<filename>it-IT.mod_jem_wide.ini</filename>
<filename>it-IT.mod_jem_wide.sys.ini</filename>
</files>
<files folder="site_it-IT" target="modules/mod_jem_cal/language/it-IT">
<filename>it-IT.mod_jem_cal.ini</filename>
<filename>it-IT.mod_jem_cal.sys.ini</filename>
</files>
<files folder="site_it-IT" target="modules/mod_jem_calajax/language/it-IT">
<filename>it-IT.mod_jem_calajax.ini</filename>
<filename>it-IT.mod_jem_calajax.sys.ini</filename>
</files>
<files folder="site_it-IT" target="modules/mod_jem_teaser/language/it-IT">
<filename>it-IT.mod_jem_teaser.ini</filename>
<filename>it-IT.mod_jem_teaser.sys.ini</filename>
</files>
<files folder="site_it-IT" target="modules/mod_jem_banner/language/it-IT">
<filename>it-IT.mod_jem_banner.ini</filename>
<filename>it-IT.mod_jem_banner.sys.ini</filename>
</files>
<!-- plugins -->
<files folder="site_it-IT" target="plugins/finder/jem/language/it-IT">
<filename>it-IT.plg_finder_jem.ini</filename>
<filename>it-IT.plg_finder_jem.sys.ini</filename>
</files>
<files folder="site_it-IT" target="plugins/jem/comments/language/it-IT">
<filename>it-IT.plg_jem_comments.ini</filename>
<filename>it-IT.plg_jem_comments.sys.ini</filename>
</files>
<files folder="site_it-IT" target="plugins/jem/mailer/language/it-IT">
<filename>it-IT.plg_jem_mailer.ini</filename>
<filename>it-IT.plg_jem_mailer.sys.ini</filename>
</files>
<files folder="site_it-IT" target="plugins/search/jem/language/it-IT">
<filename>it-IT.plg_search_jem.ini</filename>
<filename>it-IT.plg_search_jem.sys.ini</filename>
</files>
</fileset>
</extension>

View File

@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<extension version="2.5" type="file" method="upgrade">
<name>en_GB_notificationary_language_pack</name>
<version>2018-03-16 23:41</version>
<creationDate>2018-03-16 23:41</creationDate>
<author>AryGroup</author>
<email>arygroup@gmail.com</email>
<authorUrl>http://arygroup.ga</authorUrl>
<copyright>Copyright (C) 2004-2018 Gruz. All rights reserved.</copyright>
<license>http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL</license>
<description>en-GB NotificationAry language pack</description>
<scriptfile>scriptfile.php</scriptfile>
<fileset>
<files target="plugins/system/notificationary/language/en-GB" folder="plugins/system/notificationary/language/en-GB">
<file>en-GB.plg_system_notificationary.ini</file>
<file>en-GB.plg_system_notificationary.sys.ini</file>
</files>
</fileset>
<updateservers>
<server type="extension" priority="1" name="en_GB_notificationary_language_pack">http://gruz.org.ua/images/stories/files/notificationary/update_en-GB.xml</server>
</updateservers>
</extension>

View File

@ -0,0 +1,89 @@
<?php
/*
* @author Gruz <arygroup@gmail.com>
* @copyright Copyleft - All rights reversed
* @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
*/
// No direct access
defined('_JEXEC') or die('Restricted access');
/**
* Script file
*/
class en_GB_notificationary_language_packInstallerScript {
function __construct() {
}
/**
* method to install the component
*
* @return void
*/
function install($parent) {
// $parent is the class calling this method
//$parent->getParent()->setRedirectURL('index.php?option=com_helloworld');
}
/**
* method to uninstall the component
*
* @return void
*/
function uninstall($parent) {
// $parent is the class calling this method
//echo '<p>' . JText::_('COM_HELLOWORLD_UNINSTALL_TEXT') . '</p>';
}
/**
* method to update the component
*
* @return void
*/
function update($parent) {
// $parent is the class calling this method
//echo '<p>' . JText::_('COM_HELLOWORLD_UPDATE_TEXT') . '</p>';
}
/**
* method to run before an install/update/uninstall method
*
* @return void
*/
function preflight($type, $parent) {
// $parent is the class calling this method
// $type is the type of change (install, update or discover_install)
//echo '<p>' . JText::_('COM_HELLOWORLD_PREFLIGHT_' . $type . '_TEXT') . '</p>';
}
/**
* method to run after an install/update/uninstall method
*
* Remove old language pack bad installations
*
* @return void
*/
function postflight($type, $parent) {
$name = get_class($this);
$extension = JTable::getInstance('extension');
$manifest = $parent->getParent()->getManifest();
$element_to_del = str_replace(' ','',(string)$manifest->description);
$eid = $extension->find(
array(
'element' => strtolower($element_to_del)
// , 'type' => strtolower('file'),
//~ 'client_id' => strtolower($current_update->get('client_id')),
//~ 'folder' => strtolower($current_update->get('folder'))
));
if (!empty($eid)) {
$extension->delete($eid);
}
// $parent is the class calling this method
// $type is the type of change (install, update or discover_install)
//echo '<p>' . JText::_('COM_HELLOWORLD_POSTFLIGHT_' . $type . '_TEXT') . '</p>';
}
private function installExtensions ($parent) {
}
}
?>

View File

@ -0,0 +1,43 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--~
~ Akeeba Frontend Framework (FEF)
~
~ @package fef
~ @copyright (c) 2017-2022 Nicholas K. Dionysopoulos / Akeeba Ltd
~ @license GNU General Public License version 3, or later
-->
<extension type="file" version="3.3" method="upgrade">
<!-- Generic Metadata -->
<name>file_fef</name>
<author>Nicholas K. Dionysopoulos</author>
<authorEmail>nicholas@dionysopoulos.me</authorEmail>
<authorUrl>https://www.akeeba.com</authorUrl>
<copyright>(C) 2017-2021 Akeeba Ltd.</copyright>
<license>GNU GPL v3 or later</license>
<version>2.1.1</version>
<creationDate>2022-10-24</creationDate>
<description>Akeeba Frontend Framework - The CSS framework for Akeeba Ltd extensions.</description>
<!-- Fileset definition -->
<fileset>
<files target="media/fef">
<folder>css</folder>
<folder>fonts</folder>
<folder>images</folder>
<folder>js</folder>
<folder>php</folder>
<filename>fef.php</filename>
<filename>version.php</filename>
<filename>version.txt</filename>
</files>
</fileset>
<!-- Installation / uninstallation script file -->
<scriptfile>script.fef.php</scriptfile>
<!-- Update server -->
<updateservers>
<server type="extension" priority="1" name="Akeeba FEF">http://cdn.akeeba.com/updates/fef.xml</server>
</updateservers>
</extension>

View File

@ -0,0 +1,562 @@
<?php
/**
* Akeeba Frontend Framework (FEF)
*
* @package fef
* @copyright (c) 2017-2022 Nicholas K. Dionysopoulos / Akeeba Ltd
* @license GNU General Public License version 3, or later
*/
defined('_JEXEC') or die();
use Joomla\CMS\Date\Date as JDate;
use Joomla\CMS\Factory as JFactory;
use Joomla\CMS\Filesystem\File;
use Joomla\CMS\Filesystem\Folder;
use Joomla\CMS\Installer\Adapter\FileAdapter as JInstallerAdapterFile;
use Joomla\CMS\Installer\Installer as JInstaller;
use Joomla\CMS\Log\Log as JLog;
if (class_exists('file_fefInstallerScript'))
{
// WTAF?!
return;
}
/**
* Akeeba FEF Installation Script
*
* @noinspection PhpUnused
*/
class file_fefInstallerScript
{
/**
* The minimum PHP version required to install this extension
*
* @var string
*/
protected $minimumPHPVersion = '7.2.0';
/**
* The minimum Joomla! version required to install this extension
*
* @var string
*/
protected $minimumJoomlaVersion = '3.9.0';
/**
* The maximum Joomla! version this extension can be installed on
*
* @var string
*/
protected $maximumJoomlaVersion = '4.999.999';
/**
* Joomla! pre-flight event. This runs before Joomla! installs or updates the component. This is our last chance to
* tell Joomla! if it should abort the installation.
*
* @param string $type Installation type (install, update, discover_install)
* @param JInstaller|JInstallerAdapterFile $parent Parent object
*
* @return boolean True to let the installation proceed, false to halt the installation
*/
public function preflight($type, $parent)
{
// Do not run on uninstall.
if ($type === 'uninstall')
{
return true;
}
// Check the minimum PHP version
if (!empty($this->minimumPHPVersion))
{
if (defined('PHP_VERSION'))
{
$version = PHP_VERSION;
}
elseif (function_exists('phpversion'))
{
$version = phpversion();
}
else
{
$version = '5.0.0'; // all bets are off!
}
if (!version_compare($version, $this->minimumPHPVersion, 'ge'))
{
$msg = "<p>You need PHP $this->minimumPHPVersion or later to install this package but you are currently using PHP $version</p>";
JLog::add($msg, JLog::WARNING, 'jerror');
return false;
}
}
// Check the minimum Joomla! version
if (!empty($this->minimumJoomlaVersion) && !version_compare(JVERSION, $this->minimumJoomlaVersion, 'ge'))
{
$jVersion = JVERSION;
$msg = "<p>You need Joomla! $this->minimumJoomlaVersion or later to install this package but you only have $jVersion installed.</p>";
JLog::add($msg, JLog::WARNING, 'jerror');
return false;
}
// Check the maximum Joomla! version
if (!empty($this->maximumJoomlaVersion) && !version_compare(JVERSION, $this->maximumJoomlaVersion, 'le'))
{
$jVersion = JVERSION;
$msg = <<< HTML
<h3>FEF is no longer needed on Joomla 5</h3>
<p>
<strong>Summary: FEF is no longer used on Joomla 5. Please uninstall it.</strong>
</p>
<hr/>
<p>
Akeeba FEF a.k.a. the Akeeba Front-End Framework was a CSS and JavaScript framework used by Akeeba Ltd with the Joomla 3 versions of our software.
</p>
<p>
Akeeba Ltd has stopped using the FEF framework for developing extensions. All of our extensions have new, Joomla 4 and later native versions which use the Bootstrap library, included in Joomla itself.
</p>
<p>
You can no longer install or update FEF on Joomla 5.0 and later (you have {$jVersion}). In fact, you just need to uninstall it.
</p>
HTML;
JLog::add($msg, JLog::WARNING, 'jerror');
return false;
}
// In case of an update, discovery etc I need to check if I am an update
if (($type == 'update') && !$this->amIAnUpdate($parent))
{
$msg = "<p>You already have a newer version of Akeeba Frontend Framework installed. If you want to downgrade please uninstall Akeeba Frontend Framework and install the older version.</p><p>If you see this message during the installation or update of an Akeeba extension please ignore it <em>and</em> the immediately following “Files Install: Custom install routine failure” message. They are expected but Joomla! won't allow us to prevent them from showing up.</p>";
JLog::add($msg, JLog::WARNING, 'jerror');
return false;
}
// Delete obsolete font files and folders
if ($type == 'update')
{
// Use pathnames relative to your site's root
$removeFiles = [
'files' => [
// Non-WOFF fonts are not shipped as of 1.0.1 since all modern browsers we target use WOFF
'media/fef/fonts/akeeba/Akeeba-Products.eot',
'media/fef/fonts/akeeba/Akeeba-Products.svg',
'media/fef/fonts/akeeba/Akeeba-Products.ttf',
'media/fef/fonts/Ionicon/ionicons.eot',
'media/fef/fonts/Ionicon/ionicons.svg',
'media/fef/fonts/Ionicon/ionicons.ttf',
// Files renamed in 1.0.8
'css/reset.min.css',
'css/style.min.css',
// JavaScript: Irrelevant for Joomla
'js/darkmode.js',
'js/darkmode.min.js',
'js/darkmode.map',
'js/Darkmode.min.js',
'js/Darkmode.map',
'js/menu.js',
'js/menu.min.js',
'js/menu.map',
'js/Menu.min.js',
'js/Menu.map',
// JavaScript: Uncompressed and map files
'js/dropdown.js',
'js/dropdown.map',
'js/Dropdown.map',
'js/loader.js',
'js/loader.map',
'js/Loader.map',
'js/tabs.js',
'js/tabs.map',
'js/Tabs.map',
],
'folders' => [
],
];
// Remove obsolete files and folders
$this->removeFilesAndFolders($removeFiles);
}
return true;
}
/**
* Runs after install, update or discover_update. In other words, it executes after Joomla! has finished installing
* or updating your component. This is the last chance you've got to perform any additional installations, clean-up,
* database updates and similar housekeeping functions.
*
* @param string $type install, update or discover_update
* @param JInstallerAdapterFile $parent Parent object
*
* @throws Exception
*
* @noinspection PhpUnusedParameterInspection
*/
public function postflight($type, JInstallerAdapterFile $parent)
{
// Do not run on uninstall.
if ($type === 'uninstall')
{
return true;
}
// Auto-uninstall this package when it is no longer needed.
if (($type != 'install') && ($this->countHardcodedDependencies() === 0))
{
$this->uninstallSelf($parent);
return true;
}
$this->bugfixFilesNotCopiedOnUpdate($parent);
return true;
}
/**
* Runs on uninstallation
*
* @param JInstallerAdapterFile $parent The parent object
*
* @throws RuntimeException If the uninstallation is not allowed
*
* @noinspection PhpUnusedParameterInspection
*/
public function uninstall($parent)
{
if (version_compare(JVERSION, '4.1.0', 'ge'))
{
return false;
}
// Check dependencies on FEF
$dependencyCount = $this->countHardcodedDependencies();
if ($dependencyCount)
{
$msg = "<p>You have $dependencyCount extension(s) depending on Akeeba Frontend Framework. The package cannot be uninstalled unless these extensions are uninstalled first.</p>";
JLog::add($msg, JLog::WARNING, 'jerror');
throw new RuntimeException($msg, 500);
}
Folder::delete(JPATH_SITE . '/media/fef');
return true;
}
/**
* Removes obsolete files and folders
*
* @param array $removeList The files and directories to remove
*/
protected function removeFilesAndFolders($removeList)
{
// Remove files
if (isset($removeList['files']) && !empty($removeList['files']))
{
foreach ($removeList['files'] as $file)
{
$f = JPATH_ROOT . '/' . $file;
if (!is_file($f))
{
continue;
}
File::delete($f);
}
}
// Remove folders
if (isset($removeList['folders']) && !empty($removeList['folders']))
{
foreach ($removeList['folders'] as $folder)
{
$f = JPATH_ROOT . '/' . $folder;
if (!is_dir($f))
{
continue;
}
Folder::delete($f);
}
}
}
/**
* Is this package an update to the currently installed FEF? If not (we're a downgrade) we will return false
* and prevent the installation from going on.
*
* @param JInstallerAdapterFile $parent The parent object
*
* @return bool Am I an update to an existing version>
*/
protected function amIAnUpdate($parent)
{
$grandpa = $parent->getParent();
$source = $grandpa->getPath('source');
$target = JPATH_ROOT . '/media/fef';
if (!Folder::exists($source))
{
// WTF? I can't find myself. I can't install anything.
return false;
}
// If FEF is not really installed (someone removed the directory instead of uninstalling?) I have to install it.
if (!Folder::exists($target))
{
return true;
}
$fefVersion = [];
if (File::exists($target . '/version.txt'))
{
$rawData = @file_get_contents($target . '/version.txt');
$rawData = ($rawData === false) ? "0.0.0\n2011-01-01\n" : $rawData;
$info = explode("\n", $rawData);
$fefVersion['installed'] = [
'version' => trim($info[0]),
'date' => new JDate(trim($info[1])),
];
}
else
{
$fefVersion['installed'] = [
'version' => '0.0',
'date' => new JDate('2011-01-01'),
];
}
$rawData = @file_get_contents($source . '/version.txt');
$rawData = ($rawData === false) ? "0.0.0\n2011-01-01\n" : $rawData;
$info = explode("\n", $rawData);
$fefVersion['package'] = [
'version' => trim($info[0]),
'date' => new JDate(trim($info[1])),
];
return $fefVersion['package']['date']->toUNIX() >= $fefVersion['installed']['date']->toUNIX();
}
/**
* Fix for Joomla bug: sometimes files are not copied on update.
*
* We have observed that ever since Joomla! 1.5.5, when Joomla! is performing an extension update some files /
* folders are not copied properly. This seems to be a bit random and seems to be more likely to happen the more
* added / modified files and folders you have. We are trying to work around it by retrying the copy operation
* ourselves WITHOUT going through the manifest, based entirely on the conventions we follow.
*
* @param \Joomla\CMS\Installer\Adapter\FileAdapter $parent
*/
protected function bugfixFilesNotCopiedOnUpdate($parent)
{
$source = $parent->getParent()->getPath('source');
$target = JPATH_SITE . '/media/fef';
$this->recursiveConditionalCopy($source, $target);
}
/**
* Recursively copy a bunch of files, but only if the source and target file have a different size.
*
* @param string $source Path to copy FROM
* @param string $dest Path to copy TO
* @param array $ignored List of entries to ignore (first level entries are taken into account)
*
* @return void
*/
protected function recursiveConditionalCopy($source, $dest, $ignored = [])
{
// Make sure source and destination exist
if (!@is_dir($source))
{
return;
}
if (!@is_dir($dest))
{
if (!@mkdir($dest, 0755))
{
Folder::create($dest, 0755);
}
}
if (!@is_dir($dest))
{
// Cannot create folder $dest
return;
}
// List the contents of the source folder
try
{
$di = new DirectoryIterator($source);
}
catch (Exception $e)
{
return;
}
// Process each entry
foreach ($di as $entry)
{
// Ignore dot dirs (. and ..)
if ($entry->isDot())
{
continue;
}
$sourcePath = $entry->getPathname();
$fileName = $entry->getFilename();
// Do not copy ignored files
if (!empty($ignored) && in_array($fileName, $ignored))
{
continue;
}
// If it's a directory do a recursive copy
if ($entry->isDir())
{
$this->recursiveConditionalCopy($sourcePath, $dest . DIRECTORY_SEPARATOR . $fileName);
continue;
}
// If it's a file check if it's missing or identical
$mustCopy = false;
$targetPath = $dest . DIRECTORY_SEPARATOR . $fileName;
if (!@is_file($targetPath))
{
$mustCopy = true;
}
else
{
$sourceSize = @filesize($sourcePath);
$targetSize = @filesize($targetPath);
$mustCopy = $sourceSize != $targetSize;
if ((substr($targetPath, -4) === '.php') && function_exists('opcache_invalidate'))
{
opcache_invalidate($targetPath);
}
}
if (!$mustCopy)
{
continue;
}
if (!@copy($sourcePath, $targetPath))
{
File::copy($sourcePath, $targetPath);
}
}
}
/**
* Count the number of old FOF + FEF based extensions installed on this site
*
* @return int
*/
private function countHardcodedDependencies()
{
// Look for fof.xml in the backend directories of the following components
$hardcodedDependencies = [
'com_admintools',
'com_akeeba',
'com_ars',
'com_ats',
'com_compatibility',
'com_datacompliance',
'com_contactus',
'com_docimport',
'com_loginguard',
];
$count = 0;
foreach ($hardcodedDependencies as $component)
{
$filePath = JPATH_ADMINISTRATOR . '/components/' . $component . '/fof.xml';
if (@file_exists($filePath))
{
$count++;
}
}
return $count;
}
/**
* Uninstall this package.
*
* This runs on update when there are no more dependencies left.
*
* @param \Joomla\CMS\Installer\Adapter\FileAdapter $adapter
*
* @return void
*/
private function uninstallSelf($adapter)
{
$parent = $adapter->getParent();
if (empty($parent) || !property_exists($parent, 'extension'))
{
return;
}
if (version_compare(JVERSION, '4.0', 'lt'))
{
$db = \Joomla\CMS\Factory::getDbo();
}
else
{
$db = \Joomla\CMS\Factory::getContainer()->get('DatabaseDriver');
}
try
{
$query = $db->getQuery(true)
->select($db->quoteName('extension_id'))
->from($db->quoteName('#__extensions'))
->where($db->quoteName('type') . ' = ' . $db->quote('file'))
->where($db->quoteName('name') . ' = ' . $db->quote('file_fef'));
$id = $db->setQuery($query)->loadResult();
}
catch (Exception $e)
{
return;
}
if (empty($id))
{
return;
}
$msg = 'Automatically uninstalling FEF; this package is no longer required on your site.';
\Joomla\CMS\Log\Log::add($msg, \Joomla\CMS\Log\Log::INFO, 'jerror');
$parent->uninstall('file', $id);
}
}

View File

@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<extension type="file" version="3.7" method="upgrade">
<!-- Generic Metadata -->
<name>file_jlcomponent_ajax</name>
<author>Joomline</author>
<creationDate>01.08.2023</creationDate>
<copyright>(C) 2017-2023 Arkadiy Sedelnikov, Sergey Tolkachyov, Joomline. All rights reserved.</copyright>
<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
<authorEmail>sales@joomline.ru</authorEmail>
<packager>JoomLine</packager>
<packagerurl>https://joomline.ru</packagerurl>
<version>3.0.0</version>
<!-- Fileset definition -->
<fileset>
<files target="templates/system">
<filename>jlcomponent_ajax.php</filename>
</files>
</fileset>
</extension>

View File

@ -0,0 +1,29 @@
<?xml version="1.0" encoding="UTF-8"?>
<extension type="file" version="2.5" method="upgrade">
<!-- Generic Metadata -->
<name>AkeebaStrapper</name>
<author>Nicholas K. Dionysopoulos</author>
<authorEmail>nicholas@dionysopoulos.me</authorEmail>
<authorUrl>https://www.akeebabackup.com</authorUrl>
<copyright>(C) 2012-2013 Akeeba Ltd.</copyright>
<license>GNU GPL v2 or later</license>
<version>revAA17947</version>
<creationDate>2016-05-12</creationDate>
<description>Namespaced jQuery, jQuery UI and Bootstrap for Akeeba products.</description>
<!-- Fileset definition -->
<fileset>
<files folder="akeeba_strapper" target="media/akeeba_strapper">
<folder>css</folder>
<folder>img</folder>
<folder>js</folder>
<folder>less</folder>
<filename>strapper.ini</filename>
<filename>strapper.php</filename>
<filename>version.php</filename>
</files>
<files target="media/akeeba_strapper">
<filename>version.txt</filename>
</files>
</fileset>
</extension>

View File

@ -0,0 +1,30 @@
<?xml version="1.0" encoding="UTF-8" ?>
<extension type="file" method="upgrade" version="3.0">
<name>Componente Phoca Gallery - Traduzione italiana</name>
<version>4.0.4</version>
<creationDate>31.12.2013</creationDate>
<author>Corrado Catalani</author>
<authorUrl>http://www.cataweb.org</authorUrl>
<license>GNU/GPL version 2</license>
<description>
<![CDATA[
<p><strong>Traduzione della componente/versione:</strong> Phoca Gallery 4.0.4 (it-IT.com_phocagallery)<br /><br />
<strong>Lingua:</strong> Italiano<br />
<strong>Client:</strong> Administrator (Backend) + Site (Frontend)<br />
<strong>Autore:</strong> Corrado Catalani <br /><br />
<a target="_blank" href="http://www.cataweb.org">www.cataweb.org</a> per ringraziare Jan Pawelka <a target="_blank" href="http://phoca.cz">Phoca.CZ</a> di aver creato e messo a disposizione della collettività e gratuitamente il suo software.<br />
<strong>Versione traduzione:</strong> 4.0.4 <br /><br />
</p>
]]>
</description>
<fileset>
<files target="language/it-IT">
<filename>it-IT.com_phocagallery.ini</filename>
<filename>it-IT.com_phocagallery.sys.ini</filename>
</files>
<files target="administrator/language/it-IT">
<filename>it-IT.com_phocagallery.ini</filename>
<filename>it-IT.com_phocagallery.sys.ini</filename>
</files>
</fileset>
</extension>

View File

@ -0,0 +1,27 @@
<?xml version="1.0" encoding="UTF-8" ?>
<extension type="file" method="upgrade" version="3.0">
<name>Componente Phoca Maps - lingua Italiano</name>
<version>3.0.1</version>
<creationDate>25.06.2015</creationDate>
<author>Cesare Manca</author>
<authorUrl>http://www.pcteknet.it</authorUrl>
<license>GNU/GPL version 2</license>
<description>
<![CDATA[
<p><strong>File di lingua Italiana per il Componente/Versione:</strong> Phoca Maps 3.0.1 (it-IT.com_phocamaps)<br /><br />
<strong>Lingua:</strong> Italiana<br />
</p>
]]>
</description>
<fileset>
<files target="language/it-IT">
<filename>it-IT.com_phocamaps.ini</filename>
<filename>it-IT.com_phocamaps.sys.ini</filename>
</files>
<files target="administrator/language/it-IT">
<filename>it-IT.com_phocamaps.ini</filename>
<filename>it-IT.com_phocamaps.sys.ini</filename>
</files>
</fileset>
</extension>

View File

@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<extension version="2.5" type="file" method="upgrade">
<name>it_IT_notificationary_language_pack</name>
<version>2018-03-16 23:41</version>
<creationDate>2018-03-16 23:41</creationDate>
<author>AryGroup</author>
<email>arygroup@gmail.com</email>
<authorUrl>http://arygroup.ga</authorUrl>
<copyright>Copyright (C) 2004-2018 Gruz. All rights reserved.</copyright>
<license>http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL</license>
<description>it-IT NotificationAry language pack</description>
<scriptfile>scriptfile.php</scriptfile>
<fileset>
<files target="plugins/system/notificationary/language/it-IT" folder="plugins/system/notificationary/language/it-IT">
<file>it-IT.plg_system_notificationary.ini</file>
<file>it-IT.plg_system_notificationary.sys.ini</file>
</files>
</fileset>
<updateservers>
<server type="extension" priority="1" name="it_IT_notificationary_language_pack">http://gruz.org.ua/images/stories/files/notificationary/update_it-IT.xml</server>
</updateservers>
</extension>

View File

@ -0,0 +1,89 @@
<?php
/*
* @author Gruz <arygroup@gmail.com>
* @copyright Copyleft - All rights reversed
* @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
*/
// No direct access
defined('_JEXEC') or die('Restricted access');
/**
* Script file
*/
class it_IT_notificationary_language_packInstallerScript {
function __construct() {
}
/**
* method to install the component
*
* @return void
*/
function install($parent) {
// $parent is the class calling this method
//$parent->getParent()->setRedirectURL('index.php?option=com_helloworld');
}
/**
* method to uninstall the component
*
* @return void
*/
function uninstall($parent) {
// $parent is the class calling this method
//echo '<p>' . JText::_('COM_HELLOWORLD_UNINSTALL_TEXT') . '</p>';
}
/**
* method to update the component
*
* @return void
*/
function update($parent) {
// $parent is the class calling this method
//echo '<p>' . JText::_('COM_HELLOWORLD_UPDATE_TEXT') . '</p>';
}
/**
* method to run before an install/update/uninstall method
*
* @return void
*/
function preflight($type, $parent) {
// $parent is the class calling this method
// $type is the type of change (install, update or discover_install)
//echo '<p>' . JText::_('COM_HELLOWORLD_PREFLIGHT_' . $type . '_TEXT') . '</p>';
}
/**
* method to run after an install/update/uninstall method
*
* Remove old language pack bad installations
*
* @return void
*/
function postflight($type, $parent) {
$name = get_class($this);
$extension = JTable::getInstance('extension');
$manifest = $parent->getParent()->getManifest();
$element_to_del = str_replace(' ','',(string)$manifest->description);
$eid = $extension->find(
array(
'element' => strtolower($element_to_del)
// , 'type' => strtolower('file'),
//~ 'client_id' => strtolower($current_update->get('client_id')),
//~ 'folder' => strtolower($current_update->get('folder'))
));
if (!empty($eid)) {
$extension->delete($eid);
}
// $parent is the class calling this method
// $type is the type of change (install, update or discover_install)
//echo '<p>' . JText::_('COM_HELLOWORLD_POSTFLIGHT_' . $type . '_TEXT') . '</p>';
}
private function installExtensions ($parent) {
}
}
?>

View File

@ -0,0 +1,50 @@
<?xml version="1.0" encoding="UTF-8"?>
<extension type="file" method="upgrade">
<name>files_joomla</name>
<author>Joomla! Project</author>
<authorEmail>admin@joomla.org</authorEmail>
<authorUrl>www.joomla.org</authorUrl>
<copyright>(C) 2019 Open Source Matters, Inc.</copyright>
<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
<version>5.2.2</version>
<creationDate>2024-11</creationDate>
<description>FILES_JOOMLA_XML_DESCRIPTION</description>
<scriptfile>administrator/components/com_admin/script.php</scriptfile>
<update>
<schemas>
<schemapath type="mysql">administrator/components/com_admin/sql/updates/mysql</schemapath>
<schemapath type="postgresql">administrator/components/com_admin/sql/updates/postgresql</schemapath>
</schemas>
</update>
<fileset>
<files>
<folder>administrator</folder>
<folder>api</folder>
<folder>cache</folder>
<folder>cli</folder>
<folder>components</folder>
<folder>images</folder>
<folder>includes</folder>
<folder>language</folder>
<folder>layouts</folder>
<folder>libraries</folder>
<folder>media</folder>
<folder>modules</folder>
<folder>plugins</folder>
<folder>templates</folder>
<folder>tmp</folder>
<file>htaccess.txt</file>
<file>web.config.txt</file>
<file>LICENSE.txt</file>
<file>README.txt</file>
<file>index.php</file>
</files>
</fileset>
<updateservers>
<server name="Joomla! Core" type="collection">https://update.joomla.org/core/list.xml</server>
</updateservers>
</extension>

View File

@ -0,0 +1,39 @@
<?xml version="1.0" encoding="utf-8"?>
<extension type="library" method="upgrade">
<name>Joomlashack Framework</name>
<libraryname>allediaframework</libraryname>
<author>Joomlashack</author>
<authorEmail>help@joomlashack.com</authorEmail>
<authorUrl>https://www.joomlashack.com/</authorUrl>
<copyright>Copyright 2016-2023 Joomlashack.com</copyright>
<license>GNU GPL; see LICENSE file</license>
<description>Shared library for Joomlashack extensions</description>
<version>3.7.3</version>
<creationDate>June 13 2024</creationDate>
<variant>FREE</variant>
<files>
<folder>Framework</folder>
<folder>helpers</folder>
<folder>vendor</folder>
<filename>include.php</filename>
</files>
<media destination="lib_allediaframework" folder="media">
<folder>css</folder>
</media>
<updateservers>
<server type="extension" priority="1" name="Joomlashack Framework"><![CDATA[https://deploy.ostraining.com/client/update/free/stable/lib_allediaframework]]></server>
</updateservers>
<alledia>
<element>allediaframework</element>
<namespace>AllediaFramework</namespace>
<name>Joomlashack Framework</name>
<license>free</license>
<targetplatform>3.9</targetplatform>
<phpminimum>7.2.5</phpminimum>
</alledia>
</extension>

View File

@ -0,0 +1,67 @@
<?xml version="1.0" encoding="UTF-8"?>
<extension type="library" version="3.2" method="upgrade">
<name>FOF30</name>
<libraryname>fof30</libraryname>
<description>
<![CDATA[
Framework-on-Framework (FOF) 3.x - The rapid application development framework for Joomla!.<br/>
<b>WARNING</b>: This is NOT a duplicate of the FOF library already installed with Joomla!. It is a different version used by other extensions on your site. Do NOT uninstall either FOF package. If you do you will break your site.
]]>
</description>
<creationDate>2018-12-07</creationDate>
<author>Nicholas K. Dionysopoulos / Akeeba Ltd</author>
<authorEmail>nicholas@akeebabackup.com</authorEmail>
<authorUrl>https://www.akeebabackup.com</authorUrl>
<copyright>(C)2010-2017 Nicholas K. Dionysopoulos</copyright>
<license>GNU GPLv2 or later</license>
<version>3.3.9</version>
<packager>Akeeba Ltd</packager>
<packagerurl>https://www.AkeebaBackup.com/download.html</packagerurl>
<languages folder="fof/language">
<language tag="en-GB">en-GB/en-GB.lib_fof30.ini</language>
</languages>
<files folder="fof">
<folder>Autoloader</folder>
<folder>Configuration</folder>
<folder>Container</folder>
<folder>Controller</folder>
<folder>Database</folder>
<folder>Date</folder>
<folder>Dispatcher</folder>
<folder>Download</folder>
<folder>Encrypt</folder>
<folder>Event</folder>
<folder>Factory</folder>
<folder>Form</folder>
<folder>Hal</folder>
<folder>Inflector</folder>
<folder>Input</folder>
<folder>Layout</folder>
<folder>Less</folder>
<folder>Model</folder>
<folder>Params</folder>
<folder>Pimple</folder>
<folder>Platform</folder>
<folder>Render</folder>
<folder>Template</folder>
<folder>Timer</folder>
<folder>Toolbar</folder>
<folder>TransparentAuthentication</folder>
<folder>Update</folder>
<folder>Utils</folder>
<folder>View</folder>
<file>LICENSE.txt</file>
<file>include.php</file>
<file>version.txt</file>
</files>
<!-- Installation / uninstallation script file -->
<scriptfile>script.fof.php</scriptfile>
<updateservers>
<server type="extension" priority="1" name="FOF 3.x">http://cdn.akeebabackup.com/updates/fof3.xml</server>
</updateservers>
</extension>

View File

@ -0,0 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<extension type="library">
<name>lib_joomla</name>
<libraryname>joomla</libraryname>
<version>13.1</version>
<description>LIB_JOOMLA_XML_DESCRIPTION</description>
<creationDate>2008-01</creationDate>
<copyright>(C) 2008 Open Source Matters, Inc.</copyright>
<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
<author>Joomla! Project</author>
<authorEmail>admin@joomla.org</authorEmail>
<authorUrl>https://www.joomla.org</authorUrl>
<packager>Joomla!</packager>
<packagerurl>https://www.joomla.org</packagerurl>
<files folder="libraries">
<folder>compat</folder>
<folder>joomla</folder>
<folder>legacy</folder>
<file>import.legacy.php</file>
<file>import.php</file>
<file>loader.php</file>
<file>platform.php</file>
</files>
</extension>

View File

@ -0,0 +1,50 @@
<?xml version="1.0" encoding="UTF-8"?>
<extension type="library" version="2.5" method="upgrade">
<name>F0F (NEW) DO NOT REMOVE</name>
<libraryname>f0f</libraryname>
<description>Framework-on-Framework (FOF) newer version - DO NOT REMOVE - The rapid component development framework for Joomla!. This package is the newer version of FOF, not the one shipped with Joomla! as the official Joomla! RAD Layer. The Joomla! RAD Layer has ceased development in March 2014. DO NOT UNINSTALL THIS PACKAGE, IT IS *** N O T *** A DUPLICATE OF THE 'FOF' PACKAGE. REMOVING EITHER FOF PACKAGE WILL BREAK YOUR SITE.</description>
<creationDate>2016-05-12</creationDate>
<author>Nicholas K. Dionysopoulos / Akeeba Ltd</author>
<authorEmail>nicholas@akeebabackup.com</authorEmail>
<authorUrl>https://www.akeebabackup.com</authorUrl>
<copyright>(C)2011-2014 Nicholas K. Dionysopoulos</copyright>
<license>GNU GPLv2 or later</license>
<version>revAA17947</version>
<packager>Akeeba Ltd</packager>
<packagerurl>https://www.AkeebaBackup.com/download.html</packagerurl>
<languages folder="_lang">
<language tag="en-GB">en-GB/en-GB.lib_f0f.ini</language>
</languages>
<files folder="fof">
<folder>autoloader</folder>
<folder>config</folder>
<folder>controller</folder>
<folder>database</folder>
<folder>dispatcher</folder>
<folder>download</folder>
<folder>encrypt</folder>
<folder>form</folder>
<folder>hal</folder>
<folder>inflector</folder>
<folder>integration</folder>
<folder>input</folder>
<folder>layout</folder>
<folder>less</folder>
<folder>model</folder>
<folder>platform</folder>
<folder>query</folder>
<folder>render</folder>
<folder>string</folder>
<folder>table</folder>
<folder>template</folder>
<folder>toolbar</folder>
<folder>utils</folder>
<folder>view</folder>
<file>LICENSE.txt</file>
<file>include.php</file>
<file>version.txt</file>
</files>
</extension>

View File

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<extension type="library" method="upgrade">
<name>lib_phpass</name>
<libraryname>phpass</libraryname>
<description>LIB_PHPASS_XML_DESCRIPTION</description>
<creationDate>2004-01</creationDate>
<author>Solar Designer</author>
<authorEmail>solar@openwall.com</authorEmail>
<authorUrl>https://www.openwall.com/phpass/</authorUrl>
<license>PD / GWC</license>
<version>0.3</version>
<packagerurl>https://www.openwall.com/phpass/</packagerurl>
<files folder="phpass">
<file>PasswordHash.php</file>
</files>
</extension>

View File

@ -0,0 +1,28 @@
<?xml version="1.0" encoding="utf-8"?>
<extension version="4.0" type="library" method="upgrade">
<name>Regular Labs Library</name>
<description>Regular Labs Library - used by Regular Labs extensions</description>
<version>24.11.1459</version>
<creationDate>November 2024</creationDate>
<author>Regular Labs (Peter van Westen)</author>
<authorEmail>info@regularlabs.com</authorEmail>
<authorUrl>https://regularlabs.com</authorUrl>
<copyright>Copyright © 2024 Regular Labs - All Rights Reserved</copyright>
<license>GNU General Public License version 2 or later</license>
<libraryname>regularlabs</libraryname>
<namespace path="src">RegularLabs\Library</namespace>
<scriptfile>script.install.php</scriptfile>
<files>
<file>autoload.php</file>
<file>regularlabs.xml</file>
<folder>layouts</folder>
<folder>src</folder>
<folder>vendor</folder>
</files>
<media folder="media" destination="regularlabs">
<folder>css</folder>
<folder>images</folder>
<folder>js</folder>
<folder>scss</folder>
</media>
</extension>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,187 @@
<?php
/**
* @package Conditions
* @version 24.11.1459
*
* @author Peter van Westen <info@regularlabs.com>
* @link https://regularlabs.com
* @copyright Copyright © 2024 Regular Labs All Rights Reserved
* @license GNU General Public License version 2 or later
*/
defined('_JEXEC') or die;
use Joomla\CMS\Factory as JFactory;
use Joomla\CMS\Installer\Manifest\PackageManifest as JPackageManifest;
use Joomla\CMS\Language\Text as JText;
if ( ! class_exists('pkg_conditionsInstallerScript'))
{
class pkg_conditionsInstallerScript
{
static $current_version;
static $name;
static $package_name;
static $previous_version;
public function postflight($install_type, $adapter)
{
if ( ! in_array($install_type, ['install', 'update']))
{
return true;
}
self::publishExtensions();
self::recreateNamespaceMap();
self::displayMessages();
return true;
}
public function preflight($install_type, $adapter)
{
$manifest = $adapter->getManifest();
static::$package_name = trim($manifest->packagename);
static::$name = trim($manifest->name);
static::$current_version = trim($manifest->version);
static::$previous_version = self::getPreviousVersion();
return true;
}
private static function recreateNamespaceMap()
{
if (JVERSION < 4)
{
return;
}
// Remove the administrator/cache/autoload_psr4.php file
$filename = JPATH_ADMINISTRATOR . '/cache/autoload_psr4.php';
if (file_exists($filename))
{
self::clearFileInOPCache($filename);
clearstatcache(true, $filename);
@unlink($filename);
}
JFactory::getApplication()->createExtensionNamespaceMap();
}
private static function clearFileInOPCache($file)
{
$hasOpCache = ini_get('opcache.enable')
&& function_exists('opcache_invalidate')
&& (
! ini_get('opcache.restrict_api')
|| stripos(realpath($_SERVER['SCRIPT_FILENAME']), ini_get('opcache.restrict_api')) === 0
);
if ( ! $hasOpCache)
{
return false;
}
return opcache_invalidate($file, true);
}
private static function displayMessages()
{
if (php_sapi_name() == 'cli')
{
return;
}
$msg = self::getInstallationLanguageString();
JFactory::getApplication()->enqueueMessage(
JText::sprintf(
$msg,
'<strong>' . JText::_(static::$name . '_SHORT') . '</strong>',
'<strong>' . static::$current_version . '</strong>'
), 'success'
);
}
private static function getInstallationLanguageString()
{
if ( ! static::$previous_version)
{
return 'PKG_RL_EXTENSION_INSTALLED';
}
if (static::$previous_version == static::$current_version)
{
return 'PKG_RL_EXTENSION_REINSTALLED';
}
return 'PKG_RL_EXTENSION_UPDATED';
}
private static function getPreviousVersion()
{
$xml_file = self::getXmlFile();
if ( ! $xml_file)
{
return '';
}
$manifest = new JPackageManifest($xml_file);
return isset($manifest->version) ? trim($manifest->version) : '';
}
private static function getXmlFile()
{
$xml_file = JPATH_MANIFESTS . '/packages/pkg_' . static::$package_name . '.xml';
if (file_exists($xml_file))
{
return $xml_file;
}
$xml_file = JPATH_LIBRARIES . '/' . static::$package_name . '.xml';
if (file_exists($xml_file))
{
return $xml_file;
}
$xml_file = JPATH_ADMINISTRATOR . '/components/com_' . static::$package_name . '/' . static::$package_name . '.xml';
if (file_exists($xml_file))
{
return $xml_file;
}
return '';
}
private static function publishExtensions()
{
// ignore if this is an update of Conditions
if (static::$package_name == 'conditions' && static::$previous_version)
{
return;
}
$db = JFactory::getDbo();
$query = $db->getQuery(true)
->update('#__extensions')
->set($db->quoteName('enabled') . ' = 1')
->where($db->quoteName('element') . ' IN ('
. $db->quote(static::$package_name)
. ', ' . $db->quote('com_' . static::$package_name)
. ')'
);
$db->setQuery($query);
$db->execute();
}
}
}

View File

@ -0,0 +1 @@
<!DOCTYPE html><title></title>

View File

@ -0,0 +1,186 @@
<?php
/**
* JEM Package
* @package JEM.Package
*
* @copyright (C) 2013-2024 joomlaeventmanager.net
* @license https://www.gnu.org/licenses/gpl-3.0 GNU/GPL
*
* @copyright (C) 2008 - 2013 Kunena Team. All rights reserved.
* @license https://www.gnu.org/copyleft/gpl.html GNU/GPL
* @link https://www.kunena.org
**/
defined ('_JEXEC') or die;
use Joomla\CMS\Factory;
use Joomla\CMS\Version;
use Joomla\CMS\Table\Table;
use Joomla\CMS\Router\Route;
/**
* JEM package installer script.
*/
class Pkg_JemInstallerScript
{
/**
* List of supported versions. Newest version first!
* @var array
*/
protected $versions = array(
'PHP' => array (
'8.0' => '8.0',
'0' => '8.0' // Preferred version
),
'MySQL' => array (
'8.0' => '8.0',
'5.6' => '5.6',
'0' => '5.6' // Preferred version
),
'Joomla!' => array (
'4.2' => '4.2',
'4.0' => '',
'0' => '4.2' // Preferred version
)
);
/**
* List of required PHP extensions.
* @var array
*/
protected $extensions = array ('gd', 'json', 'pcre', 'ctype', 'SimpleXML' /* iCalCreator */ );
public function install($parent) {
return true;
}
public function discover_install($parent) {
return self::install($parent);
}
public function update($parent) {
return self::install($parent);
}
public function uninstall($parent) {
return true;
}
public function preflight($type, $parent) {
// Prevent installation if requirements are not met.
if (!$this->checkRequirements()){
return false;
}
return true;
}
public function makeRoute($uri) {
return Route::_($uri, false);
}
public function postflight($type, $parent) {
// Clear Joomla system cache.
/** @var JCache|JCacheController $cache */
$cache = Factory::getCache();
$cache->clean('_system');
// Remove all compiled files from APC cache.
if (function_exists('apc_clear_cache')) {
@apc_clear_cache();
}
if ($type == 'uninstall') return true;
$this->enablePlugin('content', 'jem');
$this->enablePlugin('content', 'jemlistevents');
$this->enablePlugin('quickicon', 'jem');
// $this->enablePlugin('finder', 'jem');
// $this->enablePlugin('search', 'jem');
// $this->enablePlugin('jem', 'mailer');
# ajax calendar module doesn't fully work on Joomla! 2.5
if (version_compare(JVERSION, '3', '<')) {
$this->disableModule('mod_jem_calajax');
}
return true;
}
function enablePlugin($group, $element) {
$plugin = Table::getInstance('extension');
if (!$plugin->load(array('type'=>'plugin', 'folder'=>$group, 'element'=>$element))) {
return false;
}
$plugin->enabled = 1;
return $plugin->store();
}
function disableModule($element) {
$module = Table::getInstance('extension');
if (!$module->load(array('type'=>'module', 'element'=>$element))) {
return false;
}
$module->enabled = 0;
return $module->store();
}
public function checkRequirements() {
$db = Factory::getContainer()->get('DatabaseDriver');
$pass = $this->checkVersion('PHP', phpversion());
$pass &= $this->checkVersion('Joomla!', JVERSION);
$pass &= $this->checkVersion('MySQL', $db->getVersion ());
$pass &= $this->checkDbo($db->name, array('mysql', 'mysqli'));
$pass &= $this->checkExtensions($this->extensions);
return $pass;
}
// Internal functions
protected function checkVersion($name, $version) {
$app = Factory::getApplication();
$major = $minor = 0;
foreach ($this->versions[$name] as $major=>$minor) {
if (!$major || version_compare($version, $major, '<')) {
continue;
}
if ($minor && version_compare($version, $minor, '>=')) {
return true;
}
break;
}
if (!$major) {
$minor = reset($this->versions[$name]);
}
$recommended = end($this->versions[$name]);
if ($minor) {
$app->enqueueMessage(sprintf("%s %s is not supported. Minimum required version is %s %s, but it is highly recommended to use %s %s or later.", $name, $version, $name, $minor, $name, $recommended), 'notice');
} else {
$app->enqueueMessage(sprintf("%s %s is not supported. It is highly recommended to use %s %s or later.", $name, $version, $name, $recommended), 'notice');
}
return false;
}
protected function checkDbo($name, $types) {
$app = Factory::getApplication();
if (in_array($name, $types)) {
return true;
}
$app->enqueueMessage(sprintf("Database driver '%s' is not supported. Please use MySQL instead.", $name), 'notice');
return false;
}
protected function checkExtensions($extensions) {
$app = Factory::getApplication();
$pass = 1;
foreach ($extensions as $name) {
if (!extension_loaded($name)) {
$pass = 0;
$app->enqueueMessage(sprintf("Required PHP extension '%s' is missing. Please install it into your system.", $name), 'notice');
}
}
return $pass;
}
}

View File

@ -0,0 +1,27 @@
<?xml version="1.0" encoding="UTF-8"?>
<extension type="package" method="upgrade">
<packagename>articles</packagename>
<name>PKG_ARTICLES</name>
<version>4.3.2</version>
<creationDate>October 2024</creationDate>
<author>Regular Labs (Peter van Westen)</author>
<authorEmail>info@regularlabs.com</authorEmail>
<authorUrl>https://regularlabs.com</authorUrl>
<copyright>Copyright © 2024 Regular Labs - All Rights Reserved</copyright>
<license>GNU General Public License version 2 or later</license>
<scriptfile>script.install.php</scriptfile>
<blockChildUninstall>true</blockChildUninstall>
<files folder="packages/j4">
<file type="plugin" group="fields" id="articles">plg_fields_articles</file>
<file type="plugin" group="fields" id="articleslinked">plg_fields_articleslinked</file>
</files>
<languages folder="language">
<language tag="en-GB">en-GB/en-GB.pkg_articles.sys.ini</language>
</languages>
<updateservers>
<server type="extension" priority="1" name="Articles Field">https://download.regularlabs.com/updates.xml?e=articlesfield&amp;type=.xml</server>
</updateservers>
</extension>

View File

@ -0,0 +1,33 @@
<?xml version="1.0" encoding="UTF-8" ?>
<extension type="package" version="2.5.7" method="upgrade">
<name>pkg_attachments</name>
<packagename>attachments</packagename>
<version>3.2.6</version>
<creationDate>March 26, 2018</creationDate>
<copyright>(C) 2007-2018 Jonathan M. Cameron. All rights reserved.</copyright>
<license>http://www.gnu.org/licenses/gpl-3.0.html GNU/GPL</license>
<author>Jonathan M. Cameron</author>
<authorEmail>jmcameron@jmcameron.net</authorEmail>
<authorUrl>http://joomlacode.org/gf/project/attachments/</authorUrl>
<packager>Jonathan M. Cameron</packager>
<packagerurl>http://joomlacode.org/gf/project/attachments/</packagerurl>
<description>ATTACH_PACKAGE_ATTACHMENTS_FOR_JOOMLA_16PLUS</description>
<files folder="packages">
<file type="plugin" id="attachments" group="content">attachments_plugin.zip</file>
<file type="plugin" id="attachments" group="search">attachments_search.zip</file>
<file type="plugin" id="attachments_plugin_framework" group="attachments">attachments_plugin_framework.zip</file>
<file type="plugin" id="attachments_for_content" group="attachments">attachments_for_content.zip</file>
<file type="plugin" id="show_attachments" group="system">show_attachments_in_editor_plugin.zip</file>
<file type="plugin" id="add_attachment" group="editors-xtd">add_attachment_btn_plugin.zip</file>
<file type="plugin" id="insert_attachments_token" group="editors-xtd">insert_attachments_token_btn_plugin.zip</file>
<file type="plugin" id="attachments" group="quickicon">attachments_quickicon_plugin.zip</file>
<file type="component" id="com_attachments">attachments_component.zip</file>
</files>
<updateservers>
<server type="extension" priority="1" name="Attachments Updates">http://jmcameron.net/attachments/updates/updates.xml</server>
</updateservers>
</extension>

View File

@ -0,0 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
<extension type="package" method="upgrade">
<packagename>conditionalcontent</packagename>
<name>PKG_CONDITIONALCONTENT</name>
<version>5.2.2</version>
<creationDate>November 2024</creationDate>
<author>Regular Labs (Peter van Westen)</author>
<authorEmail>info@regularlabs.com</authorEmail>
<authorUrl>https://regularlabs.com</authorUrl>
<copyright>Copyright © 2024 Regular Labs - All Rights Reserved</copyright>
<license>GNU General Public License version 2 or later</license>
<scriptfile>script.install.php</scriptfile>
<blockChildUninstall>true</blockChildUninstall>
<files folder="packages/j4">
<file type="plugin" group="system" id="conditionalcontent">plg_system_conditionalcontent</file>
<file type="plugin" group="editors-xtd" id="conditionalcontent">plg_editors-xtd_conditionalcontent</file>
</files>
<languages folder="language">
<language tag="en-GB">en-GB/en-GB.pkg_conditionalcontent.sys.ini</language>
</languages>
<updateservers>
<server type="extension" priority="1" name="Conditional Content">https://download.regularlabs.com/updates.xml?e=conditionalcontent&amp;type=.xml</server>
</updateservers>
</extension>

View File

@ -0,0 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<extension type="package" method="upgrade">
<packagename>conditions</packagename>
<name>PKG_CONDITIONS</name>
<version>24.11.1459</version>
<creationDate>November 2024</creationDate>
<author>Regular Labs (Peter van Westen)</author>
<authorEmail>info@regularlabs.com</authorEmail>
<authorUrl>https://regularlabs.com</authorUrl>
<copyright>Copyright © 2024 Regular Labs - All Rights Reserved</copyright>
<license>GNU General Public License version 2 or later</license>
<scriptfile>script.install.php</scriptfile>
<blockChildUninstall>true</blockChildUninstall>
<files folder="packages">
<file type="component" id="com_conditions">com_conditions</file>
<file type="plugin" group="actionlog" id="conditions">plg_actionlog_conditions</file>
</files>
<updateservers>
<server type="extension" priority="1" name="Regular Labs - Conditions">https://download.regularlabs.com/updates.xml?e=conditions&amp;type=.xml</server>
</updateservers>
<languages folder="language">
<language tag="en-GB">en-GB/en-GB.pkg_conditions.sys.ini</language>
</languages>
</extension>

View File

@ -0,0 +1,27 @@
<?xml version="1.0" encoding="UTF-8"?>
<extension type="package" method="upgrade">
<name>English (en-GB) Language Pack</name>
<packagename>en-GB</packagename>
<version>5.2.2.1</version>
<creationDate>2024-11</creationDate>
<author>Joomla! Project</author>
<authorEmail>admin@joomla.org</authorEmail>
<authorUrl>www.joomla.org</authorUrl>
<copyright>(C) 2019 Open Source Matters, Inc.</copyright>
<license>https://www.gnu.org/licenses/gpl-2.0.html GNU/GPL</license>
<url>https://github.com/joomla/joomla-cms</url>
<packager>Joomla! Project</packager>
<packagerurl>www.joomla.org</packagerurl>
<description><![CDATA[en-GB language pack]]></description>
<blockChildUninstall>true</blockChildUninstall>
<files>
<folder type="language" client="site" id="en-GB">language/en-GB</folder>
<folder type="language" client="administrator" id="en-GB">administrator/language/en-GB</folder>
<folder type="language" client="api" id="en-GB">api/language/en-GB</folder>
</files>
<updateservers>
<server type="collection" priority="1" name="Accredited Joomla! Translations">
https://update.joomla.org/language/translationlist_5.xml
</server>
</updateservers>
</extension>

View File

@ -0,0 +1,38 @@
<?xml version="1.0" encoding="UTF-8"?>
<extension type="package" method="upgrade">
<name>Italian (it-IT) Language Pack</name>
<packagename>it-IT</packagename>
<version>5.2.2.1</version>
<creationDate>Novembre 2024</creationDate>
<author>Joomla! Project (Italian Translation Team)</author>
<authorEmail>admin@joomla.org</authorEmail>
<authorUrl>www.joomla.org</authorUrl>
<copyright>(C) 2019 Open Source Matters, Inc.</copyright>
<license>https://www.gnu.org/licenses/gpl-2.0.html GNU/GPL</license>
<url>https://github.com/joomla/joomla-cms</url>
<packager>Joomla! Project (Italian Translation Team)</packager>
<packagerurl>www.joomla.org</packagerurl>
<description><![CDATA[<div style="text-align: center;">
<h3>Joomla! 5.1 Full Italian (it-IT) Language Package - Version 5.2.0</h3>
<h3>Pacchetto completo della lingua italiana di Joomla! 5.2 (it-IT) - Versione 5.2.0</h3>
</div>
<div class="alert alert-warning alert-wrapper">
<h4 class="alert-heading">Comunicazione importante</h4>
<div class="alert-message">
<p>Il tool utilizzato per gestire i file di lingua (<a href="https://joomla. crowdin. com/u/projects/18/l/it" target="_blank" rel="noopener noreferrer">CROWDIN</a>), a seguito di unanomalia, ha introdotto diversi errori nelle traduzioni fatte dal team di volontari negli ultimi anni. Il rilascio del pacchetto di lingua Italiana rischiava quindi di essere corrotto e pertanto è stato saltato il suo rilascio per 1 mese durante il quale si è lavorato per correggere tutto.</p>
<p>A grande richiesta pubblichiamo il pacchetto quasi totalmente corretto.</p>
<p>Il team di traduzione sta continuando ad adoperarsi per sistemare questa problematica e fornirvi una traduzione sempre più precisa.</p>
</div>
</div>]]></description>
<blockChildUninstall>true</blockChildUninstall>
<files>
<folder type="language" client="site" id="it-IT">language/it-IT</folder>
<folder type="language" client="administrator" id="it-IT">administrator/language/it-IT</folder>
<folder type="language" client="api" id="it-IT">api/language/it-IT</folder>
</files>
<updateservers>
<server type="collection" priority="1" name="Traduzioni accreditate di Joomla!">
https://update.joomla.org/language/translationlist_5.xml
</server>
</updateservers>
</extension>

View File

@ -0,0 +1,46 @@
<?xml version="1.0" encoding="UTF-8" ?>
<extension type="package" version="4.4" method="upgrade">
<name>pkg_jem</name>
<packagename>jem</packagename>
<creationDate>October 2024</creationDate>
<copyright>Copyright (C) 2013-2024 joomlaeventmanager.net</copyright>
<license>https://www.gnu.org/licenses/gpl-3.0 GNU/GPL</license>
<author>JEM Community</author>
<authorEmail>info@joomlaeventmanager.net</authorEmail>
<authorUrl>https://www.joomlaeventmanager.net</authorUrl>
<version>4.3.1</version>
<description>PKG_JEM_INSTALLATION_DESCRIPTION</description>
<url>https://www.joomlaeventmanager.net/</url>
<packager>JEM Community</packager>
<packagerurl>https://www.joomlaeventmanager.net</packagerurl>
<scriptfile>pkg_install.php</scriptfile>
<files folder="packages">
<file type="component" id="com_jem">com_jem.zip</file>
<file type="module" id="mod_jem" client="site">mod_jem.zip</file>
<file type="module" id="mod_jem_wide" client="site">mod_jem_wide.zip</file>
<file type="module" id="mod_jem_cal" client="site">mod_jem_cal.zip</file>
<!--file type="module" id="mod_jem_calajax" client="site">mod_jem_calajax.zip</file-->
<file type="module" id="mod_jem_teaser" client="site">mod_jem_teaser.zip</file>
<file type="module" id="mod_jem_banner" client="site">mod_jem_banner.zip</file>
<file type="module" id="mod_jem_jubilee" client="site">mod_jem_jubilee.zip</file>
<file type="plugin" id="jem" group="content">plg_content_jem.zip</file>
<file type="plugin" id="jemlistevents" group="content">plg_content_jemlistevents.zip</file>
<file type="plugin" id="jem" group="search">plg_search_jem.zip</file>
<file type="plugin" id="jem" group="finder">plg_finder_jem.zip</file>
<file type="plugin" id="comments" group="jem">plg_jem_comments.zip</file>
<file type="plugin" id="mailer" group="jem">plg_jem_mailer.zip</file>
<file type="plugin" id="jem" group="quickicon">plg_quickicon_jem.zip</file>
</files>
<languages folder="language">
<language tag="en-GB">en-GB/pkg_jem.sys.ini</language>
</languages>
<updateservers>
<server type="extension" name="JEM Update Site">https://www.joomlaeventmanager.net/updatecheck/update_pkg_jem.xml</server>
</updateservers>
</extension>

View File

@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8" ?>
<extension type="package" version="3.8" method="upgrade">
<name>jlcontentfieldsfilter</name>
<author>Joomline</author>
<packagename>jlcontentfieldsfilter</packagename>
<creationDate>01.08.2023</creationDate>
<copyright>(C) 2017-2023 Arkadiy Sedelnikov, Sergey Tolkachyov, Joomline. All rights reserved.</copyright>
<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
<authorEmail>sales@joomline.ru</authorEmail>
<packager>JoomLine</packager>
<packagerurl>https://joomline.ru</packagerurl>
<version>3.0.0</version>
<description>PLG_JLCONTENTFIELSDFILTER_DESC_ALL</description>
<files>
<folder type="module" id="mod_jlcontentfieldsfilter" method="upgrade" client="site">mod_jlcontentfieldsfilter</folder>
<folder type="plugin" id="jlcontentfieldsfilter" group="system" method="upgrade" client="site">plg_system_jlcontentfieldsfilter</folder>
<folder type="file" id="file_jlcomponent_ajax" method="upgrade" client="site">file_jlcomponent_ajax</folder>
</files>
<updateservers><server type="extension" priority="1" name="JL Content Fields Filter">https://joomline.net/update.html?extension_id=5.xml</server></updateservers>
</extension>

View File

@ -0,0 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<extension type="package" method="upgrade">
<packagename>regularlabs</packagename>
<name>PKG_REGULARLABS</name>
<version>24.11.1459</version>
<creationDate>November 2024</creationDate>
<author>Regular Labs (Peter van Westen)</author>
<authorEmail>info@regularlabs.com</authorEmail>
<authorUrl>https://regularlabs.com</authorUrl>
<copyright>Copyright © 2024 Regular Labs - All Rights Reserved</copyright>
<license>GNU General Public License version 2 or later</license>
<scriptfile>script.install.php</scriptfile>
<blockChildUninstall>true</blockChildUninstall>
<files folder="packages">
<file type="library" id="regularlabs">lib_regularlabs</file>
<file type="plugin" group="system" id="regularlabs">plg_system_regularlabs</file>
</files>
<updateservers>
<server type="extension" priority="1" name="Regular Labs Library">https://download.regularlabs.com/updates.xml?e=library&amp;type=.xml</server>
</updateservers>
<languages folder="language">
<language tag="en-GB">en-GB/en-GB.pkg_regularlabs.sys.ini</language>
</languages>
</extension>

View File

@ -0,0 +1,33 @@
<?xml version="1.0" encoding="UTF-8"?>
<extension type="package" method="upgrade">
<name>pkg_search</name>
<packagename>search</packagename>
<creationDate>2021-08-17</creationDate>
<packager>Joomla! Project</packager>
<copyright>(C) 2021 Open Source Matters. All rights reserved.</copyright>
<packageremail>admin@joomla.org</packageremail>
<packagerurl>www.joomla.org</packagerurl>
<author>Joomla! Project</author>
<authorEmail>admin@joomla.org</authorEmail>
<authorUrl>www.joomla.org</authorUrl>
<version>4.0.0</version>
<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
<scriptfile>script.php</scriptfile>
<files>
<!-- The id for each extension is the element stored in the DB -->
<file type="component" id="com_search">com_search.zip</file>
<file type="module" id="mod_search" client="site">mod_search.zip</file>
<file type="plugin" id="categories" group="search">plg_search_categories.zip</file>
<file type="plugin" id="contacts" group="search">plg_search_contacts.zip</file>
<file type="plugin" id="content" group="search">plg_search_content.zip</file>
<file type="plugin" id="newsfeeds" group="search">plg_search_newsfeeds.zip</file>
<file type="plugin" id="tags" group="search">plg_search_tags.zip</file>
</files>
<languages folder="language">
<language tag="en-GB">en-GB/en-GB.pkg_search.sys.ini</language>
</languages>
<updateservers>
<!-- Note: No spaces or linebreaks allowed between the server tags -->
<server type="extension" name="Search Update Site">https://raw.githubusercontent.com/joomla-extensions/search/main/manifest.xml</server>
</updateservers>
</extension>

View File

@ -0,0 +1,187 @@
<?php
/**
* @package Regular Labs Library
* @version 24.11.1459
*
* @author Peter van Westen <info@regularlabs.com>
* @link https://regularlabs.com
* @copyright Copyright © 2024 Regular Labs All Rights Reserved
* @license GNU General Public License version 2 or later
*/
defined('_JEXEC') or die;
use Joomla\CMS\Factory as JFactory;
use Joomla\CMS\Installer\Manifest\PackageManifest as JPackageManifest;
use Joomla\CMS\Language\Text as JText;
if ( ! class_exists('pkg_regularlabsInstallerScript'))
{
class pkg_regularlabsInstallerScript
{
static $current_version;
static $name;
static $package_name;
static $previous_version;
public function postflight($install_type, $adapter)
{
if ( ! in_array($install_type, ['install', 'update']))
{
return true;
}
self::publishExtensions();
self::recreateNamespaceMap();
self::displayMessages();
return true;
}
public function preflight($install_type, $adapter)
{
$manifest = $adapter->getManifest();
static::$package_name = trim($manifest->packagename);
static::$name = trim($manifest->name);
static::$current_version = trim($manifest->version);
static::$previous_version = self::getPreviousVersion();
return true;
}
private static function recreateNamespaceMap()
{
if (JVERSION < 4)
{
return;
}
// Remove the administrator/cache/autoload_psr4.php file
$filename = JPATH_ADMINISTRATOR . '/cache/autoload_psr4.php';
if (file_exists($filename))
{
self::clearFileInOPCache($filename);
clearstatcache(true, $filename);
@unlink($filename);
}
JFactory::getApplication()->createExtensionNamespaceMap();
}
private static function clearFileInOPCache($file)
{
$hasOpCache = ini_get('opcache.enable')
&& function_exists('opcache_invalidate')
&& (
! ini_get('opcache.restrict_api')
|| stripos(realpath($_SERVER['SCRIPT_FILENAME']), ini_get('opcache.restrict_api')) === 0
);
if ( ! $hasOpCache)
{
return false;
}
return opcache_invalidate($file, true);
}
private static function displayMessages()
{
if (php_sapi_name() == 'cli')
{
return;
}
$msg = self::getInstallationLanguageString();
JFactory::getApplication()->enqueueMessage(
JText::sprintf(
$msg,
'<strong>' . JText::_(static::$name . '_SHORT') . '</strong>',
'<strong>' . static::$current_version . '</strong>'
), 'success'
);
}
private static function getInstallationLanguageString()
{
if ( ! static::$previous_version)
{
return 'PKG_RL_EXTENSION_INSTALLED';
}
if (static::$previous_version == static::$current_version)
{
return 'PKG_RL_EXTENSION_REINSTALLED';
}
return 'PKG_RL_EXTENSION_UPDATED';
}
private static function getPreviousVersion()
{
$xml_file = self::getXmlFile();
if ( ! $xml_file)
{
return '';
}
$manifest = new JPackageManifest($xml_file);
return isset($manifest->version) ? trim($manifest->version) : '';
}
private static function getXmlFile()
{
$xml_file = JPATH_MANIFESTS . '/packages/pkg_' . static::$package_name . '.xml';
if (file_exists($xml_file))
{
return $xml_file;
}
$xml_file = JPATH_LIBRARIES . '/' . static::$package_name . '.xml';
if (file_exists($xml_file))
{
return $xml_file;
}
$xml_file = JPATH_ADMINISTRATOR . '/components/com_' . static::$package_name . '/' . static::$package_name . '.xml';
if (file_exists($xml_file))
{
return $xml_file;
}
return '';
}
private static function publishExtensions()
{
// ignore if this is an update of Conditions
if (static::$package_name == 'conditions' && static::$previous_version)
{
return;
}
$db = JFactory::getDbo();
$query = $db->getQuery(true)
->update('#__extensions')
->set($db->quoteName('enabled') . ' = 1')
->where($db->quoteName('element') . ' IN ('
. $db->quote(static::$package_name)
. ', ' . $db->quote('com_' . static::$package_name)
. ')'
);
$db->setQuery($query);
$db->execute();
}
}
}