static function save_general_mailing_list($type = 'course_students') { $db = JFactory::getDBO(); //XXX checkar q no existe ya $comp_params = JComponentHelper::getParams('com_joomdle'); $ml = $comp_params->get('mailing_list_integration'); $type_str = JoomdleHelperMailinglist::get_type_str($type); switch ($ml) { case 'acymailing': $list_id = JoomdleHelperAcymailing::save_list(JText::_('COM_JOOMDLE_GENERAL') . $type_str, JText::_('COM_JOOMDLE_LIST_FOR_ALL') . " " . $type_str); break; default: // No component selected, do nothing return; } // Add to joomdle table $mlist = new JObject(); $mlist->course_id = 0; $mlist->list_id = $list_id; $mlist->type = $type; $status = $db->insertObject('#__joomdle_mailinglists', $mlist); // Add all type members to list JoomdleHelperMailinglist::add_general_list_members($type); }