/**
  * Uninstall Mobile
  *
  * @param vivvo_site 	$site_manager
  * @param integer		$step
  */
 function uninstall(&$site_manager, $step = 1)
 {
     parent::uninstall($site_manager, $step);
     if ($step == 2) {
         //Definition
         $pl_manager =& $site_manager->get_plugin_manager();
         $pl_manager->unregister('mobile');
         //Url
         $um =& $site_manager->get_url_manager();
         $um->unregister_url('mobile');
     }
     $output = $site_manager->get_output();
     echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">' . "\n";
     echo $output;
 }
 /**
  * Feed Importer uninstall procedure
  *
  * @param vivvo_site 	$site_manager
  * @param int			$step
  */
 public function uninstall($site_manager, $step = 1)
 {
     parent::uninstall($site_manager, $step);
     if ($step == 2) {
         $sqlRunner = new SQLRunner(array('db' => $site_manager->get_db(), 'filename' => VIVVO_FS_PLUGIN_ROOT . ($plugin_dir = $this->get_root_dir()) . 'db/uninstall.sql'));
         try {
             $sqlRunner->load() and $sqlRunner->run();
         } catch (SQLRunnerException $e) {
             $this->set_error_code(14, $e->getMessage());
             // error executing sql script file
             $this->uninstall($site_manager, 1);
             return;
         }
         $conf = $site_manager->get_configuration();
         $conf->remove_global('VIVVO_PLUGIN_FEED_IMPORTER_AUTHOR');
         $conf->remove_global('VIVVO_PLUGIN_FEED_IMPORTER_AUTO_ARCHIVE');
         $conf->remove_global('VIVVO_PLUGIN_FEED_IMPORTER_AUTO_DELETE');
         $conf->remove_global('VIVVO_PLUGIN_FEED_IMPORTER_PERIOD');
         $conf->remove_global('VIVVO_PLUGIN_FEED_IMPORTER_STATUS');
         $conf->remove_global('VIVVO_PLUGIN_FEED_IMPORTER_SHOW_COMMENT');
         $conf->remove_global('VIVVO_PLUGIN_FEED_IMPORTER_UPDATE_ARTICLES');
         $conf->remove_global('VIVVO_PLUGIN_FEED_IMPORTER_USE_LOGO');
         $conf->remove_global('VIVVO_PLUGIN_FEED_IMPORTER_TRASH');
         $conf->remove_global('VIVVO_PLUGIN_FEED_IMPORTER_USER_ID');
         $site_manager->unregister_action('feed');
         require_once VIVVO_FS_INSTALL_ROOT . 'lib/vivvo/framework/vivvo_cron.php';
         $cm = new vivvo_cron_manager($site_manager);
         $cm->delete_cron_job($plugin_dir . 'tasks/auto_import_feeds.php', null, 'auto_import_feeds');
         $site_manager->get_plugin_manager()->unregister($this->plugin_name);
     }
     $output = $site_manager->get_output();
     echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">' . "\n";
     echo $output;
 }
 /**
  * Newsletter uninstall procedure
  *
  * @param vivvo_site 	$site_manager
  * @param int			$step
  */
 public function uninstall($site_manager, $step = 1)
 {
     parent::uninstall($site_manager, $step);
     if ($step == 2) {
         $sqlRunner = new SQLRunner(array('db' => $site_manager->get_db(), 'filename' => VIVVO_FS_PLUGIN_ROOT . ($plugin_dir = $this->get_root_dir()) . 'db/uninstall.sql'));
         try {
             $sqlRunner->load() and $sqlRunner->run();
         } catch (SQLRunnerException $e) {
             $this->set_error_code(14, $e->getMessage());
             // error executing sql script file
             $this->uninstall($site_manager, 1);
             return;
         }
         $conf = $site_manager->get_configuration();
         $conf->remove_global('VIVVO_PLUGIN_NEWSLETTER_SUBSCRIBE_BODY');
         $conf->remove_global('VIVVO_PLUGIN_NEWSLETTER_SUBSCRIBE_SUBJECT');
         $conf->remove_global('VIVVO_PLUGIN_NEWSLETTER_UNSUBSCRIBE_TEXT');
         $conf->remove_global('VIVVO_PLUGIN_NEWSLETTER_PERIOD');
         $conf->remove_global('VIVVO_PLUGIN_NEWSLETTER_NUMBER_OF_MAILS');
         $site_manager->unregister_action('newsletter');
         $site_manager->unregister_module('box_newsletter');
         $site_manager->unregister_module('box_maillist');
         $site_manager->get_url_manager()->unregister_url('newsletter');
         require_once VIVVO_FS_INSTALL_ROOT . 'lib/vivvo/framework/vivvo_cron.php';
         $cm = new vivvo_cron_manager($site_manager);
         $cm->delete_cron_job($plugin_dir . 'tasks/mail_queue.php', null, 'mail_queue');
         $site_manager->get_plugin_manager()->unregister($this->plugin_name);
     }
     $output = $site_manager->get_output();
     echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">' . "\n";
     echo $output;
 }
 /**
  * Poll uninstall procedure
  *
  * @param vivvo_site 	$site_manager
  * @param int			$step
  */
 public function uninstall($site_manager, $step = 1)
 {
     parent::uninstall($site_manager, $step);
     if ($step == 2) {
         $sqlRunner = new SQLRunner(array('db' => $site_manager->get_db(), 'filename' => VIVVO_FS_PLUGIN_ROOT . ($plugin_dir = $this->get_root_dir()) . 'db/uninstall.sql'));
         try {
             $sqlRunner->load() and $sqlRunner->run();
         } catch (SQLRunnerException $e) {
             $this->set_error_code(14, $e->getMessage());
             // error executing sql script file
             $this->uninstall($site_manager, 1);
             return;
         }
         $site_manager->unregister_action('poll');
         $site_manager->unregister_module('box_poll');
         $site_manager->unregister_module('box_poll_list');
         $site_manager->get_url_manager()->unregister_url('poll');
         $site_manager->get_plugin_manager()->unregister($this->plugin_name);
     }
     $output = $site_manager->get_output();
     echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">' . "\n";
     echo $output;
 }
 /**
  * Uninstall Pages
  *
  * @param vivvo_site 	$site_manager
  * @param integer		$step
  */
 function uninstall(&$site_manager, $step = 1)
 {
     parent::uninstall($site_manager, $step);
     if ($step == 2) {
         //Uninstall procedure
         //Table
         $db =& $site_manager->get_db();
         $dbm =& $site_manager->get_db_manager();
         $db->manager->dropTable(VIVVO_DB_PREFIX . 'pages');
         $site_manager->unregister_module('box_pages');
         $site_manager->unregister_action('pages');
         $pl_manager = $site_manager->get_plugin_manager();
         $pl_manager->unregister('pages');
         ui_hooks::unregister('plugin_pages_admin_content_subnav_hook');
     }
     $output = $site_manager->get_output();
     echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">' . "\n";
     echo $output;
 }
 /**
  * Uninstall Image gallery
  *
  * @param vivvo_site 	$site_manager
  * @param integer		$step
  */
 function uninstall(&$site_manager, $step = 1)
 {
     parent::uninstall($site_manager, $step);
     if ($step == 2) {
         //Table
         $db =& $site_manager->get_db();
         $dbm =& $site_manager->get_db_manager();
         $db->manager->dropTable(VIVVO_DB_PREFIX . 'article_images');
         //Definition
         $pl_manager =& $site_manager->get_plugin_manager();
         $pl_manager->unregister('image_gallery');
         //Action
         $site_manager->unregister_action('article_images');
         //Configuration
         $configuration =& $site_manager->get_configuration();
         $configuration->remove_from_module('article_tabs', 'image_gallery');
         //Boxes
         $site_manager->unregister_module('box_article_images');
     }
     $output = $site_manager->get_output();
     echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">' . "\n";
     echo $output;
 }