| Server IP : 213.186.33.4 / Your IP : 216.73.216.193 Web Server : Apache System : Linux webm006.cluster103.gra.hosting.ovh.net 5.15.206-ovh-vps-grsec-zfs-classid #1 SMP Fri May 15 02:41:25 UTC 2026 x86_64 User : awebpaca ( 35430) PHP Version : 8.5.0 Disable Function : _dyuweyrj4,_dyuweyrj4r,dl MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/awebpaca/blog/plugins/search/kunena/ |
Upload File : |
<?php
/**
* Kunena Search Plugin
* @package Kunena.plg_search_kunena
*
* @copyright (C) 2008 - 2016 Kunena Team. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
* @link http://www.kunena.org
**/
defined ( '_JEXEC' ) or die ();
class PlgSearchKunenaInstallerScript {
function postflight($type, $parent) {
// Delete useless manifest file
$path = $parent->getParent()->getPath('extension_root');
$name = preg_replace('/^plg_[^_]*_/', '', $parent->get('name'));
if (JFile::exists("{$path}/{$name}.j25.xml")) {
JFile::delete("{$path}/{$name}.j25.xml");
}
// Uninstall old version of the plug-in.
$this->uninstallPlugin('search', 'kunenasearch');
}
function uninstallPlugin($folder, $name) {
// Joomla 2.5+
$query = "SELECT extension_id FROM #__extensions WHERE type='plugin' AND folder='{$folder}' AND element='{$name}'";
$db = JFactory::getDbo();
$db->setQuery ( $query );
$pluginid = $db->loadResult ();
if ($pluginid) {
$installer = new JInstaller ( );
$installer->uninstall ( 'plugin', $pluginid );
}
}
}