/**
  * Legacy j1.5 function to use the 1.6 class uninstall
  *
  * @return boolean True on success
  * @deprecated
  */
 function com_uninstall()
 {
     if (version_compare(JVERSION, '1.7.0', 'ge')) {
         // Joomla! 1.7 code here
     } elseif (version_compare(JVERSION, '1.6.0', 'ge')) {
         // Joomla! 1.6 code here
     } else {
         // Joomla! 1.5 code here
         jimport('joomla.filesystem.folder');
         jimport('joomla.filesystem.file');
         jimport('joomla.filesystem.archive');
         if (file_exists(JPATH_SITE . DS . 'plugins' . DS . 'vmextended' . DS . 'opc.xml')) {
             JFile::delete(JPATH_SITE . DS . 'plugins' . DS . 'vmextended' . DS . 'opc.xml');
         }
         if (file_exists(JPATH_SITE . DS . 'plugins' . DS . 'vmextended' . DS . 'opc.php')) {
             JFile::delete(JPATH_SITE . DS . 'plugins' . DS . 'vmextended' . DS . 'opc.php');
         }
         if (file_exists(JPATH_SITE . DS . 'plugins' . DS . 'system' . DS . 'opc.xml')) {
             JFile::delete(JPATH_SITE . DS . 'plugins' . DS . 'system' . DS . 'opc.xml');
         }
         if (file_exists(JPATH_SITE . DS . 'plugins' . DS . 'system' . DS . 'opc.php')) {
             JFile::delete(JPATH_SITE . DS . 'plugins' . DS . 'system' . DS . 'opc.php');
         }
         if (file_exists(JPATH_SITE . DS . 'plugins' . DS . 'vmpayment' . DS . 'opctracking.xml')) {
             JFile::delete(JPATH_SITE . DS . 'plugins' . DS . 'vmpayment' . DS . 'opctracking.xml');
         }
         if (file_exists(JPATH_SITE . DS . 'plugins' . DS . 'vmpayment' . DS . 'opctracking.php')) {
             JFile::delete(JPATH_SITE . DS . 'plugins' . DS . 'vmpayment' . DS . 'opctracking.php');
         }
         if (file_exists(JPATH_SITE . DS . 'components' . DS . 'themes')) {
             if (@JFolder::remove(JPATH_SITE . DS . 'components' . DS . 'themes') === false) {
                 echo 'Cannot remove themes directory! Please remove it manually from /components/com_onepage';
             }
         }
         if (@JFolder::delete(JPATH_SITE . DS . 'libraries' . DS . 'joomla' . DS . 'document' . DS . 'opchtml') === false) {
             echo 'Cannot remove OPC document type in: ' . JPATH_SITE . DS . 'libraries' . DS . 'joomla' . DS . 'document' . DS . 'opchtml<br />';
         }
         $db = JFactory::getDBO();
         $q = "delete from #__plugins where element = 'opc' limit 5";
         $db->setQuery($q);
         $db->query();
         $db = JFactory::getDBO();
         $q = "delete from #__plugins where element = 'opctracking' limit 5";
         $db->setQuery($q);
         $db->query();
         $q = "drop table if exists #__vmtranslator_translations";
         $db->setQuery($q);
         $db->query();
         $q = "drop table if exists #__onepage_config";
         $db->setQuery($q);
         $db->query();
         $q = "drop table if exists #__virtuemart_plg_opctracking";
         $db->setQuery($q);
         $db->query();
         return true;
     }
 }