function doImport() { $vars = JCommentsInput::getVar('vars', array()); $source = trim(strtolower($vars['import'])); $cnt = 0; if ($source != '' && $source != 'com_jcomments') { JCommentsMigrationTool::deleteCommentsBySource($source); $language = JCommentsInput::getVar($source . '_lang', ''); switch ($source) { case 'akocomment': JCommentsMigrationTool::importAkoComment($source, $language); break; case 'moscom': JCommentsMigrationTool::importMosCom($source, $language); break; case 'combomax': JCommentsMigrationTool::importComboMax($source, $language); break; case 'joomlacomment': JCommentsMigrationTool::importJoomlaComment($source, $language); break; case 'jomcomment': JCommentsMigrationTool::importJomComment($source, $language); break; case 'urcomment': JCommentsMigrationTool::importUrComment($source, $language); break; case 'datsogallery': JCommentsMigrationTool::importDatsoGalleryComment($source, $language); break; case 'joomgallery': JCommentsMigrationTool::importJoomGalleryComment($source, $language); break; case 'icegallery': JCommentsMigrationTool::importIceGalleryComment($source, $language); break; case 'remository': JCommentsMigrationTool::importRemositoryComment($source, $language); break; case 'paxxgallery': JCommentsMigrationTool::importPAXXGalleryComment($source, $language); break; case 'phocagallery': JCommentsMigrationTool::importPhocaGalleryComment($source, $language); break; case 'cinema': JCommentsMigrationTool::importCinemaComment($source, $language); break; case 'jmovies': JCommentsMigrationTool::importJMoviesComment($source, $language); break; case 'mosetstree': JCommentsMigrationTool::importMosetsTree($source, $language); break; case 'linkdirectory': JCommentsMigrationTool::importLinkDirectory($source, $language); break; case 'mxcomment': JCommentsMigrationTool::importmXcomment($source, $language); break; case 'zoommediagallery': JCommentsMigrationTool::importZoom($source, $language); break; case 'rsgallery2': JCommentsMigrationTool::importRSGallery2($source, $language); break; case 'hotornot2': JCommentsMigrationTool::importHotOrNot2($source, $language); break; case 'easycomments': JCommentsMigrationTool::importEasyComments($source, $language); break; case 'musicbox': JCommentsMigrationTool::importMusicBox($source, $language); break; case 'jreviews': JCommentsMigrationTool::importJReviews($source, $language); break; case 'tutorials': JCommentsMigrationTool::importTutorialsComments($source, $language); break; case 'idoblog': JCommentsMigrationTool::importIDoBlogComments($source, $language); break; case 'sobi2reviews': JCommentsMigrationTool::importSobi2Reviews($source, $language); break; case 'jreactions': JCommentsMigrationTool::importJReactions($source, $language); break; case 'virtuemart': JCommentsMigrationTool::importVirtueMart($source, $language); break; case 'jxtendedcomments': JCommentsMigrationTool::importJXtendedComments($source, $language); break; case 'chronocomments': JCommentsMigrationTool::importChronoComments($source, $language); break; case 'akobook': JCommentsMigrationTool::importAkoBook($source, $language); break; case 'jambook': JCommentsMigrationTool::importJamBook($source, $language); break; case 'k2': JCommentsMigrationTool::importK2($source, $language); break; case 'smartblog': JCommentsMigrationTool::importSmartBlog($source, $language); break; case 'yvcomment': JCommentsMigrationTool::importYvComment($source, $language); break; case 'zimb': JCommentsMigrationTool::importZimbComment($source, $language); break; case 'rdbscomment': JCommentsMigrationTool::importRDBSComment($source, $language); break; case 'lyftenbloggie': JCommentsMigrationTool::importLyftenBloggie($source, $language); break; case 'webee': JCommentsMigrationTool::importWebeeComment($source, $language); break; case 'resource': JCommentsMigrationTool::importResourceComments($source, $language); break; case 'jacomment': JCommentsMigrationTool::importJAComment($source, $language); break; case 'tpdugg': JCommentsMigrationTool::importTPDuggComments($source, $language); break; case 'zoo': JCommentsMigrationTool::importZooComments($source, $language); break; case 'beeheard': JCommentsMigrationTool::importBeeHeardComments($source, $language); break; case 'jmylife': JCommentsMigrationTool::importJMyLifeComments($source, $language); break; case 'muscol': JCommentsMigrationTool::importMusicCollectionsComments($source, $language); break; case 'rscomments': JCommentsMigrationTool::importRSComments($source, $language); break; } $cnt = JCommentsMigrationTool::countCommentsBySource($source); } if ($cnt > 0) { JCommentsMigrationTool::updateParent($source); $message = sprintf(JText::_('A_IMPORT_DONE'), $cnt); } else { $message = JText::_('A_IMPORT_FAILED'); } return $message; }