| Server IP : 104.21.84.107 / Your IP : 104.23.197.208 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/bienestar/modules/mod_djmegamenu/ |
Upload File : |
<?php
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
class Mod_DJMegamenuInstallerScript
{
/*
* $parent is the class calling this method.
* $type is the type of change (install, update or discover_install, not uninstall).
* preflight runs before anything else and while the extracted files are in the uploaded temp folder.
* If preflight returns false, Joomla will abort the update and undo everything already done.
*/
function postflight( $type, $parent ) {
$db = JFactory::getDBO();
$config = JFactory::getConfig();
if($type == 'install') {
$db->setQuery("UPDATE #__extensions SET enabled=1 WHERE type='plugin' AND element='djmegamenu'");
$db->execute();
}
if($type == 'update') {
// we need to handle the update server for package here
require_once(JPath::clean(JPATH_ROOT.'/modules/mod_djmegamenu/fields/djupdater.php'));
JFormFieldDJUpdater::setUpdateServer(DJUPDATER_URL_LIGHT);
// disable old update server
$db->setQuery("UPDATE #__update_sites SET enabled=0 WHERE name='DJ-MegaMenu Package' AND type='extension'");
$db->execute();
}
}
}