| Server IP : 104.21.84.107 / Your IP : 104.23.243.197 Web Server : Apache/2.4.63 (Ubuntu) System : Linux adminpruebas-Virtual-Machine 6.14.0-37-generic #37-Ubuntu SMP PREEMPT_DYNAMIC Fri Nov 14 22:10:32 UTC 2025 x86_64 User : www-data ( 33) PHP Version : 8.4.5 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /var/www/html/planeacion/modules/mod_sr_menu/ |
Upload File : |
<?php
/********************************************************************
Product : Simple Responsive Menu
Date : 30 November 2023
Copyright : Les Arbres Design 2010-2023
Contact : https://www.lesarbresdesign.info
Licence : GNU General Public License
*********************************************************************/
defined('_JEXEC') or die('Restricted Access');
use Joomla\CMS\Factory;
use Joomla\CMS\Component\ComponentHelper;
class mod_sr_menuInstallerScript
{
public function preflight($type, $parent)
{
}
//-------------------------------------------------------------------------------
// The main install function
//
public function postflight($type, $parent)
{
if ($type == 'uninstall')
return;
// we now install language files in the module directories, so must remove them from the system-wide directories, since they would take precedence
$dirs = glob(JPATH_SITE.'/language/*',GLOB_ONLYDIR);
foreach ($dirs as $dir)
{
$sub_dir = basename($dir);
@unlink($dir.'/'.$sub_dir.'.mod_sr_menu.ini');
@unlink($dir.'/'.$sub_dir.'.mod_sr_menu.sys.ini');
}
// remove redundant http update site, if present
$db = Factory::getDBO();
$query = "DELETE FROM `#__update_sites` WHERE `name` = 'Simple Responsive Menu' AND SUBSTRING(`location`,1,5) = 'http:'";
$db->setQuery($query);
try {$db->execute();} catch (RuntimeException $e) {}
// if update check caching is disabled, disable our update site as it causes excessive traffic
$component = ComponentHelper::getComponent('com_installer');
$params = $component->params;
$cache_timeout = $params->get('cachetimeout', 6, 'int');
if ($cache_timeout == 0)
{
$query = $db->getQuery(true)->update($db->quoteName('#__update_sites'))->set($db->quoteName('enabled') . ' = 0')->where($db->quoteName('name') . ' = ' . $db->quote('Simple Responsive Menu'));
$db->setQuery($query);
try {$db->execute();} catch (RuntimeException $e) {}
}
}
}