<?php
if (!defined('_VALID_MOS') && !defined('_JEXEC')) die('Direct Access to ' . basename(__FILE__) . ' is not allowed.');
/**
 *
 * @package simpleMembership
 * @copyright Andrey Kvasnevskiy-OrdaSoft(akbet@mail.ru); Anton Getman(ljanton@mail.ru);
 * Homepage: http://www.ordasoft.com
 * @version: 6.0.0 FREE
 * @license GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007; see LICENSE.txt
 *
 */
$GLOBALS['mosConfig_absolute_path'] = JPATH_SITE;
class com_simplemembershipInstallerScript {
    /**
     * method to install the component
     *
     * @return void
     */
    function install($parent) {
        // $parent is the class calling this method
        
    }
    /**
     * method to uninstall the component
     *
     * @return void
     */
    function uninstall($parent) {
        // $parent is the class calling this method
        require_once ($GLOBALS['mosConfig_absolute_path'] . "/administrator/components/com_simplemembership/uninstall.simplemembership.php");
    }
    /**
     * method to update the component
     *
     * @return void
     */
    function update($parent) {
        // $parent is the class calling this method
        
    }
    /**
     * method to run before an install/update/uninstall method
     *
     * @return void
     */
    function preflight($type, $parent) {
        // $parent is the class calling this method
        // $type is the type of change (install, update or discover_install)
        /*$db = JFactory::getDBO();
        $db->setQuery("DELETE FROM #__update_sites WHERE name = 'Simplemembership`s FREE Update'");
        $db->query();*/
    }
    /**
     * method to run after an install/update/uninstall method
     *
     * @return void
     */
    function postflight($type, $parent) {
        // $parent is the class calling this method
        // $type is the type of change (install, update or discover_install)
        require_once (dirname(__FILE__) . "/install.simplemembership.php");
        updateSMSConfigurationVersion();
        //com_install();
        // DMInstallHelper::setAdminMenuImages();
    }
}
