File manager - Edit - /home/jardides/www/Jardi-design/old/administrator/components/com_extensionsmanagerck/install.php
Back
<?php /** * @name Extensions Manager CK * @package com_extensionsmanagerck * @copyright Copyright (C) 2016. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt * @author Cedric Keiflin - http://www.template-creator.com - http://www.joomlack.fr */ defined('_JEXEC') or die('Restricted access'); /* preflight which is executed before install and update install update uninstall postflight which is executed after install and update */ class com_extensionsmanagerckInstallerScript { function install($parent) { } function update($parent) { } function uninstall($parent) { // disable all plugins and modules $db = JFactory::getDbo(); $db->setQuery("UPDATE `#__extensions` SET `enabled` = 0 WHERE `type` = 'plugin' AND `element` LIKE '%extensionsmanagerck%' AND `folder` LIKE '%installer%'"); $db->execute(); return true; } function preflight($type, $parent) { // $db = JFactory::getDbo(); // $tablesList = $db->getTableList(); // test if the table not exists // $tableExists = in_array($db->getPrefix() . 'pagebuilderck_elements', $tablesList); // if (! $tableExists) { // $this->updateTable('2.2.0'); // } // return true; } // run on install and update function postflight($type, $parent) { // install modules and plugins jimport('joomla.installer.installer'); $db = JFactory::getDbo(); $status = array(); $src_ext = dirname(__FILE__).'/extensions'; $installer = new JInstaller; // extensions to install // system plugin $result = $installer->install($src_ext.'/extensionsmanagerck'); $status[] = array('name'=>'Installer - JoomlaCK auto updater','type'=>'plugin', 'result'=>$result); // system plugin must be enabled for user group limits and private areas $db->setQuery("UPDATE #__extensions SET enabled = '1' WHERE `element` = 'extensionsmanagerck' AND `type` = 'plugin'"); $db->execute(); foreach ($status as $statu) { if ($statu['result'] == true) { $alert = 'success'; $icon = 'icon-ok'; $text = 'Successful'; } else { $alert = 'warning'; $icon = 'icon-cancel'; $text = 'Failed'; } echo '<div class="alert alert-' . $alert . '"><i class="icon ' . $icon . '"></i>Installation and activation of the <b>' . $statu['type'] . ' ' . $statu['name'] . '</b> : ' . $text . '</div>'; } return true; } }
| ver. 1.4 |
Github
|
.
| PHP 7.4.33 | Generation time: 0 |
proxy
|
phpinfo
|
Settings