Your IP : 216.73.216.158


Current Path : /home/megadansyp/www/plugins/system/wbreactiv/
Upload File :
Current File : /home/megadansyp/www/plugins/system/wbreactiv/installation.script.php

<?php
/**
 * wbReactiv - resend confirmation email
 *
 * @author      Yannick Gaultier - Weeblr.com
 * @copyright   (c) Yannick Gaultier - Weeblr llc - 2015
 * @package     wbreactiv
 * @license     http://www.gnu.org/copyleft/gpl.html GNU/GPL
 * @version     1.0.7.100
 * @date        2016-07-18
 */

// no direct access
defined('_JEXEC') or die('Restricted access');

/**
 * Installation/Uninstallation script
 *
 */
class plgSystemWbreactivInstallerScript
{
	public function install($parent)
	{
		// enable ourselves
		$db = JFactory::getDbo();
		$query = $db->getQuery(true);

		$query->update('#__extensions');
		$query->where($db->quoteName('type') . '=' . $db->Quote('plugin'));
		$query->where($db->quoteName('element') . '=' . $db->Quote('wbreactiv'));
		$query->where($db->quoteName('folder') . '=' . $db->Quote('system'));
		$query->set($db->quoteName('enabled') . '=' . $db->Quote(1));

		$db->setQuery($query);
		$db->execute();
	}

	public function uninstall($parent)
	{
	}

	public function update($parent)
	{
	}

	public function preflight($type, $parent)
	{
		if (!version_compare(JVERSION, '3', 'ge'))
		{
			echo 'wbReactiv requires Joomla! version 3 or above to operate. Aborting installation.';
		}
	}

	public function postflight($type, $parent)
	{
	}
}