Your IP : 216.73.216.240


Current Path : /home/j/u/v/juvelize/www/modules/mod_myshortlist/
Upload File :
Current File : /home/j/u/v/juvelize/www/modules/mod_myshortlist/script.php

<?php
/*------------------------------------------------------------------------
# mod_myshortlist - My ShortList
# ------------------------------------------------------------------------
# author    Christopher Mavros - Mavrosxristoforos.com
# copyright Copyright (C) 2011 Mavrosxristoforos.com. All Rights Reserved.
# @license - http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
# Websites: http://www.mavrosxristoforos.com
# Technical Support:  Forum - http://www.mavrosxristoforos.com/support/forum
-------------------------------------------------------------------------*/

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

class mod_myshortlistInstallerScript
{
        /**
         * Method to install the extension
         * $parent is the class calling this method
         *
         * @return void
         */
        function install($parent)
        {
          $db = JFactory::getDBO();

          $db->setQuery('CREATE TABLE IF NOT EXISTS `#__myshortlist_lists` (
              `id` int(11) NOT NULL auto_increment,
              `user_id` int(11) NOT NULL,
              `cookielist` TEXT NULL,
              `cookie_prefix` varchar(50) NULL,
              PRIMARY KEY (`id`)
              ) ENGINE=MyISAM AUTO_INCREMENT=0');

          return $db->query();
        }

        /**
         * Method to uninstall the extension
         * $parent is the class calling this method
         *
         * @return void
         */
        function uninstall($parent)
        {
                //echo '<p>The module has been uninstalled</p>';
        }

        /**
         * Method to update the extension
         * $parent is the class calling this method
         *
         * @return void
         */
        function update($parent)
        {
                //echo '<p>The module has been updated to version' . $parent->get('manifest')->version) . '</p>';
          $db = JFactory::getDBO();

          $db->setQuery('CREATE TABLE IF NOT EXISTS `#__myshortlist_lists` (
              `id` int(11) NOT NULL auto_increment,
              `user_id` int(11) NOT NULL,
              `cookielist` TEXT NULL,
              `cookie_prefix` varchar(50) NULL,
              PRIMARY KEY (`id`)
              ) ENGINE=MyISAM AUTO_INCREMENT=0');

          return $db->query();
        }

        /**
         * Method to run before an install/update/uninstall method
         * $parent is the class calling this method
         * $type is the type of change (install, update or discover_install)
         *
         * @return void
         */
        function preflight($type, $parent)
        {
                //echo '<p>Anything here happens before the installation/update/uninstallation of the module</p>';
        }

        /**
         * Method to run after an install/update/uninstall method
         * $parent is the class calling this method
         * $type is the type of change (install, update or discover_install)
         *
         * @return void
         */
        function postflight($type, $parent)
        {
                //echo '<p>Anything here happens after the installation/update/uninstallation of the module</p>';
        }
}

?>